LDAP Auth Advanced Configuration
The ldap-auth-advanced plugin authenticates clients against LDAP, optionally maps directory users to consumers, and supports LDAP, Basic, StartTLS, and LDAPS. Configuration covers credential fields and route and service fields.
Parameters
See plugin common configurations for configuration options available to all plugins.
This plugin supports gateway references in string-valued configuration fields. Use the $env:// prefix for environment variables or the $secret:// prefix for values from a secret manager, such as HashiCorp Vault’s KV secrets engine. The gateway resolves these references at runtime. ADC ${NAME} interpolation is different because ADC resolves it while loading the configuration file, before synchronization. For more information, see environment variables in plugin and secrets.
Credentials
The following are plugin attributes available for configurations on credentials.
user_dn
valid value:
between 1 and 4096 charactersDistinguished name of the directory entry this consumer represents, such as
uid=johndoe,ou=users,dc=example,dc=org. It has to match the DN the plugin resolves through its directory search.
Routes or Services
The following are plugin attributes available for configurations on routes or services.
ldap_uri
valid value:
between 1 and 256 charactersAddress of the LDAP directory, as
hostorhost:port. When the port is omitted,636is used ifuse_ldapsis enabled and389otherwise.base_dn
valid value:
between 1 and 4096 charactersDistinguished name of the subtree the plugin searches to resolve the user, such as
ou=users,dc=example,dc=org.attribute
valid value:
an RFC 4512 attribute description, at most 256 charactersAttribute matched against the user name supplied by the client. The search filter is
(attribute=username), souidsuits most OpenLDAP directories andsAMAccountNamesuits Active Directory.bind_dn
valid value:
between 1 and 4096 charactersDistinguished name the plugin binds as to perform the search. When unset, the search is performed anonymously. Setting it requires
ldap_password.ldap_password
valid value:
between 1 and 4096 charactersPassword for
bind_dn. Required whenbind_dnis set. When Data Plane data encryption is enabled, this field is encrypted at rest.use_ldaps
If true, connect to the directory over LDAPS. Mutually exclusive with
use_starttls.use_starttls
If true, upgrade a plaintext connection to TLS with StartTLS. Mutually exclusive with
use_ldaps.ssl_verify
If true, verify the directory's TLS certificate when connecting over LDAPS or StartTLS.
timeout
valid value:
between 1 and 60000 inclusiveTimeout in milliseconds for the connection to the directory.
size_limit
valid value:
greater than or equal to 2Maximum number of entries the directory returns for the search. The default of
2is enough to detect an ambiguous user name, which the plugin rejects rather than binding as an arbitrary match.time_limit
valid value:
greater than or equal to 0Time limit in seconds the directory applies to the search. Set to
0to use the directory's own default.consumer_required
If true, the authenticated user has to map onto a consumer whose credential records their distinguished name, and a user without such a credential is rejected. Set to
falseto authenticate against the directory without involving consumers.header_type
valid value:
ldaporbasicAuthentication scheme the plugin accepts in the
AuthorizationorProxy-Authorizationheader, and the scheme it names in theWWW-Authenticatechallenge. In both cases the credential itself isbase64(username:password), sobasicproduces an ordinary HTTP Basic exchange.hide_credentials
If true, remove the header carrying the directory credentials after authentication so the username and password are not forwarded upstream. Available in API7 Enterprise from version 3.10.6.
realm
Realm reported in the
WWW-Authenticateheader of the challenge returned to unauthenticated clients.keepalive
If true, keep connections to the directory alive so that they are reused across requests.
keepalive_timeout
valid value:
greater than or equal to 1000Idle time in milliseconds after which a pooled connection to the directory is closed.
keepalive_pool_size
valid value:
greater than or equal to 1Maximum number of pooled connections to the directory per worker.
keepalive_pool_name
valid value:
between 1 and 256 charactersName of the connection pool. Set it to keep the connections of different plugin configurations in separate pools.