Prepare SAML authentication Added in 7.5.0

POST /_security/saml/prepare

Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch.

application/json

Body Required

  • acs string

    The Assertion Consumer Service URL that matches the one of the SAML realms in Elasticsearch. The realm is used to generate the authentication request. You must specify either this parameter or the realm parameter.

  • realm string

    The name of the SAML realm in Elasticsearch for which the configuration is used to generate the authentication request. You must specify either this parameter or the acs parameter.

  • A string that will be included in the redirect URL that this API returns as the RelayState query parameter. If the Authentication Request is signed, this value is used as part of the signature computation.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
POST /_security/saml/prepare
curl \
 -X POST http://api.example.com/_security/saml/prepare \
 -H "Content-Type: application/json" \
 -d '{"acs":"string","realm":"string","relay_state":"string"}'
Request examples
{
  "acs": "string",
  "realm": "string",
  "relay_state": "string"
}
Response examples (200)
{
  "id": "string",
  "realm": "string",
  "redirect": "string"
}