saml-sp-metadata.asciidoc 2.0 KB

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