Skip to content

Commit 22e590f

Browse files
authored
Merge branch 'main' into feat/add-otel-support
2 parents d3d9883 + df4a15d commit 22e590f

File tree

9 files changed

+540
-357
lines changed

9 files changed

+540
-357
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ repos:
4545
pass_filenames: false
4646

4747
- repo: https://github.com/golangci/golangci-lint
48-
rev: v2.1.2
48+
rev: v2.1.5
4949
hooks:
5050
- id: golangci-lint
5151
args: [--new-from-patch=/tmp/diff.patch]

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ We value community input and would love to see you at the next community call. A
3333

3434
| **Community Call Dates** |
3535
| ------------------------ |
36-
| **2025-04-07** |
37-
| **2025-04-22** |
38-
| **2025-05-05** |
36+
| **2025-05-06** |
3937
| **2025-05-19** |
40-
| **2025-06-02** |
38+
| **2025-06-03** |
4139
| **2025-06-16** |
40+
| **2025-06-30** |
41+
| **2025-07-14** |
4242

4343
---
4444

internal/configs/oidc/oidc.conf

+19-3
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
@@ -37,33 +38,48 @@
3738
# to construct the OpenID Connect token request, as per:
3839
# http://openid.net/specs/openid-connect-core-1_0.html#TokenRequest
3940
internal;
41+
42+
# Exclude client headers to avoid CORS errors with certain IdPs (e.g., Microsoft Entra ID)
43+
proxy_pass_request_headers off;
44+
4045
proxy_ssl_server_name on; # For SNI to the IdP
4146
proxy_set_header Content-Type "application/x-www-form-urlencoded";
4247
proxy_set_header Authorization $arg_secret_basic;
4348
proxy_pass $oidc_token_endpoint;
44-
}
49+
}
4550

4651
location = /_refresh {
4752
# This location is called by oidcAuth() when performing a token refresh. We
4853
# use the proxy_ directives to construct the OpenID Connect token request, as per:
4954
# https://openid.net/specs/openid-connect-core-1_0.html#RefreshingAccessToken
5055
internal;
56+
57+
# Exclude client headers to avoid CORS errors with certain IdPs (e.g., Microsoft Entra ID)
58+
proxy_pass_request_headers off;
59+
5160
proxy_ssl_server_name on; # For SNI to the IdP
5261
proxy_set_header Content-Type "application/x-www-form-urlencoded";
5362
proxy_set_header Authorization $arg_secret_basic;
5463
proxy_pass $oidc_token_endpoint;
5564
}
5665

57-
location = /_id_token_validation {
66+
location = /_token_validation {
5867
# This location is called by oidcCodeExchange() and oidcRefreshRequest(). We use
5968
# the auth_jwt_module to validate the OpenID Connect token response, as per:
6069
# https://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation
6170
internal;
6271
auth_jwt "" token=$arg_token;
63-
js_content oidc.validateIdToken;
72+
js_content oidc.extractTokenClaims;
6473
error_page 500 502 504 @oidc_error;
6574
}
6675

76+
location = /front_channel_logout {
77+
status_zone "OIDC logout";
78+
add_header Cache-Control "no-store";
79+
default_type text/plain;
80+
js_content oidc.handleFrontChannelLogout;
81+
}
82+
6783
location = /logout {
6884
status_zone "OIDC logout";
6985
add_header Set-Cookie "auth_token=; $oidc_cookie_flags";

internal/configs/oidc/oidc_common.conf

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ 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;
2324
#keyval_zone zone=oidc_pkce:128K timeout=90s sync; # Temporary storage for PKCE code verifier.
2425

2526
keyval $cookie_auth_token $session_jwt zone=oidc_id_tokens; # Exchange cookie for ID token(JWT)
@@ -28,6 +29,7 @@ keyval $cookie_auth_token $refresh_token zone=refresh_tokens; # Exchange coo
2829
keyval $request_id $new_session zone=oidc_id_tokens; # For initial session creation
2930
keyval $request_id $new_access_token zone=oidc_access_tokens;
3031
keyval $request_id $new_refresh zone=refresh_tokens; # ''
32+
keyval $idp_sid $client_sid zone=oidc_sids
3133
#keyval $pkce_id $pkce_code_verifier zone=oidc_pkce;
3234

3335
auth_jwt_claim_set $jwt_audience aud; # In case aud is an array

0 commit comments

Comments
 (0)