|
| 1 | +[role="xpack"] |
| 2 | +[[security-api-saml-sp-metadata]] |
| 3 | +=== SAML service provider metadata API |
| 4 | + |
| 5 | +Generate SAML metadata for a SAML 2.0 Service Provider. |
| 6 | + |
| 7 | +[[security-api-saml-sp-metadata-request]] |
| 8 | +==== {api-request-title} |
| 9 | + |
| 10 | +`GET /_security/saml/metadata/<realm_name>` |
| 11 | + |
| 12 | +[[security-api-saml-sp-metadata-desc]] |
| 13 | +==== {api-description-title} |
| 14 | + |
| 15 | +The SAML 2.0 specification provides a mechanism for Service Providers to |
| 16 | +describe their capabilities and configuration using a metadata file. This API |
| 17 | +generates Service Provider metadata, based on the configuration of a SAML realm |
| 18 | +in {es}. |
| 19 | + |
| 20 | +[[security-api-saml-sp-metadata-path-params]] |
| 21 | +==== {api-path-parms-title} |
| 22 | + |
| 23 | +`<realm_name>`:: |
| 24 | + (Required, string) The name of the SAML realm in {es}. |
| 25 | + |
| 26 | +[[security-api-saml-sp-metadata-response-body]] |
| 27 | +==== {api-response-body-title} |
| 28 | + |
| 29 | +`metadata`:: |
| 30 | +(string) An XML string that contains a SAML Service Provider's metadata for the realm. |
| 31 | + |
| 32 | +[[security-api-saml-sp-metadata-example]] |
| 33 | +==== {api-examples-title} |
| 34 | + |
| 35 | +The following example generates Service Provider metadata for |
| 36 | +SAML realm `saml1`: |
| 37 | + |
| 38 | +[source,console] |
| 39 | +-------------------------------------------------- |
| 40 | +GET /_security/saml/metadata/saml1 |
| 41 | +-------------------------------------------------- |
| 42 | +The API returns the following response containing the SAML metadata as an XML string: |
| 43 | + |
| 44 | +[source,console-result] |
| 45 | +-------------------------------------------------- |
| 46 | +{ |
| 47 | + "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>" |
| 48 | +} |
| 49 | +-------------------------------------------------- |
0 commit comments