Skip to content

Commit 05d1a07

Browse files
committed
Add front channel logout configs to oidc conf
1 parent 5cdae50 commit 05d1a07

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

internal/configs/oidc/oidc.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Advanced configuration START
22
set $internal_error_message "NGINX / OpenID Connect login failure\n";
33
set $pkce_id "";
4+
set $idp_sid "";
45
# resolver 8.8.8.8; # For DNS lookup of IdP endpoints;
56
subrequest_output_buffer_size 32k; # To fit a complete tokenset response
67
gunzip on; # Decompress IdP responses if necessary
@@ -79,6 +80,13 @@
7980
js_content oidc.logout;
8081
}
8182

83+
location = /front_channel_logout {
84+
status_zone "OIDC logout";
85+
add_header Cache-Control "no-store";
86+
default_type text/plain;
87+
js_content oidc.handleFrontChannelLogout;
88+
}
89+
8290
location = /_logout {
8391
# This location is the default value of $oidc_logout_redirect (in case it wasn't configured)
8492
default_type text/plain;

internal/configs/oidc/oidc_common.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ proxy_cache_path /var/cache/nginx/jwk levels=1 keys_zone=jwk:64k max_size=1m;
2020
keyval_zone zone=oidc_id_tokens:1M timeout=1h sync;
2121
keyval_zone zone=oidc_access_tokens:1M timeout=1h sync;
2222
keyval_zone zone=refresh_tokens:1M timeout=8h sync;
23+
keyval_zone zone=oidc_sids:1M timeout=8h sync;
2324

2425
keyval $cookie_auth_token $session_jwt zone=oidc_id_tokens; # Exchange cookie for ID token(JWT)
2526
keyval $cookie_auth_token $access_token zone=oidc_access_tokens; # Exchange cookie for access token
2627
keyval $cookie_auth_token $refresh_token zone=refresh_tokens; # Exchange cookie for refresh token
2728
keyval $request_id $new_session zone=oidc_id_tokens; # For initial session creation
2829
keyval $request_id $new_access_token zone=oidc_access_tokens;
2930
keyval $request_id $new_refresh zone=refresh_tokens; # ''
31+
keyval $idp_sid $client_sid zone=oidc_sids;
3032

3133
auth_jwt_claim_set $jwt_audience aud; # In case aud is an array
3234
js_import oidc from oidc/openid_connect.js;

0 commit comments

Comments
 (0)