saml-sp-metadata.asciidoc 2.1 KB

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