Compare commits

...

182 Commits

Author SHA1 Message Date
Ruslan Baidan 4d2dabfc64
Merge remote-tracking branch 'origin/master' into feature/remove-db-abstract
* origin/master: (153 commits)
  Update the client version with the operational risks fix.
  Added the new version 2.12.7
  Added the data path global const to use it in all the places.
  Update issue templates
  Update bug_report.md
  Updated the frontoffice dependency with the fix of snapshots creation.
  Added setting up the project the PROJECT_ROOT const, update the core dependency where the const is used.
  Updated the client dependency with a deliverable generation fix.
  Update the client dependency with the profile removal fix.
  Changing the script permissions.
  Updated the import anrs script permission and the clients db upgrade parameter.
  [WSL]Updated FO install
  [WSL]Updated Full install
  [WSL]Updated README
  [WSL] Typo
  [WSL]Fixed stats-service install
  [WSL]Updated stats-service install
  [WSL]Added missing npm install
  [WSL]Updated WSL Full install
  [WSL]Updated WSL Full install
  ...

# Conflicts:
#	composer.json
#	composer.lock
2023-11-17 13:50:07 +01:00
Ruslan Baidan bcbc8c67ad
Update the client version with the operational risks fix. 2023-11-14 15:26:39 +01:00
Ruslan Baidan fda59cb068
Added the new version 2.12.7 2023-10-25 07:49:34 +02:00
Ruslan Baidan a841068f60
Added the data path global const to use it in all the places. 2023-10-24 11:34:21 +02:00
Ruslan Baidan 8ad3daa8e9
Update issue templates 2023-10-19 10:16:18 +02:00
Ruslan Baidan 7febaf90a4
Update bug_report.md
Updated the issue report name.
2023-10-19 10:09:48 +02:00
Ruslan Baidan 4b52ee0208
Updated the frontoffice dependency with the fix of snapshots creation. 2023-10-11 14:43:25 +02:00
Ruslan Baidan a599661190
Added setting up the project the PROJECT_ROOT const, update the core dependency where the const is used. 2023-10-10 12:11:29 +02:00
Ruslan Baidan 4c5c2931e6
Updated the client dependency with a deliverable generation fix. 2023-09-18 10:48:43 +02:00
Ruslan Baidan 22ed670d8e
Update the client dependency with the profile removal fix. 2023-06-20 17:20:33 +02:00
Ruslan Baidan 231b4193a7 Changing the script permissions. 2023-06-13 08:13:37 +00:00
Ruslan Baidan fac269091c
Updated the import anrs script permission and the clients db upgrade parameter. 2023-06-13 10:05:28 +02:00
Juan Rocha ddca7f3434
[WSL]Updated FO install 2023-04-18 12:02:19 +02:00
Juan Rocha 611b1c28a0
[WSL]Updated Full install 2023-04-18 11:33:28 +02:00
Juan Rocha 99848c0b1c
[WSL]Updated README 2023-04-18 11:10:46 +02:00
Juan Rocha 9a94ba8c4d
[WSL] Typo 2023-04-18 11:10:19 +02:00
Juan Rocha 716769ac68
[WSL]Fixed stats-service install 2023-04-18 11:02:15 +02:00
Juan Rocha 167a912568
[WSL]Updated stats-service install 2023-04-18 10:45:14 +02:00
Juan Rocha cecca24c38
[WSL]Added missing npm install 2023-04-18 10:25:42 +02:00
Juan Rocha fe4bff4a7a
[WSL]Updated WSL Full install 2023-04-18 09:59:24 +02:00
Juan Rocha 317480ed26
[WSL]Updated WSL Full install 2023-04-18 09:52:13 +02:00
Juan Rocha c4bec38520
[WSL]Fixed poetry path 2023-04-17 15:36:51 +02:00
Juan Rocha 195e75d9b7
[WSL]Updated poetry install URL 2023-04-17 15:23:00 +02:00
Juan Rocha e669a2e4bc
[WSL]Fixed poetry path 2023-04-17 15:04:24 +02:00
Juan Rocha ff9450d471
[WSL]Updated install FO script 2023-04-17 14:43:18 +02:00
Ruslan Baidan f7da8e4b08
Updated the changelog and dependencies. 2023-03-24 10:38:17 +01:00
Ruslan Baidan c1d49abb21
Removed the .gitkeep from data import files dir and added the doc. 2023-03-22 15:22:13 +01:00
Ruslan Baidan cbd9fab73a
Updated the dependencies and composer installation script. 2023-03-22 14:34:45 +01:00
Ruslan Baidan f64266c363
Update INSTALL.rhel7.9.md
Added the installation detail about php version.
2023-03-22 10:07:26 +01:00
Ruslan Baidan 8d0492e134
Update INSTALL.ubuntu2004.md 2023-03-14 17:48:48 +01:00
Ruslan Baidan ab7f8ecd2e
Update INSTALL.debian10.md
Updated the documentation with the php settings.
2023-03-14 17:48:15 +01:00
Ruslan Baidan 859a2214fd
Update INSTALL.ubuntu2004.md
Added the php configuration settings in the installation doc.
2023-03-14 17:46:14 +01:00
Ruslan Baidan b6412d4e41
Update INSTALL.rhel7.md
Added the php settings in the documentation.
2023-03-14 17:44:55 +01:00
Ruslan Baidan e778ff2d18
Update INSTALL.rhel7.9.md
Updated the php installation instructions.
2023-03-14 17:43:43 +01:00
Ruslan Baidan f7a218f1fa Added the lates dependencies chagnes. 2023-03-09 15:22:13 +01:00
Ruslan Baidan 9749d7e7ef Fixed the xdebug config. 2023-03-09 11:29:37 +01:00
Ruslan Baidan e1b371b0e4 Updated the dependency. 2023-03-08 17:22:58 +01:00
Ruslan Baidan 327a0d033a
Update releases.yml
Added the option "--ignore-platform-req=php"
2023-03-08 17:18:26 +01:00
Ruslan Baidan b290870655
Update php.yml
Reverted the option "--ignore-platform-req=php"
2023-03-08 17:17:59 +01:00
Ruslan Baidan 833bc7df5b
Update php.yml
Removed the "--ignore-platform-req=php" as for install it is not needed.
2023-03-08 17:17:11 +01:00
Ruslan Baidan dbd8d13559
Update releases.yml
Changed the usage of php8.1
2023-03-08 17:16:35 +01:00
Ruslan Baidan 9bb0835599
Update php.yml
Changed the use of php8.1 and added --ignore-platform-req=php (as a temporary solution as of problems with proxy manager).
2023-03-08 17:13:27 +01:00
Ruslan Baidan df87650fba Updated the dependencies and installation of php dependencies in update-all.sh 2023-03-08 17:09:27 +01:00
Ruslan Baidan 90e66143c8 Updated the dependencies with use of php8 2023-03-08 14:31:18 +01:00
Ruslan Baidan c1e5cd1b13 Changed the vagrant bootstrap to use ubuntu 22.04. 2023-03-07 17:58:29 +01:00
Ruslan Baidan 344b3498b8
Merge remote-tracking branch 'origin/feature/php8'
* origin/feature/php8:
  Updated packages of composer
  Fixed semantic of composer.json
  Updated composer packages
  Added update PO Files script
  Removed duplicated twoFactorAuthEnforced option flag
  Updated composer.lock
  Added the support of php8 for vagrant and composer loading of the specific packages.

# Conflicts:
#	composer.lock
2023-03-07 08:04:20 +01:00
Ruslan Baidan 40abd19089
Updated the client dependency with the migration fix. 2023-03-06 16:27:26 +01:00
Ruslan Baidan e3bf42e565
Updated the dependencies with the new release tags. 2023-03-06 15:53:58 +01:00
Ruslan Baidan 8e1af808ec
Update INSTALL.rhel7.9.md
Removed cache cleanup option in update-all command as this is a fresh install guide.
2023-03-06 14:41:59 +01:00
Ruslan Baidan cb18c98a9a
Update INSTALL.rhel7.9.md
Changed the exact tag use recommendation to the latest one.
2023-03-06 14:39:13 +01:00
Ruslan Baidan d02c121468
Merge pull request #475 from monarc-project/feature/background-import
Feature / Background Import
2023-02-07 14:58:38 +01:00
Ruslan Baidan e63de5f7ac
Merge remote-tracking branch 'origin/master' into feature/background-import
* origin/master:
  Updated the client dependency with objects import fixes.
  Updated the client dependency with the measures import fixes.
  Updated the client dependency with the import fix.
  Updated the client dependency with the import fix.
  Updated the client dependency with the import fix.
  Updated the client dependency with the import fix.
  Updated the composer.lock with the doctrine verison.
  Release of the v2.12.15-p2.

