Update SAML configuration
Updates an existing SAML configuration.
Path parameters
-
The Elasticsearch Security realm identifier.
Query parameters
-
version string
When specified, checks for conflicts against the version stored in the persistent store (returned in 'x-cloud-resource-version' of the GET request)
Body Required
The SAML configuration
-
The identifier for the security realm
-
The friendly name of the security realm
-
The SAML Identity Provider configuration
Additional properties are allowed.
-
The SAML Service Provider configuration
Additional properties are allowed.
-
The SAML attribute mapping configuration
Additional properties are allowed.
-
nameid_format string
The NameID format. If not specified the IdP default is used. Example: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent'
-
role_mappings object
The role mapping rules associated with the security realm
Additional properties are allowed.
-
enabled boolean
When true, enables the security realm
-
order integer(int32)
The order that the security realm is evaluated
-
force_authn boolean
Specifies whether to set the ForceAuthn attribute when requesting that the IdP authenticate the current user. If set to true, the IdP is required to verify the user's identity, irrespective of any existing sessions they might have.
-
signing_certificate_url string
The SAML signing certificate bundle URL. The bundle should be a zip file containing 'signing.key' and 'signing.pem' files in the directory '/saml/:id', where :id is the value of the [id] field.
-
The password to the signing certificate bundle
-
signing_saml_messages array[string]
A list of SAML message types that should be signed. Each element in the list should be the local name of a SAML XML Element. Supported element types are AuthnRequest, LogoutRequest and LogoutResponse. Only valid if a signing certificate is also specified.
-
encryption_certificate_url string
The SAML encryption certificate bundle URL. The bundle should be a zip file containing 'encryption.key' and 'encryption.pem' files in the directory '/saml/:id', where :id is the value of the [id] field.
-
The password to the encryption certificate bundle
-
ssl_certificate_url string
The SSL trusted CA certificate bundle URL. The bundle should be a zip file containing a single keystore file 'keystore.ks' Note that all keys should omit the 'xpack.security.authc.realms.saml.{realm_id}' prefix. For example, when the realm ID is set to 'saml1', the advanced configuration 'xpack.security.authc.realms.saml.saml1.ssl.verification_mode: full' should be added as 'ssl.verification_mode: full'.
-
The password to the SSL certificate bundle URL truststore
-
The format of the keystore file. Should be jks to use the Java Keystore format or PKCS12 to use PKCS#12 files. The default is jks.
Values are
jks
orPKCS12
. -
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 'xpack.security.authc.realms.{realm_type}.{realm_id}'.
Responses
-
The SAML configuration was successfully updated
Additional properties are allowed.
-
- 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 SAML IDP metadata endpoint returned an error response code 200 OK. (code:
security_realm.saml.invalid_idp_metadata_url
) - Invalid certificate bundle URL. (code:
security_realm.invalid_bundle_url
)
- The realm id is already in use. (code:
-
The realm specified by {realm_id} cannot be found. (code:
security_realm.not_found
) -
There is a version conflict. (code:
security_realm.version_conflict
)
curl \
-X PUT https://{{hostname}}/api/v1/platform/configuration/security/realms/saml/{realm_id} \
-d '{"id":"string","name":"string","idp":{"entity_id":"string","metadata_path":"string","use_single_logout":true},"sp":{"entity_id":"string","acs":"string","logout":"string"},"attributes":{"principal":"string","groups":"string","name":"string","mail":"string","dn":"string"},"nameid_format":"string","role_mappings":{"default_roles":["string"],"rules":[{"type":"username","roles":["string"],"value":"string"}]},"enabled":true,"order":42,"force_authn":true,"signing_certificate_url":"string","signing_certificate_url_password":"string","signing_saml_messages":["string"],"encryption_certificate_url":"string","encryption_certificate_url_password":"string","ssl_certificate_url":"string","ssl_certificate_url_truststore_password":"string","ssl_certificate_url_truststore_type":"jks","override_yaml":"string"}'
{
"id": "string",
"name": "string",
"idp": {
"entity_id": "string",
"metadata_path": "string",
"use_single_logout": true
},
"sp": {
"entity_id": "string",
"acs": "string",
"logout": "string"
},
"attributes": {
"principal": "string",
"groups": "string",
"name": "string",
"mail": "string",
"dn": "string"
},
"nameid_format": "string",
"role_mappings": {
"default_roles": [
"string"
],
"rules": [
{
"type": "username",
"roles": [
"string"
],
"value": "string"
}
]
},
"enabled": true,
"order": 42,
"force_authn": true,
"signing_certificate_url": "string",
"signing_certificate_url_password": "string",
"signing_saml_messages": [
"string"
],
"encryption_certificate_url": "string",
"encryption_certificate_url_password": "string",
"ssl_certificate_url": "string",
"ssl_certificate_url_truststore_password": "string",
"ssl_certificate_url_truststore_type": "jks",
"override_yaml": "string"
}
# Headers
x-cloud-resource-version: string
x-cloud-resource-created: string
x-cloud-resource-last-modified: string
# Payload
{}
# Headers
x-cloud-error-codes: security_realm.id_conflict
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
# Headers
x-cloud-error-codes: security_realm.not_found
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
# Headers
x-cloud-error-codes: security_realm.version_conflict
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}