MongoDB Authentication

92 views
Skip to first unread message

tanveer madan

unread,
Aug 15, 2016, 7:50:20 PM8/15/16
to mongodb-user
Hi,

I was using role based access/authentication until now
Then I enabled LDAP authentication using Linux PAM and created other users
After restarting the database I am unable to access the database with users that had role based access

Does mongodb support mixed authentication ?

Thanks,
Tanveer

John Murphy

unread,
Aug 24, 2016, 6:41:44 PM8/24/16
to mongodb-user

Hi Tanveer,

MongoDB can be configured to support multiple authenticationMechanisms. Note that LDAP support is only included in MongoDB Enterprise for Linux editions.

For example you could use the following on MongoDB 3.0+ to allow SCRAM-SHA-1 and LDAP Proxy Authority Authentication:

mongod --auth --setParameter saslauthPath="" --setParameter authenticationMechanisms=PLAIN,SCRAM-SHA-1 --auth

Also note that it is possible to set the authentication parameters using a configuration file:

security:
    authorization: enabled
setParameter:
    authenticationMechanisms: SCRAM-SHA-1,MONGODB-X509,PLAIN

Please confirm that you allow both mechanisms so that LDAP and MongoDB credentials can be used.

Regards,
John Murphy

Reply all
Reply to author
Forward
0 new messages