commit
6e0dadee63
|
@ -12,24 +12,13 @@ jobs:
|
||||||
MYSQL_ROOT_PASSWORD: root
|
MYSQL_ROOT_PASSWORD: root
|
||||||
MYSQL_USER: sqlmonarcuser
|
MYSQL_USER: sqlmonarcuser
|
||||||
MYSQL_PASSWORD: password
|
MYSQL_PASSWORD: password
|
||||||
|
MYSQL_VERSION: 10.6.18
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
#- name: Shutdown Ubuntu MySQL (SUDO)
|
- name: Shutdown Ubuntu MySQL (SUDO)
|
||||||
#run: sudo service mysql stop
|
run: sudo service mysql stop
|
||||||
|
|
||||||
#- name: Start MariaDB and create databases
|
|
||||||
#uses: getong/mariadb-action@v1.1
|
|
||||||
#with:
|
|
||||||
#host port: $MYSQL_HOST_PORT
|
|
||||||
#mysql database: $MYSQL_DATABASE # Optional, default value is "test". The specified database which will be create
|
|
||||||
#mysql root password: $MYSQL_ROOT_PASSWORD # Required if "mysql user" is empty, default is empty. The root superuser password
|
|
||||||
#mysql user: $MYSQL_USER # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too
|
|
||||||
#mysql password: $MYSQL_PASSWORD # Required if "mysql user" exists. The password for the "mysql user"
|
|
||||||
|
|
||||||
- name: Start MySQL (SUDO)
|
|
||||||
run: sudo service mysql start
|
|
||||||
|
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
|
@ -57,6 +46,19 @@ jobs:
|
||||||
- name: Set MONARC configuration file
|
- name: Set MONARC configuration file
|
||||||
run: cp ./config/autoload/local.php.dist ./config/autoload/local.php
|
run: cp ./config/autoload/local.php.dist ./config/autoload/local.php
|
||||||
|
|
||||||
|
- name: Start MariaDB and create databases
|
||||||
|
uses: getong/mariadb-action@v1.1
|
||||||
|
with:
|
||||||
|
host port: $MYSQL_HOST_PORT
|
||||||
|
mariadb version: $MYSQL_VERSION # Optional, default value is "latest". The version of the MariaDB
|
||||||
|
mysql database: $MYSQL_DATABASE # Optional, default value is "test". The specified database which will be create
|
||||||
|
mysql root password: $MYSQL_ROOT_PASSWORD # Required if "mysql user" is empty, default is empty. The root superuser password
|
||||||
|
mysql user: $MYSQL_USER # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too
|
||||||
|
mysql password: $MYSQL_PASSWORD # Required if "mysql user" exists. The password for the "mysql user"
|
||||||
|
|
||||||
|
- name: Shutdown Ubuntu MySQL (SUDO)
|
||||||
|
run: sudo service mysql start
|
||||||
|
|
||||||
- name: Creating and populating databases
|
- name: Creating and populating databases
|
||||||
run: |
|
run: |
|
||||||
mysql -u root -p$MYSQL_ROOT_PASSWORD -P $MYSQL_HOST_PORT -e "CREATE DATABASE monarc_common DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;"
|
mysql -u root -p$MYSQL_ROOT_PASSWORD -P $MYSQL_HOST_PORT -e "CREATE DATABASE monarc_common DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;"
|
||||||
|
@ -67,6 +69,7 @@ jobs:
|
||||||
mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -P $MYSQL_HOST_PORT $MYSQL_DATABASE < db-bootstrap/monarc_structure.sql
|
mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -P $MYSQL_HOST_PORT $MYSQL_DATABASE < db-bootstrap/monarc_structure.sql
|
||||||
mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -P $MYSQL_HOST_PORT $MYSQL_DATABASE < db-bootstrap/monarc_data.sql
|
mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -P $MYSQL_HOST_PORT $MYSQL_DATABASE < db-bootstrap/monarc_data.sql
|
||||||
|
|
||||||
|
|
||||||
- name: Upgrading databases
|
- name: Upgrading databases
|
||||||
run: |
|
run: |
|
||||||
./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/Monarc/Core/migrations/phinx.php
|
./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/Monarc/Core/migrations/phinx.php
|
||||||
|
|
12
AUTHORS
12
AUTHORS
|
@ -3,7 +3,7 @@
|
||||||
Cédric Bonhomme - https://www.cedricbonhomme.org
|
Cédric Bonhomme - https://www.cedricbonhomme.org
|
||||||
Jérôme Lombardi - https://github.com/jerolomb
|
Jérôme Lombardi - https://github.com/jerolomb
|
||||||
Juan Rocha - https://github.com/jfrocha
|
Juan Rocha - https://github.com/jfrocha
|
||||||
Ruslan Baidan - https://github.com/ruslanbaydan
|
Ruslan Baidan - https://github.com/ruslanbaidan
|
||||||
|
|
||||||
|
|
||||||
# Contributors
|
# Contributors
|
||||||
|
@ -22,11 +22,11 @@ Thomas Metois
|
||||||
|
|
||||||
# Copyright holders
|
# Copyright holders
|
||||||
|
|
||||||
- Copyright (C) 2016-2023 Jérôme Lombardi - https://github.com/jerolomb
|
- Copyright (C) 2016-2024 Luxembourg House of Cybersecurity
|
||||||
- Copyright (C) 2016-2023 Juan Rocha - https://github.com/jfrocha
|
- Copyright (C) 2016-2024 Jérôme Lombardi - https://github.com/jerolomb
|
||||||
- Copyright (C) 2016-2023 Luxembourg House of Cybersecurity
|
- Copyright (C) 2016-2024 Juan Rocha - https://github.com/jfrocha
|
||||||
- Copyright (C) 2017-2023 Cédric Bonhomme - https://www.cedricbonhomme.org
|
- Copyright (C) 2017-2024 Cédric Bonhomme - https://www.cedricbonhomme.org
|
||||||
|
- Copyright (C) 2019-2024 Ruslan Baidan - https://github.com/ruslanbaidan
|
||||||
- Copyright (C) 2016-2017 Guillaume Lesniak
|
- Copyright (C) 2016-2017 Guillaume Lesniak
|
||||||
- Copyright (C) 2016-2017 Thomas Metois
|
- Copyright (C) 2016-2017 Thomas Metois
|
||||||
- Copyright (C) 2016-2017 Jérôme De Almeida
|
- Copyright (C) 2016-2017 Jérôme De Almeida
|
||||||
- Copyright (C) 2019-2023 Ruslan Baidan - https://github.com/ruslanbaidan
|
|
||||||
|
|
27
CHANGELOG.md
27
CHANGELOG.md
|
@ -1,6 +1,33 @@
|
||||||
MONARC Changelog
|
MONARC Changelog
|
||||||
================
|
================
|
||||||
|
|
||||||
|
## 2.13.1 (2024-10-07)
|
||||||
|
|
||||||
|
### Enhancement
|
||||||
|
|
||||||
|
- Refactored backend code. It includes the following changes points:
|
||||||
|
- Removed the relying on the abstraction and sharing the same methods execution of services.
|
||||||
|
- Implemented the single responsibility approach to the entities.I
|
||||||
|
- Added the filtering functionality to process the incoming get requests data and prepare them for the filter and sort queries.
|
||||||
|
- Added the data validation at first place. Before the post, put, patch and delete requests data are passed to the services, they are validated.
|
||||||
|
- Removed the dependency on the abstract table common methods, where the entities positions were processed, and some specific code run.
|
||||||
|
- Implemented the common approach, not resources/time consuming, of the entities positioning based on interfaces and traits.
|
||||||
|
- Optimised the export and import functionality to be clean and fast.
|
||||||
|
- Added a common place to validate the analysis access and endpoints permissions before the controllers’ actions are reached. The Middleware passed an anr object to the actions automatically as an attribute.
|
||||||
|
- Restructured the components and code parts of the application for the based on responsibilities, relations and to be more clear.
|
||||||
|
- Removed many deprecated code parts and cleaned up the deprecated columns in the DB tables.
|
||||||
|
- Improved some DB indexes and renamed tables, columns to be more clear on the names.
|
||||||
|
- Added some first unit tests as a starting point for the full coverage.
|
||||||
|
- **Not refactored parts are the following**: `Questions`, `QuestionsChoices`, `Guide`, `Interviews`, `ROPA`, `Deliverable`.
|
||||||
|
|
||||||
|
### User stories
|
||||||
|
- Added possibility to export risk analysis with Knowledge Base (KB) and/or Assets Library (AL). That allows to optionally export all the KB a AL data without having the analysis modelling started. This is needed for sharing models between FrontOffices or update AL or KB with new versions of the structures.
|
||||||
|
- Changed the export format of JSON export file to reduce its size and be similar to the api endpoints responses and the projects structures views. An old data converter is implemented for the backward compatibility.
|
||||||
|
- Significantly improved the import time and made it always consistent. In case of import issues the data are not inserted, there are saved in the DB only at the end of the process (transactional approach).
|
||||||
|
- Removed extra user’s information from password reset response and removed the endpoint access by the other users (points 5.1.1, 5.1.2).
|
||||||
|
- Restricted analysis creation based on the models that are not available for the client by manually faking the request (point 5.2.3).
|
||||||
|
- [Fixed the password change](https://github.com/monarc-project/MonarcAppFO/discussions/523).
|
||||||
|
|
||||||
|
|
||||||
## 2.12.7 (2023-10-25)
|
## 2.12.7 (2023-10-25)
|
||||||
|
|
||||||
|
|
10
README.md
10
README.md
|
@ -75,14 +75,14 @@ License
|
||||||
This software is licensed under
|
This software is licensed under
|
||||||
[GNU Affero General Public License version 3](http://www.gnu.org/licenses/agpl-3.0.html)
|
[GNU Affero General Public License version 3](http://www.gnu.org/licenses/agpl-3.0.html)
|
||||||
|
|
||||||
- Copyright (C) 2016-2023 Luxembourg House of Cybersecurity
|
- Copyright (C) 2016-2024 Luxembourg House of Cybersecurity
|
||||||
- Copyright (C) 2016-2023 Jérôme Lombardi - https://github.com/jerolomb
|
- Copyright (C) 2016-2024 Jérôme Lombardi - https://github.com/jerolomb
|
||||||
- Copyright (C) 2016-2023 Juan Rocha - https://github.com/jfrocha
|
- Copyright (C) 2016-2024 Juan Rocha - https://github.com/jfrocha
|
||||||
- Copyright (C) 2017-2023 Cédric Bonhomme - https://www.cedricbonhomme.org
|
- Copyright (C) 2017-2024 Cédric Bonhomme - https://www.cedricbonhomme.org
|
||||||
|
- Copyright (C) 2019-2024 Ruslan Baidan - https://github.com/ruslanbaidan
|
||||||
- Copyright (C) 2016-2017 Guillaume Lesniak
|
- Copyright (C) 2016-2017 Guillaume Lesniak
|
||||||
- Copyright (C) 2016-2017 Thomas Metois
|
- Copyright (C) 2016-2017 Thomas Metois
|
||||||
- Copyright (C) 2016-2017 Jérôme De Almeida
|
- Copyright (C) 2016-2017 Jérôme De Almeida
|
||||||
- Copyright (C) 2019-2023 Ruslan Baidan - https://github.com/ruslanbaidan
|
|
||||||
|
|
||||||
For more information, [the list of authors and contributors](AUTHORS) is available.
|
For more information, [the list of authors and contributors](AUTHORS) is available.
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"major":2, "minor":12, "hotfix":7}
|
{"major":2, "minor":13, "hotfix":1}
|
||||||
|
|
|
@ -41,13 +41,13 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.4 || ^8.0",
|
"php": "^8.0",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"ext-bcmath": "*",
|
"ext-bcmath": "*",
|
||||||
"ext-openssl": "*",
|
"ext-openssl": "*",
|
||||||
"monarc/frontoffice": "^2.12.6",
|
"monarc/frontoffice": "^2.13.1",
|
||||||
"monarc/core": "^2.12.6",
|
"monarc/core": "^2.13.1",
|
||||||
"laminas/laminas-mvc": "^3.1",
|
"laminas/laminas-mvc": "^3.1",
|
||||||
"laminas/laminas-di": "^3.1",
|
"laminas/laminas-di": "^3.1",
|
||||||
"laminas/laminas-permissions-rbac": "^3.0",
|
"laminas/laminas-permissions-rbac": "^3.0",
|
||||||
|
@ -55,6 +55,7 @@
|
||||||
"laminas/laminas-i18n": "^2.9",
|
"laminas/laminas-i18n": "^2.9",
|
||||||
"symfony/console": "^5.0",
|
"symfony/console": "^5.0",
|
||||||
"laminas/laminas-dependency-plugin": "^2.0",
|
"laminas/laminas-dependency-plugin": "^2.0",
|
||||||
|
"laminas/laminas-mvc-middleware": "^2.2",
|
||||||
"robthree/twofactorauth": "^1.8",
|
"robthree/twofactorauth": "^1.8",
|
||||||
"endroid/qr-code": "^4.4"
|
"endroid/qr-code": "^4.4"
|
||||||
},
|
},
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -43,6 +43,7 @@ return [
|
||||||
'Laminas\Di',
|
'Laminas\Di',
|
||||||
'Laminas\Router',
|
'Laminas\Router',
|
||||||
'Laminas\Validator',
|
'Laminas\Validator',
|
||||||
|
'Laminas\Mvc\Middleware',
|
||||||
'DoctrineModule',
|
'DoctrineModule',
|
||||||
'DoctrineORMModule',
|
'DoctrineORMModule',
|
||||||
],
|
],
|
||||||
|
|
|
@ -54,39 +54,11 @@ return [
|
||||||
'index' => 4,
|
'index' => 4,
|
||||||
'label' => 'Nederlands',
|
'label' => 'Nederlands',
|
||||||
],
|
],
|
||||||
'es' => [
|
|
||||||
'index' => 5,
|
|
||||||
'label' => 'Spanish',
|
|
||||||
],
|
|
||||||
'ro' => [
|
|
||||||
'index' => 6,
|
|
||||||
'label' => 'Romanian',
|
|
||||||
],
|
|
||||||
'it' => [
|
|
||||||
'index' => 7,
|
|
||||||
'label' => 'Italian',
|
|
||||||
],
|
|
||||||
'pt' => [
|
|
||||||
'index' => 9,
|
|
||||||
'label' => 'Portuguese',
|
|
||||||
],
|
|
||||||
'pl' => [
|
|
||||||
'index' => 10,
|
|
||||||
'label' => 'Polish',
|
|
||||||
],
|
|
||||||
'jp' => [
|
|
||||||
'index' => 11,
|
|
||||||
'label' => 'Japanese',
|
|
||||||
],
|
|
||||||
'zh' => [
|
|
||||||
'index' => 12,
|
|
||||||
'label' => 'Chinese',
|
|
||||||
],
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'defaultLanguageIndex' => 1,
|
'defaultLanguageIndex' => 1,
|
||||||
|
|
||||||
'activeLanguages' => array('fr','en','de','nl','es','ro','it','ja','pl','pt','zh'),
|
'activeLanguages' => ['fr','en','de','nl','es','ro','it','ja','pl','pt','zh'],
|
||||||
|
|
||||||
'appVersion' => $package_json['version'],
|
'appVersion' => $package_json['version'],
|
||||||
|
|
||||||
|
@ -121,4 +93,12 @@ return [
|
||||||
'uploadFolder' => $appdir . '/data/import/files',
|
'uploadFolder' => $appdir . '/data/import/files',
|
||||||
'isBackgroundProcessActive' => false,
|
'isBackgroundProcessActive' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
|
/* Custom configuration of the smtp. The example config below is to make Mailcatcher work for the dev env.
|
||||||
|
'smtpOptions' => [
|
||||||
|
'name' => 'localhost',
|
||||||
|
'host' => '127.0.0.1',
|
||||||
|
'port' => 1025,
|
||||||
|
],
|
||||||
|
*/
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "MONARC",
|
"name": "MONARC",
|
||||||
"version": "2.12.7",
|
"version": "2.13.1",
|
||||||
"description": "Monarc front office application",
|
"description": "Monarc front office application",
|
||||||
"private": true,
|
"private": true,
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -22,10 +22,16 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
# Create a forwarded port mapping which allows access to a specific port
|
# Create a forwarded port mapping which allows access to a specific port
|
||||||
# within the machine from a port on the host machine. In the example below,
|
# within the machine from a port on the host machine. In the example below,
|
||||||
# accessing "localhost:8080" will access port 80 on the guest machine.
|
# accessing "localhost:8080" will access port 80 on the guest machine.
|
||||||
|
# The FO application port:
|
||||||
config.vm.network :forwarded_port, guest: 80, host: 5001
|
config.vm.network :forwarded_port, guest: 80, host: 5001
|
||||||
|
# The stats-service port:
|
||||||
config.vm.network :forwarded_port, guest: 5005, host: 5005
|
config.vm.network :forwarded_port, guest: 5005, host: 5005
|
||||||
|
# The MySQL DB port:
|
||||||
config.vm.network :forwarded_port, guest: 3306, host: 3306
|
config.vm.network :forwarded_port, guest: 3306, host: 3306
|
||||||
|
# The PostgreSQL port:
|
||||||
config.vm.network :forwarded_port, guest: 5432, host: 5435
|
config.vm.network :forwarded_port, guest: 5432, host: 5435
|
||||||
|
# The MailCatcher port:
|
||||||
|
config.vm.network :forwarded_port, guest: 1080, host: 1080
|
||||||
|
|
||||||
# Create a private network, which allows host-only access to the machine
|
# Create a private network, which allows host-only access to the machine
|
||||||
# using a specific IP.
|
# using a specific IP.
|
||||||
|
@ -57,7 +63,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
#
|
#
|
||||||
# # Use VBoxManage to customize the VM. For example to change memory:
|
# # Use VBoxManage to customize the VM. For example to change memory:
|
||||||
vb.customize ["modifyvm", :id, "--memory", "4092"]
|
vb.customize ["modifyvm", :id, "--memory", "4092"]
|
||||||
vb.customize ["modifyvm", :id, "--name", "MONARC FO - Ubuntu 22.04 - DEV"]
|
vb.customize ["modifyvm", :id, "--name", "MONARC FO - Ubuntu 22.04 - New"]
|
||||||
end
|
end
|
||||||
#
|
#
|
||||||
# View the documentation for the provider you're using for more
|
# View the documentation for the provider you're using for more
|
||||||
|
|
|
@ -394,6 +394,12 @@ sudo npm install -g grunt-cli
|
||||||
echo -e "\n--- Create initial user and client ---\n"
|
echo -e "\n--- Create initial user and client ---\n"
|
||||||
php ./bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
|
php ./bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
|
||||||
|
|
||||||
|
echo -e "\n--- Install and run mailcatcher ---\n"
|
||||||
|
sudo apt-get install -y build-essential software-properties-common
|
||||||
|
sudo apt-get install -y libsqlite3-dev ruby-dev
|
||||||
|
sudo gem install mailcatcher
|
||||||
|
sudo mailcatcher --http-ip 0.0.0.0
|
||||||
|
|
||||||
|
|
||||||
echo -e "\n--- Restarting Apache… ---\n"
|
echo -e "\n--- Restarting Apache… ---\n"
|
||||||
sudo systemctl restart apache2.service > /dev/null
|
sudo systemctl restart apache2.service > /dev/null
|
||||||
|
@ -401,3 +407,4 @@ sudo systemctl restart apache2.service > /dev/null
|
||||||
|
|
||||||
echo -e "MONARC is ready and available at http://127.0.0.1:5001"
|
echo -e "MONARC is ready and available at http://127.0.0.1:5001"
|
||||||
echo -e "Stats service is ready and available at http://127.0.0.1:$STATS_PORT"
|
echo -e "Stats service is ready and available at http://127.0.0.1:$STATS_PORT"
|
||||||
|
echo -e "Mailcatcher is available http://127.0.0.1:1080"
|
||||||
|
|
Loading…
Reference in New Issue