Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-36117

LDAP Authorization add support for posixGroup schema (RFC2307)

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.8
    • Affects Version/s: None
    • Component/s: Security
    • Labels:
      None
    • Fully Compatible
    • Security 2018-12-17, Security 2019-01-14, Security 2019-01-28, Security 2019-02-11

      When LDAP authentication and authorization is enabled in the Server, there is a variable

      {USER}

      that can be used in the security.ldap.authz.queryTemplate configuration option.

      That variable will contain the DN of the user after the security.ldap.userToDNMapping expression is processed.

      Please add another variable, such as

      {0}

      that allows to use the non-mapped username (the username passed to the client.

      This will be useful for LDAP environments where the posixGroup schema is used (RFC2307) and the member field contains the user uid instead of the full DN:

      Example posixGroup element:

      dn: cn=Administrators,ou=group,ou=engineering,dc=example,dc=com
      memberUid: bob
      memberUid: eve
      memberUid: tom
      cn: Administrators
      objectClass: posixgroup
      objectClass: top
      gidNumber: 12345
      

      Possible configuration settings for MongoDB once the {0} variable is available:

      security.ldap.authz.queryTemplate = ou=group,ou=engineering,dc=example,dc=com??base?(&(objectClass=posixGroup)(memberUid=\{0}))
      security.ldap.userToDNMapping=[{match : "(.+)",substitution:"uid=\{0},ou=people,ou=engineering,dc=example,dc=com"}]
      

      If the username is "bob":

      • {0} will be "bob" in the security.ldap.userToDNMapping parameter and the security.ldap.authz.queryTemplate
      • {USER} will be "uid=bob,ou=people,ou=engineering,dc=example,dc=com"

            Assignee:
            jonathan.reams@mongodb.com Jonathan Reams
            Reporter:
            emilio.scalise@mongodb.com Emilio Scalise
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: