LDAP integration with MongoDB

Hi, instructor,

I have a question about LDAP integration with MongoDB. In the lecture, we create a user with his password in LDAP, then create the same user in MongoDB. Is there a way that we can create a user from MongoDB directly under specific organization unit and map him to LDAP? In other word, does it mean we only can use users predefined in LDAP? Thanks a lot.

Q Yang

Hi Q Yang,

Starting with MongoDB 3.4 , LDAP integration allows both users and roles to be defined in LDAP. If users and roles are defined on the LDAP server, you do not need to create the user at all in MongoDB. Because all the definition of the user is actually defined in the LDAP configuration. So you only need to create users in LDAP not in both.

You may want to review those lectures discussing LDAP authorization. You will need to create roles and/or map roles in MongoDB to roles in the LDAP directory.