IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Create LDAP configuration
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Create LDAP configuration
editCreates a new LDAP configuration.
Request
editPOST /api/v1/platform/configuration/security/realms/ldap
Request body
edit(LdapSettings) (required) The LDAP configuration
Responses
edit-
201 -
The LDAP configuration was successfully created
Headers
-
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)
-
x-cloud-resource-version(string) - The resource version, which is used to avoid update conflicts with concurrent operations
-
-
400 -
-
The realm id is already in use. (code:
security_realm.id_conflict) -
The selected id is not valid. (code:
security_realm.invalid_id) -
Order must be greater than zero. (code:
security_realm.invalid_order) -
Invalid Elasticsearch Security realm type. (code:
security_realm.invalid_type) -
The realm order is already in use. (code:
security_realm.order_conflict) -
Advanced YAML format is invalid. (code:
security_realm.invalid_yaml) -
The url format is invalid. (code:
security_realm.invalid_url) -
Invalid LDAP URL. (code:
security_realm.ldap.invalid_url) -
Invalid certificate bundle URL. (code:
security_realm.invalid_bundle_url)
Headers
-
x-cloud-error-codes(string; allowed values: [security_realm.id_conflict,security_realm.invalid_id,security_realm.invalid_order,security_realm.invalid_type,security_realm.order_conflict,security_realm.invalid_yaml,security_realm.invalid_url,security_realm.ldap.invalid_url,security_realm.invalid_bundle_url]) - The error codes associated with the response
-
The realm id is already in use. (code:
-
449 -
Elevated permissions are required. (code:
root.unauthorized.rbac.elevated_permissions_required)Headers
-
x-cloud-error-codes(string; allowed values: [root.unauthorized.rbac.elevated_permissions_required]) - The error codes associated with the response
-
Request example
editcurl -XPOST https://{{hostname}}/api/v1/platform/configuration/security/realms/ldap \
-H "Authorization: ApiKey $ECE_API_KEY" \
-H 'Content-Type: application/json' \
-d '
{
"bind_anonymously" : true,
"bind_dn" : "string",
"bind_password" : "string",
"bind_type" : "string",
"certificate_url" : "string",
"certificate_url_truststore_password" : "string",
"certificate_url_truststore_type" : "string",
"enabled" : true,
"group_search" : {
"base_dn" : "string",
"filter" : "string",
"scope" : "string",
"user_attribute" : "string"
},
"id" : "string",
"load_balance" : {
"cache_ttl" : "string",
"type" : "string"
},
"name" : "string",
"order" : 0,
"override_yaml" : "string",
"role_mappings" : {
"default_roles" : [
"string"
],
"rules" : [
{
"roles" : [
"string"
],
"type" : "string",
"value" : "string"
}
]
},
"urls" : [
"string"
],
"user_dn_templates" : [
"string"
],
"user_group_attribute" : "string",
"user_search" : {
"base_dn" : "string",
"filter" : "string",
"scope" : "string"
}
}
'