Skip to content

Commit 533eace

Browse files
author
Adam Locke
authored
[DOCS] Adding authorization_realms setting for OIDC (#64877) (#65093)
* Adding authorization_realms setting for OIDC. * Fix typo * Splitting note into separate notes.
1 parent de66ac4 commit 533eace

File tree

3 files changed

+25
-17
lines changed

3 files changed

+25
-17
lines changed

docs/reference/settings/security-settings.asciidoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,6 +1610,13 @@ File-based resources are polled at a frequency determined by the global {es}
16101610
`resource.reload.interval.high` setting, which defaults to 5 seconds.
16111611
// end::oidc-op-jwkset-path-tag[]
16121612

1613+
`authorization_realms`::
1614+
(<<static-cluster-setting,Static>>)
1615+
The names of the realms that should be consulted for delegated authorization.
1616+
If this setting is used, then the OpenID Connect realm does not perform role
1617+
mapping and instead loads the user from the listed realms.
1618+
See <<authorization_realms>>.
1619+
16131620
// tag::rp-client-id-tag[]
16141621
`rp.client_id` {ess-icon}::
16151622
(<<static-cluster-setting,Static>>)

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,13 @@ If your users also exist in a repository that can be directly accessed by {es}
481481
<<authorization_realms, authorization realms>> instead of role mappings.
482482

483483
In this case, you perform the following steps:
484+
484485
1. In your OpenID Connect realm, assign a claim to act as the lookup userid,
485486
by configuring the `claims.principal` setting.
486-
2. Create a new realm that can lookup users from your local repository (e.g. an
487+
2. Create a new realm that can look up users from your local repository (e.g. an
487488
`ldap` realm)
488-
3. In your OpenID Connect realm, set `authorization_realms` to the name of the realm you
489-
created in step 2.
489+
3. In your OpenID Connect realm, set `authorization_realms` to the name of the
490+
realm you created in step 2.
490491

491492
[[oidc-user-metadata]]
492493
=== User metadata

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@ For other types of realms, you must create _role-mappings_ that define which
1010
roles should be assigned to each user based on their username, groups, or
1111
other metadata.
1212

13+
NOTE: When <<anonymous-access,anonymous access>> is enabled, the roles
14+
of the anonymous user are assigned to all the other users as well.
15+
1316
You can define role-mappings via an
1417
<<mapping-roles-api, API>> or manage them through <<mapping-roles-file, files>>.
1518
These two sources of role-mapping are combined inside of the {es}
1619
{security-features}, so it is
1720
possible for a single user to have some roles that have been mapped through
1821
the API, and other roles that are mapped through files.
1922

23+
NOTE: Users with no roles assigned will be unauthorized for any action.
24+
2025
When you use role-mappings, you assign existing roles to users.
2126
The available roles should either be added using the
2227
{ref}/security-api.html#security-role-apis[role management APIs] or defined in the
@@ -25,13 +30,8 @@ either role management method. For example, when you use the role mapping API,
2530
you are able to map users to both API-managed roles and file-managed roles
2631
(and likewise for file-based role-mappings).
2732

28-
NOTE: The PKI, LDAP, Kerberos and SAML realms support using
29-
<<authorization_realms, authorization realms>> as an alternative to role mapping.
30-
31-
NOTE: When <<anonymous-access, anonymous access>> is enabled, the roles
32-
of the anonymous user are assigned to all the other users as well.
33-
34-
NOTE: Users with no roles assigned will be unauthorized for any action.
33+
TIP: The PKI, LDAP, Kerberos, OpenID Connect, and SAML realms support using
34+
<<authorization_realms,authorization realms>> as an alternative to role mapping.
3535

3636
[[mapping-roles-api]]
3737
==== Using the role mapping API
@@ -49,10 +49,10 @@ this.
4949
By default, role mappings are stored in `ES_PATH_CONF/role_mapping.yml`,
5050
where `ES_PATH_CONF` is `ES_HOME/config` (zip/tar installations) or
5151
`/etc/elasticsearch` (package installations). To specify a different location,
52-
you configure the `files.role_mapping` setting in the
53-
{ref}/security-settings.html#ref-ad-settings[Active Directory],
54-
{ref}/security-settings.html#ref-ldap-settings[LDAP], and
55-
{ref}/security-settings.html#ref-pki-settings[PKI] realm settings in
52+
you configure the `files.role_mapping` setting in the
53+
<<ref-ad-settings,Active Directory>>,
54+
<<ref-ldap-settings,LDAP>>, and
55+
<<ref-pki-settings,PKI>> realm settings in
5656
`elasticsearch.yml`.
5757

5858
Within the role mapping file, the security roles are keys and groups and users
@@ -67,9 +67,9 @@ this is a common setting in Elasticsearch, changing its value might effect other
6767
schedules in the system.
6868

6969
While the _role mapping APIs_ is the preferred way to manage role mappings, using
70-
the `role_mappings.yml` file becomes useful in a couple of use cases:
70+
the `role_mappings.yml` file becomes useful in a couple of use cases:
7171

72-
. If you want to define fixed role mappings that no one (besides an administrator
72+
. If you want to define fixed role mappings that no one (besides an administrator
7373
with physical access to the {es} nodes) would be able to change.
7474

7575
. If cluster administration depends on users from external realms and these users
@@ -82,7 +82,7 @@ as a minimal administrative function and is not intended to cover and be used to
8282
define roles for all use cases.
8383

8484
IMPORTANT: You cannot view, edit, or remove any roles that are defined in the role
85-
mapping files by using the role mapping APIs.
85+
mapping files by using the role mapping APIs.
8686

8787
==== Realm specific details
8888
[discrete]

0 commit comments

Comments
 (0)