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
Copy file name to clipboardExpand all lines: content/nginx/deployment-guides/single-sign-on/active-directory-federation-services.md
+44-14Lines changed: 44 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,13 @@ nd-docs: DOCS-1683
10
10
11
11
This guide explains how to enable single sign-on (SSO) for applications being proxied by F5 NGINX Plus. The solution uses OpenID Connect as the authentication mechanism, with [Microsoft Active Directory Federation Services](https://docs.microsoft.com/en-us/windows-server/identity/active-directory-federation-services) (AD FS) as the Identity Provider (IdP) and NGINX Plus as the Relying Party (RP), or OIDC client application that verifies user identity.
12
12
13
-
{{< call-out "note" >}} This guide applies to [NGINX Plus Release 35]({{< ref "nginx/releases.md#r35" >}}) and later. In earlier versions, NGINX Plus relied on an [njs-based solution](#legacy-njs-guide), which required NGINX JavaScript files, key-value stores, and advanced OpenID Connect logic. In the latest NGINX Plus version, the new [OpenID Connect module](https://nginx.org/en/docs/http/ngx_http_oidc_module.html) simplifies this process to just a few directives.{{< /call-out >}}
13
+
{{< call-out "note" >}} This guide applies to [NGINX Plus Release 36]({{< ref "nginx/releases.md#r36" >}}) and later. In earlier versions, NGINX Plus relied on an [njs-based solution](#legacy-njs-guide), which required NGINX JavaScript files, key-value stores, and advanced OpenID Connect logic. In the latest NGINX Plus version, the new [OpenID Connect module](https://nginx.org/en/docs/http/ngx_http_oidc_module.html) simplifies this process to just a few directives.{{< /call-out >}}
14
14
15
15
## Prerequisites
16
16
17
17
- A Microsoft AD FS instance, either on-premises or in [Azure](https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/deployment/how-to-connect-fed-azure-adfs), with administrator privileges.
18
18
19
-
- An NGINX Plus [subscription](https://www.f5.com/products/nginx/nginx-plus) and NGINX Plus [Release 35]({{< ref "nginx/releases.md#r35" >}}) or later. For installation instructions, see [Installing NGINX Plus](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-plus/).
19
+
- An NGINX Plus [subscription](https://www.f5.com/products/nginx/nginx-plus) and NGINX Plus [Release 36]({{< ref "nginx/releases.md#r36" >}}) or later. For installation instructions, see [Installing NGINX Plus](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-plus/).
20
20
21
21
- A domain name pointing to your NGINX Plus instance, for example, `demo.example.com`.
22
22
@@ -66,6 +66,17 @@ After creating the application group, you need to configure the logout URLs to s
66
66
67
67
- Add the post logout URL, for example: `https://demo.example.com/post_logout/`.
68
68
69
+
4. To enable OpenID Connect front-channel logout (single sign-out when the user signs out of another application):
70
+
71
+
- Use PowerShell to configure a **LogoutUri** for the AD FS client (there is no GUI option for this). For example, run:
Replace `<client-id>` with the Client Identifier from [Step 5](#adfs-setup-id) above (the AD FS Application ID) and substitute the domain name of your NGINX Plus instance for `demo.example.com`.
77
+
78
+
This registers a front-channel logout URL (`LogoutUri`) for the client in AD FS. When a user signs out of this or any other application in AD FS, the AD FS server sends a GET request to this URL (typically via a hidden iframe) with the user's session ID (`sid`) as a query parameter, instructing NGINX Plus to clear the user's session. According to the OpenID Connect front-channel logout specification, the identity provider is supposed to send both an issuer (`iss`) and a session ID; AD FS provides only the `sid` parameter, but the NGINX Plus OIDC module supports both the fully compliant `iss+sid` and the `sid`-only variants and will clear the session in either case.
79
+
69
80
### Get the OpenID Connect Discovery URL
70
81
71
82
Check the OpenID Connect endpoint URL. By default, AD FS publishes the `.well-known/openid-configuration` document at the following address:
@@ -97,6 +108,8 @@ Check the OpenID Connect endpoint URL. By default, AD FS publishes the `.well-kn
@@ -118,10 +131,10 @@ With AD FS configured, you can enable OIDC on NGINX Plus. NGINX Plus serves as t
118
131
nginx -v
119
132
```
120
133
121
-
The output should match NGINX Plus Release 35 or later:
134
+
The output should match NGINX Plus Release 36 or later:
122
135
123
136
```text
124
-
nginx version: nginx/1.29.0 (nginx-plus-r35)
137
+
nginx version: nginx/1.29.3 (nginx-plus-r36)
125
138
```
126
139
127
140
2. Ensure that you have the values of the **Client ID**, **Client Secret**, and **Issuer** obtained during [AD FS Configuration](#adfs-setup).
@@ -165,27 +178,36 @@ With AD FS configured, you can enable OIDC on NGINX Plus. NGINX Plus serves as t
165
178
166
179
- The **logout_uri** is URI that a user visits to start an RP‑initiated logout flow.
167
180
181
+
- The **frontchannel_logout_uri** directive defines the URI that receives OpenID Connect front-channel logout requests from AD FS. This URI must be an HTTPS path and must match the LogoutUri configured forthe clientin AD FS. When AD FS triggers a front-channel logout (for example, when a user signs out of another application), it sends a GET request to this URI (typically via a hidden iframe) with the session ID (sid) as a query parameter. The OIDC module clears the corresponding user session on NGINX Plus.
182
+
168
183
- The **post_logout_uri** is absolute HTTPS URL where AD FS should redirect the user after a successful logout. This value **must also be configured**in the AD FS application properties.
169
184
170
185
- If the **logout_token_hint** directive set to `on`, NGINX Plus sends the user's ID token as a *hint* to AD FS.
171
186
This directive is **optional**, however, if it is omitted the AD FS may display an extra confirmation page asking the user to approve the logout request.
172
187
173
188
- If the **userinfo** directive is set to `on`, NGINX Plus will fetch `/userinfo` from the AD FS and append the claims from userinfo to the `$oidc_claims_` variables.
174
189
190
+
- PKCE (Proof Key for Code Exchange) is automatically enabled when the provider's OpenID Connect discovery document advertises the S256 code challenge method in the code_challenge_methods_supported field. You can override this behavior with the pkce directive: set`pkce off;` to disable PKCE even when S256 is advertised, or `pkce on;` to force PKCE even if the IdP's metadata does not list S256.
191
+
175
192
- {{< call-out "important" >}} All interaction with the IdP is secured exclusively over SSL/TLS, so NGINX must trust the certificate presented by the IdP. By default, this trust is validated against your system's CA bundle (the default CA store foryour Linux or FreeBSD distribution). If the IdP's certificate is not includedin the system CA bundle, you can explicitly specify a trusted certificate or chain with the [`ssl_trusted_certificate`](https://nginx.org/en/docs/http/ngx_http_oidc_module.html#ssl_trusted_certificate) directive so that NGINX can validate and trust the IdP's certificate. {{< /call-out >}}
# Optional: PKCE configuration (enabled automatically when supported by the IdP)
346
+
# pkce on;
319
347
}
320
348
321
349
server {
@@ -373,10 +401,12 @@ If you are running NGINX Plus R33 and earlier or if you still need the njs-based
373
401
374
402
- [NGINX Plus Native OIDC Module Reference documentation](https://nginx.org/en/docs/http/ngx_http_oidc_module.html)
375
403
376
-
- [Release Notes for NGINX Plus R35]({{< ref "nginx/releases.md#r35">}})
404
+
- [Release Notes for NGINX Plus R36]({{< ref "nginx/releases.md#r36">}})
377
405
378
406
## Revision History
379
407
380
-
- Version 2 (August 2025) – Added RP‑initiated logout (logout_uri, post_logout_uri, logout_token_hint) and userinfo support.
408
+
- Version 3 (November 2025) – Updated for NGINX Plus R36; added front-channel logout support (`frontchannel_logout_uri`), PKCE configuration (`pkce` directive), and the `client_secret_post` token endpoint authentication method.
409
+
410
+
- Version 2 (August 2025) – Updated for NGINX Plus R35; added RP‑initiated logout (`logout_uri`, `post_logout_uri`, `logout_token_hint`) and `userinfo` support.
381
411
382
-
- Version 1 (March 2025) – Initial version (NGINX Plus Release 34)
412
+
- Version 1 (March 2025) – Initial version (NGINX Plus Release 34).
Copy file name to clipboardExpand all lines: content/nginx/deployment-guides/single-sign-on/auth0.md
+20-7Lines changed: 20 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,13 @@ nd-docs: DOCS-1686
10
10
11
11
This guide explains how to enable single sign-on (SSO) for applications being proxied by F5 NGINX Plus. The solution uses OpenID Connect as the authentication mechanism, with [Auth0](https://auth0.com/features/single-sign-on) as the Identity Provider (IdP), and NGINX Plus as the Relying Party, or OIDC client application that verifies user identity.
12
12
13
-
{{< call-out "note" >}} This guide applies to [NGINX Plus Release 35]({{< ref "nginx/releases.md#r35" >}}) and later. In earlier versions, NGINX Plus relied on an [njs-based solution](#legacy-njs-guide), which required NGINX JavaScript files, key-value stores, and advanced OpenID Connect logic. In the latest NGINX Plus version, the new [OpenID Connect module](https://nginx.org/en/docs/http/ngx_http_oidc_module.html) simplifies this process to just a few directives.{{< /call-out >}}
13
+
{{< call-out "note" >}} This guide applies to [NGINX Plus Release 36]({{< ref "nginx/releases.md#r36" >}}) and later. In earlier versions, NGINX Plus relied on an [njs-based solution](#legacy-njs-guide), which required NGINX JavaScript files, key-value stores, and advanced OpenID Connect logic. In the latest NGINX Plus version, the new [OpenID Connect module](https://nginx.org/en/docs/http/ngx_http_oidc_module.html) simplifies this process to just a few directives.{{< /call-out >}}
14
14
15
15
## Prerequisites
16
16
17
17
- An [Auth0](https://auth0.com/) tenant with administrator privileges.
18
18
19
-
- An NGINX Plus [subscription](https://www.f5.com/products/nginx/nginx-plus) and NGINX Plus [Release 35]({{< ref "nginx/releases.md#r35" >}}) or later. For installation instructions, see [Installing NGINX Plus](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-plus/).
19
+
- An NGINX Plus [subscription](https://www.f5.com/products/nginx/nginx-plus) and NGINX Plus [Release 36]({{< ref "nginx/releases.md#r36" >}}) or later. For installation instructions, see [Installing NGINX Plus](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-plus/).
20
20
21
21
- A domain name pointing to your NGINX Plus instance, for example, `demo.example.com`.
22
22
@@ -101,10 +101,10 @@ With Auth0 configured, you can enable OIDC on NGINX Plus. NGINX Plus serves as t
101
101
nginx -v
102
102
```
103
103
104
-
The output should match NGINX Plus Release 35 or later:
104
+
The output should match NGINX Plus Release 36 or later:
105
105
106
106
```none
107
-
nginx version: nginx/1.29.0 (nginx-plus-r35)
107
+
nginx version: nginx/1.29.3 (nginx-plus-r36)
108
108
```
109
109
110
110
2. Ensure that you have the values of the **Client ID**, **Client Secret**, and **Issuer** obtained during [Auth0 Configuration](#auth0-setup).
@@ -156,6 +156,10 @@ With Auth0 configured, you can enable OIDC on NGINX Plus. NGINX Plus serves as t
156
156
157
157
- If the **userinfo** directive is set to `on`, NGINX Plus will fetch `/userinfo` from the Auth0 and append the claims from userinfo to the `$oidc_claims_` variables.
158
158
159
+
- PKCE (Proof Key forCode Exchange) is automatically enabled when Auth0's OpenID Connect discovery document advertises the `S256` code challenge methodin the `code_challenge_methods_supported` field. You can override this behavior with the [`pkce`](https://nginx.org/en/docs/http/ngx_http_oidc_module.html#pkce) directive: set`pkce off;` to disable PKCE even when `S256` is advertised, or `pkce on;` to force PKCE even if the IdP metadata does not list `S256`.
160
+
161
+
- The module automatically selects the client authentication method forthe token endpoint based on the provider metadata `token_endpoint_auth_methods_supported`. When only `client_secret_post` is advertised, NGINX Plus uses the `client_secret_post` method and sends the client credentialsin the POST body. When both `client_secret_basic` and `client_secret_post` are present, the module prefers HTTP Basic (`client_secret_basic`), which remains the default for Auth0.
162
+
159
163
- {{< call-out "important">}} All interaction with the IdP is secured exclusively over SSL/TLS, so NGINX must trust the certificate presented by the IdP. By default, this trust is validated against your system’s CA bundle (the default CA store foryour Linux or FreeBSD distribution). If the IdP’s certificate is not includedin the system CA bundle, you can explicitly specify a trusted certificate or chain with the [`ssl_trusted_certificate`](https://nginx.org/en/docs/http/ngx_http_oidc_module.html#ssl_trusted_certificate) directive so that NGINX can validate and trust the IdP’s certificate. {{< /call-out >}}
160
164
161
165
```nginx
@@ -170,6 +174,10 @@ With Auth0 configured, you can enable OIDC on NGINX Plus. NGINX Plus serves as t
# Optional: PKCE configuration. By default, PKCE is automatically
179
+
# enabled when the IdP advertises the S256 code challenge method.
180
+
# pkce on;
173
181
}
174
182
175
183
# ...
@@ -292,6 +300,9 @@ http {
292
300
293
301
# Fetch userinfo claims
294
302
userinfo on;
303
+
304
+
# Optional: PKCE configuration
305
+
# pkce on;
295
306
}
296
307
297
308
server {
@@ -348,10 +359,12 @@ If you are running NGINX Plus R33 and earlier or if you still need the njs-based
348
359
349
360
- [NGINX Plus Native OIDC Module Reference documentation](https://nginx.org/en/docs/http/ngx_http_oidc_module.html)
350
361
351
-
- [Release Notes for NGINX Plus R35]({{< ref "nginx/releases.md#r35">}})
362
+
- [Release Notes for NGINX Plus R36]({{< ref "nginx/releases.md#r36">}})
352
363
353
364
## Revision History
354
365
355
-
- Version 2 (August 2025) – Added RP‑initiated logout (logout_uri, post_logout_uri, logout_token_hint) and userinfo support.
366
+
- Version 3 (November 2025) – Updated for NGINX Plus R36; added PKCE configuration (`pkce` directive) and the `client_secret_post` token endpoint authentication method.
367
+
368
+
- Version 2 (August 2025) – Updated for NGINX Plus R35; added RP‑initiated logout (`logout_uri`, `post_logout_uri`, `logout_token_hint`) and `userinfo` support.
356
369
357
-
- Version 1 (March 2025) – Initial version (NGINX Plus Release 34)
370
+
- Version 1 (March 2025) – Initial version (NGINX Plus Release 34).
0 commit comments