You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added support for client_secret_basic as a client authentication method (#97)
- Updated token exchange to use the Authorization header for client_secret_basic.
- Refactored logic for generating POST request parameters for token retrieval and refresh.
- Added "oidc_client_auth_method" variable to select client authentication method.
Copy file name to clipboardExpand all lines: README.md
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,18 @@ Subsequent requests to protected resources are authenticated by exchanging the s
70
70
71
71
For more information on OpenID Connect and JWT validation with NGINX Plus, see [Authenticating Users to Existing Applications with OpenID Connect and NGINX Plus](https://www.nginx.com/blog/authenticating-users-existing-applications-openid-connect-nginx-plus/).
72
72
73
+
### Client Authentication Methods
74
+
75
+
When configuring NGINX Plus as an OpenID Connect client, it supports multiple client authentication methods:
76
+
77
+
***client_secret_basic**:
78
+
* The `client_id` and `client_secret` are sent in the Authorization header as a Base64-encoded string.
79
+
***client_secret_post**:
80
+
* The `client_id` and `client_secret` are sent in the body of the POST request.
81
+
***none** (PKCE):
82
+
* For public clients that cannot protect a client secret, the `code_verifier` is used instead of a `client_secret`.
83
+
* PKCE is particularly useful for mobile and single-page applications.
84
+
73
85
### Access Tokens
74
86
75
87
[Access tokens](https://openid.net/specs/openid-connect-core-1_0.html#AccessTokenDisclosure) are used in token-based authentication to allow OIDC client to access a protected resource on behalf of the user. NGINX Plus receives an access token after a user successfully authenticates and authorizes access, and then stores it in the key-value store. NGINX Plus can pass that token on the HTTP Authorization header as a [Bearer token](https://oauth.net/2/bearer-tokens/) for every request that is sent to the downstream application.
@@ -140,6 +152,7 @@ When NGINX Plus is deployed behind another proxy, the original protocol and port
140
152
* Choose the **authorization code flow**
141
153
* Set the **redirect URI** to the address of your NGINX Plus instance (including the port number), with `/_codexch` as the path, e.g. `https://my-nginx.example.com:443/_codexch`
142
154
* Ensure NGINX Plus is configured as a confidential client (with a client secret) or a public client (with PKCE S256 enabled)
155
+
* If NGINX Plus is configured as a confidential client, choose the appropriate authentication method: **client_secret_basic** or **client_secret_post**.
143
156
* Make a note of the `client ID` and `client secret` if set
144
157
* Set the **post logout redirect URI** to the address of your NGINX Plus instance (including the port number), with `/_logout` as the path, e.g. `https://my-nginx.example.com:443/_logout`
145
158
@@ -300,3 +313,4 @@ This reference implementation for OpenID Connect is supported for NGINX Plus sub
300
313
***R22** Separate configuration file, supports multiple IdPs. Configurable scopes and cookie flags. JavaScript is imported as an indepedent module with `js_import`. Container-friendly logging. Additional metrics for OIDC activity.
301
314
***R23** PKCE support. Added support for deployments behind another proxy or load balancer.
302
315
***R28** Access token support. Added support for access token to authorize NGINX to access protected backend.
316
+
***R32** Added support for `client_secret_basic` client authentication method.
0 commit comments