BaderLab / GenomeClinic-PGX

Web application for clinical pharmacogenomic interpretation
GNU Lesser General Public License v3.0
9 stars 2 forks source link

Include Database Credentials #173

Closed patmagee closed 9 years ago

patmagee commented 9 years ago

At the moment, the database is connecting strictly to a local instance of mongoDB, which may not always be the case, additionally in order to ensure for increased security for patient data, there must be a method included for passing using credentials to the database.

patmagee commented 9 years ago

Credentials can now be added in one of two ways

1. Adding credentials to constants.json

once the project is build all Constants and config options are kept in the lib/conf/constants.json file. To add credentials to this file simply change the lines saying:

AUTH_USER:null,
AUTH_PASSWD:null

to

AUTH_USER:<username>,
AUTH_PASSWD:<password>
2. Pass Options as a comand line flag.

You can also send the credentials once via the command to start the server:

~$ node webapp.js -A [user]
Using authenticated MongoDB login
USERNAME: [user]
PASSWORD: [insert password]

You will be prompted to provide the appropriate password credentials with this command (which will be hidden and stored in memory, never saved).