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: README.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,13 +34,13 @@ For more information on OIDC and NGINX Plus JWT support, see [Authenticating Use
34
34
35
35
OpenID Connect integration requires NGINX Plus R15 or later to be installed. See [Installing NGINX Plus](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-plus/).
36
36
37
-
In addition, the nginScript module is required for handling the interaction between NGINX Plus and the OpenID Connect provider (IdP). Install the nginScript module after installing NGINX Plus by running one of the following:
37
+
In addition, the [njs module](https://www.nginx.com/blog/introduction-nginscript/) is required for handling the interaction between NGINX Plus and the OpenID Connect provider (IdP). Install the njs module after installing NGINX Plus by running one of the following:
38
38
39
39
`$ sudo apt install nginx-plus-module-njs` for Debian/Ubuntu
40
40
41
41
`$ sudo yum install nginx-plus-module-njs` for CentOS/RedHat
42
42
43
-
The nginScript module needs to be loaded by adding the following configuration directive near the top of **nginx.conf**.
43
+
The njs module needs to be loaded by adding the following configuration directive near the top of **nginx.conf**.
44
44
45
45
```nginx
46
46
load_module modules/ngx_http_js_module.so;
@@ -52,6 +52,10 @@ Finally, create a clone of the GitHub repository.
52
52
53
53
All files can be copied to **/etc/nginx/conf.d**
54
54
55
+
> **N.B.** The GitHub repository contains [include](http://nginx.org/en/docs/ngx_core_module.html#include) files for NGINX configuration and JavaScript code for token exchange and initial token validation. These files are referenced with a relative path (relative to /etc/nginx). If NGINX Plus is running from a non-standard location then copy the files from the GitHub repository to `/path/to/conf/conf.d` and use the `-p` flag to start NGINX with a prefix path that specifies the location where the configuration files are located.
* Create an OpenID Connect client to represent your NGINX Plus instance
@@ -66,7 +70,7 @@ All files can be copied to **/etc/nginx/conf.d**
66
70
67
71
## Configuring NGINX Plus
68
72
69
-
The GitHub repository contains [include](http://nginx.org/en/docs/ngx_core_module.html#include)files for NGINX configuration and JavaScript code for token exchange and initial token validation. Some configuration is required:
73
+
Review the following files copied from the GitHub repository so that they match your IdP configuration.
70
74
71
75
***frontend.conf** - this is the reverse proxy configuration and where the IdP is configured
72
76
* Modify the upstream group to match your backend site or app
@@ -75,11 +79,11 @@ The GitHub repository contains [include](http://nginx.org/en/docs/ngx_core_modul
75
79
* Set a unique value for `$oidc_hmac_key` to ensure nonce values are unpredictable
76
80
77
81
***openid_connect.server_conf** - this is the NGINX configuration for handling the various stages of OpenID Connect authorization code flow
78
-
* Modify the `add_header Set-Cookie` directives with appropriate [cookie flags](https://en.wikipedia.org/wiki/HTTP_cookie#Terminology), e.g. Domain; Path; Secure;
82
+
* Modify the `add_header Set-Cookie` directives with appropriate [cookie flags](https://en.wikipedia.org/wiki/HTTP_cookie#Terminology) to control the scope of single sign-on and security options, e.g. Domain; Path; Secure;
79
83
* Modify the `resolver` directive to match a DNS server that is capable of resolving the IdP defined in `$oidc_token_endpoint`
80
84
81
-
***openid_connect.js** - this is the nginScript code for performing the authorization code exchange and nonce hashing
82
-
* No changes are required unless modifying the code exchange process
85
+
***openid_connect.js** - this is the JavaScript code for performing the authorization code exchange and nonce hashing
86
+
* No changes are required unless modifying the code exchange or validation process
0 commit comments