Skip to content

Latest commit

 

History

History
110 lines (67 loc) · 4.32 KB

INSTALL.md

File metadata and controls

110 lines (67 loc) · 4.32 KB

scap-v2-prototype

The SCAP v2 Prototype implements the components and basic message flows for the SCAP v2 Architecture which is defined here.

Build Instructions

The following provides instructions on how to set up the SCAP v2 Prototype on Ubuntu 20.04.

Install Docker

Docker can be installed using the instructions found here. Docker may be installed on other operating systems by following the instructions found here.

Install OpenDXL

The OpenDXL Broker Docker image can be retrieved using the following command.

sudo docker pull opendxl/opendxl-broker

Next, prepare the directory structure for the OpenDXL Broker. Assuming you are in a user home directory (e.g., /home/username), run the following commands. These commands are based on the instructions found here.

mkdir opendxl
mkdir opendxl/opendxl-broker

Next, run OpenDXL with the following command. The -v argument should point to the directory structure created in the previous step.

sudo docker run -d --name opendxl-broker -p 8443:8443 -p 8883:8883 -v /home/dhaynes/opendxl/opendxl-broker:/dxlbroker-volume opendxl/opendxl-broker

Check to see that the OpenDXL Docker image is running using the following command.

sudo docker ps

If there are no directories (config, keystore, logs, policy) in opendxl-broker, ensure that docker has permission to create them and re-run OpenDXL as above.

sudo chmod g+w opendxl/opendxl-broker
sudo chgrp ubuntu opendxl/opendxl-broker Grant write permission to group that sudo runs in (ubuntu)

Install OpenDXL Client Library

The following was based on the instructions found here.

First, check the OpenSSL version used by Python.

python3

Then, type the following.

>>> import ssl
>>> ssl.OPENSSL_VERSION

Once the OpenSSL version is verified (1.0.1 or greater), type the following.

>>> quit()

Next, install pip.

sudo apt install python3-pip

Then, the OpenDXL client library can be installed using the following command.

pip3 install dxlclient

Once installed, provision the OpenDXL client by running the following command. This will create files needed by the OpenDXL client to connect to the OpenDXL broker in the /home/dhaynes/opendxl/opendxl-client directory. You will have to enter the OpenDXL broker username (admin) and password (password).

python3 -m dxlclient provisionconfig /home/dhaynes/opendxl/opendxl-client 127.0.0.1 opendxl-client

Get the SCAP v2 Prototype

Retrieve the SCAP v2 Prototype by running the following command.

git clone https://github.com/opencybersecurityalliance/scap-v2-prototype.git

Then, edit scap-v2-prototype/src/common.py to point to the OpenDXL client configuration file created during provisioning.

CONFIG = "/home/username/opendxl/opendxl-client/dxlclient.config"

Now, the individual components of the SCAP v2 Architecture can be started from the scap-v2-prototype/src directory. Start each component in its own window to view the associated messages.

Start the Manager.

python3 manager.py

Start the Repository. The repository must be started before any Collector, PCX, or PCE.

python3 repository.py

Start the Collector. The Collector must be started before any PCX or PCE that reports to it. Select the desired configuration file on the command line.

python3 collector.py ../config/collector-1.config

Start the PCX. The PCX must be started before any PCE that reports to it.

python3 pcx.py ../config/pcx-1.config

Start the PCE. This triggers action by the manager, repository and PCX components.

python3 pce.py ../config/pce-1.config

Start the Application. Enter the desired operation when prompted.

python3 application.py ../config/application-1.config

Getting Help

To get help with the SCAP v2 Prototype or to report an issue. Please open an issue or send an email to https://groups.google.com/a/list.nist.gov/g/scap-dev-endpoint.