Skip to content

Commit bc82390

Browse files
NLB-7031: Addressed the spacing and some content change in oidc section
1 parent ddccc31 commit bc82390

File tree

1 file changed

+17
-12
lines changed
  • content/nginxaas-azure/quickstart/security-controls

1 file changed

+17
-12
lines changed

content/nginxaas-azure/quickstart/security-controls/oidc.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,33 @@ Learn how to configure F5 NGINXaaS for Azure with OpenID Connect (OIDC) authenti
1414

1515
There are currently two methods available for setting up OIDC authentication.
1616

17-
1. Using Native OIDC implementation (Introduced from NGINX Plus R35)
17+
1. Using Native OIDC implementation (Introduced from NGINX Plus R34)
1818

19-
This method applies to NGINX Plus Release 35 and later. In earlier versions, NGINX Plus relied on an njs-based solution, 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.
20-
2119
2. Using NJS based implementation
2220

2321
## Prerequisites
2422

2523
These prerequisites are used for both methods of configuring NGINXaaS for Azure with IdP using Native OIDC and NJS.
24+
2625
1. Configure an NGINXaaS deployment with [SSL/TLS certificates]({{< ref "/nginxaas-azure/getting-started/ssl-tls-certificates/" >}}).
2726

2827
2. Enable [Runtime State Sharing]({{< ref "/nginxaas-azure/quickstart/runtime-state-sharing.md" >}}) on the NGINXaaS deployment.
2928

3029

31-
3230
## Configure NGINXaaS for Azure with IdP using Native OIDC
3331

32+
This method applies to NGINX Plus Release 34 and later. In earlier versions, NGINX Plus relied on an njs-based solution, 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.
33+
3434
### Prerequisites
35+
3536
1. Configure the IdP. For example, you can [register a Microsoft Entra Web application]({{< ref "/nginx/deployment-guides/single-sign-on/entra-id/#entra-setup" >}}) as the IdP.
36-
2. A domain name pointing to your NGINXaaS deployment, for example, `demo.example.com`. This will be referred to as `<nginxaas_deployment_fqdn>` throughout this guide.
37+
1. A domain name pointing to your NGINXaaS deployment, for example, `demo.example.com`. This will be referred to as `<nginxaas_deployment_fqdn>` throughout this guide.
3738

3839
With your IdP configured, you can enable OIDC on NGINXaaS for Azure.
3940

4041
1. Ensure that you have the values of the **Client ID**, **Client Secret**, and **Tenant ID** obtained during IdP configuration.
4142

