Merge remote-tracking branch 'origin/feature/upgrade-to-zf3' into ldap
commit
9f44985d4c
|
@ -1,13 +1,10 @@
|
|||
nbproject
|
||||
._*
|
||||
.~lock.*
|
||||
.buildpath
|
||||
.DS_Store
|
||||
.idea
|
||||
.project
|
||||
.settings
|
||||
composer.lock
|
||||
vendor/bin
|
||||
migrations
|
||||
*.sublime-*
|
||||
vagrant/.vagrant/
|
||||
|
@ -19,12 +16,14 @@ public/js/
|
|||
public/img/
|
||||
public/flags/
|
||||
public/views/
|
||||
scripts/public
|
||||
module/
|
||||
npm-debug.log
|
||||
node_modules/
|
||||
bin/
|
||||
data/DoctrineORMModule/
|
||||
data/monarc/
|
||||
data/json/
|
||||
go-pear.phar
|
||||
data/*
|
||||
!data/cache/.gitkeep
|
||||
!data/DoctrineORMModule/Proxy/.gitkeep
|
||||
!data/LazyServices/Proxy/.gitkeep
|
||||
!data/json/.gitkeep
|
||||
scripts/public/
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[submodule "vendor/ZF2"]
|
||||
path = vendor/ZF2
|
||||
url = https://github.com/zendframework/zf2.git
|
44
CHANGELOG.md
44
CHANGELOG.md
|
@ -1,6 +1,50 @@
|
|||
MONARC Changelog
|
||||
================
|
||||
|
||||
## 2.9.1 (2019-10-29)
|
||||
|
||||
### Upgrade
|
||||
|
||||
- upgrade of the Backend Framework. Now we use ZendFramework 3;
|
||||
- restructured the Monarc code to comply with PSR-2 standard;
|
||||
- updated the usage of the dependencies (Core and FrontOffice) from packagist.org;
|
||||
- some code improvements and bug-fixes.
|
||||
|
||||
## 2.9.0 (2019-08-23)
|
||||
|
||||
### New
|
||||
|
||||
- each analysis can now integrate a record of processing activities in order
|
||||
to help you in your GDPR compliance efforts;
|
||||
- it is now possible to create and manage set of recommendations via the
|
||||
knowledge base of a risk analysis. Like for the security referentials
|
||||
(introduced in version 2.8.0), MOSP can now be used in order to
|
||||
[share recommendations](https://objects.monarc.lu/schema/17).
|
||||
|
||||
### Fix
|
||||
|
||||
- Monarc 2.8.3 - invalid datetime format: 1292 [#179](https://github.com/monarc-project/MonarcAppFO/issues/179)
|
||||
- various minor fixes and improvements.
|
||||
|
||||
|
||||
## 2.8.3 (2019-07-26)
|
||||
|
||||
### Enhancement
|
||||
|
||||
- Some improvements in MOSP import
|
||||
- Some improvements in 3rd deliverable
|
||||
|
||||
### Fix
|
||||
|
||||
- SOA is not imported [#166](https://github.com/monarc-project/MonarcAppFO/issues/166)
|
||||
- Drag & drop in risk treatment plan fails after 1 change [#167](https://github.com/monarc-project/MonarcAppFO/issues/166)
|
||||
- Underscore "\_" is not considered as a special character in password reset [#169](https://github.com/monarc-project/MonarcAppFO/issues/169)
|
||||
- Error when duplicating object [#171](https://github.com/monarc-project/MonarcAppFO/issues/171)
|
||||
- Add objects in model/anr from common DB [#172](https://github.com/monarc-project/MonarcAppFO/issues/172)
|
||||
- Composed objects in the library->position [#174](https://github.com/monarc-project/MonarcAppFO/issues/174)
|
||||
- Import analysis -> conflict on uuid on objects [#175](https://github.com/monarc-project/MonarcAppFO/issues/175)
|
||||
- FO > Knowledge base > OP risks [#177](https://github.com/monarc-project/MonarcAppFO/issues/177)
|
||||
|
||||
|
||||
## 2.8.2 (2019-05-28)
|
||||
|
||||
|
|
|
@ -0,0 +1,184 @@
|
|||
Installation on Debian 10
|
||||
=========================
|
||||
|
||||
# 1. Install LAMP & dependencies
|
||||
|
||||
## 1.1. Install system dependencies
|
||||
|
||||
$ sudo apt-get install zip unzip git gettext curl gsfonts software-properties-common
|
||||
|
||||
Some might already be installed.
|
||||
|
||||
## 1.2. Install MariaDB
|
||||
|
||||
$ sudo apt-get install mariadb-server
|
||||
|
||||
### Secure the MariaDB installation
|
||||
|
||||
$ sudo mysql_secure_installation
|
||||
|
||||
Especially by setting a strong root password.
|
||||
|
||||
## 1.3. Install Apache2
|
||||
|
||||
$ sudo apt-get install apache2
|
||||
|
||||
### Enable modules, settings, and default of SSL in Apache
|
||||
|
||||
$ sudo a2dismod status
|
||||
$ sudo a2enmod ssl
|
||||
$ sudo a2enmod rewrite
|
||||
$ sudo a2enmod headers
|
||||
|
||||
### Apache Virtual Host
|
||||
|
||||
<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
|
||||
|
||||
$ sudo apt-get install php7.3 libapache2-mod-php7.3 php7.3-curl php7.3-gd php7.3-mysql php7.3-apcu php7.3-xml php7.3-mbstring php7.3-intl php7.3-imagick php7.3-zip
|
||||
|
||||
$ curl -sS https://getcomposer.org/installer -o composer-setup.php
|
||||
$ sudo php composer-setup.php --install-dir=/usr/bin --filename=composer
|
||||
|
||||
## 1.5 Apply all changes
|
||||
|
||||
$ sudo systemctl restart apache2.service
|
||||
|
||||
|
||||
|
||||
# 2. Installation of MONARC
|
||||
|
||||
## 2.1. MONARC source code
|
||||
|
||||
$ mkdir -p /var/lib/monarc/fo
|
||||
$ 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/LazyServices/Proxy
|
||||
$ chmod -R g+w data
|
||||
$ composer install -o
|
||||
|
||||
|
||||
### Back-end
|
||||
|
||||
The back-end is using the Zend Framework 3.
|
||||
|
||||
Create two symbolic links:
|
||||
|
||||
$ cd module/Monarc
|
||||
$ ln -s ./../../vendor/monarc/core Core
|
||||
$ ln -s ./../../vendor/monarc/frontoffice FrontOffice
|
||||
$ cd ../..
|
||||
|
||||
There are 2 parts:
|
||||
|
||||
* Monarc\FrontOffice is only for MONARC;
|
||||
* Monarc\Core is common to MONARC and to the back office of MONARC.
|
||||
|
||||
|
||||
### Front-end
|
||||
|
||||
The frontend is an AngularJS application.
|
||||
|
||||
$ mkdir node_modules
|
||||
$ cd node_modules
|
||||
$ git clone https://github.com/monarc-project/ng-client.git ng_client
|
||||
$ git clone https://github.com/monarc-project/ng-anr.git ng_anr
|
||||
|
||||
There are 2 parts:
|
||||
|
||||
* one only for MONARC: ng_client;
|
||||
* one common for MONARC and the back office of MONARC: ng_anr.
|
||||
|
||||
|
||||
## 2.2. Databases
|
||||
|
||||
### Create 2 databases
|
||||
|
||||
In your MariaDB interpreter:
|
||||
|
||||
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
|
||||
|
||||
$ mysql -u user monarc_common < db-bootstrap/monarc_structure.sql
|
||||
$ mysql -u user monarc_common < db-bootstrap/monarc_data.sql
|
||||
|
||||
### Database connection
|
||||
|
||||
Create the configuration file:
|
||||
|
||||
$ sudo cp ./config/autoload/local.php.dist ./config/autoload/local.php
|
||||
|
||||
And configure the database connection:
|
||||
|
||||
return array(
|
||||
'doctrine' => array(
|
||||
'connection' => array(
|
||||
'orm_default' => array(
|
||||
'params' => array(
|
||||
'host' => 'localhost',
|
||||
'user' => 'sqlmonarcuser',
|
||||
'password' => '<password>',
|
||||
'dbname' => 'monarc_common',
|
||||
),
|
||||
),
|
||||
'orm_cli' => array(
|
||||
'params' => array(
|
||||
'host' => 'localhost',
|
||||
'user' => 'sqlmonarcuser',
|
||||
'password' => '<password>',
|
||||
'dbname' => 'monarc_cli',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
|
||||
# 3. Update MONARC
|
||||
|
||||
Install Grunt:
|
||||
|
||||
$ curl -sL https://deb.nodesource.com/setup_13.x | sudo bash -
|
||||
$ sudo apt-get install nodejs
|
||||
$ npm install -g grunt-cli
|
||||
|
||||
then update MONARC:
|
||||
|
||||
$ ./scripts/update-all.sh -c
|
||||
|
||||
|
||||
# 4. Create initial user
|
||||
|
||||
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
|
||||
|
||||
|
||||
The username is *admin@admin.test* and the password is *admin*.
|
|
@ -69,10 +69,10 @@ Clone the repository and invoke composer
|
|||
|
||||
Backend
|
||||
|
||||
$ mkdir module
|
||||
$ cd module/
|
||||
$ ln -s ./../vendor/monarc/core MonarcCore
|
||||
$ ln -s ./../vendor/monarc/frontoffice MonarcFO
|
||||
$ cd module/Monarc
|
||||
$ ln -s ./../../vendor/monarc/core Core
|
||||
$ ln -s ./../../vendor/monarc/frontoffice FrontOffice
|
||||
$ cd ../..
|
||||
|
||||
Frontend
|
||||
|
||||
|
@ -97,7 +97,7 @@ Update MONARC (including npm config for explicit proxy)
|
|||
|
||||
Create initial user
|
||||
|
||||
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php
|
||||
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
|
||||
|
||||
# Configure apache (as root)
|
||||
|
||||
|
@ -128,4 +128,4 @@ Set file ownership for monarc installation
|
|||
Header always set X-Frame-Options SAMEORIGIN
|
||||
</IfModule>
|
||||
|
||||
SetEnv APPLICATION_ENV "development"
|
||||
SetEnv APP_ENV "development"
|
||||
|
|
|
@ -49,7 +49,7 @@ Especially by setting a strong root password.
|
|||
Header always set X-Frame-Options SAMEORIGIN
|
||||
</IfModule>
|
||||
|
||||
SetEnv APPLICATION_ENV "development"
|
||||
SetEnv APP_ENV "development"
|
||||
</VirtualHost>
|
||||
|
||||
|
||||
|
@ -88,15 +88,15 @@ You must create modules with symbolic links to libraries.
|
|||
|
||||
Create two symbolic links:
|
||||
|
||||
$ mkdir module
|
||||
$ cd module/
|
||||
$ ln -s ./../vendor/monarc/core MonarcCore
|
||||
$ ln -s ./../vendor/monarc/frontoffice MonarcFO
|
||||
$ cd module/Monarc
|
||||
$ ln -s ./../../vendor/monarc/core Core
|
||||
$ ln -s ./../../vendor/monarc/frontoffice FrontOffice
|
||||
$ cd ../..
|
||||
|
||||
There are 2 parts:
|
||||
|
||||
* MonarcFO is only for front office;
|
||||
* MonarcCore is common to the front office and to the back office.
|
||||
* Monarc\FrontOffice is only for front office;
|
||||
* Monarc\Core is common to the front office and to the back office.
|
||||
|
||||
|
||||
### Frontend
|
||||
|
@ -188,7 +188,7 @@ execute the database migration scripts and compile the translations.
|
|||
|
||||
# Create initial user
|
||||
|
||||
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php
|
||||
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
|
||||
|
||||
|
||||
The username is *admin@admin.test* and the password is *admin*.
|
||||
|
|
|
@ -3,37 +3,38 @@ Installation on Ubuntu 18.04
|
|||
|
||||
# 1. Install LAMP & dependencies
|
||||
|
||||
## Install the dependencies
|
||||
## 1.1. Install system dependencies
|
||||
|
||||
$ sudo apt-get install vim zip unzip git gettext curl gsfonts
|
||||
$ sudo apt-get install zip unzip git gettext curl gsfonts
|
||||
|
||||
Some might already be installed.
|
||||
|
||||
## Install MariaDB
|
||||
## 1.2. Install MariaDB
|
||||
|
||||
$ sudo apt-get install mariadb-client mariadb-server
|
||||
|
||||
# Secure the MariaDB installation
|
||||
### Secure the MariaDB installation
|
||||
|
||||
$ sudo mysql_secure_installation
|
||||
|
||||
Especially by setting a strong root password.
|
||||
|
||||
## Install Apache2
|
||||
## 1.3. Install Apache2
|
||||
|
||||
$ sudo apt-get install apache2
|
||||
|
||||
## Enable modules, settings, and default of SSL in Apache
|
||||
### Enable modules, settings, and default of SSL in Apache
|
||||
|
||||
$ sudo a2dismod status
|
||||
$ sudo a2enmod ssl
|
||||
$ sudo a2enmod rewrite
|
||||
$ sudo a2enmod headers
|
||||
|
||||
## Apache Virtual Host
|
||||
### Apache Virtual Host
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName monarc.localhost
|
||||
<VirtualHost _default_:80>
|
||||
ServerAdmin admin@localhost.lu
|
||||
ServerName monarc.local
|
||||
DocumentRoot /var/lib/monarc/fo/public
|
||||
|
||||
<Directory /var/lib/monarc/fo/public>
|
||||
|
@ -49,15 +50,15 @@ Especially by setting a strong root password.
|
|||
Header always set X-Frame-Options SAMEORIGIN
|
||||
</IfModule>
|
||||
|
||||
SetEnv APPLICATION_ENV "development"
|
||||
SetEnv APP_ENV "development"
|
||||
</VirtualHost>
|
||||
|
||||
|
||||
## Install PHP and dependencies
|
||||
## 1.4. Install PHP and dependencies
|
||||
|
||||
$ sudo apt-get 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
|
||||
$ sudo apt-get 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 composer
|
||||
|
||||
## Apply all changes
|
||||
## 1.5 Apply all changes
|
||||
|
||||
$ sudo systemctl restart apache2.service
|
||||
|
||||
|
@ -65,41 +66,35 @@ Especially by setting a strong root password.
|
|||
|
||||
# 2. Installation of MONARC
|
||||
|
||||
## MONARC code
|
||||
## 2.1. MONARC source code
|
||||
|
||||
Clone the repository and invoke `composer` using the shipped `composer.phar`:
|
||||
|
||||
$ cd /var/lib/monarc/
|
||||
$ git clone https://github.com/monarc-project/MonarcAppFO.git fo
|
||||
$ cd fo/
|
||||
$ chown -R www-data data
|
||||
$ mkdir -p /var/lib/monarc/fo
|
||||
$ 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/LazyServices/Proxy
|
||||
$ chmod -R g+w data
|
||||
$ sudo composer self-update
|
||||
$ composer install -o
|
||||
|
||||
The `self-update` directive is to ensure you have an up-to-date `composer.phar`
|
||||
available.
|
||||
|
||||
### Back-end
|
||||
|
||||
### Backend
|
||||
|
||||
The backend is not directly modules of the project but libraries.
|
||||
You must create modules with symbolic links to libraries.
|
||||
The back-end is using the Zend Framework 3.
|
||||
|
||||
Create two symbolic links:
|
||||
|
||||
$ mkdir module
|
||||
$ cd module/
|
||||
$ ln -s ./../vendor/monarc/core MonarcCore
|
||||
$ ln -s ./../vendor/monarc/frontoffice MonarcFO
|
||||
$ cd module/Monarc
|
||||
$ ln -s ./../../vendor/monarc/core Core
|
||||
$ ln -s ./../../vendor/monarc/frontoffice FrontOffice
|
||||
$ cd ../..
|
||||
|
||||
There are 2 parts:
|
||||
|
||||
* MonarcFO is only for front office;
|
||||
* MonarcCore is common to the front office and to the back office.
|
||||
* Monarc\FrontOffice is only for MONARC;
|
||||
* Monarc\Core is common to MONARC and to the back office of MONARC.
|
||||
|
||||
|
||||
### Frontend
|
||||
### Front-end
|
||||
|
||||
The frontend is an AngularJS application.
|
||||
|
||||
|
@ -110,18 +105,18 @@ The frontend is an AngularJS application.
|
|||
|
||||
There are 2 parts:
|
||||
|
||||
* one only for front office: ng_client;
|
||||
* one common for front office and back office: ng_anr.
|
||||
* one only for MONARC: ng_client;
|
||||
* one common for MONARC and the back office of MONARC: ng_anr.
|
||||
|
||||
|
||||
## Databases
|
||||
## 2.2. Databases
|
||||
|
||||
### Create 2 databases
|
||||
|
||||
In your MariaDB interpreter:
|
||||
|
||||
CREATE DATABASE monarc_cli DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
|
||||
CREATE DATABASE monarc_common DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
|
||||
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
|
||||
|
@ -145,17 +140,17 @@ And configure the database connection:
|
|||
'connection' => array(
|
||||
'orm_default' => array(
|
||||
'params' => array(
|
||||
'host' => 'host',
|
||||
'user' => 'user',
|
||||
'password' => 'password',
|
||||
'host' => 'localhost',
|
||||
'user' => 'sqlmonarcuser',
|
||||
'password' => '<password>',
|
||||
'dbname' => 'monarc_common',
|
||||
),
|
||||
),
|
||||
'orm_cli' => array(
|
||||
'params' => array(
|
||||
'host' => 'host',
|
||||
'user' => 'user',
|
||||
'password' => 'password',
|
||||
'host' => 'localhost',
|
||||
'user' => 'sqlmonarcuser',
|
||||
'password' => '<password>',
|
||||
'dbname' => 'monarc_cli',
|
||||
),
|
||||
),
|
||||
|
@ -165,22 +160,21 @@ And configure the database connection:
|
|||
|
||||
|
||||
|
||||
# Update MONARC
|
||||
# 3. Update MONARC
|
||||
|
||||
## Install Grunt
|
||||
Install Grunt:
|
||||
|
||||
$ sudo apt-get -y install npm
|
||||
$ npm install -g grunt-cli
|
||||
|
||||
then update MONARC:
|
||||
|
||||
Update MONARC:
|
||||
|
||||
$ ./scripts/update-all.sh
|
||||
$ ./scripts/update-all.sh -c
|
||||
|
||||
|
||||
# Create initial user
|
||||
# 4. Create initial user
|
||||
|
||||
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php
|
||||
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
|
||||
|
||||
|
||||
The username is *admin@admin.test* and the password is *admin*.
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 30 KiB |
Binary file not shown.
Before Width: | Height: | Size: 42 KiB |
Binary file not shown.
Before Width: | Height: | Size: 51 KiB |
|
@ -1 +1 @@
|
|||
{"major":2, "minor":8, "hotfix":2}
|
||||
{"major":2, "minor":9, "hotfix":1}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "monarc/skeleton",
|
||||
"description": "Skeleton for Monarc project",
|
||||
"name": "monarc/monarc",
|
||||
"description": "Monarc application",
|
||||
"authors": [
|
||||
{"name": "Cyril Rouyer", "email": "cyril@netlor.fr"},
|
||||
{"name": "Guillaume Lesniak", "email": "guillaume@netlor.fr"},
|
||||
|
@ -12,32 +12,23 @@
|
|||
{"name": "Cédric Bonhomme", "email": "cedric.bonhomme@cases.lu"}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.5",
|
||||
"zendframework/zendframework": "2.5.3",
|
||||
"doctrine/doctrine-orm-module": "^0.10",
|
||||
"robmorgan/phinx": "0.5.*",
|
||||
"monarc/core": "dev-master",
|
||||
"monarc/frontoffice": "dev-master",
|
||||
"phing/phing": "~2.0",
|
||||
"phpoffice/phpword": "dev-stable",
|
||||
"ramsey/uuid": "^3.8",
|
||||
"ramsey/uuid-doctrine": "^1.5"
|
||||
"php": "^7.1",
|
||||
"ext-json": "*",
|
||||
"ext-pdo": "*",
|
||||
"monarc/core": "dev-feature/upgrade-to-zf3",
|
||||
"monarc/frontoffice": "dev-feature/upgrade-to-zf3",
|
||||
"monarc/phpword": "dev-master",
|
||||
"zendframework/zend-mvc": "^3.1",
|
||||
"zendframework/zend-di": "^3.1",
|
||||
"zendframework/zend-permissions-rbac": "^3.0",
|
||||
"zendframework/zend-log": "^2.11",
|
||||
"zendframework/zend-i18n": "^2.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"roave/security-advisories": "dev-master",
|
||||
"zendframework/zend-component-installer": "^2.1"
|
||||
},
|
||||
"config": {
|
||||
"bin-dir": "bin/"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/monarc-project/zm-core"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/monarc-project/zm-client"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/monarc-project/monarc_phpword"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
BIN
composer.phar
BIN
composer.phar
Binary file not shown.
|
@ -5,37 +5,52 @@
|
|||
*
|
||||
* @see https://github.com/zendframework/ZFTool
|
||||
*/
|
||||
$env = getenv('APP_ENV') ?: 'production';
|
||||
$appconfdir = getenv('APP_CONF_DIR') ? getenv('APP_CONF_DIR') : '';
|
||||
$env = getenv('APPLICATION_ENV') ?: 'production';
|
||||
$appConfDir = getenv('APP_CONF_DIR') ?? '';
|
||||
|
||||
$confpaths = [ 'config/autoload/{,*.}{global,local}.php' ];
|
||||
$datapath = "data";
|
||||
if( ! empty($appconfdir) ){
|
||||
$confpaths[] = $appconfdir.'/local.php';
|
||||
$datapath = $appconfdir.'/data';
|
||||
if(!is_dir($datapath.'/cache')){
|
||||
mkdir($datapath.'/cache');
|
||||
$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)) {
|
||||
throw new \RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array(
|
||||
'modules' => array(
|
||||
return [
|
||||
'modules' => [
|
||||
'Zend\Mvc\Console',
|
||||
'Zend\I18n',
|
||||
'Zend\Mail',
|
||||
'Zend\Log',
|
||||
'Monarc\Core',
|
||||
'Monarc\FrontOffice',
|
||||
'Zend\Cache',
|
||||
'Zend\Form',
|
||||
'Zend\InputFilter',
|
||||
'Zend\Filter',
|
||||
'Zend\Paginator',
|
||||
'Zend\Hydrator',
|
||||
'Zend\Di',
|
||||
'Zend\Router',
|
||||
'Zend\Validator',
|
||||
'DoctrineModule',
|
||||
'DoctrineORMModule',
|
||||
'MonarcCore',
|
||||
'MonarcFO',
|
||||
),
|
||||
'module_listener_options' => array(
|
||||
'module_paths' => array(
|
||||
],
|
||||
'module_listener_options' => [
|
||||
'module_paths' => [
|
||||
'./module',
|
||||
'./vendor'
|
||||
),
|
||||
'config_glob_paths' => $confpaths,
|
||||
'config_cache_enabled' => ($env == 'production'),
|
||||
],
|
||||
'config_glob_paths' => $confPaths,
|
||||
'config_cache_enabled' => $env === 'production',
|
||||
'config_cache_key' => 'c8aaaaa11586f8b1bf5565cc6064e70a', // md5('config_cache_key_monarc')
|
||||
'module_map_cache_enabled' => ($env == 'production'),
|
||||
'module_map_cache_enabled' => $env === 'production',
|
||||
'module_map_cache_key' => '664579376c4dcdcaa0bcdd0f7e7bf25b', // md5('module_map_cache_key_monarc'),
|
||||
'cache_dir' => $datapath.'/cache/',
|
||||
'check_dependencies' => ($env != 'production'),
|
||||
),
|
||||
);
|
||||
'cache_dir' => $dataPath . '/cache/',
|
||||
'check_dependencies' => $env !== 'production',
|
||||
],
|
||||
];
|
||||
|
|
|
@ -11,7 +11,11 @@
|
|||
* file.
|
||||
*/
|
||||
|
||||
$appconfdir = getenv('APP_CONF_DIR') ? getenv('APP_CONF_DIR') : '';
|
||||
use Doctrine\DBAL\Driver\PDOMySql\Driver;
|
||||
use Monarc\Core\Service\DoctrineCacheServiceFactory;
|
||||
use Monarc\Core\Service\DoctrineLoggerFactory;
|
||||
|
||||
$appconfdir = getenv('APP_CONF_DIR') ?? '';
|
||||
|
||||
$datapath = "data";
|
||||
if( ! empty($appconfdir) ){
|
||||
|
@ -22,14 +26,14 @@ return array(
|
|||
// DOCTRINE CONF
|
||||
'service_manager' => array(
|
||||
'factories' => array(
|
||||
'doctrine.cache.mycache' => 'MonarcCore\Service\DoctrineCacheServiceFactory',
|
||||
'doctrine.monarc_logger' => 'MonarcCore\Service\DoctrineLoggerFactory',
|
||||
'doctrine.cache.mycache' => DoctrineCacheServiceFactory::class,
|
||||
'doctrine.monarc_logger' => DoctrineLoggerFactory::class,
|
||||
),
|
||||
),
|
||||
'doctrine' => array(
|
||||
'connection' => array(
|
||||
'orm_default' => array(
|
||||
'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
|
||||
'driverClass' => Driver::class,
|
||||
'params' => array(
|
||||
'host' => 'localhost',
|
||||
'port' => 3306,
|
||||
|
@ -45,7 +49,7 @@ return array(
|
|||
),
|
||||
),
|
||||
'orm_cli' => array(
|
||||
'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
|
||||
'driverClass' => Driver::class,
|
||||
'params' => array(
|
||||
'host' => 'localhost',
|
||||
'port' => 3306,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,8 +1,8 @@
|
|||
-- MySQL dump 10.15 Distrib 10.0.38-MariaDB, for debian-linux-gnu (x86_64)
|
||||
-- MySQL dump 10.16 Distrib 10.1.41-MariaDB, for debian-linux-gnu (x86_64)
|
||||
--
|
||||
-- Host: localhost Database: monarc_common
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 10.0.38-MariaDB-0ubuntu0.16.04.1
|
||||
-- Server version 10.1.41-MariaDB-0ubuntu0.18.04.1
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
|
@ -23,27 +23,28 @@ DROP TABLE IF EXISTS `amvs`;
|
|||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `amvs` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uuid` char(36) NOT NULL,
|
||||
`vulnerability_id` char(36) NOT NULL,
|
||||
`threat_id` char(36) NOT NULL,
|
||||
`asset_id` char(36) NOT NULL,
|
||||
`anr_id` int(11) unsigned DEFAULT NULL,
|
||||
`asset_id` int(11) unsigned DEFAULT NULL,
|
||||
`threat_id` int(11) unsigned DEFAULT NULL,
|
||||
`vulnerability_id` int(11) unsigned DEFAULT NULL,
|
||||
`position` int(11) DEFAULT '1',
|
||||
`status` int(11) DEFAULT '1',
|
||||
`creator` varchar(255) DEFAULT NULL,
|
||||
`created_at` datetime DEFAULT NULL,
|
||||
`updater` varchar(255) DEFAULT NULL,
|
||||
`updated_at` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
PRIMARY KEY (`uuid`),
|
||||
KEY `anr_id` (`anr_id`),
|
||||
KEY `asset_id` (`asset_id`),
|
||||
KEY `threat_id` (`threat_id`),
|
||||
KEY `vulnerability_id` (`vulnerability_id`),
|
||||
KEY `uuid` (`uuid`),
|
||||
CONSTRAINT `amvs_ibfk_1` FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `amvs_ibfk_2` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `amvs_ibfk_3` FOREIGN KEY (`threat_id`) REFERENCES `threats` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `amvs_ibfk_4` FOREIGN KEY (`vulnerability_id`) REFERENCES `vulnerabilities` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=11985 DEFAULT CHARSET=utf8;
|
||||
CONSTRAINT `amvs_ibfk_5` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`uuid`) ON DELETE CASCADE,
|
||||
CONSTRAINT `amvs_ibfk_6` FOREIGN KEY (`threat_id`) REFERENCES `threats` (`uuid`) ON DELETE CASCADE,
|
||||
CONSTRAINT `amvs_ibfk_7` FOREIGN KEY (`vulnerability_id`) REFERENCES `vulnerabilities` (`uuid`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -103,13 +104,13 @@ DROP TABLE IF EXISTS `anrs_objects`;
|
|||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `anrs_objects` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`object_id` char(36) NOT NULL,
|
||||
`anr_id` int(11) unsigned DEFAULT NULL,
|
||||
`object_id` int(11) unsigned DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `anr_id` (`anr_id`),
|
||||
KEY `object_id` (`object_id`),
|
||||
CONSTRAINT `anrs_objects_ibfk_1` FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `anrs_objects_ibfk_2` FOREIGN KEY (`object_id`) REFERENCES `objects` (`id`) ON DELETE CASCADE
|
||||
CONSTRAINT `anrs_objects_ibfk_2` FOREIGN KEY (`object_id`) REFERENCES `objects` (`uuid`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1535 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
@ -145,7 +146,7 @@ DROP TABLE IF EXISTS `assets`;
|
|||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `assets` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uuid` char(36) NOT NULL,
|
||||
`anr_id` int(11) unsigned DEFAULT '0',
|
||||
`mode` tinyint(4) DEFAULT '1',
|
||||
`type` tinyint(4) DEFAULT '1',
|
||||
|
@ -163,11 +164,12 @@ CREATE TABLE `assets` (
|
|||
`created_at` datetime DEFAULT NULL,
|
||||
`updater` varchar(255) DEFAULT NULL,
|
||||
`updated_at` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
PRIMARY KEY (`uuid`),
|
||||
KEY `anr_id` (`anr_id`,`code`),
|
||||
KEY `anr_id_2` (`anr_id`),
|
||||
KEY `uuid` (`uuid`),
|
||||
CONSTRAINT `assets_ibfk_1` FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=357 DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -178,15 +180,13 @@ DROP TABLE IF EXISTS `assets_models`;
|
|||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `assets_models` (
|
||||
`asset_id` int(11) unsigned NOT NULL,
|
||||
`model_id` int(11) unsigned NOT NULL,
|
||||
`asset_id` char(36) NOT NULL,
|
||||
PRIMARY KEY (`asset_id`,`model_id`),
|
||||
KEY `asset_id` (`asset_id`),
|
||||
KEY `model_id` (`model_id`),
|
||||
CONSTRAINT `assets_models_ibfk_1` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`id`),
|
||||
CONSTRAINT `assets_models_ibfk_2` FOREIGN KEY (`model_id`) REFERENCES `models` (`id`),
|
||||
CONSTRAINT `assets_models_ibfk_3` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `assets_models_ibfk_4` FOREIGN KEY (`model_id`) REFERENCES `models` (`id`) ON DELETE CASCADE
|
||||
CONSTRAINT `assets_models_ibfk_4` FOREIGN KEY (`model_id`) REFERENCES `models` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `assets_models_ibfk_5` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`uuid`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
@ -279,9 +279,9 @@ DROP TABLE IF EXISTS `instances`;
|
|||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `instances` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`object_id` char(36) DEFAULT NULL,
|
||||
`asset_id` char(36) NOT NULL,
|
||||
`anr_id` int(11) unsigned DEFAULT NULL,
|
||||
`asset_id` int(11) unsigned DEFAULT NULL,
|
||||
`object_id` int(11) unsigned DEFAULT NULL,
|
||||
`root_id` int(11) unsigned DEFAULT NULL,
|
||||
`parent_id` int(11) unsigned DEFAULT NULL,
|
||||
`name1` varchar(255) DEFAULT NULL,
|
||||
|
@ -309,15 +309,15 @@ CREATE TABLE `instances` (
|
|||
`dh` tinyint(4) DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `anr_id` (`anr_id`),
|
||||
KEY `asset_id` (`asset_id`),
|
||||
KEY `object_id` (`object_id`),
|
||||
KEY `root_id` (`root_id`),
|
||||
KEY `parent_id` (`parent_id`),
|
||||
KEY `asset_id` (`asset_id`),
|
||||
KEY `object_id` (`object_id`),
|
||||
CONSTRAINT `instances_ibfk_1` FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_ibfk_2` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_ibfk_3` FOREIGN KEY (`object_id`) REFERENCES `objects` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_ibfk_4` FOREIGN KEY (`root_id`) REFERENCES `instances` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_ibfk_5` FOREIGN KEY (`parent_id`) REFERENCES `instances` (`id`) ON DELETE CASCADE
|
||||
CONSTRAINT `instances_ibfk_5` FOREIGN KEY (`parent_id`) REFERENCES `instances` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_ibfk_6` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`uuid`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_ibfk_7` FOREIGN KEY (`object_id`) REFERENCES `objects` (`uuid`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
@ -330,9 +330,9 @@ DROP TABLE IF EXISTS `instances_consequences`;
|
|||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `instances_consequences` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`object_id` char(36) DEFAULT NULL,
|
||||
`anr_id` int(11) unsigned DEFAULT '0',
|
||||
`instance_id` int(11) unsigned DEFAULT '0',
|
||||
`object_id` int(11) unsigned DEFAULT '0',
|
||||
`scale_impact_type_id` int(11) unsigned DEFAULT '0',
|
||||
`is_hidden` tinyint(4) DEFAULT '0',
|
||||
`locally_touched` tinyint(4) DEFAULT '0',
|
||||
|
@ -346,11 +346,9 @@ CREATE TABLE `instances_consequences` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `anr_id` (`anr_id`),
|
||||
KEY `instance_id` (`instance_id`),
|
||||
KEY `object_id` (`object_id`),
|
||||
KEY `scale_impact_type_id` (`scale_impact_type_id`),
|
||||
CONSTRAINT `instances_consequences_ibfk_1` FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_consequences_ibfk_2` FOREIGN KEY (`instance_id`) REFERENCES `instances` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_consequences_ibfk_3` FOREIGN KEY (`object_id`) REFERENCES `objects` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_consequences_ibfk_4` FOREIGN KEY (`scale_impact_type_id`) REFERENCES `scales_impact_types` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
@ -364,12 +362,12 @@ DROP TABLE IF EXISTS `instances_risks`;
|
|||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `instances_risks` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`amv_id` char(36) DEFAULT NULL,
|
||||
`vulnerability_id` char(36) NOT NULL,
|
||||
`threat_id` char(36) NOT NULL,
|
||||
`asset_id` char(36) NOT NULL,
|
||||
`anr_id` int(11) unsigned DEFAULT NULL,
|
||||
`amv_id` int(11) unsigned DEFAULT NULL,
|
||||
`specific` tinyint(4) DEFAULT '0',
|
||||
`asset_id` int(11) unsigned DEFAULT NULL,
|
||||
`threat_id` int(11) unsigned DEFAULT NULL,
|
||||
`vulnerability_id` int(11) unsigned DEFAULT NULL,
|
||||
`mh` tinyint(4) NOT NULL DEFAULT '1',
|
||||
`threat_rate` int(11) NOT NULL DEFAULT '-1',
|
||||
`vulnerability_rate` int(11) NOT NULL DEFAULT '-1',
|
||||
|
@ -389,17 +387,17 @@ CREATE TABLE `instances_risks` (
|
|||
`instance_id` int(11) unsigned DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `anr_id` (`anr_id`),
|
||||
KEY `amv_id` (`amv_id`),
|
||||
KEY `instance_id` (`instance_id`),
|
||||
KEY `asset_id` (`asset_id`),
|
||||
KEY `threat_id` (`threat_id`),
|
||||
KEY `vulnerability_id` (`vulnerability_id`),
|
||||
KEY `instance_id` (`instance_id`),
|
||||
KEY `amv_id` (`amv_id`),
|
||||
CONSTRAINT `instances_risks_ibfk_1` FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_risks_ibfk_2` FOREIGN KEY (`amv_id`) REFERENCES `amvs` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_risks_ibfk_4` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_risks_ibfk_5` FOREIGN KEY (`threat_id`) REFERENCES `threats` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_risks_ibfk_6` FOREIGN KEY (`vulnerability_id`) REFERENCES `vulnerabilities` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_risks_ibfk_7` FOREIGN KEY (`instance_id`) REFERENCES `instances` (`id`) ON DELETE CASCADE
|
||||
CONSTRAINT `instances_risks_ibfk_10` FOREIGN KEY (`vulnerability_id`) REFERENCES `vulnerabilities` (`uuid`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_risks_ibfk_11` FOREIGN KEY (`amv_id`) REFERENCES `amvs` (`uuid`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_risks_ibfk_7` FOREIGN KEY (`instance_id`) REFERENCES `instances` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_risks_ibfk_8` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`uuid`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_risks_ibfk_9` FOREIGN KEY (`threat_id`) REFERENCES `threats` (`uuid`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
@ -412,9 +410,9 @@ DROP TABLE IF EXISTS `instances_risks_op`;
|
|||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `instances_risks_op` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`object_id` char(36) DEFAULT NULL,
|
||||
`anr_id` int(11) unsigned DEFAULT NULL,
|
||||
`instance_id` int(11) unsigned DEFAULT NULL,
|
||||
`object_id` int(11) unsigned DEFAULT NULL,
|
||||
`rolf_risk_id` int(11) unsigned DEFAULT NULL,
|
||||
`risk_cache_code` char(100) DEFAULT NULL,
|
||||
`risk_cache_label1` varchar(255) DEFAULT NULL,
|
||||
|
@ -457,12 +455,12 @@ CREATE TABLE `instances_risks_op` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `anr_id` (`anr_id`),
|
||||
KEY `instance_id` (`instance_id`),
|
||||
KEY `object_id` (`object_id`),
|
||||
KEY `rolf_risk_id` (`rolf_risk_id`),
|
||||
KEY `object_id` (`object_id`),
|
||||
CONSTRAINT `instances_risks_op_ibfk_1` FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_risks_op_ibfk_2` FOREIGN KEY (`instance_id`) REFERENCES `instances` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `instances_risks_op_ibfk_3` FOREIGN KEY (`rolf_risk_id`) REFERENCES `rolf_risks` (`id`) ON DELETE SET NULL,
|
||||
CONSTRAINT `instances_risks_op_ibfk_4` FOREIGN KEY (`object_id`) REFERENCES `objects` (`id`) ON DELETE CASCADE
|
||||
CONSTRAINT `instances_risks_op_ibfk_4` FOREIGN KEY (`object_id`) REFERENCES `objects` (`uuid`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
@ -506,17 +504,17 @@ DROP TABLE IF EXISTS `measures_amvs`;
|
|||
CREATE TABLE `measures_amvs` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`measure_id` char(36) NOT NULL,
|
||||
`amv_id` int(11) unsigned DEFAULT NULL,
|
||||
`creator` varchar(255) DEFAULT NULL,
|
||||
`created_at` datetime DEFAULT NULL,
|
||||
`updater` varchar(255) DEFAULT NULL,
|
||||
`updated_at` datetime DEFAULT NULL,
|
||||
`amv_id` char(36) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `amv_id` (`amv_id`),
|
||||
KEY `measure_id` (`measure_id`),
|
||||
CONSTRAINT `measures_amvs_ibfk_1` FOREIGN KEY (`amv_id`) REFERENCES `amvs` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `measures_amvs_ibfk_2` FOREIGN KEY (`measure_id`) REFERENCES `measures` (`uuid`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=37164 DEFAULT CHARSET=utf8;
|
||||
KEY `amv_id` (`amv_id`),
|
||||
CONSTRAINT `measures_amvs_ibfk_2` FOREIGN KEY (`measure_id`) REFERENCES `measures` (`uuid`) ON DELETE CASCADE,
|
||||
CONSTRAINT `measures_amvs_ibfk_3` FOREIGN KEY (`amv_id`) REFERENCES `amvs` (`uuid`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=39861 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -598,7 +596,7 @@ CREATE TABLE `models` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `anr_id` (`anr_id`),
|
||||
CONSTRAINT `models_ibfk_1` FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -609,9 +607,9 @@ DROP TABLE IF EXISTS `objects`;
|
|||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `objects` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uuid` char(36) NOT NULL,
|
||||
`asset_id` char(36) NOT NULL,
|
||||
`object_category_id` int(11) unsigned DEFAULT NULL,
|
||||
`asset_id` int(11) unsigned DEFAULT NULL,
|
||||
`rolf_tag_id` int(11) unsigned DEFAULT NULL,
|
||||
`mode` tinyint(4) DEFAULT '1',
|
||||
`scope` tinyint(4) DEFAULT '1',
|
||||
|
@ -632,16 +630,17 @@ CREATE TABLE `objects` (
|
|||
`updater` varchar(255) DEFAULT NULL,
|
||||
`updated_at` datetime DEFAULT NULL,
|
||||
`anr_id` int(11) unsigned DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
PRIMARY KEY (`uuid`),
|
||||
KEY `object_category_id` (`object_category_id`),
|
||||
KEY `asset_id` (`asset_id`),
|
||||
KEY `rolf_tag_id` (`rolf_tag_id`),
|
||||
KEY `anr_id` (`anr_id`),
|
||||
KEY `asset_id` (`asset_id`),
|
||||
KEY `uuid` (`uuid`),
|
||||
CONSTRAINT `objects_ibfk_2` FOREIGN KEY (`object_category_id`) REFERENCES `objects_categories` (`id`) ON DELETE SET NULL,
|
||||
CONSTRAINT `objects_ibfk_3` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `objects_ibfk_5` FOREIGN KEY (`rolf_tag_id`) REFERENCES `rolf_tags` (`id`) ON DELETE SET NULL,
|
||||
CONSTRAINT `objects_ibfk_7` FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1004 DEFAULT CHARSET=utf8;
|
||||
CONSTRAINT `objects_ibfk_7` FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `objects_ibfk_8` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`uuid`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -685,9 +684,9 @@ DROP TABLE IF EXISTS `objects_objects`;
|
|||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `objects_objects` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`child_id` char(36) DEFAULT NULL,
|
||||
`father_id` char(36) DEFAULT NULL,
|
||||
`anr_id` int(11) unsigned DEFAULT NULL,
|
||||
`father_id` int(11) unsigned DEFAULT NULL,
|
||||
`child_id` int(11) unsigned DEFAULT NULL,
|
||||
`creator` varchar(255) DEFAULT NULL,
|
||||
`created_at` datetime DEFAULT NULL,
|
||||
`updater` varchar(255) DEFAULT NULL,
|
||||
|
@ -698,8 +697,8 @@ CREATE TABLE `objects_objects` (
|
|||
KEY `father_id` (`father_id`),
|
||||
KEY `child_id` (`child_id`),
|
||||
CONSTRAINT `objects_objects_ibfk_1` FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `objects_objects_ibfk_2` FOREIGN KEY (`father_id`) REFERENCES `objects` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `objects_objects_ibfk_3` FOREIGN KEY (`child_id`) REFERENCES `objects` (`id`) ON DELETE CASCADE
|
||||
CONSTRAINT `objects_objects_ibfk_2` FOREIGN KEY (`father_id`) REFERENCES `objects` (`uuid`) ON DELETE CASCADE,
|
||||
CONSTRAINT `objects_objects_ibfk_3` FOREIGN KEY (`child_id`) REFERENCES `objects` (`uuid`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=665 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
@ -978,7 +977,7 @@ CREATE TABLE `soacategory` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `referential_uuid` (`referential_uuid`),
|
||||
CONSTRAINT `soacategory_ibfk_1` FOREIGN KEY (`referential_uuid`) REFERENCES `referentials` (`uuid`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=78 DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=89 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -1013,7 +1012,7 @@ DROP TABLE IF EXISTS `threats`;
|
|||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `threats` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uuid` char(36) NOT NULL,
|
||||
`anr_id` int(11) unsigned DEFAULT NULL,
|
||||
`theme_id` int(11) unsigned DEFAULT NULL,
|
||||
`mode` tinyint(4) DEFAULT '1',
|
||||
|
@ -1037,13 +1036,14 @@ CREATE TABLE `threats` (
|
|||
`created_at` datetime DEFAULT NULL,
|
||||
`updater` varchar(255) DEFAULT NULL,
|
||||
`updated_at` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
PRIMARY KEY (`uuid`),
|
||||
UNIQUE KEY `anr_id` (`anr_id`,`code`),
|
||||
KEY `anr_id_2` (`anr_id`),
|
||||
KEY `threat_theme_id` (`theme_id`),
|
||||
KEY `uuid` (`uuid`),
|
||||
CONSTRAINT `threats_ibfk_1` FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `threats_ibfk_2` FOREIGN KEY (`theme_id`) REFERENCES `themes` (`id`) ON DELETE SET NULL
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=211 DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -1054,15 +1054,13 @@ DROP TABLE IF EXISTS `threats_models`;
|
|||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `threats_models` (
|
||||
`threat_id` int(11) unsigned NOT NULL,
|
||||
`model_id` int(11) unsigned NOT NULL,
|
||||
`threat_id` char(36) NOT NULL,
|
||||
PRIMARY KEY (`threat_id`,`model_id`),
|
||||
KEY `threat_id` (`threat_id`),
|
||||
KEY `model_id` (`model_id`),
|
||||
CONSTRAINT `threats_models_ibfk_1` FOREIGN KEY (`threat_id`) REFERENCES `threats` (`id`),
|
||||
CONSTRAINT `threats_models_ibfk_2` FOREIGN KEY (`model_id`) REFERENCES `models` (`id`),
|
||||
CONSTRAINT `threats_models_ibfk_3` FOREIGN KEY (`threat_id`) REFERENCES `threats` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `threats_models_ibfk_4` FOREIGN KEY (`model_id`) REFERENCES `models` (`id`) ON DELETE CASCADE
|
||||
CONSTRAINT `threats_models_ibfk_4` FOREIGN KEY (`model_id`) REFERENCES `models` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `threats_models_ibfk_5` FOREIGN KEY (`threat_id`) REFERENCES `threats` (`uuid`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
@ -1074,7 +1072,7 @@ DROP TABLE IF EXISTS `vulnerabilities`;
|
|||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `vulnerabilities` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uuid` char(36) NOT NULL,
|
||||
`anr_id` int(11) unsigned DEFAULT NULL,
|
||||
`mode` tinyint(4) DEFAULT '1',
|
||||
`code` char(100) DEFAULT NULL,
|
||||
|
@ -1091,11 +1089,12 @@ CREATE TABLE `vulnerabilities` (
|
|||
`created_at` datetime DEFAULT NULL,
|
||||
`updater` varchar(255) DEFAULT NULL,
|
||||
`updated_at` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
PRIMARY KEY (`uuid`),
|
||||
UNIQUE KEY `anr_id` (`anr_id`,`code`),
|
||||
KEY `anr_id_2` (`anr_id`),
|
||||
KEY `uuid` (`uuid`),
|
||||
CONSTRAINT `vulnerabilities_ibfk_1` FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5746 DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -1106,15 +1105,13 @@ DROP TABLE IF EXISTS `vulnerabilities_models`;
|
|||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `vulnerabilities_models` (
|
||||
`vulnerability_id` int(11) unsigned NOT NULL,
|
||||
`model_id` int(11) unsigned NOT NULL,
|
||||
`vulnerability_id` char(36) NOT NULL,
|
||||
PRIMARY KEY (`vulnerability_id`,`model_id`),
|
||||
KEY `vulnerability_id` (`vulnerability_id`),
|
||||
KEY `model_id` (`model_id`),
|
||||
CONSTRAINT `vulnerabilities_models_ibfk_1` FOREIGN KEY (`vulnerability_id`) REFERENCES `vulnerabilities` (`id`),
|
||||
CONSTRAINT `vulnerabilities_models_ibfk_2` FOREIGN KEY (`model_id`) REFERENCES `models` (`id`),
|
||||
CONSTRAINT `vulnerabilities_models_ibfk_3` FOREIGN KEY (`vulnerability_id`) REFERENCES `vulnerabilities` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `vulnerabilities_models_ibfk_4` FOREIGN KEY (`model_id`) REFERENCES `models` (`id`) ON DELETE CASCADE
|
||||
CONSTRAINT `vulnerabilities_models_ibfk_4` FOREIGN KEY (`model_id`) REFERENCES `models` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `vulnerabilities_models_ibfk_5` FOREIGN KEY (`vulnerability_id`) REFERENCES `vulnerabilities` (`uuid`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
@ -1127,4 +1124,4 @@ CREATE TABLE `vulnerabilities_models` (
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2019-04-24 10:31:41
|
||||
-- Dump completed on 2019-09-12 11:01:07
|
||||
|
|
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.
|
@ -1,54 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
/**
|
||||
* This autoloading setup is really more complicated than it needs to be for most
|
||||
* applications. The added complexity is simply to reduce the time it takes for
|
||||
* new developers to be productive with a fresh skeleton. It allows autoloading
|
||||
* to be correctly configured, regardless of the installation method and keeps
|
||||
* the use of composer completely optional. This setup should work fine for
|
||||