georchestra / georchestra-gateway

GNU General Public License v3.0
0 stars 6 forks source link

Feature/auth with multiple ldap dbs #19

Closed groldan closed 2 years ago

groldan commented 2 years ago

Configuration structure changed to support multiple LDAP databases as authentication source:

georchestra:
  gateway:
    security:
      ldap:
        # Multiple LDAP data sources are supported. The first key defines a simple
        # name for them. The `default` one here, disabled by default, is pre-configured
        # to use Georchestra's default OpenLDAP database.
        # You should usually just enable it in the georchestra dataidr's gateway.yml
        # with georchestra.gateway.security.ldap.default.enabled: true
        default:
          enabled: true
        ldap2:
          # Sample additional LDAP database configuration. Disabled. Enable and
          # tweak as needed if you want to authenticate against multiple LDAP databases.
          # Can also change the 'ldap2' key to something meaningful to you.
          enabled: false
          extended: true
          url: ${ldapScheme}://${ldapHost}:${ldapPort}
          baseDn: ${ldapBaseDn:dc=georchestra,dc=org}
          users:
            rdn: ${ldapUsersRdn:ou=users}
            searchFilter: ${ldapUserSearchFilter:(uid={0})}
            pendingUsersSearchBaseDN: ou=pendingusers
            protectedUsers: geoserver_privileged_user
          roles:
            rdn: ${ldapRolesRdn:ou=roles}
            searchFilter: ${ldapRolesSearchFilter:(member={0})}
            protectedRoles: ADMINISTRATOR, EXTRACTORAPP, GN_.*, ORGADMIN, REFERENT, USER, SUPERUSER
          orgs:
            rdn: ${ldapOrgsRdn:ou=orgs}
            orgTypes: Association,Company,NGO,Individual,Other
            pendingOrgSearchBaseDN: ou=pendingorgs
pmauduit commented 2 years ago

Finished the late-review