Picture of Trieu Truong
Re: Trouble setting up the authoring tool - MongoError
by Trieu Truong - Tuesday, 27 February 2018, 6:19 AM
 

[Update Feb-2018]

Recently I came across this discussion when trying to set up the Authoring Tool with MongoDB authentication enabled and was able to accomplish this.

Here are the steps I've done to install the AT 0.4.1 (FW 2.2.5) with MongoDB authentication enabled.

1/ MongoDB auth:

https://docs.mongodb.com/manual/tutorial/enable-authentication

2/ Create an admin user for 'system.users' from: mongo client

db.createUser({user: "adaptadmin", pwd: "abc123", roles: [ { role: "root", db: "admin" }]})

3/ Update Adapt's install.js to allow dbUser, dbPass and dbAuthSource
https://github.com/adaptlearning/adapt_authoring/pull/1822 

{
name: 'dbUser',
type: 'string',
description: 'Database server user',
pattern: installHelpers.inputHelpers.alphanumValidator,
default: ''
}, {
name: 'dbPass',
type: 'string',
description: 'Database server password',
pattern: installHelpers.inputHelpers.alphanumValidator,
default: ''
}, {
name: 'dbAuthSource',
type: 'string',
description: 'Database server authentication database',
pattern: installHelpers.inputHelpers.alphanumValidator,
default: 'admin'
}

Thanks to Johannes Baum for that commit.

4/ Start MongoDB with auth: "mongod --auth --dbpath ./data"

5/ Run "node install" as Adapts' wiki instructions

Hope it helps in some way.

Cheers