elasticsearch/docs/reference/rest-api/security/saml-sp-metadata.asciidoc
James Rodewig 255c9a7f95
[DOCS] Move x-pack docs to docs/reference dir (#99209)
**Problem:**
For historical reasons, source files for the Elasticsearch Guide's security, watcher, and Logstash API docs are housed in the `x-pack/docs` directory. This can confuse new contributors who expect Elasticsearch Guide docs to be located in `docs/reference`. 

**Solution:**
- Move the security, watcher, and Logstash API doc source files to the `docs/reference` directory
- Update doc snippet tests to use security

Rel: https://github.com/elastic/platform-docs-team/issues/208
2023-09-12 14:53:41 -04:00

52 lines
2.1 KiB
Text

[role="xpack"]
[[security-api-saml-sp-metadata]]
=== SAML service provider metadata API
++++
<titleabbrev>SAML service provider metadata</titleabbrev>
++++
Generate SAML metadata for a SAML 2.0 Service Provider.
[[security-api-saml-sp-metadata-request]]
==== {api-request-title}
`GET /_security/saml/metadata/<realm_name>`
[[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 {es}.
[[security-api-saml-sp-metadata-path-params]]
==== {api-path-parms-title}
`<realm_name>`::
(Required, string) The name of the SAML realm in {es}.
[[security-api-saml-sp-metadata-response-body]]
==== {api-response-body-title}
`metadata`::
(string) An XML string that contains a SAML Service Provider's metadata for the realm.
[[security-api-saml-sp-metadata-example]]
==== {api-examples-title}
The following example generates Service Provider metadata for
SAML realm `saml1`:
[source,console]
--------------------------------------------------
GET /_security/saml/metadata/saml1
--------------------------------------------------
The API returns the following response containing the SAML metadata as an XML string:
[source,console-result]
--------------------------------------------------
{
"metadata" : "<?xml version=\"1.0\" encoding=\"UTF-8\"?><md:EntityDescriptor xmlns:md=\"urn:oasis:names:tc:SAML:2.0:metadata\" entityID=\"https://kibana.org\"><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.org/logout\"/><md:AssertionConsumerService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" Location=\"https://kibana.org/api/security/saml/callback\" index=\"1\" isDefault=\"true\"/></md:SPSSODescriptor></md:EntityDescriptor>"
}
--------------------------------------------------