GovReady / GovReady-CMS-API

Compliance API service supporting GovReady's WordPress Agent
4 stars 0 forks source link

GovReady CMS API

The GovReady CMS API Service is used in conjuction with the GovReady WordPress Agent to provide cybersecurity, compliance, and operations and maintenance status information.

The GovReady CMS API uses Auth0 as the user authentication store, mongo db as the database, and RabbitMQ as the task queue.

When a new Agent -- such as a WordPress or Drupal plugin -- is initialized, a new site is created in the GovReady CMS API.
The API will then begin collecting information about the site by requesting information from the Agent (WordPress site), or polling site site. It also serves as a store for information collected manually within the Agent user interface.

Here is an overview of the data collected and the source for the information:

screenshot of GovReady WordPress dashboard

API Documentation

You can view all of their endpoints and associated parameters at /docs.

The API is scaffolded with Swagger. You can edit, preview and export the YAML file in an online editor at: http://editor.swagger.io/#/?import=https://raw.githubusercontent.com/GovReady/GovReady-CMS-API/master/swagger.yaml

Installing and Running

Depending on your network setup and security requirements, you may prefer to run the GovReady API locally rather than connecting to our servers. For more information about installation and configuration, read our wiki documentation.

Copy the .env file. Then run with forever:

sudo forever -w ./bin/www 

Alterntive starting command

cd path/to/repo
forever start ./bin/www

Commands to run to setup Ubuntu 14.04 server:

# Install node via nvm
apt-get update
apt-get install git build-essential
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
nvm install 6
node -v
npm install -g forever

# Install python (for Let's Encrypt)
apt-get install python

# Install RabbitMQ
echo 'deb http://www.rabbitmq.com/debian/ testing main' |
        sudo tee /etc/apt/sources.list.d/rabbitmq.list
wget -O- https://www.rabbitmq.com/rabbitmq-signing-key-public.asc |
        sudo apt-key add -
sudo apt-get update
sudo apt-get install rabbitmq-server    

# Install and run GovReady-CMS-API
cd /var/local
git clone https://github.com/GovReady/GovReady-CMS-API.git
cd GovReady-CMS-API
nano .env
npm install
forever -w ./bin/www