Skip to content

Commit 7a6aa19

Browse files
authored
Non-standard directories
1 parent aa99e0f commit 7a6aa19

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ For more information on OIDC and NGINX Plus JWT support, see [Authenticating Use
3434

3535
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/).
3636

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:
3838

3939
`$ sudo apt install nginx-plus-module-njs` for Debian/Ubuntu
4040

4141
`$ sudo yum install nginx-plus-module-njs` for CentOS/RedHat
4242

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**.
4444

4545
```nginx
4646
load_module modules/ngx_http_js_module.so;
@@ -52,6 +52,10 @@ Finally, create a clone of the GitHub repository.
5252

5353
All files can be copied to **/etc/nginx/conf.d**
5454

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.
56+
>
57+
> `nginx -p /path/to/conf -c /path/to/conf/nginx.conf`
58+
5559
## Configuring your IdP
5660

5761
* 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**
6670

6771
## Configuring NGINX Plus
6872

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.
7074

7175
* **frontend.conf** - this is the reverse proxy configuration and where the IdP is configured
7276
* 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
7579
* Set a unique value for `$oidc_hmac_key` to ensure nonce values are unpredictable
7680

7781
* **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;
7983
* Modify the `resolver` directive to match a DNS server that is capable of resolving the IdP defined in `$oidc_token_endpoint`
8084

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
8387

8488
## Support
8589

0 commit comments

Comments
 (0)