... | ... | @@ -9,7 +9,6 @@ Documentation for these frameworks can be found directly on their site. |
|
|
All of these libraries are provided under MIT License and thus are free to use in the VM4SEC project.
|
|
|
|
|
|
# Repository organization
|
|
|
|
|
|
Directories and files:
|
|
|
|
|
|
- `.` contains the license, the README, and some project-level configuration files used by NodeJS.
|
... | ... | @@ -22,46 +21,43 @@ Directories and files: |
|
|
- `public` contains the files that are actually visible to everyone with access on the server.
|
|
|
- `.env-default` contains all environment variables that hold host configurations (e.g., URLS) for each backend service.
|
|
|
|
|
|
# Installation of VM4SEC Dashboard
|
|
|
|
|
|
- **Step 1**: Clone the latest VM4SEC Dashboard version that can be found in [this link](https://gitlab.seis.iti.gr/vm4sec/vm4sec-dashboard.git) and navigate to the root directory.
|
|
|
- **Step 2**: To deploy the application you have to first install all the dependencies used. Open cmd and run the following command:
|
|
|
|
|
|
```bash
|
|
|
npm install
|
|
|
```
|
|
|
|
|
|
- **Step 3**: Next, you must create an empty `.env` file in the root directory of the application. Then, copy the contents of the `.env-default` file (also found in root directory) inside the `.env` file.
|
|
|
|
|
|
> **Important Notice:** The `.env` file contains all environment variables that hold host configurations for each required backend service (i.e., the endpoints of the _Project Management_, the _Quantitative Security Assessment_ and the _Vulnerability Prediction_ services). In case you have installed these services locally on your premises, you will need to modify these environment variables accordingly, by providing the correct IP and PORT. Remember to restart the application each time you modify this file.
|
|
|
|
|
|
- **Step 4**: Finally, you can start the VM4SEC Dashboard server and a web page should open on your favorite browser. Open cmd and run the following command:
|
|
|
|
|
|
```bash
|
|
|
npm start
|
|
|
```
|
|
|
|
|
|
- **Step 5**: Visit [http://localhost:3000/](http://localhost:3000/) to navigate to the VM4SEC dashboard. You should be able to access the dashboard home page.
|
|
|
|
|
|
# Installation of SDK4ED Dashboard using Docker (recommended)
|
|
|
Alternatively, you can install the VM4SEC Dashboard using Docker.
|
|
|
# Installation of VM4SEC Dashboard from scratch
|
|
|
In this section, we provide instructions on how the user can set up the VM4SEC Dashboard from scratch, using Node's *npm* package manager.
|
|
|
- **Step 1**: Clone the latest VM4SEC Dashboard version that can be found in the present Gitlab repository and navigate to the root directory.
|
|
|
- **Step 2**: To deploy the application you have to first install all the dependencies used. Open a terminal inside the application's root directory and run the following command:
|
|
|
```bash
|
|
|
npm install
|
|
|
```
|
|
|
- **Step 3**: Next, you must create an empty `.env` file in the root directory of the application. Then, copy the contents of the `.env-default` file (also found in root directory) inside the `.env` file.
|
|
|
|
|
|
> **Important Notice:** The `.env` file contains all environment variables that hold host configurations for each required backend service (i.e., the endpoints of the *Project Management*, the *Quantitative Security Assessment* and the *Vulnerability Prediction* services). In case you have installed these services locally on your premises, you will need to modify these environment variables accordingly, by providing the correct IP and PORT. Remember to restart the application each time you modify this file.
|
|
|
- **Step 4**: Finally, you can start the VM4SEC dashboard server and a web page should open on your favorite browser. Use the terminal to run the following command:
|
|
|
```bash
|
|
|
npm start
|
|
|
```
|
|
|
- **Step 5**: Visit http://localhost:3000/ to navigate to the VM4SEC dashboard. You should be able to access the dashboard home page.
|
|
|
|
|
|
# Installation of VM4SEC Dashboard using Docker (recommended)
|
|
|
In this section, we provide instructions on how the user can set up the VM4SEC Dashboard using Docker. We highly recommend this way of installing the Dashboard, as it constitutes the easiest and most reliable way.
|
|
|
- **Step 1**: Download and install [Docker](https://www.docker.com/).
|
|
|
- **Step 2**: Clone the latest VM4SEC Dashboard version that can be found in the present Gitlab repository and navigate to the root directory.
|
|
|
- **Step 3**: **Important** Configure `.env-default` file based on your needs. The `.env-default` file contains all environment variables that hold host configurations for each required backend service (i.e., the endpoints of the *Project Management*, the *Quantitative Security Assessment* and the *Vulnerability Prediction* services). In case you have installed these services locally on your premises, you will need to modify these environment variables accordingly, by providing the correct IP and PORT.
|
|
|
- **Step 4**: In the home directory of the VM4SEC Dashboard, open cmd and execute the following command:
|
|
|
```
|
|
|
docker build -t vm4sec-dashboard-image .
|
|
|
```
|
|
|
This command will result in the creation of a Docker Image named *vm4sec-dashboard-image*. In order to create and start a Docker Container from this image, execute the following command:
|
|
|
- **Step 5**: Open cmd and run:
|
|
|
```
|
|
|
docker run -t -d --name vm4sec-dashboard -p 3000:3000 vm4sec-dashboard-image
|
|
|
```
|
|
|
This command will generate and run a Docker Container named *vm4sec-dashboard* in detach mode, i.e. the Node server hosting the dashboard will start in the background.
|
|
|
- **Step 6**: You can now visit http://localhost:3000/ to navigate to the VM4SEC dashboard (change the port accordingly in case you updated it in the `docker run` command). You should be able to access the dashboard home page.
|
|
|
- **Step 2**: The VM4SEC dashboard is bundled as a Docker Image on [DockerHub](https://hub.docker.com/r/tsoukj/vm4sec-dashboard). In order to install and run it locally, open a terminal and execute the following command (assuming that Docker Engine is already installed on your system):
|
|
|
```bash
|
|
|
docker run \
|
|
|
--tty \
|
|
|
--detach \
|
|
|
--name vm4sec-dashboard \
|
|
|
--publish 3000:3000 \
|
|
|
--env REACT_APP_PROJECT_MANAGEMENT_SERVER_IP="http://160.40.52.130:3005/VM4SEC/" \
|
|
|
--env REACT_APP_SECURITY_TOOL_SERVER_IP="http://160.40.52.130:8088" \
|
|
|
--env REACT_APP_VULNERABILITY_VP_TOOL_SERVER_IP="http://160.40.52.130:5002" \
|
|
|
tsoukj/vm4sec-dashboard:v1
|
|
|
```
|
|
|
The above command will download the Docker Image of the VM4SEC dashboard locally and will generate a Docker Container named *vm4sec-dashboard* in detach mode. It will also start the Node server that hosts the dashboard in the background. Hence, after the execution of this command the VM4SEC dashboard will be up and running at port 3000 of of your local machine.
|
|
|
|
|
|
**Important Notice:** The environmental variables `REACT_APP_PROJECT_MANAGEMENT_SERVER_IP`, `REACT_APP_SECURITY_TOOL_SERVER_IP`, and `REACT_APP_VULNERABILITY_VP_TOOL_SERVER_IP` hold host configurations for each required backend service (i.e., the endpoints of the *Project Management*, the *Quantitative Security Assessment* and the *Vulnerability Prediction* services). In case you have installed these services locally on your premises, you will need to modify these environment variables accordingly, by providing the correct IP and PORT.
|
|
|
- **Step 3**: You can now visit http://localhost:3000/ to navigate to the VM4SEC dashboard (change the port accordingly in case you updated it in the `docker run` command). You should be able to access the dashboard home page.
|
|
|
|
|
|
# MongoDB
|
|
|
|
|
|
A MongoDB is necessary for storing the results of the analysis that is performed by the individual services of the VM4SEC Platform. The VM4SEC Dashboard uses this MongoDB in order to keep the results of each analysis.
|
|
|
|
|
|
The process of setting up a database for the VM4SEC Platform is simple. The user just needs to deploy the latest MongoDB instance from DockerHub. In particular, the following command needs to be executed:
|
... | ... | |