Type to search.

Create LDAP configuration

  • POST /platform/configuration/security/realms/ldap
Auth

Creates a new LDAP configuration.

Request body

The LDAP configuration

id string required

The identifier for the security realm

name string required

The friendly name of the security realm

urls string[] required

The LDAP URLs used to authenticate against, in the format ldap[s]://server:port. Note that ldap and ldaps protocols cannot be mixed together.

bind_anonymously boolean required

When true, bindDb credentials are ignored

bind_type enum required

The type of user binding to apply

Values: user_search user_templates
user_dn_templates string[]

The distinguished name template that replaces the user name with the string {0}. Only used when bind_type is set to 'user_templates'.

bind_dn string

The distinguished name of the user that is used to bind to the LDAP and perform searches. Only used when bind_type is set to 'user_search'.

bind_password string

The user password that is used to bind to the LDAP server. Only used when bind_type is set to 'user_search'.

user_group_attribute string

Specifies the attribute to examine on the user for group membership. If any 'group_search' settings are specified, this setting is ignored. Defaults to 'memberOf'.

certificate_url string

The SSL trusted CA certificate bundle URL. The bundle should be a zip file containing a single keystore file 'keystore.ks' in the directory '/ldap/:id/truststore', where :id is the value of the [id] field.

certificate_url_truststore_password string

The password to the certificate bundle URL truststore

certificate_url_truststore_type enum

The format of the truststore file. Should be jks to use the Java Keystore format or PKCS12 to use PKCS#12 files. The default is jks.

Values: jks PKCS12
enabled boolean

When true, enables the security realm

order integer · format: int32

The order that the security realm is evaluated

override_yaml string

Advanced configuration options in YAML format. Any settings defined here will override any configuration set via the API. Note that all keys should omit the 'xpack.security.authc.realms.ldap.{realm_id}' prefix. For example, when the realm ID is set to 'ldap1', the advanced configuration 'xpack.security.authc.realms.ldap.ldap1.ssl.verification_mode: full' should be added as 'ssl.verification_mode: full'.

Responses

The LDAP configuration was successfully created

application/json

Response Type: object

Response headers

x-cloud-resource-version string

The resource version, which is used to avoid update conflicts with concurrent operations

x-cloud-resource-created string

The date-time when the resource was created (ISO format relative to UTC)

x-cloud-resource-last-modified string

The date-time when the resource was last modified (ISO format relative to UTC)