Skip to content

Adding doc for the new API introduced by #64517 - /_security/saml/metadata/{realm} #65065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Nov 17, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions x-pack/docs/en/rest-api/security/saml_sp_metadata.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[role="xpack"]
[[security-api-saml-sp-metadata]]
=== SAML sp metadata API

Generate a SAML 2.0 Service Provider Metadata.

[[security-api-saml-sp-metadata-request]]
==== {api-request-title}

`POST /_security/saml/metadata/<realmname>`

[[security-api-saml-sp-metadata-desc]]
==== {api-description-title}

The SAML 2.0 specification provides a mechanism for Service Providers to describe their
capabilities and configuration using a metadata file.
This API generates Service Provider metadata, based on the configuration of a SAML realm
in Elasticsearch.

[[security-api-saml-sp-metadata-response-body]]
==== {api-response-body-title}

`metadata`::
(string) An XML string that contains a SAML Service Providers metadata for the realm.

[[security-api-saml-sp-metadata-example]]
==== {api-examples-title}

The following example generate Service Provider metadata for
SAML realm `saml1`:

[source,console]
--------------------------------------------------
GET /_security/saml/metadata/saml1
--------------------------------------------------
The API returns the following response:

[source,js]
--------------------------------------------------
{
"metadata" : "<?xml version="1.0" encoding="UTF-8"?><md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="https://kibana.example.com/"><md:SPSSODescriptor AuthnRequestsSigned="false" WantAssertionsSigned="true" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"><md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://kibana.example.com/logout"/><md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://kibana.example.com/api/security/v1/saml" index="1" isDefault="true"/></md:SPSSODescriptor></md:EntityDescriptor>"
}
--------------------------------------------------
// NOTCONSOLE