Skip to content

Commit 29dcf9b

Browse files
authored
Docs for authorization_realms (#32765)
Adds links to the "authorization_realms" (Delegating authorization to another realm) section to each of the applicable realms, and adds the "authorization_realms" setting to the list of realm settings.
1 parent b91a0ac commit 29dcf9b

File tree

7 files changed

+59
-8
lines changed

7 files changed

+59
-8
lines changed

docs/reference/settings/security-settings.asciidoc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,13 @@ This setting is multivalued; you can specify multiple user contexts.
246246
Required to operate in user template mode. If `user_search.base_dn` is specified,
247247
this setting is not valid. For more information on
248248
the different modes, see {xpack-ref}/ldap-realm.html[LDAP realms].
249+
250+
`authorization_realms`::
251+
The names of the realms that should be consulted for delegate authorization.
252+
If this setting is used, then the LDAP realm does not perform role mapping and
253+
instead loads the user from the listed realms. The referenced realms are
254+
consulted in the order that they are defined in this list.
255+
See {stack-ov}/realm-chains.html#authorization_realms[Delegating authorization to another realm]
249256
+
250257
--
251258
NOTE: If any settings starting with `user_search` are specified, the
@@ -733,6 +740,12 @@ Specifies the {xpack-ref}/security-files.html[location] of the
733740
{xpack-ref}/mapping-roles.html[YAML role mapping configuration file].
734741
Defaults to `ES_PATH_CONF/role_mapping.yml`.
735742

743+
`authorization_realms`::
744+
The names of the realms that should be consulted for delegate authorization.
745+
If this setting is used, then the PKI realm does not perform role mapping and
746+
instead loads the user from the listed realms.
747+
See {stack-ov}/realm-chains.html#authorization_realms[Delegating authorization to another realm]
748+
736749
`cache.ttl`::
737750
Specifies the time-to-live for cached user entries. A user and a hash of its
738751
credentials are cached for this period of time. Use the
@@ -856,6 +869,12 @@ Defaults to `false`.
856869
Specifies whether to populate the {es} user's metadata with the values that are
857870
provided by the SAML attributes. Defaults to `true`.
858871

872+
`authorization_realms`::
873+
The names of the realms that should be consulted for delegate authorization.
874+
If this setting is used, then the SAML realm does not perform role mapping and
875+
instead loads the user from the listed realms.
876+
See {stack-ov}/realm-chains.html#authorization_realms[Delegating authorization to another realm]
877+
859878
`allowed_clock_skew`::
860879
The maximum amount of skew that can be tolerated between the IdP's clock and the
861880
{es} node's clock.

x-pack/docs/en/security/authentication/configuring-ldap-realm.asciidoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ For more information, see
189189
{xpack-ref}/ldap-realm.html#mapping-roles-ldap[Mapping LDAP Groups to Roles]
190190
and
191191
{xpack-ref}/mapping-roles.html[Mapping Users and Groups to Roles].
192+
193+
NOTE: The LDAP realm supports
194+
{stack-ov}/realm-chains.html#authorization_realms[authorization realms] as an
195+
alternative to role mapping.
196+
192197
--
193198

194199
. (Optional) Configure the `metadata` setting on the LDAP realm to include extra
@@ -211,4 +216,4 @@ xpack:
211216
type: ldap
212217
metadata: cn
213218
--------------------------------------------------
214-
--
219+
--

x-pack/docs/en/security/authentication/configuring-pki-realm.asciidoc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ NOTE: You cannot use PKI certificates to authenticate users in {kib}.
1010

1111
To use PKI in {es}, you configure a PKI realm, enable client authentication on
1212
the desired network layers (transport or http), and map the Distinguished Names
13-
(DNs) from the user certificates to {security} roles in the role mapping file.
13+
(DNs) from the user certificates to {security} roles in the
14+
<<security-api-role-mapping,role-mapping API>> or role-mapping file.
1415

1516
You can also use a combination of PKI and username/password authentication. For
1617
example, you can enable SSL/TLS on the transport layer and define a PKI realm to
@@ -173,4 +174,9 @@ key. You can also use the authenticate API to validate your role mapping.
173174

174175
For more information, see
175176
{xpack-ref}/mapping-roles.html[Mapping Users and Groups to Roles].
176-
--
177+
178+
NOTE: The PKI realm supports
179+
{stack-ov}/realm-chains.html#authorization_realms[authorization realms] as an
180+
alternative to role mapping.
181+
182+
--

x-pack/docs/en/security/authentication/configuring-saml-realm.asciidoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ access any data.
219219

220220
Your SAML users cannot do anything until they are mapped to {security}
221221
roles. See {stack-ov}/saml-role-mapping.html[Configuring role mappings].
222+
223+
NOTE: The SAML realm supports
224+
{stack-ov}/realm-chains.html#authorization_realms[authorization realms] as an
225+
alternative to role mapping.
226+
222227
--
223228

224229
. {stack-ov}/saml-kibana.html[Configure {kib} to use SAML SSO].

x-pack/docs/en/security/authentication/saml-guide.asciidoc

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ or separate keys used for each of those.
473473

474474
The Elastic Stack uses X.509 certificates with RSA private keys for SAML
475475
cryptography. These keys can be generated using any standard SSL tool, including
476-
the `elasticsearch-certutil` tool that ships with X-Pack.
476+
the `elasticsearch-certutil` tool that ships with {xpack}.
477477

478478
Your IdP may require that the Elastic Stack have a cryptographic key for signing
479479
SAML messages, and that you provide the corresponding signing certificate within
@@ -624,9 +624,10 @@ When a user authenticates using SAML, they are identified to the Elastic Stack,
624624
but this does not automatically grant them access to perform any actions or
625625
access any data.
626626

627-
Your SAML users cannot do anything until they are mapped to {security}
628-
roles. This mapping is performed through the
629-
{ref}/security-api-put-role-mapping.html[add role mapping API].
627+
Your SAML users cannot do anything until they are assigned {security}
628+
roles. This is done through either the
629+
{ref}/security-api-put-role-mapping.html[add role mapping API], or with
630+
<<authorization_realms, authorization realms>>.
630631

631632
This is an example of a simple role mapping that grants the `kibana_user` role
632633
to any user who authenticates against the `saml1` realm:
@@ -683,6 +684,18 @@ PUT /_xpack/security/role_mapping/saml-finance
683684
// CONSOLE
684685
// TEST
685686

687+
If your users also exist in a repository that can be directly accessed by {security}
688+
(such as an LDAP directory) then you can use
689+
<<authorization_realms, authorization realms>> instead of role mappings.
690+
691+
In this case, you perform the following steps:
692+
1. In your SAML realm, assigned a SAML attribute to act as the lookup userid,
693+
by configuring the `attributes.principal` setting.
694+
2. Create a new realm that can lookup users from your local repository (e.g. an
695+
`ldap` realm)
696+
3. In your SAML realm, set `authorization_realms` to the name of the realm you
697+
created in step 2.
698+
686699
[[saml-user-metadata]]
687700
=== User metadata
688701

x-pack/docs/en/security/authorization/mapping-roles.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ either role management method. For example, when you use the role mapping API,
2424
you are able to map users to both API-managed roles and file-managed roles
2525
(and likewise for file-based role-mappings).
2626

27+
NOTE: The PKI, LDAP, Kerberos and SAML realms support using
28+
<<authorization_realms, authorization realms>> as an alternative to role mapping.
29+
2730
[[mapping-roles-api]]
2831
==== Using the role mapping API
2932

x-pack/docs/en/security/authorization/run-as-privilege.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ the realm you use to authenticate. Both the internal `native` and `file` realms
1212
support this out of the box. The LDAP realm must be configured to run in
1313
<<ldap-user-search, _user search_ mode>>. The Active Directory realm must be
1414
<<ad-settings,configured with a `bind_dn` and `secure_bind_password`>> to support
15-
_run as_. The PKI realm does not support _run as_.
15+
_run as_. The PKI, Kerberos, and SAML realms do not support _run as_.
1616

1717
To submit requests on behalf of other users, you need to have the `run_as`
1818
permission. For example, the following role grants permission to submit request

0 commit comments

Comments
 (0)