42-
2. In your NGINX configuration file, add a public DNS resolver with the [`resolver`](https://nginx.org/en/docs/http/ngx_http_core_module.html#resolver) directive in the [`http {}`](https://nginx.org/en/docs/http/ngx_http_core_module.html#http) context:
43+
1. In your NGINX configuration file, add a public DNS resolver with the [`resolver`](https://nginx.org/en/docs/http/ngx_http_core_module.html#resolver) directive in the [`http {}`](https://nginx.org/en/docs/http/ngx_http_core_module.html#http) context:
4344

4445
```nginx
4546
http {
@@ -49,7 +50,7 @@ With your IdP configured, you can enable OIDC on NGINXaaS for Azure.
4950
}
5051
```
5152
52-
3. In the [`http {}`](https://nginx.org/en/docs/http/ngx_http_core_module.html#http) context, define your IdP provider by specifying the [`oidc_provider {}`](https://nginx.org/en/docs/http/ngx_http_oidc_module.html#oidc_provider) context. The `session_store` directive stores the session data and we need `keyval_zone` to sync this data in a clustered environment. Include the `state` parameter to persist session data across NGINX restarts. For example, for Microsoft Entra ID:
53+
1. In the [`http {}`](https://nginx.org/en/docs/http/ngx_http_core_module.html#http) context, define your IdP provider by specifying the [`oidc_provider {}`](https://nginx.org/en/docs/http/ngx_http_oidc_module.html#oidc_provider) context. The `session_store` directive stores the session data and we need `keyval_zone` to sync this data in a clustered environment. Include the `state` parameter to persist session data across NGINX restarts. For example, for Microsoft Entra ID:
5354
5455
```nginx
5556
http {
@@ -78,7 +79,7 @@ With your IdP configured, you can enable OIDC on NGINXaaS for Azure.
7879
7980
{{< call-out "note" >}} The `state=/opt/oidc_sessions.json` parameter enables persistence of OIDC session data across NGINX restarts. The state file path must be placed in a directory accessible to the NGINX worker processes, following [NGINX Filesystem Restrictions]({{< ref "/nginxaas-azure/getting-started/nginx-configuration/overview/#nginx-filesystem-restrictions" >}}).{{< /call-out >}}
8081
81-
4. Configure your server block with OIDC protection. This example uses localhost as the upstream server:
82+
1. Configure your server block with OIDC protection. The following example uses localhost as the upstream server:
8283
8384
```nginx
8485
server {
@@ -116,7 +117,7 @@ With your IdP configured, you can enable OIDC on NGINXaaS for Azure.
116117
}
117118
```
118119
119-
5. Add the runtime state sharing configuration to your NGINX configuration as mentioned in the [Prerequisites](#prerequisites). This enables synchronization of OIDC session data across NGINXaaS instances:
120+
1. Add the runtime state sharing configuration to your NGINX configuration as mentioned in the [Prerequisites]({{< ref "/nginxaas-azure/quickstart/security-controls/oidc.md#prerequisites" >}}). This enables synchronization of OIDC session data across NGINXaaS instances:
120121
121122
```nginx
122123
stream {
@@ -209,29 +210,33 @@ With your IdP configured, you can enable OIDC on NGINXaaS for Azure.
209210
```
210211
</details>
211212
212-
6. Upload the NGINX configurations. See [Upload an NGINX configuration]({{< ref "/nginxaas-azure/getting-started/nginx-configuration/" >}}) for more details.
213+
1. Upload the NGINX configurations. See [Upload an NGINX configuration]({{< ref "/nginxaas-azure/getting-started/nginx-configuration/" >}}) for more details.
214+
213215
For more detailed steps on this OIDC configuration, please refer to:
214216
215217
- [Single Sign-On with Microsoft Entra ID]({{< ref "/nginx/deployment-guides/single-sign-on/entra-id.md" >}})
216218
- [Terraform snippets for Native OIDC use case](https://github.com/nginxinc/nginxaas-for-azure-snippets/tree/main/terraform/configurations/native-oidc)
219+
217220
### Testing
218221
219222
1. Open `https://<nginxaas_deployment_fqdn>/` in a browser. You will be automatically redirected to your IdP sign-in page.
220223
221-
2. Enter valid IdP credentials. Upon successful sign-in, you will be redirected back to NGINXaaS and see your protected application. Using the example configuration, you will see a message displaying the authenticated user's information in the browser:
224+
1. Enter valid IdP credentials. Upon successful sign-in, you will be redirected back to NGINXaaS and see your protected application. Using the example configuration, you will see a message displaying the authenticated user's information in the browser:
222225
223226
```text
224227
Hello, [Name]!
225228
Email: [email]
226229
Entra ID sub: [subject_id]
227230
```
228231
229-
3. To test logout, navigate to `https://<nginxaas_deployment_fqdn>/logout`. NGINXaaS initiates an RP-initiated logout, and your IdP ends the session and redirects back to the post-logout page.
232+
1. To test logout, navigate to `https://<nginxaas_deployment_fqdn>/logout`. NGINXaaS initiates an RP-initiated logout, and your IdP ends the session and redirects back to the post-logout page.
230233
231234
232235
233236
## Configure NGINXaaS for Azure with IdP using NJS
237+
234238
### Prerequisites
239+
235240
1. [Configure the IdP](https://github.com/nginxinc/nginx-openid-connect/blob/main/README.md#configuring-your-idp). For example, you can [register a Microsoft Entra Web application](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app) as the IdP.
236241
237242
Configuring NGINXaaS for Azure with OIDC is similar as [Configuring NGINX Plus](https://github.com/nginxinc/nginx-openid-connect/blob/main/README.md#configuring-nginx-plus) in [nginx-openid-connect](https://github.com/nginxinc/nginx-openid-connect) but it also has its own specific configurations that must be completed to work normally.

0 commit comments

Comments
 (0)