MongoDB Adapter Setup Quick Guides
The following information is available to assist in the setup of Mongo Delivery Method.
STEP JSON Schema
The STEP JSON schema can be downloaded from your STEP server at: http://[enter step-server]/files/StepSchema.json
Configuring Mongo Authentication Quick Guide
The following quick guide describes how to configure a Mongo database to use authentication. Details may be found in the Mongo documentation on the web.
The guide assumes that the setup is used on a Mongo database installation running as a single server installation (i.e., the Mongo database is running as a standalone server).
- Start the Mongo database without authentication.
- Log onto the database using the Mongo client.
- Create a system administrator user.
> use admin switched to db admin > db.createUser( { user: "admin", pwd: "password", roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] } ) Successfully added user: { "user" : "admin", "roles" : [ { "role" : "userAdminAnyDatabase", "db" : "admin" } ] }
- Create the user that will be used when the MongoDB adapter logs onto the Mongo database. This user should be created in the admin database with roles to read and write any databases in Mongo:
> use admin switched to db admin > db.createUser( {"user" : "stepsys", "pwd" : "stepsys", "roles" : [ "readWriteAnyDatabase" ] }) Successfully added user: { "user" : "stepsys", "roles" : [ "readWriteAnyDatabase" ] }
- Stop the Mongo database and enable authentication. This may be done in the Mongo configuration file:
auth = true
or from the command line:
mongod --auth --config
SSL Configuration Quick Guide
When the Mongo DB adapter is configured for SSL, a key store and a trust store must be configured.
- The key store is a key store file in jks format containing the Mongo Adapter (STEP) private key and certificate.
- The trust store is a trust store file in jks format containing the Mongo DB public key and certificate.
Key store files may be created from the public and private key files and certificates using utilities like the java keytool utility. The diagram below illustrates the uses of the key store and trust store.
To configure SSL encryption on the STEP-to-Mongo database connection:
- Configure the Mongo database to use SSL: http://docs.mongodb.org/manual/tutorial/configure-ssl/
- Configure the Mongo client to connect to a Mongo database using SSL: http://docs.mongodb.org/manual/tutorial/configure-ssl-clients/
The Mongo database available as a free download does not support SSL. (SSL requires the Enterprise edition of Mongo.) Instead, download the appropriate source and compile your own version of the Mongo database from the web: https://www.mongodb.com/docs/manual/installation/