# Conflicts:
#	composer.lock
2023-02-07 14:58:21 +01:00
Ruslan Baidan 2a6f3fd0d0
Updated the client dependency with objects import fixes. 2023-02-03 15:37:38 +01:00
Ruslan Baidan dd7f6a008c
Updated the client dependency with the measures import fixes. 2023-02-02 11:33:34 +01:00
Ruslan Baidan 19b6c5a1d4
Updated the client dependency with the measures import fixes. 2023-02-02 11:28:54 +01:00
Ruslan Baidan b1680339ec
Updated the client dependency with the measures import fixes. 2023-02-02 10:42:01 +01:00
Ruslan Baidan e1b0337095
Updated the client dependency with the import fix. 2023-01-27 13:01:02 +01:00
Ruslan Baidan 306db87b1e
Updated the client dependency with the import fix. 2023-01-27 11:50:33 +01:00
Ruslan Baidan 7424b189ed
Updated the client dependency with the import fix. 2023-01-27 11:48:57 +01:00
Ruslan Baidan d18674d4b8
Updated the client dependency with the import fix. 2023-01-27 10:47:13 +01:00
Ruslan Baidan 1fbbcaaf78
Added the whole data dir to the gitignore. 2023-01-26 19:18:25 +01:00
Ruslan Baidan f5b6c8b734
Removed the .gitignore files as they are dropped by the cache cleanup. 2023-01-26 19:15:48 +01:00
Ruslan Baidan ee166a7d98
Updated the client dependency with the import fix. 2023-01-26 12:54:30 +01:00
Juan Rocha f5cc8f51e7 Merge remote-tracking branch 'origin/master' into feature/php8 2023-01-17 10:43:19 +01:00
Ruslan Baidan 4d3e6c4187
Updated the composer.lock with the doctrine verison. 2023-01-17 09:37:35 +01:00
Ruslan Baidan 79fc6467f3
Turned off the background import by default, added the script to run the import for all clients. 2023-01-13 14:42:11 +01:00
Ruslan Baidan c2623bf0f1
Release of the v2.12.15-p2. 2023-01-12 10:33:09 +01:00
Ruslan Baidan 7f923907eb
Added the config and upload path for importing files. 2023-01-12 10:30:10 +01:00
Juan Rocha 602be25f44 Updated packages of composer 2023-01-05 10:44:18 +01:00
Juan Rocha 445a62b8b8 Fixed semantic of composer.json 2023-01-05 10:44:00 +01:00
Juan Rocha a47d58e64e Merge remote-tracking branch 'origin/master' into feature/php8 2023-01-05 09:41:58 +01:00
Cédric Bonhomme 0a7fcacdc6
Updated zm-client dependency. 2023-01-05 08:38:41 +01:00
Juan Rocha 7c61a96994 Updated composer packages 2023-01-03 15:44:50 +01:00
Juan Rocha d56eba2a1c Merge remote-tracking branch 'origin/master' into feature/php8 2023-01-03 15:42:50 +01:00
Ruslan Baidan 1fbb68c2c5
Release of the new version 2.12.5 2022-12-21 10:26:10 +01:00
Ruslan Baidan 279f074aa3
Updated the core package with the import fix when multiple thems with the same label. 2022-11-24 16:42:46 +01:00
jfrocha a67eb53bc1 Added update PO Files script 2022-11-23 12:48:53 +01:00
jfrocha 9eb0e913c7 Removed duplicated twoFactorAuthEnforced option flag 2022-11-22 10:52:25 +01:00
jfrocha df7dc2ab9f Updated composer.lock 2022-11-22 10:04:37 +01:00
Ruslan Baidan b4438ac52c
Updated the client dependency with the import fix of threat duplication. 2022-11-17 11:46:33 +01:00
jfrocha 037eafbd05 Updated logos 2022-11-16 15:35:47 +01:00
Ruslan Baidan 2a0a209811
Added the support of php8 for vagrant and composer loading of the specific packages. 2022-11-15 11:52:23 +01:00
Ruslan Baidan 5cabb27fb7
Added the example config parameter to enforce 2FA. 2022-11-15 11:48:50 +01:00
Ruslan Baidan 84ded7122e
New Monarc version release v2.12.4 2022-11-11 16:52:24 +01:00
Ruslan Baidan 80f345267a
Increased the vagrant disc size. 2022-11-09 11:42:49 +01:00
Ruslan Baidan 89e9de4a15
Updated the client's dependency with the import duplication issues fix. 2022-10-20 13:31:38 +02:00
Ruslan Baidan 054401714c
Updated the client version with the multiple clients' record fix. 2022-10-14 11:49:42 +02:00
Ruslan Baidan df061a18b4
Fixed the object categories language validation. 2022-10-13 16:23:56 +02:00
Ruslan Baidan b8b3e8d0cc
Fixed the issue of the analysis creation. 2022-10-12 13:06:03 +02:00
Ruslan Baidan 35a44c2b2e
Fixed the cache cleanup in the update script. 2022-10-12 11:50:21 +02:00
Ruslan Baidan cb084d6a21
Update releases.yml
Fixed the ng-client latest tag fetching.
2022-10-10 16:31:56 +02:00
Ruslan Baidan 94bf5123e9
Fixed the last tag determining 2022-10-10 16:24:02 +02:00
Ruslan Baidan d787c6524c
Updated the core version with the models fix. 2022-10-07 12:15:27 +02:00
Ruslan Baidan 2821df94d7
Update releases.yml
Switched to v2 of checkout.
2022-10-06 16:26:29 +02:00
Ruslan Baidan b4d34e7823
Update releases.yml
Test of use the latest release
2022-10-06 15:22:35 +02:00
Ruslan Baidan 0cb8fbb44b
Fixed the changelog message. 2022-10-06 10:41:10 +02:00
Ruslan Baidan 7f4bc44f60
Added the bug-fix to the release. 2022-10-06 10:23:39 +02:00
Ruslan Baidan 03cc0cca03
Added the new version information, updated the dependencies. 2022-10-06 08:55:13 +02:00
Ruslan Baidan bf539fb409
Update package.json
Removed the versions notion for the packages as we don't use it anymore.
2022-10-05 17:16:44 +02:00
Ruslan Baidan 7fe838ddeb
Update releases.yml
Added the checking out of the ng-x repos to the latest tag.
2022-10-05 17:16:00 +02:00
Ruslan Baidan cee00fd31d
Update releases.yml
Attempt to avoid submodules installation.
2022-10-05 16:53:00 +02:00
Ruslan Baidan 8856ef80b9
Update releases.yml
Separated the installation of ng-anr and ng-client to avoid the node_modules being installed twice.
2022-10-05 16:29:15 +02:00
Ruslan Baidan 7c0b2b3728
Update releases.yml
Added the installation of ng_client, ng_anr separately.
2022-10-05 15:54:37 +02:00
Ruslan Baidan 922c0b3d2b
Removed the deprecated tasks. 2022-10-05 15:23:04 +02:00
Ruslan Baidan 7b78f2a0b0
Removed the npm installation execution 2x times. 2022-10-05 10:31:56 +02:00
Cédric Bonhomme 92d131e461
updated zm-client 2022-09-19 16:09:58 +02:00
Cédric Bonhomme f42d9c30ad
updated composer.json 2022-09-15 16:43:16 +02:00
Cédric Bonhomme e64726f3ee
downgraded laminas-dependency-plugin 2022-08-30 09:34:47 +02:00
jerolomb a57daa4fee update zm-client to 2.12.1-p1 2022-08-30 09:22:35 +02:00
jerolomb 7edd4f467d update zm-client to 2.12.1-p1 2022-08-30 09:19:08 +02:00
Cédric Bonhomme 8d3aa6f9c3
chg: [dependencies] Updated ng-client to 2.12.2 (related to CVE-2022-31129). 2022-07-07 14:39:54 +02:00
Cédric Bonhomme 418a6c1fe4
updated ng-client 2022-07-07 12:42:37 +02:00
Cédric Bonhomme dea25935eb
chg: [dependencies] Updated zm-core to v2.12.1-p1.
Fixed the bug when we try to instantiate a global operational risk
and it was already linked to the same anr before.
(https://github.com/monarc-project/zm-core/commit/98c096f)
2022-07-04 10:50:03 +02:00
Cédric Bonhomme c27e4c8572
chg: [dependencies] Updated zm-core to 2.12.1. 2022-06-29 09:14:35 +02:00
Cédric Bonhomme 4392e77c57
new: [deployment] Updated installation instructions with the bundle generated by GitHub Actions. 2022-06-28 15:09:01 +02:00
Cédric Bonhomme 961c3fcb25
new: [deployment] installation instructions with the bundle generated by GitHub Actions. 2022-06-28 15:07:33 +02:00
Cédric Bonhomme 40db23fc6b
fix: [typo] fixed year in the dates. !minor 2022-06-27 16:22:20 +02:00
Cédric Bonhomme 9163ca6b49
chg: updated CHANGELOG with missing information concerning the
current release and a first fix for the next release. !minor
2022-06-27 16:15:42 +02:00
Cédric Bonhomme c1eaddd027
updated VERSION.json file !minor 2022-06-22 09:36:46 +02:00
Cédric Bonhomme cf663ecfe1
updated dependency to monarc/frontoffice. 2022-06-22 09:30:16 +02:00
Cédric Bonhomme f8c4262bab Merge branch 'master' of https://github.com/monarc-project/MonarcAppFO 2022-06-22 09:27:59 +02:00
Cédric Bonhomme f809ad4705
chg: [dependencies] Added new QRCode backend endroid/qr-code. 2022-06-22 09:26:35 +02:00
Ruslan Baidan 91725a6d2e
Updated the dependencies. 2022-06-21 14:46:56 +02:00
Cédric Bonhomme 0f9bf866a7
chg: [dependencies] updated zm-core and zm-client dependencies for ci release. 2022-06-20 14:41:57 +02:00
Cédric Bonhomme 81987d684c
!minor typo in changelog 2022-06-20 12:21:07 +02:00
Cedric 77786a7845
Merge pull request #443 from monarc-project/feature/compliance-scale
Feature/compliance scale
2022-06-20 10:09:28 +00:00
Cedric 81d5276604
Merge branch 'master' into feature/compliance-scale 2022-06-20 10:09:11 +00:00
Cédric Bonhomme 0e8e013954
Updated JavaScript requirements and PHP. 2022-06-20 12:05:52 +02:00
Cédric Bonhomme 336bac9baa Merge branch 'feature/2FA' into feature/compliance-scale 2022-06-20 10:05:07 +02:00
Cédric Bonhomme 3f8486b83a
chg: [dependencies] Updated JavaScript dependencies (ng-client). 2022-06-15 08:43:29 +02:00
Cédric Bonhomme 3bd4dccd37
chg: [dependencies] Updated PHP dependencies. 2022-06-15 08:42:59 +02:00
Cédric Bonhomme 75d132d778
chg: [ci-releases] Do not install dev packages. 2022-06-13 17:26:31 +02:00
Cedric 04aa6f638c
Merge pull request #434 from remil1000/ci-releases
Ci releases
2022-06-13 14:32:10 +00:00
Rémi Laurent a43cd0fae0
Merge branch 'monarc-project:master' into ci-releases 2022-06-13 16:15:16 +02:00
Cedric d0b4d400e7
Merge pull request #433 from monarc-project/dependabot/composer/guzzlehttp/guzzle-6.5.7
Bump guzzlehttp/guzzle from 6.5.6 to 6.5.7
2022-06-12 21:51:20 +00:00
dependabot[bot] 5c92edfcfb
Bump guzzlehttp/guzzle from 6.5.6 to 6.5.7
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 6.5.6 to 6.5.7.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/6.5.7/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/6.5.6...6.5.7)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-10 06:39:48 +00:00
Cédric Bonhomme 89bf9e8fe0
chg: [dependencies] updated laminas/laminas-stdlib. !minor 2022-06-08 14:31:12 +02:00
Cédric Bonhomme a2dfb1a41c
chg: [scripts] replaced zendframework by Laminas. !minor 2022-06-08 14:29:55 +02:00
Cédric Bonhomme bd2a76644d Merge branch 'master' into feature/2FA 2022-06-08 10:59:41 +02:00
Cédric Bonhomme 01ce8df10a xMerge branch 'master' of https://github.com/monarc-project/MonarcAppFO 2022-06-08 10:59:02 +02:00
Cédric Bonhomme 207378c3be
chg: [dependencies] Updated dependency monarc/frontoffice to v2.11.1-p17. 2022-06-08 10:58:50 +02:00
Juan Rocha 34216bde35 Merge remote-tracking branch 'origin/master' into feature/compliance-scale 2022-06-02 10:58:24 +02:00
Rémi Laurent 7d14134710 release pipeline working, ready to merge 2022-05-31 11:28:14 +02:00
Rémi Laurent 6dcda5c832 fixing typo 2022-05-30 16:28:40 +02:00
Rémi Laurent 061718bb43 trying will full error handling 2022-05-30 16:28:04 +02:00
Rémi Laurent bb1fd68994 using tagged version in package.json 2022-05-30 15:51:05 +02:00
Rémi Laurent 45b1a8f9ff checking ng_client checkout mechanism 2022-05-30 15:45:38 +02:00
Rémi Laurent 4c0a19bef7 full pipeline run test 2022-05-30 15:33:53 +02:00
Rémi Laurent 907cbc0a28 let's try to build tar.gz first 2022-05-30 15:31:37 +02:00
Rémi Laurent 76d3d73815 let's ignore error for the moment 2022-05-30 15:25:59 +02:00
Rémi Laurent 13a656617f sudo missing 2022-05-30 15:16:00 +02:00
Rémi Laurent 596f74e03a missing gettext for post tasks 2022-05-30 15:15:09 +02:00
Rémi Laurent 973e51933c npm madness 2022-05-30 15:11:51 +02:00
Rémi Laurent 23d460771d fetch tags 2022-05-30 15:09:45 +02:00
Rémi Laurent b728c2ee71 use origin php setup action 2022-05-30 15:07:47 +02:00
Rémi Laurent 5ef86725b8 need arg to be set 2022-05-30 15:04:01 +02:00
Rémi Laurent 1d1e4edf07 lets try without extension 2022-05-30 14:59:37 +02:00
Rémi Laurent fbdd629411 release packaging attempt 2022-05-30 14:55:16 +02:00
Cedric f4ac4053fc
Merge pull request #432 from monarc-project/dependabot/composer/guzzlehttp/guzzle-6.5.6
Bump guzzlehttp/guzzle from 6.5.5 to 6.5.6
2022-05-26 13:08:50 +00:00
dependabot[bot] 3caee64a17
Bump guzzlehttp/guzzle from 6.5.5 to 6.5.6
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 6.5.5 to 6.5.6.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/6.5.6/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/6.5.5...6.5.6)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-25 21:56:11 +00:00
Juan Rocha 027d52c9d3 Merge branch 'feature/2FA' into feature/compliance-scale 2022-05-19 12:58:44 +02:00
Cédric Bonhomme b0edd71877 Merge branch 'master' into feature/2FA 2022-05-19 12:13:19 +02:00
Cédric Bonhomme 1425232196
chg: [dependencies] updated composer.lock. 2022-05-19 12:13:00 +02:00
Cédric Bonhomme 166cb01080
deleed package-lock.json from master 2022-05-19 11:29:43 +02:00
Cédric Bonhomme 0684ef636b
deleted package-lock.json 2022-05-19 11:28:44 +02:00
Cédric Bonhomme 77da8592f0
fixed conflicts 2022-05-19 11:24:15 +02:00
Cedric 2508028c6d
Merge pull request #431 from monarc-project/dependabot/npm_and_yarn/async-3.2.3
Bump async from 3.2.0 to 3.2.3
2022-05-19 09:16:04 +00:00
dependabot[bot] 431dab2a52
Bump async from 3.2.0 to 3.2.3
Bumps [async](https://github.com/caolan/async) from 3.2.0 to 3.2.3.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/master/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v3.2.0...v3.2.3)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-19 09:13:41 +00:00
Cedric 74d0db0ceb
Merge pull request #430 from monarc-project/dependabot/npm_and_yarn/grunt-1.5.2
Bump grunt from 1.4.1 to 1.5.2
2022-05-19 09:13:18 +00:00
Cédric Bonhomme 8f2de36833 Merge branch 'master' of https://github.com/monarc-project/MonarcAppFO 2022-05-19 11:09:02 +02:00
Cédric Bonhomme 2ff77c0bcb chg: [CSS] updated path of the flags. 2022-05-19 11:08:43 +02:00
Cédric Bonhomme 62027f673f
chg: [CSS] updated path of the flags. 2022-05-19 11:08:19 +02:00
Cédric Bonhomme 0d99987033
new: [2FA] added instanceName config for the label of 2fa QRCode 2022-05-18 08:50:39 +02:00
Cédric Bonhomme 823eec5d3b
chg: updated Grunt. !minor 2022-05-17 15:42:22 +02:00
jfrocha 54cd572bb9 Added new tag for soa scale in 5th deliverable 2022-05-16 14:18:34 +02:00
Ruslan Baidan 0c3a2d7916
Update INSTALL.rhel7.9.md
Updated the paths and added monarc.conf link.
2022-05-12 09:52:47 +02:00
Juan Rocha bc7017b293 Merge branch 'feature/metadata-assets' of https://github.com/monarc-project/MonarcAppFO into feature/metadata-assets 2022-05-10 09:50:16 +02:00
Juan Rocha c48165b724 Merge branch 'feature/2FA' into feature/metadata-assets 2022-05-06 08:51:58 +02:00
Juan Rocha 6180424b31 Merge branch 'feature/2FA' into feature/metadata-assets 2022-05-05 15:25:55 +02:00
Cédric Bonhomme e042b2544d
[2FA] added robthree/twofactorauth dependency. 2022-05-05 14:59:47 +02:00
jfrocha ef56170eac Add new tag [$TABLE_ASSET_CONTEXT] in 3th deliverables 2022-05-02 15:06:21 +02:00
dependabot[bot] ce775109f9
Bump grunt from 1.4.1 to 1.5.2
Bumps [grunt](https://github.com/gruntjs/grunt) from 1.4.1 to 1.5.2.
- [Release notes](https://github.com/gruntjs/grunt/releases)
- [Changelog](https://github.com/gruntjs/grunt/blob/main/CHANGELOG)
- [Commits](https://github.com/gruntjs/grunt/compare/v1.4.1...v1.5.2)

---
updated-dependencies:
- dependency-name: grunt
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-27 10:39:43 +00:00
60 changed files with 3164 additions and 7524 deletions

View File

@ -1,8 +1,9 @@
---
name: Bug report
name: Issue or bug report
about: Create a report to help us improve
labels: bug, potential-bug, needs triage
projects: MONARC Development Overview
title: ''
labels: bug, needs triage, potential-bug
assignees: ''
---

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@ -34,7 +34,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.1'
extensions: imagick, intl, xml, mysql, bcmath #optional, setup extensions
ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
coverage: xdebug #optional, setup coverage driver
@ -44,7 +44,7 @@ jobs:
run: composer validate
- name: Install PHP dependencies
run: composer install --prefer-dist --no-progress --no-suggest
run: composer install --prefer-dist --no-progress --no-suggest --ignore-platform-req=php
- name: Create synlinks for MONARC PHP modules
run: |

108
.github/workflows/releases.yml vendored Normal file
View File

@ -0,0 +1,108 @@
name: MonarcAppFO releases
on:
push:
branches: [ 'master' ]
tags: [ 'v*.*', 'v*.*.*', 'v*.*.*-*' ]
pull_request:
branches: [ 'master' ]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [ "16.x" ]
php-version: [ "8.1" ]
steps:
- uses: actions/checkout@v2
- name: install deps
run: sudo apt-get update && sudo apt install -y gettext
# PHP
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2.3
extensions: bcmath
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install PHP dependencies
run: composer install --prefer-dist --no-progress --no-suggest --no-dev --ignore-platform-req=php
- name: Symlink Monarc modules
run: |
mkdir -p module/Monarc
ln -s ../../vendor/monarc/core module/Monarc/Core
ln -s ../../vendor/monarc/frontoffice module/Monarc/FrontOffice
# javascript
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: oprypin/find-latest-tag@v1
with:
repository: monarc-project/ng-anr
releases-only: true
id: ng_anr_lasttag
- run: echo "ng-anr is at version ${{ steps.ng_anr_lasttag.outputs.tag }}"
- name: Install ng-anr
uses: actions/checkout@v3
with:
repository: monarc-project/ng-anr
ref: ${{ steps.ng_anr_lasttag.outputs.tag }}
path: './node_modules/ng_anr'
- uses: oprypin/find-latest-tag@v1
with:
repository: monarc-project/ng-client
releases-only: true
id: ng_client_lasttag
- run: echo "ng-client is at version ${{ steps.ng_client_lasttag.outputs.tag }}"
- name: Install ng-client
uses: actions/checkout@v3
with:
repository: monarc-project/ng-client
ref: ${{ steps.ng_client_lasttag.outputs.tag }}
path: './node_modules/ng_client'
- name: Install ng-client dependencies
run: |
cd node_modules/ng_client
npm ci
# final "cleanup"
- name: post job
run: |
bash -ex ./scripts/link_modules_resources.sh
bash -ex ./scripts/compile_translations.sh
# prepare release
- name: Get repository name
id: repository
run: echo "::set-output name=pathref::$(echo '${{ github.repository }}' | cut -d'/' -f2)-$(echo '${{ github.ref_name }}' | sed 's/[^[:alnum:]\.-]/_/g')"
- name: create artifact archive
run: |
tar --exclude .git --exclude .github -zcf '../${{ steps.repository.outputs.pathref }}.tar.gz' .
- name: release
uses: softprops/action-gh-release@v1
with:
files: |
../${{ steps.repository.outputs.pathref }}.tar.gz
fail_on_unmatched_files: true
if: startsWith(github.ref, 'refs/tags/')

3
.gitignore vendored
View File

@ -1,4 +1,3 @@
nbproject
._*
.buildpath
.DS_Store
@ -8,7 +7,6 @@ nbproject
*.cache
migrations
!tests/migrations
*.sublime-*
vagrant/.vagrant/
vagrant/*.log
vendor/
@ -23,3 +21,4 @@ npm-debug.log
node_modules/
bin/
data/*
.docker/mariaDb/data/*

10
AUTHORS
View File

@ -22,11 +22,11 @@ Thomas Metois
# Copyright holders
- Copyright (C) 2016-2022 Jérôme Lombardi - https://github.com/jerolomb
- Copyright (C) 2016-2022 Juan Rocha - https://github.com/jfrocha
- Copyright (C) 2016-2022 SMILE gie securitymadein.lu
- Copyright (C) 2017-2022 Cédric Bonhomme - https://www.cedricbonhomme.org
- Copyright (C) 2016-2023 Jérôme Lombardi - https://github.com/jerolomb
- Copyright (C) 2016-2023 Juan Rocha - https://github.com/jfrocha
- Copyright (C) 2016-2023 Luxembourg House of Cybersecurity
- Copyright (C) 2017-2023 Cédric Bonhomme - https://www.cedricbonhomme.org
- Copyright (C) 2016-2017 Guillaume Lesniak
- Copyright (C) 2016-2017 Thomas Metois
- Copyright (C) 2016-2017 Jérôme De Almeida
- Copyright (C) 2019-2022 Ruslan Baidan - https://github.com/ruslanbaydan
- Copyright (C) 2019-2023 Ruslan Baidan - https://github.com/ruslanbaidan

View File

@ -1,6 +1,103 @@
MONARC Changelog
================
## 2.12.7 (2023-10-25)
### Enhancement
- [Alternative to 2FA QR code](https://github.com/monarc-project/MonarcAppFO/issues/505)
- [Add context info to the list of analysis panel](https://github.com/monarc-project/MonarcAppFO/issues/506)
### Fix
- [Global dashboard max calculation error](https://github.com/monarc-project/MonarcAppFO/issues/507)
- [[FrontOffice] Fixed the operational risks import from CSV](https://github.com/monarc-project/MonarcAppFO/issues/484)
## 2.12.6 (2023-03-24)
### Enhancement
- Analysis background import.
- Support of PHP8.
- Specific error message on a wrong password input of analysis import.
### Fix
- Recommendations modification from the Knowledge Base when due date is set.
- Recommendations modification fix of loading the linked recommendation set.
## 2.12.5 (2022-12-21)
### Enhancement
- Rebranding of Monarc app (logos, titles) according to the "Cases" -> "NC3" move.
- Improved the analyses import speed.
### Fix
- Fixed the autocomplete for passwords. Password filling for Import brakes the execution.
- Record of processing activities processor creation JS error.
- Fixed the long names displaying for assets (responsive view).
- Dashboard fixes.
- Added the possibility to modify the threat's theme.
- Updated and added missing translations.
## 2.12.4 (2022-11-11)
### Enhancement
- Implemented new dashboard chart views and a curve line that represents the average number tendency.
- Added a possibility to enforce all the instance's users to enable 2-Factor Authentication.
## 2.12.3 (2022-10-06)
### Enhancement
- Link multiple specific models per client.
- Added a possibility to import assets in the library from CSV files.
### Fix
- Error when adding a tag to instantiate an object.
([#459](https://github.com/monarc-project/MonarcAppFO/issues/459)).
## 2.12.2 (2022-06-29)
### Fix
- Error when exporting analysis with Statement of Applicability
([#445](https://github.com/monarc-project/MonarcAppFO/issues/445)).
## 2.12.1 (2022-06-22)
### Enhancement
- [Added new QRCode backend endroid/qr-code](https://github.com/monarc-project/zm-client/commit/406471458a9c729d2d4a9b677cc7a8518d640ab1)
NTP access to time.google.com:123 (NTP check removed) and api.qrserver.com is
no more needed: QRCode generation is local.
## 2.12.0 (2022-06-20)
### New
- [compliance scale](https://github.com/monarc-project/MonarcAppFO/discussions/439);
- [metadata assets](https://github.com/monarc-project/MonarcAppFO/discussions/437);
- [two-factor authentication](https://github.com/monarc-project/MonarcAppFO/discussions/442).
### Fix
- [Stats provider] removed the leading slash in the URI
([e7dfba1](https://github.com/monarc-project/zm-client/commit/e7dfba1cf64322bc3e83630df6729b525d7d5c8d))
## 2.11.1 (2021-10-28)
### New

View File

@ -54,12 +54,18 @@ Especially by setting a strong root password.
</VirtualHost>
## 1.4. Install PHP and dependencies
## 1.4. Install PHP and dependencies (It's recommended to install php8 or php8.1 and all the modules of the version).
# apt-get install php7.3 libapache2-mod-php7.3 php7.3-curl php7.3-gd php7.3-mysql php-apcu php7.3-xml php7.3-mbstring php7.3-intl php-imagick php7.3-zip
$ curl -sS https://getcomposer.org/installer -o composer-setup.php
# php composer-setup.php --install-dir=/usr/bin --filename=composer
## Apply PHP configuration settings in your php.ini
https://github.com/monarc-project/MonarcAppFO/blob/master/vagrant/bootstrap.sh#L22-L26
## 1.5 Apply all changes
@ -75,7 +81,9 @@ Especially by setting a strong root password.
$ git clone https://github.com/monarc-project/MonarcAppFO.git /var/lib/monarc/fo
$ cd /var/lib/monarc/fo
$ mkdir -p data/cache
$ mkdir -p data/DoctrineORMModule/Proxy
$ mkdir -p data/LazyServices/Proxy
$ mkdir -p data/import/files
$ composer install -o
# chown -R www-data:www-data data/
# chmod -R 700 data/

View File

@ -33,7 +33,7 @@ Installation on RHEL 7.9
[root@monarc ~]# yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
```
## Install PHP 7.4, required modules & dependencies from Remi's repository:
## Install PHP 7.4, required modules & dependencies from Remi's repository (PHP8 or PHP8.1 can be used from Monarc v2.15.6):
```bash
[root@monarc ~]# yum install php74.x86_64 php74-php.x86_64 \
@ -108,12 +108,14 @@ CREATE DATABASE monarc_common DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_ge
## Install MONARC
```bash
[root@monarc ~]# mkdir -p /var/lib/monarc/fo
[root@monarc ~]# mkdir -p /var/www/html/monarc/fo
[root@monarc ~]# yum install git
[root@monarc ~]# git clone https://github.com/monarc-project/MonarcAppFO.git /var/lib/monarc/fo
[root@monarc ~]# cd /var/lib/monarc/fo
[root@monarc ~]# git clone https://github.com/monarc-project/MonarcAppFO.git /var/www/html/monarc/fo
[root@monarc ~]# cd /var/www/html/monarc/fo
[root@monarc fo]# mkdir -p data/cache
[root@monarc fo]# mkdir -p data/LazyServices/Proxy
[root@monarc fo]# mkdir -p data/DoctrineORMModule/Proxy
[root@monarc fo]# mkdir -p data/import/files
[root@monarc fo]# chmod -R g+w data
[root@monarc fo]# yum remove php-5.4.16 php-cli-5.4.16 php-common-5.4.16
```
@ -126,24 +128,28 @@ CREATE DATABASE monarc_common DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_ge
[root@monarc fo]# rm composer-setup.php
```
## Install PHP 7.4
## Install PHP. Php 7.4 (command below) can be a working solutin but recommended 8.0 or 8.1 from Monarc v2.15.6
```bash
[root@monarc fo]# yum install php74-php-cli
```
## Configure path
## Configure path (can be adjusted depending on the php version)
```bash
[root@monarc fo]# export PATH=$PATH:/opt/remi/php74/root/usr/bin:/opt/remi/php74/root/usr/sbin
[root@monarc fo]# ln -s /usr/bin/php74 /usr/bin/php
```
## Update
## Apply PHP configuration settings in your php.ini
https://github.com/monarc-project/MonarcAppFO/blob/master/vagrant/bootstrap.sh#L22-L26
## Update (The option --ignore-platform-req=php is used in case of php8.1)
```bash
[root@monarc fo]# composer self-update
[root@monarc fo]# composer install -o
[root@monarc fo]# composer install -o --ignore-platform-req=php
```
## Prepare Backend
@ -183,7 +189,7 @@ grant create, delete, insert, select, update, drop, alter on monarc_cli.* to 'mo
## Set up database connection
```bash
[root@monarc fo]# cd /var/lib/monarc/fo/config/autoload/
[root@monarc fo]# cd /var/www/html/monarc/fo/config/autoload/
[root@monarc autoload]# cp local.php.dist local.php
[root@monarc autoload]# vi local.php
```
@ -204,8 +210,11 @@ Reference: <https://github.com/nodesource/distributions>
## Set git branch
For the commnad below, the {LATEST-RELEASE-TAG} parameter can be found here (for example: v2.12.5-p4):
https://github.com/monarc-project/MonarcAppFO/releases
```bash
[root@monarc fo]# git branch --set-upstream-to=origin/master v2.11.1
[root@monarc fo]# git branch --set-upstream-to=origin/master {LATEST-RELEASE-TAG}
```
## Reconfigure SSH
@ -219,7 +228,7 @@ StrictHostKeyChecking no
## Trigger the update script
```bash
[root@monarc fo]# ./scripts/update-all.sh -c
[root@monarc fo]# ./scripts/update-all.sh
```
## Set permissions on MONARC website folder
@ -237,6 +246,7 @@ StrictHostKeyChecking no
[root@monarc conf.d]# systemctl stop firewalld
[root@monarc conf.d]# systemctl restart httpd.service
```
monarc.conf can be found [here](https://github.com/monarc-project/MonarcAppFO/blob/master/INSTALL/INSTALL.rhel7.md#configure-virtual-host)
## Create MONARC Admin User

View File

@ -60,6 +60,11 @@ Add php to $PATH
$ export PATH=$PATH:/opt/remi/php72/root/usr/bin:/opt/remi/php72/root/usr/sbin
Apply PHP configuration settings in your php.ini
https://github.com/monarc-project/MonarcAppFO/blob/master/vagrant/bootstrap.sh#L22-L26
Clone the repository and invoke composer
$ git clone https://github.com/monarc-project/MonarcAppFO.git fo

View File

@ -81,6 +81,7 @@ Especially by setting a strong root password.
$ mkdir -p data/cache
$ mkdir -p data/DoctrineORMModule/Proxy
$ mkdir -p data/LazyServices/Proxy
$ mkdir -p data/import/files
$ chmod -R g+w data
$ composer install -o

View File

@ -0,0 +1,209 @@
Installation on Ubuntu 20.04
============================
# 1. Install LAMP & dependencies
## 1.1. Install system dependencies
```bash
$ sudo apt-get install zip unzip git gettext curl
```
Some might already be installed.
## 1.2. Install MariaDB
```bash
$ sudo apt-get install mariadb-client mariadb-server
```
### Secure the MariaDB installation
```bash
$ sudo mysql_secure_installation
```
Especially by setting a strong root password.
## 1.3. Install Apache2
```bash
$ sudo apt-get install apache2
```
### Enable modules, settings, and default of SSL in Apache
```bash
$ sudo a2dismod status
$ sudo a2enmod ssl
$ sudo a2enmod rewrite
$ sudo a2enmod headers
```
### Apache Virtual Host
```conf
<VirtualHost _default_:80>
ServerAdmin admin@localhost.lu
ServerName monarc.local
DocumentRoot /var/lib/monarc/fo/public
<Directory /var/lib/monarc/fo/public>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
<IfModule mod_headers.c>
Header always set X-Content-Type-Options nosniff
Header always set X-XSS-Protection "1; mode=block"
Header always set X-Robots-Tag none
Header always set X-Frame-Options SAMEORIGIN
</IfModule>
SetEnv APP_ENV "development"
</VirtualHost>
```
## 1.4. Install PHP and dependencies (It's recommended to install php8 or php8.1 and all the modules of the version)
```bash
$ sudo apt-get install php apache2 libapache2-mod-php php-curl php-gd php-mysql php-pear php-xml php-mbstring php-intl php-imagick php-zip php-bcmath
```
## Apply PHP configuration settings in your php.ini
https://github.com/monarc-project/MonarcAppFO/blob/master/vagrant/bootstrap.sh#L22-L26
## 1.5 Apply all changes
```bash
$ sudo systemctl restart apache2.service
```
# 2. Installation of MONARC
```bash
PATH_TO_MONARC='/var/lib/monarc/fo'
PATH_TO_MONARC_DATA='/var/lib/monarc/fo-data'
MONARC_VERSION=$(curl --silent -H 'Content-Type: application/json' https://api.github.com/repos/monarc-project/MonarcAppFO/releases/latest | jq -r '.tag_name')
MONARCFO_RELEASE_URL="https://github.com/monarc-project/MonarcAppFO/releases/download/$MONARC_VERSION/MonarcAppFO-$MONARC_VERSION.tar.gz"
$ mkdir -p /var/lib/monarc/releases/
# Download release
$ curl -sL $MONARCFO_RELEASE_URL -o /var/lib/monarc/releases/`basename $MONARCFO_RELEASE_URL`
# Create release directory
$ mkdir /var/lib/monarc/releases/`basename $MONARCFO_RELEASE_URL | sed 's/.tar.gz//'`
# Unarchive release
$ tar -xzf /var/lib/monarc/releases/`basename $MONARCFO_RELEASE_URL` -C /var/lib/monarc/releases/`basename $MONARCFO_RELEASE_URL | sed 's/.tar.gz//'`
# Create release symlink
$ ln -s /var/lib/monarc/releases/`basename $MONARCFO_RELEASE_URL | sed 's/.tar.gz//'` $PATH_TO_MONARC
# Create data and caches directories
$ mkdir -p $PATH_TO_MONARC_DATA/cache $PATH_TO_MONARC_DATA/DoctrineORMModule/Proxy $PATH_TO_MONARC_DATA/LazyServices/Proxy $PATH_TO_MONARC_DATA/import/files
# Create data directory symlink
$ ln -s $PATH_TO_MONARC_DATA $PATH_TO_MONARC/data
```
## 2.2. Databases
### Create a MariaDB user for MONARC
With the root MariaDB user create a new user for MONARC:
```sql
MariaDB [(none)]> CREATE USER 'monarc'@'%' IDENTIFIED BY 'password';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON * . * TO 'monarc'@'%';
MariaDB [(none)]> FLUSH PRIVILEGES;
```
### Create 2 databases
In your MariaDB interpreter:
```sql
MariaDB [(none)]> CREATE DATABASE monarc_cli DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
MariaDB [(none)]> CREATE DATABASE monarc_common DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
```
* monarc_common contains models and data created by CASES;
* monarc_cli contains all client risk analyses. Each analysis is based on CASES
model of monarc_common.
### Initializes the database
```bash
$ mysql -u monarc -ppassword monarc_common < db-bootstrap/monarc_structure.sql
$ mysql -u monarc -ppassword monarc_common < db-bootstrap/monarc_data.sql
```
### Database connection
Create the configuration file:
```bash
$ sudo cp ./config/autoload/local.php.dist ./config/autoload/local.php
```
And configure the database connection:
```php
return [
'doctrine' => [
'connection' => [
'orm_default' => [
'params' => [
'host' => 'localhost',
'user' => 'monarc',
'password' => 'password',
'dbname' => 'monarc_common',
],
],
'orm_cli' => [
'params' => [
'host' => 'localhost',
'user' => 'monarc',
'password' => 'password',
'dbname' => 'monarc_cli',
],
],
],
],
];
```
# 3. Migrating MONARC DB
```bash
$ php ./vendor/robmorgan/phinx/bin/phinx migrate -c module/Monarc/FrontOffice/migrations/phinx.php
$ php ./vendor/robmorgan/phinx/bin/phinx migrate -c module/Monarc/Core/migrations/phinx.php
```
# 4. Create initial user
```bash
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
```
The username is *admin@admin.localhost* and the password is *admin*.
# 5. Statistics for Global Dashboard
If you would like to use the global dashboard stats feature, you need to
configure a Stats Service instance on your server.
The architecture, installation instructions and GitHub project can be found here:
- https://www.monarc.lu/documentation/stats-service/master/architecture.html
- https://www.monarc.lu/documentation/stats-service/master/installation.html
- https://github.com/monarc-project/stats-service
The communication of access to the StatsService is performed on each instance of
FrontOffice (clients).

View File

@ -1,12 +1,11 @@
MONARC - Method for an Optimised aNAlysis of Risks by CASES
===========================================================
MONARC
======
[![Latest Release](https://img.shields.io/github/release/monarc-project/MonarcAppFO.svg?style=flat-square)](https://github.com/monarc-project/MonarcAppFO/releases/latest)
![License](https://img.shields.io/github/license/monarc-project/MonarcAppFO.svg?style=flat-square)
![Contributors](https://img.shields.io/github/contributors/monarc-project/MonarcAppFO.svg?style=flat-square)
![Stars](https://img.shields.io/github/stars/monarc-project/MonarcAppFO.svg?style=flat-square)
[![Workflow](https://github.com/monarc-project/MonarcAppFO/workflows/build/badge.svg)](https://github.com/monarc-project/MonarcAppFO/actions?query=build)
[![Twitter](https://img.shields.io/twitter/follow/MONARCProject.svg?style=social&label=Follow)](https://twitter.com/MONARCproject)
Introduction
@ -76,14 +75,14 @@ License
This software is licensed under
[GNU Affero General Public License version 3](http://www.gnu.org/licenses/agpl-3.0.html)
- Copyright (C) 2016-2022 Jérôme Lombardi - https://github.com/jerolomb
- Copyright (C) 2016-2022 Juan Rocha - https://github.com/jfrocha
- Copyright (C) 2016-2022 SMILE gie securitymadein.lu
- Copyright (C) 2017-2022 Cédric Bonhomme - https://www.cedricbonhomme.org
- Copyright (C) 2016-2023 Luxembourg House of Cybersecurity
- Copyright (C) 2016-2023 Jérôme Lombardi - https://github.com/jerolomb
- Copyright (C) 2016-2023 Juan Rocha - https://github.com/jfrocha
- Copyright (C) 2017-2023 Cédric Bonhomme - https://www.cedricbonhomme.org
- Copyright (C) 2016-2017 Guillaume Lesniak
- Copyright (C) 2016-2017 Thomas Metois
- Copyright (C) 2016-2017 Jérôme De Almeida
- Copyright (C) 2019-2022 Ruslan Baidan - https://github.com/ruslanbaydan
- Copyright (C) 2019-2023 Ruslan Baidan - https://github.com/ruslanbaidan
For more information, [the list of authors and contributors](AUTHORS) is available.
@ -96,4 +95,4 @@ These objects are available through the
If a specific author wants to license an object under a different license,
a pull request can be requested.
You can find more information about MOSP on the
[dedicated repository](https://github.com/CASES-LU/MOSP).
[dedicated repository](https://github.com/NC3-LU/MOSP).

View File

@ -8,7 +8,7 @@ Last stable version of MONARC always provides security updates.
If you think you have found a potential security issue in MONARC, do not open
directly a GitHub issue. Please email us. You can contact
[info@cases.lu](mailto:info@cases.lu).
[opensource@nc3.lu](mailto:opensource@nc3.lu).
You can also specify how you would like to be credited for your finding
(commit message, release notes or blog post for the new release). We will

View File

@ -1 +1 @@
{"major":2, "minor":11, "hotfix":1}
{"major":2, "minor":12, "hotfix":7}

View File

@ -41,12 +41,13 @@
}
],
"require": {
"php": "^7.4",
"php": "^7.4 || ^8.0",
"ext-json": "*",
"ext-pdo": "*",
"ext-bcmath": "*",
"monarc/frontoffice": "^2.10.3",
"monarc/core": "^2.10.3",
"ext-openssl": "*",
"monarc/frontoffice": "^2.12.6",
"monarc/core": "^2.12.6",
"laminas/laminas-mvc": "^3.1",
"laminas/laminas-di": "^3.1",
"laminas/laminas-permissions-rbac": "^3.0",
@ -54,12 +55,14 @@
"laminas/laminas-i18n": "^2.9",
"symfony/console": "^5.0",
"laminas/laminas-dependency-plugin": "^2.0",
"laminas/laminas-mvc-middleware": "^2.2"
"laminas/laminas-mvc-middleware": "^2.2",
"robthree/twofactorauth": "^1.8",
"endroid/qr-code": "^4.4"
},
"require-dev": {
"roave/security-advisories": "dev-master",
"phpunit/phpunit": "^8.3",
"laminas/laminas-test": "^3.4"
"roave/security-advisories": "dev-latest",
"phpunit/phpunit": "^9.5",
"laminas/laminas-test": "^4.5"
},
"autoload-dev": {
"psr-4": {

4787
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -5,26 +5,30 @@
*
* @see https://github.com/zendframework/ZFTool
*/
$env = getenv('APPLICATION_ENV') ?: 'production';
$env = getenv('APP_ENV') ?: 'production';
$appConfDir = getenv('APP_CONF_DIR') ?: null;
defined('PROJECT_ROOT') or define('PROJECT_ROOT', __DIR__ . '/../');
if ($env !== 'testing') {
$confPaths = ['config/autoload/{,*.}{global,local}.php'];
}
$dataPath = 'data';
if (!empty($appConfDir)) {
$confPaths[] = $appConfDir . '/local.php';
$dataPath = $appConfDir . '/data';
if (!is_dir($dataPath . '/cache')) {
if (!mkdir($concurrentDirectory = $dataPath . '/cache') && !is_dir($concurrentDirectory)) {
if (is_dir(PROJECT_ROOT . 'data/cache')) {
$dataPath = PROJECT_ROOT . 'data';
} elseif (!mkdir($concurrentDirectory = $dataPath . '/cache') && !is_dir($concurrentDirectory)) {
throw new \RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory));
}
}
}
defined('DATA_PATH') or define('DATA_PATH', $dataPath);
return [
'modules' => [
'Laminas\Mvc\Console',
'Laminas\I18n',
'Laminas\Mail',
'Laminas\Log',

View File

@ -15,56 +15,56 @@ use Doctrine\DBAL\Driver\PDO\MySQL\Driver;
use Monarc\Core\Service\DoctrineCacheServiceFactory;
use Monarc\Core\Service\DoctrineLoggerFactory;
$appconfdir = getenv('APP_CONF_DIR') ?? '';
$datapath = "data";
if (!empty($appconfdir)) {
$datapath = $appconfdir . '/data';
$dataPath = 'data';
if (defined('DATA_PATH')) {
$dataPath = DATA_PATH;
} elseif (getenv('APP_CONF_DIR')) {
$dataPath = getenv('APP_CONF_DIR') . '/data';
}
return array(
return [
// DOCTRINE CONF
'service_manager' => array(
'factories' => array(
'service_manager' => [
'factories' => [
'doctrine.cache.mycache' => DoctrineCacheServiceFactory::class,
'doctrine.monarc_logger' => DoctrineLoggerFactory::class,
),
),
'doctrine' => array(
'connection' => array(
'orm_default' => array(
],
],
'doctrine' => [
'connection' => [
'orm_default' => [
'driverClass' => Driver::class,
'params' => array(
'params' => [
'host' => 'localhost',
'port' => 3306,
'user' => 'root',
'password' => '',
'dbname' => 'monarc_common',
'charset' => 'utf8',
'driverOptions' => array(
'driverOptions' => [
PDO::ATTR_STRINGIFY_FETCHES => false,
PDO::ATTR_EMULATE_PREPARES => false,
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
),
),
),
'orm_cli' => array(
],
],
],
'orm_cli' => [
'driverClass' => Driver::class,
'params' => array(
'params' => [
'host' => 'localhost',
'port' => 3306,
'user' => 'root',
'password' => '',
'dbname' => 'monarc_cli',
'charset' => 'utf8',
'driverOptions' => array(
'driverOptions' => [
PDO::ATTR_STRINGIFY_FETCHES => false,
PDO::ATTR_EMULATE_PREPARES => false,
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
),
),
),
),
],
],
],
],
/*'migrations_configuration' => array(
'orm_default' => array(
'name' => 'Monarc Migrations',
@ -81,49 +81,49 @@ return array(
'column' => 'version',
),
),*/
'entitymanager' => array(
'orm_default' => array(
'connection' => 'orm_default',
'configuration' => 'orm_default'
),
'orm_cli' => array(
'connection' => 'orm_cli',
'entitymanager' => [
'orm_default' => [
'connection' => 'orm_default',
'configuration' => 'orm_default',
],
'orm_cli' => [
'connection' => 'orm_cli',
'configuration' => 'orm_cli',
),
),
],
],
// https://github.com/beberlei/DoctrineExtensions/blob/master/config/mysql.yml
'configuration' => array(
'orm_default' => array(
'metadata_cache' => 'mycache',
'query_cache' => 'mycache',
'result_cache' => 'mycache',
'driver' => 'orm_default', // This driver will be defined later
'generate_proxies' => true,
'proxy_dir' => $datapath.'/DoctrineORMModule/Proxy',
'proxy_namespace' => 'DoctrineORMModule\Proxy',
'filters' => array(),
'datetime_functions' => array(),
'string_functions' => array(),
'numeric_functions' => array(),
'second_level_cache' => array(),
'sql_logger' => 'doctrine.monarc_logger',
),
'orm_cli' => array(
'metadata_cache' => 'mycache',
'query_cache' => 'mycache',
'result_cache' => 'mycache',
'driver' => 'orm_cli', // This driver will be defined later
'generate_proxies' => true,
'proxy_dir' => $datapath.'/DoctrineORMModule/Proxy',
'proxy_namespace' => 'DoctrineORMModule\Proxy',
'filters' => array(),
'datetime_functions' => array(),
'string_functions' => array(),
'numeric_functions' => array(),
'second_level_cache' => array(),
'sql_logger' => 'doctrine.monarc_logger',
),
),
),
'configuration' => [
'orm_default' => [
'metadata_cache' => 'mycache',
'query_cache' => 'mycache',
'result_cache' => 'mycache',
'driver' => 'orm_default', // This driver will be defined later
'generate_proxies' => true,
'proxy_dir' => $dataPath . '/DoctrineORMModule/Proxy',
'proxy_namespace' => 'DoctrineORMModule\Proxy',
'filters' => [],
'datetime_functions' => [],
'string_functions' => [],
'numeric_functions' => [],
'second_level_cache' => [],
'sql_logger' => 'doctrine.monarc_logger',
],
'orm_cli' => [
'metadata_cache' => 'mycache',
'query_cache' => 'mycache',
'result_cache' => 'mycache',
'driver' => 'orm_cli', // This driver will be defined later
'generate_proxies' => true,
'proxy_dir' => $dataPath . '/DoctrineORMModule/Proxy',
'proxy_namespace' => 'DoctrineORMModule\Proxy',
'filters' => [],
'datetime_functions' => [],
'string_functions' => [],
'numeric_functions' => [],
'second_level_cache' => [],
'sql_logger' => 'doctrine.monarc_logger',
],
],
],
// END DOCTRINE CONF
);
];

View File

@ -10,6 +10,9 @@
* in ZendSkeletonApplication. This is a good practice, as it prevents sensitive
* credentials from accidentally being committed into version control.
*/
$appdir = getenv('APP_DIR') ?: '/var/lib/monarc';
$package_json = json_decode(file_get_contents('./package.json'), true);
return [
@ -95,6 +98,9 @@ return [
'from' => 'info@monarc.lu',
],
'instanceName' => 'Development', // for example a short URL or client name from ansible
'twoFactorAuthEnforced' => false,
'terms' => 'https://my.monarc.lu/terms.html',
'monarc' => [
@ -102,10 +108,17 @@ return [
'cliModel' => 'generic',
],
'twoFactorAuthEnforced' => false,
'mospApiUrl' => 'https://objects.monarc.lu/api/',
'statsApi' => [
'baseUrl' => 'http://127.0.0.1:5005',
'apiKey' => '',
],
'import' => [
'uploadFolder' => $appdir . '/data/import/files',
'isBackgroundProcessActive' => false,
],
];

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

4808
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "MONARC",
"version": "2.11.1",
"version": "2.12.7",
"description": "Monarc front office application",
"private": true,
"repository": {
@ -10,11 +10,11 @@
"author": "CASES",
"license": "GNU Affero General Public License version 3",
"dependencies": {
"ng_anr": "git+https://github.com/monarc-project/ng-anr.git#master",
"ng_client": "git+https://github.com/monarc-project/ng-client.git#master"
"ng_anr": "git+https://github.com/monarc-project/ng-anr.git",
"ng_client": "git+https://github.com/monarc-project/ng-client.git"
},
"devDependencies": {
"grunt": "~1.4.0",
"grunt-cli": "~1.4.2"
"grunt": "~1.5.3",
"grunt-cli": "~1.4.3"
}
}

View File

@ -44,7 +44,7 @@ return array(
),
'environments' => array(
'default_migration_table' => 'phinxlog',
'default_database' => 'cli',
'default_environment' => 'cli',
'cli' => array(
'adapter' => 'mysql',
'host' => '$SQLHOST',

View File

@ -43,7 +43,7 @@ cd dialogs/ && find ../../../node_modules/ng_client/views/dialogs -maxdepth 1 -n
cd ../../js/ && find ../../node_modules/ng_client/src -name "*" -exec ln -s {} \; 2>/dev/null
cd ../css/ && find ../../node_modules/ng_client/css -name "*" -exec ln -s {} \; 2>/dev/null
cd ../img/ && find ../../node_modules/ng_client/img -name "*" -exec ln -s {} \; 2>/dev/null
cd ../flags/ && find ../../node_modules/ng_client/node_modules/ng-country-flags/dist/flags -mindepth 1 -type d -exec ln -s {} \; 2>/dev/null
cd ../flags/ && find ../../node_modules/ng_client/node_modules/flag-icons/flags -mindepth 1 -type d -exec ln -s {} \; 2>/dev/null
cd ../js/
mkdir -p anr

View File

@ -0,0 +1,19 @@
#! /usr/bin/env bash
# local use:
#for conf_file_path in /home/vagrant/monarc/config/*/local.php
for conf_file_path in /var/www/*/local.php
do
config_path=$(dirname "$conf_file_path")
export APP_CONF_DIR=$config_path
echo "[$(date)] Import analyses for: $config_path."
# local use:
#./bin/console monarc:import-analyses >> data/background_import.log
/var/lib/monarc/fo/bin/console monarc:import-analyses >> "$config_path"/data/background_import.log
echo "[$(date)] Finished."
done

View File

@ -9,53 +9,53 @@ forceClearCache=0
isDevEnv=0
while getopts "hbcd" option
do
case $option in
h)
echo -e "Update or install all Monarc modules, frontend views and migrate database."
echo -e "\t-b\tbypass migrate database"
echo -e "\t-c\tforce clear cache"
echo -e "\t-h\tdisplay this message"
exit 1
;;
b)
bypass=1
echo "Migrate database don't execute !!!"
;;
c)
forceClearCache=1
;;
d)
isDevEnv=1
esac
case $option in
h)
echo -e "Update or install all Monarc modules, frontend views and migrate database."
echo -e "\t-b\tbypass migrate database"
echo -e "\t-c\tforce clear cache"
echo -e "\t-h\tdisplay this message"
exit 1
;;
b)
bypass=1
echo "Migrate database don't execute !!!"
;;
c)
forceClearCache=1
;;
d)
isDevEnv=1
esac
done
checkout_to_latest_tag() {
if [ -d $1 ]; then
pushd $1
git fetch --tags
tag=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $tag -b $tag
git pull origin $tag
popd
fi
if [ -d $1 ]; then
pushd $1
git fetch --tags
tag=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $tag -b $tag
git pull origin $tag
popd
fi
}
migrate_module() {
if [[ -d $1 ]]; then
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./$1/migrations/phinx.php
fi
if [[ -d $1 ]]; then
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./$1/migrations/phinx.php
fi
}
if [[ ! -f "config/autoload/local.php" && $bypass -eq 0 ]]; then
echo "Configure Monarc (config/autoload/local.php)"
exit 1
echo "Configure Monarc (config/autoload/local.php)"
exit 1
fi
git pull
if [ $? != 0 ]; then
echo "A problem occurred while retrieving remote files from repository."
exit 1
echo "A problem occurred while retrieving remote files from repository."
exit 1
fi
./scripts/check_composer.sh
@ -64,38 +64,36 @@ if [[ $? -eq 1 ]]; then
fi
if [[ $isDevEnv -eq 0 ]]; then
composer ins -o --no-dev
composer ins -o --no-dev --no-cache --ignore-platform-req=php
else
composer ins
composer ins --ignore-platform-req=php
fi
pathCore="module/Monarc/Core"
pathFO="module/Monarc/FrontOffice"
if [[ $bypass -eq 0 ]]; then
if [ -e data/backup/credentialsmysql.cnf ]; then
backupdir=data/backup/$(date +"%Y%m%d_%H%M%S")
mkdir $backupdir
echo -e "${GREEN}Dumping database to $backupdir...${NC}"
mysqldump --defaults-file=data/backup/credentialsmysql.cnf --databases monarc_common > $backupdir/dump-common.sql
mysqldump --defaults-file=data/backup/credentialsmysql.cnf --databases monarc_cli > $backupdir/dump-cli.sql
else
echo -e "${GREEN}Database backup not configured. Skipping.${NC}"
fi
if [ -e data/backup/credentialsmysql.cnf ]; then
backupdir=data/backup/$(date +"%Y%m%d_%H%M%S")
mkdir $backupdir
echo -e "${GREEN}Dumping database to $backupdir...${NC}"
mysqldump --defaults-file=data/backup/credentialsmysql.cnf --databases monarc_common > $backupdir/dump-common.sql
mysqldump --defaults-file=data/backup/credentialsmysql.cnf --databases monarc_cli > $backupdir/dump-cli.sql
else
echo -e "${GREEN}Database backup not configured. Skipping.${NC}"
fi
migrate_module $pathCore
migrate_module $pathFO
migrate_module $pathCore
migrate_module $pathFO
fi
if [[ -d node_modules && -d node_modules/ng_anr ]]; then
if [[ -d node_modules/ng_anr/.git ]]; then
checkout_to_latest_tag node_modules/ng_client
checkout_to_latest_tag node_modules/ng_anr
else
npm update
fi
else
npm ci
if [[ -d node_modules/ng_anr/.git ]]; then
checkout_to_latest_tag node_modules/ng_client
checkout_to_latest_tag node_modules/ng_anr
else
npm update
fi
fi
cd node_modules/ng_client
@ -106,19 +104,18 @@ cd ../..
./scripts/compile_translations.sh
if [[ $forceClearCache -eq 1 ]]; then
# Clear doctrine cache
# Move to Monarc/Core Module.php
php ./public/index.php orm:clear-cache:metadata
php ./public/index.php orm:clear-cache:query
php ./public/index.php orm:clear-cache:result
# Clear Laminas cache
rm -rf data/cache/*
rm -rf data/DoctrineORMModule/Proxy/*
rm -rf data/LazyServices/Proxy/*
# Clear ZF2 cache
touch ./data/cache/upgrade && chmod 777 ./data/cache/upgrade
# Clear Laminas cache
touch ./data/cache/upgrade && chmod 777 ./data/cache/upgrade
fi
if [[ $forceClearCache -eq 0 && $bypass -eq 0 ]]; then
# Clear ZF2 cache
touch ./data/cache/upgrade && chmod 777 ./data/cache/upgrade
# Clear Laminas cache
touch ./data/cache/upgrade && chmod 777 ./data/cache/upgrade
fi
./scripts/update_config_variables.sh

View File

@ -0,0 +1,10 @@
#!/bin/bash
pushd node_modules/ng_client
if [[ -d po && -f po/template.pot ]]; then
for f in po/*.po; do
msgmerge --backup=none -U "$f" po/template.pot
msgattrib --no-obsolete --clear-fuzzy --empty -o "$f" "$f"
done;
fi

8
vagrant/Vagrantfile vendored
View File

@ -10,8 +10,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "bento/ubuntu-20.04"
config.disksize.size = "50GB"
config.vm.box = "bento/ubuntu-22.04"
config.disksize.size = "100GB"
config.vm.provision "shell", privileged: false, path: "bootstrap.sh"
# Disable automatic box update checking. If you disable this, then
@ -56,8 +56,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# vb.gui = true
#
# # Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--name", "MONARC FO - Ubuntu 20.04 - DEV"]
vb.customize ["modifyvm", :id, "--memory", "4092"]
vb.customize ["modifyvm", :id, "--name", "MONARC FO - Ubuntu 22.04 - DEV"]
end
#
# View the documentation for the provider you're using for more

View File

@ -24,13 +24,9 @@ post_max_size=50M
max_execution_time=100
max_input_time=223
memory_limit=512M
# session expires in 1 week:
session.gc_maxlifetime=604800
session.gc_probability=1
session.gc_divisor=1000
PHP_INI=/etc/php/7.4/apache2/php.ini
XDEBUG_CFG=/etc/php/7.4/apache2/conf.d/20-xdebug.ini
PHP_INI=/etc/php/8.1/apache2/php.ini
XDEBUG_CFG=/etc/php/8.1/apache2/conf.d/20-xdebug.ini
MARIA_DB_CFG=/etc/mysql/mariadb.conf.d/50-server.cnf
# Stats service
@ -59,9 +55,9 @@ sudo apt-get update && sudo apt-get upgrade -y
echo -e "\n--- Install base packages… ---\n"
sudo apt-get -y install vim zip unzip git gettext curl gsfonts > /dev/null
echo -e "\n--- Install MariaDB specific packages and settings… ---\n"
sudo apt-get -y install mariadb-server mariadb-client > /dev/null
sudo apt -y install mariadb-server mariadb-client
# Secure the MariaDB installation (especially by setting a strong root password)
sudo systemctl restart mariadb.service > /dev/null
sleep 5
@ -88,11 +84,14 @@ expect -f - <<-EOF
send -- "y\r"
expect eof
EOF
sudo apt-get purge -y expect php-xdebug > /dev/null 2>&1
sudo apt-get purge -y expect > /dev/null 2>&1
echo -e "\n--- Configuring… ---\n"
sudo sed -i "s/skip-external-locking/#skip-external-locking/g" $MARIA_DB_CFG
sudo sed -i "s/.*bind-address.*/bind-address = 0.0.0.0/" $MARIA_DB_CFG
sudo sed -i "s/.*character-set-server.*/character-set-server = utf8mb4/" $MARIA_DB_CFG
sudo sed -i "s/.*collation-server.*/collation-server = utf8mb4_general_ci/" $MARIA_DB_CFG
echo -e "\n--- Setting up our MariaDB user for MONARC… ---\n"
sudo mysql -u root -p$DBPASSWORD_ADMIN -e "CREATE USER '$DBUSER_MONARC'@'%' IDENTIFIED BY '$DBPASSWORD_MONARC';"
@ -100,20 +99,27 @@ sudo mysql -u root -p$DBPASSWORD_ADMIN -e "GRANT ALL PRIVILEGES ON * . * TO '$DB
sudo mysql -u root -p$DBPASSWORD_ADMIN -e "FLUSH PRIVILEGES;"
sudo systemctl restart mariadb.service > /dev/null
echo -e "\n--- Installing Apache… ---\n"
sudo apt install apache2 -y
echo -e "\n--- Installing PHP-specific packages… ---\n"
sudo apt-get -y install php apache2 libapache2-mod-php php-curl php-gd php-mysql php-pear php-apcu php-xml php-mbstring php-intl php-imagick php-zip php-xdebug php-bcmath > /dev/null
sudo apt-get install -y php8.1 php8.1-cli php8.1-common php8.1-mysql php8.1-zip php8.1-gd php8.1-mbstring php8.1-curl php8.1-xml php8.1-bcmath php8.1-intl php8.1-imagic php8.1-xdebug > /dev/null
echo -e "\n--- Configuring PHP… ---\n"
for key in upload_max_filesize post_max_size max_execution_time max_input_time memory_limit
do
sudo sed -i "s/^\($key\).*/\1 = $(eval echo \${$key})/" $PHP_INI
done
# session expires in 1 week:
sudo sed -i "s/^\(session\.gc_maxlifetime\).*/\1 = $(eval echo 604800)/" $PHP_INI
sudo sed -i "s/^\(session\.gc_probability\).*/\1 = $(eval echo 1)/" $PHP_INI
sudo sed -i "s/^\(session\.gc_divisor\).*/\1 = $(eval echo 1000)/" $PHP_INI
echo -e "\n--- Configuring Xdebug for development ---\n"
sudo bash -c "cat << EOF > $XDEBUG_CFG
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.mode=debug
xdebug.discover_client_host=1
xdebug.idekey=IDEKEY
EOF"
@ -132,7 +138,7 @@ if [ $? -ne 0 ]; then
echo "\nERROR: unable to install composer\n"
exit 1;
fi
# sudo composer self-update
sudo composer self-update
echo -e "\n--- Installing MONARC… ---\n"
cd $PATH_TO_MONARC
@ -152,6 +158,10 @@ cd $PATH_TO_MONARC
# Front-end
echo -e "\n--- Installation of Node, NPM… ---\n"
curl -sL https://deb.nodesource.com/setup_15.x | sudo bash -
sudo apt-get install -y nodejs npm
mkdir -p node_modules
cd node_modules
if [ ! -d "ng_client" ]; then
@ -199,15 +209,9 @@ echo -e "\n--- Restarting Apache… ---\n"
sudo systemctl restart apache2.service > /dev/null
echo -e "\n--- Installation of Node, NPM and Grunt… ---\n"
curl -sL https://deb.nodesource.com/setup_15.x | sudo bash -
sudo apt-get install -y nodejs
echo -e "\n--- Installing the stats service… ---\n"
sudo apt-get -y install postgresql python3-pip python3-venv
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 10
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 20
sudo apt-get -y install postgresql python3 python3-pip python3-venv
sudo -u postgres psql -c "CREATE USER $STATS_DB_USER WITH PASSWORD '$STATS_DB_PASSWORD';"
sudo -u postgres psql -c "ALTER USER $STATS_DB_USER WITH SUPERUSER;"
@ -352,6 +356,11 @@ return [
'baseUrl' => 'http://127.0.0.1:$STATS_PORT',
'apiKey' => '$apiKey',
],
'import' => [
'uploadFolder' => '$appdir/data/import/files',
'isBackgroundProcessActive' => false,
],
];
EOF
@ -368,6 +377,7 @@ echo -e "\n--- Creating cache folders for backend… ---\n"
mkdir -p $PATH_TO_MONARC/data/cache
mkdir -p $PATH_TO_MONARC/data/LazyServices/Proxy
mkdir -p $PATH_TO_MONARC/data/DoctrineORMModule/Proxy
mkdir -p $PATH_TO_MONARC/data/import/files
echo -e "\n--- Adjusting user mod… ---\n"

View File

@ -36,9 +36,7 @@ wsl -s Ubuntu
In WLS shell:
```bash
$ cd ~
$ git clone https://github.com/monarc-project/MonarcAppFO
$ bash ./MonarcAppFO/wsl/installFO.sh
$ curl -sSL https://raw.githubusercontent.com/monarc-project/MonarcAppFO/master/wsl/installFO.sh | bash
```
Once the VM will be configured by WSL, go to the address in the browser
@ -57,10 +55,7 @@ accessible on```http://localhost:5005```
In WLS shell:
```bash
$ cd ~
$ git clone https://github.com/monarc-project/MonarcAppFO
$ git clone https://github.com/monarc-project/MonarcAppBO
$ bash ./MonarcAppFO/wsl/installFull.sh
$ curl -sSL https://raw.githubusercontent.com/monarc-project/MonarcAppFO/master/wsl/installFull.sh | bash
```
Once the VM will be configured by WSL:

View File

@ -21,20 +21,19 @@ max_execution_time=100
max_input_time=223
memory_limit=512M
PHP_INI=/etc/php/7.4/apache2/php.ini
XDEBUG_CFG=/etc/php/7.4/apache2/conf.d/20-xdebug.ini
PHP_INI=/etc/php/8.1/apache2/php.ini
XDEBUG_CFG=/etc/php/8.1/apache2/conf.d/20-xdebug.ini
MARIA_DB_CFG=/etc/mysql/mariadb.conf.d/50-server.cnf
# Stats service
STATS_PATH=$HOME/stats-service
STATS_HOST='0.0.0.0'
STATS_PORT='5005'
STATS_DB_NAME='statsservice'
STATS_DB_USER='sqlmonarcuser'
STATS_DB_PASSWORD="sqlmonarcuser"
STATS_DB_USER='statsserviceuser'
STATS_DB_PASSWORD="password"
STATS_SECRET_KEY="$(openssl rand -hex 32)"
echo -e "\n--- Installing now… ---\n"
sudo chmod 755 $HOME
sudo apt-get update > /dev/null 2>&1
echo -e "\n--- Updating packages list… ---\n"
@ -47,7 +46,7 @@ sudo apt-get -y install vim zip unzip git gettext curl gsfonts > /dev/null
echo -e "\n--- Install MariaDB specific packages and settings… ---\n"
sudo apt-get -y install mariadb-server mariadb-client > /dev/null
# Secure the MariaDB installation (especially by setting a strong root password)
sudo service mysql restart > /dev/null
sudo service mariadb restart > /dev/null
sleep 5
sudo mysql_secure_installation > /dev/null 2>&1 <<EOF
@ -68,10 +67,10 @@ echo -e "\n--- Setting up our MariaDB user for MONARC… ---\n"
sudo mysql -u root -p$DBPASSWORD_ADMIN -e "CREATE USER '$DBUSER_MONARC'@'%' IDENTIFIED BY '$DBPASSWORD_MONARC';"
sudo mysql -u root -p$DBPASSWORD_ADMIN -e "GRANT ALL PRIVILEGES ON * . * TO '$DBUSER_MONARC'@'%';"
sudo mysql -u root -p$DBPASSWORD_ADMIN -e "FLUSH PRIVILEGES;"
sudo service mysql restart > /dev/null
sudo service mariadb restart > /dev/null
echo -e "\n--- Installing PHP-specific packages… ---\n"
sudo apt-get -y install php apache2 libapache2-mod-php php-curl php-gd php-mysql php-pear php-apcu php-xml php-mbstring php-intl php-imagick php-zip php-xdebug php-bcmath > /dev/null 2>&1
sudo apt-get -y install php apache2 libapache2-mod-php php-curl php-gd php-mysql php-pear php-apcu php-xml php-mbstring php-intl php-zip php-xdebug php-bcmath > /dev/null 2>&1
echo -e "\n--- Configuring PHP… ---\n"
for key in upload_max_filesize post_max_size max_execution_time max_input_time memory_limit
@ -104,8 +103,9 @@ fi
echo -e "\n--- Installing MONARC… ---\n"
git clone --config core.fileMode=false https://github.com/monarc-project/MonarcAppFO $PATH_TO_MONARC > /dev/null 2>&1
cd $PATH_TO_MONARC
git config core.fileMode false
echo -e "\n--- Installing the dependencies… ---\n"
composer ins > /dev/null 2>&1
@ -170,7 +170,7 @@ sudo service apache2 restart > /dev/null
echo -e "\n--- Installation of Node, NPM and Grunt… ---\n"
curl -sL https://deb.nodesource.com/setup_15.x | sudo bash - > /dev/null 2>&1
sudo apt-get install -y nodejs > /dev/null 2>&1
sudo apt-get install -y nodejs npm > /dev/null 2>&1
sudo npm install -g grunt-cli > /dev/null 2>&1
@ -183,49 +183,23 @@ sudo -u postgres psql -c "CREATE USER $STATS_DB_USER WITH PASSWORD '$STATS_DB_PA
sudo -u postgres psql -c "ALTER USER $STATS_DB_USER WITH SUPERUSER;" > /dev/null
cd ~
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python > /dev/null
echo 'export PATH="$PATH:$HOME/.poetry/bin"' >> ~/.bashrc
curl -sSL https://install.python-poetry.org | python3 - > /dev/null
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc
echo 'export FLASK_APP=runserver.py' >> ~/.bashrc
echo 'export STATS_CONFIG=production.py' >> ~/.bashrc
git clone https://github.com/monarc-project/stats-service $STATS_PATH > /dev/null 2>&1
cd $STATS_PATH
export PATH="$PATH:$HOME/.poetry/bin"
export PATH="$PATH:$HOME/.local/bin"
export FLASK_APP=runserver.py
export STATS_CONFIG=production.py
npm ci > /dev/null 2>&1
poetry install --no-dev > /dev/null
poetry install > /dev/null 2>&1
cp instance/production.py.cfg instance/production.py
bash -c "cat << EOF > $STATS_PATH/instance/production.py
HOST = '$STATS_HOST'
PORT = $STATS_PORT
DEBUG = False
TESTING = False
INSTANCE_URL = 'http://127.0.0.1:$STATS_PORT'
ADMIN_EMAIL = 'info@cases.lu'
ADMIN_URL = 'https://www.cases.lu'
REMOTE_STATS_SERVER = 'https://dashboard.monarc.lu'
DB_CONFIG_DICT = {
'user': '$STATS_DB_USER',
'password': '$STATS_DB_PASSWORD',
'host': 'localhost',
'port': 5432,
}
DATABASE_NAME = '$STATS_DB_NAME'
SQLALCHEMY_DATABASE_URI = 'postgresql://{user}:{password}@{host}:{port}/{name}'.format(
name=DATABASE_NAME, **DB_CONFIG_DICT
)
SQLALCHEMY_TRACK_MODIFICATIONS = False
SECRET_KEY = '$STATS_SECRET_KEY'
LOG_PATH = './var/stats.log'
MOSP_URL = 'https://objects.monarc.lu'
EOF"
sed -i "s/\"postgres\"/\"$STATS_DB_USER\"/" instance/production.py
sed -i "s/password/$STATS_DB_PASSWORD/" instance/production.py
sed -i "s/SECRET_KEY.*/SECRET_KEY = \"$STATS_SECRET_KEY\"/" instance/production.py
FLASK_APP=runserver.py poetry run flask db_create
FLASK_APP=runserver.py poetry run flask db_init
@ -289,9 +263,14 @@ return [
],
'statsApi' => [
'baseUrl' => 'http://127.0.0.1:$STATS_PORT',
'baseUrl' => 'http://127.0.0.1:5000',
'apiKey' => '$apiKey',
],
'import' => [
'uploadFolder' => '$appdir/data/import/files',
'isBackgroundProcessActive' => false,
],
];
EOF
@ -308,6 +287,7 @@ echo -e "\n--- Creating cache folders for backend… ---\n"
mkdir -p $PATH_TO_MONARC/data/cache
mkdir -p $PATH_TO_MONARC/data/LazyServices/Proxy
mkdir -p $PATH_TO_MONARC/data/DoctrineORMModule/Proxy
mkdir -p $PATH_TO_MONARC/data/import/files
chmod -R g+w $PATH_TO_MONARC/data
sudo chown -R www-data:www-data data
@ -326,7 +306,7 @@ sudo service apache2 restart > /dev/null
echo -e "\n--- Adding autostart Services ---\n"
cat >> ~/.bashrc <<EOF
# Autostart services
wsl.exe -u root service mysql start > /dev/null
wsl.exe -u root service mariadb start > /dev/null
wsl.exe -u root service apache2 start > /dev/null
wsl.exe -u root service postgresql start > /dev/null
cd ~/stats-service/ ; poetry run nohup python runserver.py > /dev/null 2>&1 &
@ -334,5 +314,5 @@ cd ~
EOF
echo -e "MONARC FO is ready and available at http://localhost"
echo -e "Stats service is ready and available at http://localhost:$STATS_PORT"
echo -e "Stats service is ready and available at http://localhost:5000"
echo -e "user: admin@admin.localhost / password: admin"

View File

@ -23,20 +23,19 @@ max_execution_time=100
max_input_time=223
memory_limit=512M
PHP_INI=/etc/php/7.4/apache2/php.ini
XDEBUG_CFG=/etc/php/7.4/apache2/conf.d/20-xdebug.ini
PHP_INI=/etc/php/8.1/apache2/php.ini
XDEBUG_CFG=/etc/php/8.1/apache2/conf.d/20-xdebug.ini
MARIA_DB_CFG=/etc/mysql/mariadb.conf.d/50-server.cnf
# Stats service
STATS_PATH=$HOME/stats-service
STATS_HOST='0.0.0.0'
STATS_PORT='5005'
STATS_DB_NAME='statsservice'
STATS_DB_USER='sqlmonarcuser'
STATS_DB_PASSWORD="sqlmonarcuser"
STATS_DB_USER='statsserviceuser'
STATS_DB_PASSWORD="password"
STATS_SECRET_KEY="$(openssl rand -hex 32)"
echo -e "\n--- Installing now… ---\n"
sudo chmod 755 $HOME
sudo apt-get update > /dev/null 2>&1
echo -e "\n--- Updating packages list… ---\n"
@ -49,7 +48,7 @@ sudo apt-get -y install vim zip unzip git gettext curl gsfonts > /dev/null
echo -e "\n--- Install MariaDB specific packages and settings… ---\n"
sudo apt-get -y install mariadb-server mariadb-client > /dev/null
# Secure the MariaDB installation (especially by setting a strong root password)
sudo service mysql restart > /dev/null
sudo service mariadb restart > /dev/null
sleep 5
sudo mysql_secure_installation > /dev/null 2>&1 <<EOF
@ -70,10 +69,10 @@ echo -e "\n--- Setting up our MariaDB user for MONARC… ---\n"
sudo mysql -u root -p$DBPASSWORD_ADMIN -e "CREATE USER '$DBUSER_MONARC'@'%' IDENTIFIED BY '$DBPASSWORD_MONARC';"
sudo mysql -u root -p$DBPASSWORD_ADMIN -e "GRANT ALL PRIVILEGES ON * . * TO '$DBUSER_MONARC'@'%';"
sudo mysql -u root -p$DBPASSWORD_ADMIN -e "FLUSH PRIVILEGES;"
sudo service mysql restart > /dev/null
sudo service mariadb restart > /dev/null
echo -e "\n--- Installing PHP-specific packages… ---\n"
sudo apt-get -y install php apache2 libapache2-mod-php php-curl php-gd php-mysql php-pear php-apcu php-xml php-mbstring php-intl php-imagick php-zip php-xdebug php-bcmath > /dev/null 2>&1
sudo apt-get -y install php apache2 libapache2-mod-php php-curl php-gd php-mysql php-pear php-apcu php-xml php-mbstring php-intl php-zip php-xdebug php-bcmath > /dev/null 2>&1
echo -e "\n--- Configuring PHP… ---\n"
for key in upload_max_filesize post_max_size max_execution_time max_input_time memory_limit
@ -110,8 +109,10 @@ fi
echo -e "\n--- Installing MONARC … ---\n"
git clone --config core.fileMode=false https://github.com/monarc-project/MonarcAppFO $PATH_TO_MONARC_FO > /dev/null 2>&1
git clone --config core.fileMode=false https://github.com/monarc-project/MonarcAppBO $PATH_TO_MONARC_BO > /dev/null 2>&1
cd $PATH_TO_MONARC_FO
git config core.fileMode false
echo -e "\n--- Installing the FO dependencies… ---\n"
@ -123,10 +124,9 @@ mkdir -p module/Monarc
cd module/Monarc
ln -sfn ./../../vendor/monarc/core Core
ln -sfn ./../../vendor/monarc/frontoffice FrontOffice
cd $PATH_TO_MONARC_FO
# Front-end
mkdir -p node_modules
cd node_modules
@ -146,7 +146,6 @@ if [ $? -ne 0 ]; then
fi
cd $PATH_TO_MONARC_BO
git config core.fileMode false
echo -e "\n--- Installing the BO dependencies… ---\n"
composer ins > /dev/null 2>&1
@ -234,7 +233,7 @@ sudo service apache2 restart > /dev/null
echo -e "\n--- Installation of Node, NPM and Grunt… ---\n"
curl -sL https://deb.nodesource.com/setup_15.x | sudo bash - > /dev/null 2>&1
sudo apt-get install -y nodejs > /dev/null 2>&1
sudo apt-get install -y nodejs npm > /dev/null 2>&1
sudo npm install -g grunt-cli > /dev/null 2>&1
@ -247,49 +246,23 @@ sudo -u postgres psql -c "CREATE USER $STATS_DB_USER WITH PASSWORD '$STATS_DB_PA
sudo -u postgres psql -c "ALTER USER $STATS_DB_USER WITH SUPERUSER;" > /dev/null
cd ~
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python > /dev/null
echo 'export PATH="$PATH:$HOME/.poetry/bin"' >> ~/.bashrc
curl -sSL https://install.python-poetry.org | python3 - > /dev/null > /dev/null
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc
echo 'export FLASK_APP=runserver.py' >> ~/.bashrc
echo 'export STATS_CONFIG=production.py' >> ~/.bashrc
git clone https://github.com/monarc-project/stats-service $STATS_PATH > /dev/null 2>&1
cd $STATS_PATH
export PATH="$PATH:$HOME/.poetry/bin"
export PATH="$PATH:$HOME/.local/bin"
export FLASK_APP=runserver.py
export STATS_CONFIG=production.py
npm ci > /dev/null 2>&1
poetry install --no-dev > /dev/null
poetry install > /dev/null 2>&1
cp instance/production.py.cfg instance/production.py
bash -c "cat << EOF > $STATS_PATH/instance/production.py
HOST = '$STATS_HOST'
PORT = $STATS_PORT
DEBUG = False
TESTING = False
INSTANCE_URL = 'http://127.0.0.1:$STATS_PORT'
ADMIN_EMAIL = 'info@cases.lu'
ADMIN_URL = 'https://www.cases.lu'
REMOTE_STATS_SERVER = 'https://dashboard.monarc.lu'
DB_CONFIG_DICT = {
'user': '$STATS_DB_USER',
'password': '$STATS_DB_PASSWORD',
'host': 'localhost',
'port': 5432,
}
DATABASE_NAME = '$STATS_DB_NAME'
SQLALCHEMY_DATABASE_URI = 'postgresql://{user}:{password}@{host}:{port}/{name}'.format(
name=DATABASE_NAME, **DB_CONFIG_DICT
)
SQLALCHEMY_TRACK_MODIFICATIONS = False
SECRET_KEY = '$STATS_SECRET_KEY'
LOG_PATH = './var/stats.log'
MOSP_URL = 'https://objects.monarc.lu'
EOF"
sed -i "s/\"postgres\"/\"$STATS_DB_USER\"/" instance/production.py
sed -i "s/password/$STATS_DB_PASSWORD/" instance/production.py
sed -i "s/SECRET_KEY.*/SECRET_KEY = \"$STATS_SECRET_KEY\"/" instance/production.py
FLASK_APP=runserver.py poetry run flask db_create
FLASK_APP=runserver.py poetry run flask db_init
@ -351,9 +324,14 @@ return [
],
'statsApi' => [
'baseUrl' => 'http://127.0.0.1:$STATS_PORT',
'baseUrl' => 'http://127.0.0.1:5000',
'apiKey' => '$apiKey',
],
'import' => [
'uploadFolder' => '$appdir/data/import/files',
'isBackgroundProcessActive' => false,
],
];
EOF
@ -417,6 +395,7 @@ echo -e "\n--- Creating cache folders for backend… ---\n"
mkdir -p $PATH_TO_MONARC_FO/data/cache
mkdir -p $PATH_TO_MONARC_FO/data/LazyServices/Proxy
mkdir -p $PATH_TO_MONARC_FO/data/DoctrineORMModule/Proxy
mkdir -p $$PATH_TO_MONARC_FO/data/import/files
chmod -R g+w $PATH_TO_MONARC_FO/data
mkdir -p $PATH_TO_MONARC_BO/data/cache
mkdir -p $PATH_TO_MONARC_BO/data/LazyServices/Proxy
@ -444,7 +423,7 @@ sudo service apache2 restart > /dev/null
echo -e "\n--- Adding autostart Services ---\n"
cat >> ~/.bashrc <<EOF
# Autostart services
wsl.exe -u root service mysql start > /dev/null
wsl.exe -u root service mariadb start > /dev/null
wsl.exe -u root service apache2 start > /dev/null
wsl.exe -u root service postgresql start > /dev/null
cd ~/stats-service/ ; poetry run nohup python runserver.py > /dev/null 2>&1 &
@ -453,5 +432,5 @@ EOF
echo -e "MONARC FO is ready and available at http://localhost"
echo -e "MONARC BO is ready and available at http://localhost:8080"
echo -e "Stats service is ready and available at http://localhost:$STATS_PORT"
echo -e "Stats service is ready and available at http://localhost:5000"
echo -e "user: admin@admin.localhost / password: admin"