saml-sp-metadata.asciidoc 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. .New API reference
  8. [sidebar]
  9. --
  10. For the most up-to-date API details, refer to {api-es}/group/endpoint-security[Security APIs].
  11. --
  12. Generate SAML metadata for a SAML 2.0 Service Provider.
  13. [[security-api-saml-sp-metadata-request]]
  14. ==== {api-request-title}
  15. `GET /_security/saml/metadata/<realm_name>`
  16. [[security-api-saml-sp-metadata-desc]]
  17. ==== {api-description-title}
  18. The SAML 2.0 specification provides a mechanism for Service Providers to
  19. describe their capabilities and configuration using a metadata file. This API
  20. generates Service Provider metadata, based on the configuration of a SAML realm
  21. in {es}.
  22. [[security-api-saml-sp-metadata-path-params]]
  23. ==== {api-path-parms-title}
  24. `<realm_name>`::
  25. (Required, string) The name of the SAML realm in {es}.
  26. [[security-api-saml-sp-metadata-response-body]]
  27. ==== {api-response-body-title}
  28. `metadata`::
  29. (string) An XML string that contains a SAML Service Provider's metadata for the realm.
  30. [[security-api-saml-sp-metadata-example]]
  31. ==== {api-examples-title}
  32. The following example generates Service Provider metadata for
  33. SAML realm `saml1`:
  34. [source,console]
  35. --------------------------------------------------
  36. GET /_security/saml/metadata/saml1
  37. --------------------------------------------------
  38. The API returns the following response containing the SAML metadata as an XML string:
  39. [source,console-result]
  40. --------------------------------------------------
  41. {
  42. "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>"
  43. }
  44. --------------------------------------------------