Skip to content

Commit fb1d857

Browse files
BigPandaToolcawl
andauthored
Adding doc for the new API introduced by #64517 - /_security/saml/metadata/{realm} (#65065) (#65158)
* Adding doc for the new API introduced by #64517 - /_security/saml/metadata/{realm} (#65065) * Adding doc for the new API introduced by #64517 - /_security/saml/metadata/{realm} Related to #49018 * Adding doc for the new API introduced by #64517 - /_security/saml/metadata/{realm} Related to #49018 * Adding doc for the new API introduced by #64517 - /_security/saml/metadata/{realm} Related to #49018 * This change adds realm name of the realm used to perform authentication to the responses of _security/oidc/authenticate and _security/oidc/authenticate APIs Resolves #53161 * Adding doc for the new API introduced by #64517 - /_security/saml/metadata/{realm} Related to #49018 * [DOCS] Adds API to navigation tree * Adding doc for the new API introduced by #64517 - /_security/saml/metadata/{realm} Related to #49018 * Adding doc for the new API introduced by #64517 - /_security/saml/metadata/{realm} Related to #49018 Co-authored-by: lcawl <[email protected]> * This change adds realm name of the realm used to perform authentication to the responses of _security/oidc/authenticate and _security/oidc/authenticate APIs Resolves #53161 Co-authored-by: lcawl [email protected] #65065 #backport * This change adds realm name of the realm used to perform authentication to the responses of _security/oidc/authenticate and _security/oidc/authenticate APIs Resolves #53161 Co-authored-by: lcawl [email protected] #65065 #backport * This change adds realm name of the realm used to perform authentication to the responses of _security/oidc/authenticate and _security/oidc/authenticate APIs Resolves #53161 Co-authored-by: lcawl [email protected] #65065 #backport Co-authored-by: lcawl <[email protected]>
1 parent a5f4da6 commit fb1d857

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

x-pack/docs/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ testClusters.integTest {
5656
setting 'xpack.security.authc.realms.pki.pki1.certificate_authorities', '[ "testClient.crt" ]'
5757
setting 'xpack.security.authc.realms.pki.pki1.delegation.enabled', 'true'
5858
setting 'xpack.security.authc.realms.saml.saml1.order', '4'
59+
setting 'xpack.security.authc.realms.saml.saml1.sp.logout', 'https://kibana.org/logout'
5960
setting 'xpack.security.authc.realms.saml.saml1.idp.entity_id', 'https://my-idp.org'
6061
setting 'xpack.security.authc.realms.saml.saml1.idp.metadata.path', 'idp-docs-metadata.xml'
6162
setting 'xpack.security.authc.realms.saml.saml1.sp.entity_id', 'https://kibana.org'

x-pack/docs/en/rest-api/security.asciidoc

+2
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ realm when using a custom web application other than Kibana
103103
* <<security-api-saml-authenticate, Submit an authentication response>>
104104
* <<security-api-saml-logout, Logout an authenticated user>>
105105
* <<security-api-saml-invalidate, Submit a logout request from the IdP>>
106+
* <<security-api-saml-sp-metadata,Generate SAML metadata>>
106107

107108

108109
include::security/authenticate.asciidoc[]
@@ -141,4 +142,5 @@ include::security/saml-prepare-authentication-api.asciidoc[]
141142
include::security/saml-authenticate-api.asciidoc[]
142143
include::security/saml-logout-api.asciidoc[]
143144
include::security/saml-invalidate-api.asciidoc[]
145+
include::security/saml-sp-metadata.asciidoc[]
144146
include::security/ssl.asciidoc[]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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:NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</md:NameIDFormat><md:AssertionConsumerService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" Location=\"https://kibana.org/api/security/v1/saml\" index=\"1\" isDefault=\"true\"/></md:SPSSODescriptor></md:EntityDescriptor>"
48+
}
49+
--------------------------------------------------

0 commit comments

Comments
 (0)