Skip to content

Commit 026f0f7

Browse files
authored
OIDC Guide additions (#42555)
- Call out the fact that the SSL Configuration is important and offer a minimal example of configuring a custom CA for trust. - Add information about the `op.issuer` that was missing and add information about the `rp.post_logout_redirect` in the example since `op.endsession_endpoint` was already mentioned there and these two should be together - Explain that `op.jwkset_path` can be a URL.
1 parent a322e0d commit 026f0f7

File tree

1 file changed

+44
-8
lines changed

1 file changed

+44
-8
lines changed

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

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,13 @@ xpack.security.authc.realms.oidc.oidc1:
103103
rp.client_id: "the_client_id"
104104
rp.response_type: code
105105
rp.redirect_uri: "https://kibana.example.org:5601/api/security/v1/oidc"
106+
op.issuer: "https://op.example.org"
106107
op.authorization_endpoint: "https://op.example.org/oauth2/v1/authorize"
107108
op.token_endpoint: "https://op.example.org/oauth2/v1/token"
109+
op.jwkset_path: oidc/jwkset.json
108110
op.userinfo_endpoint: "https://op.example.org/oauth2/v1/userinfo"
109111
op.endsession_endpoint: "https://op.example.org/oauth2/v1/logout"
110-
op.issuer: "https://op.example.org"
111-
op.jwkset_path: oidc/jwkset.json
112+
rp.post_logout_redirect_uri: "https://kibana.example.org:5601/logged_out"
112113
claims.principal: sub
113114
claims.groups: "http://example.info/claims/groups"
114115
-------------------------------------------------------------------------------------
@@ -146,6 +147,10 @@ rp.redirect_uri::
146147
_exactly_ the same as the one <<oidc-guide-op, configured with the OP upon registration>> and will
147148
typically be +$\{kibana-url}/api/security/v1/oidc+ where _$\{kibana-url}_ is the base URL for your {kib} instance
148149

150+
op.issuer::
151+
A verifiable Identifier for your OpenID Connect Provider. An Issuer Identifier is usually a case sensitive URL.
152+
The value for this setting should be provided by your OpenID Connect Provider.
153+
149154
op.authorization_endpoint::
150155
The URL for the Authorization Endpoint in the OP. This is where the user's browser
151156
will be redirected to start the authentication process. The value for this setting should be provided by your
@@ -156,6 +161,13 @@ op.token_endpoint::
156161
{es} will send a request to exchange the code for an ID Token, in the case where the Authorization Code
157162
flow is used. The value for this setting should be provided by your OpenID Connect Provider.
158163

164+
op.jwkset_path::
165+
The path to a file or a URL containing a JSON Web Key Set with the key material that the OpenID Connect
166+
Provider uses for signing tokens and claims responses. If a path is set, it is resolved relative to the {es}
167+
config directory.
168+
{es} will automatically monitor this file for changes and will reload the configuration whenever
169+
it is updated. Your OpenID Connect Provider should provide you with this file or a URL where it is available.
170+
159171
op.userinfo_endpoint::
160172
(Optional) The URL for the UserInfo Endpoint in the OpenID Connect Provider. This is the endpoint of the OP that
161173
can be queried to get further user information, if required. The value for this setting should be provided by your
@@ -166,12 +178,11 @@ op.endsession_endpoint::
166178
browser will be redirected after local logout, if the realm is configured for RP initiated Single Logout and
167179
the OP supports it. The value for this setting should be provided by your OpenID Connect Provider.
168180

169-
op.jwkset_path::
170-
The path to a file containing a JSON Web Key Set with the key material that the OpenID Connect
171-
Provider uses for signing tokens and claims responses. The path is resolved relative to the {es}
172-
config directory.
173-
{es} will automatically monitor this file for changes and will reload the configuration whenever
174-
it is updated. Your OpenID Connect Provider should provide you with this file.
181+
rp.post_logout_redirect_uri::
182+
(Optional) The Redirect URL where the OpenID Connect Provider should redirect the user after a
183+
successful Single Logout (assuming `op.endsession_endpoint` above is also set). This should be set to a value that
184+
will not trigger a new OpenID Connect Authentication, such as +$\{kibana-url}/logged_out+ where _$\{kibana-url}_ is
185+
the base URL for your {kib} instance.
175186

176187
claims.principal:: See <<oidc-claims-mapping>>.
177188
claims.groups:: See <<oidc-claims-mapping>>.
@@ -306,6 +317,7 @@ realm, as demonstrated in the realm configuration below:
306317
[source, yaml]
307318
-------------------------------------------------------------------------------------
308319
xpack.security.authc.realms.oidc.oidc1:
320+
order: 2
309321
rp.client_id: "the_client_id"
310322
rp.response_type: code
311323
rp.redirect_uri: "https://kibana.example.org:5601/api/security/v1/oidc"
@@ -369,6 +381,30 @@ will trigger re-authentication of the user. For instance, when using OpenID Conn
369381
single sign-on to {kib}, this could be set to +$\{kibana-url}/logged_out+, which will show a user-
370382
friendly message to the user.
371383

384+
[[oidc-ssl-config]]
385+
==== OpenID Connect Realm SSL Configuration
386+
387+
OpenID Connect depends on TLS to provide security properties such as encryption in transit and endpoint authentication. The RP
388+
is required to establish back-channel communication with the OP in order to exchange the code for an ID Token during the
389+
Authorization code grant flow and in order to get additional user information from the UserInfo endpoint. Furthermore, if
390+
you configure `op.jwks_path` as a URL, {es} will need to get the OP's signing keys from the file hosted there. As such, it is
391+
important that {es} can validate and trust the server certificate that the OP uses for TLS. Since the system truststore is
392+
used for the client context of outgoing https connections, if your OP is using a certificate from a trusted CA, no additional
393+
configuration is needed.
394+
395+
However, if the issuer of your OP's certificate is not trusted by the JVM on which {es} is running (e.g it uses a organization CA), then you must configure
396+
{es} to trust that CA. Assuming that you have the CA certificate that has signed the certificate that the OP uses for TLS
397+
stored in the /oidc/company-ca.pem` file stored in the configuration directory of {es}, you need to set the following
398+
property in the realm configuration:
399+
400+
[source, yaml]
401+
-------------------------------------------------------------------------------------
402+
xpack.security.authc.realms.oidc.oidc1:
403+
order: 1
404+
...
405+
ssl.certificate_authorities: ["/oidc/company-ca.pem"]
406+
-------------------------------------------------------------------------------------
407+
372408
[[oidc-role-mapping]]
373409
=== Configuring role mappings
374410

0 commit comments

Comments
 (0)