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
and some [third-party repos]({{< relref "/unit/installation.md#installation-community-repos" >}}). Otherwise, account names may differ; run the `ps aux | grep unitd` command to be sure.
15
+
{{< /note >}}
16
+
17
+
For further details, including permissions, see the
Copy file name to clipboardExpand all lines: content/nginx/admin-guide/basic-functionality/runtime-control.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ where `<SIGNAL>` can be one of the following:
32
32
-`quit` – Shut down gracefully (the `SIGQUIT` signal)
33
33
-`reload` – Reload the configuration file (the `SIGHUP` signal)
34
34
-`reopen` – Reopen log files (the `SIGUSR1` signal)
35
-
-`stop` – Shut down immediately (or fast shutdown, the `SIGTERM`singal)
35
+
-`stop` – Shut down immediately (or fast shutdown, the `SIGTERM`signal)
36
36
37
37
The `kill` utility can also be used to send a signal directly to the master process. The process ID of the master process is written, by default, to the **nginx.pid** file, which is located in the **/usr/local/nginx/logs** or **/var/run** directory.
Copy file name to clipboardExpand all lines: content/nginx/deployment-guides/single-sign-on/keycloak.md
+63-13Lines changed: 63 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -24,29 +24,77 @@ This guide explains how to enable single sign-on (SSO) for applications being pr
24
24
25
25
## Configure Keycloak {#keycloak-setup}
26
26
27
-
1. Log in to your Keycloak admin console, for example, `https://<keycloak-server>/auth/admin/`.
27
+
{{<tabsname="configure-keycloak">}}
28
28
29
-
2. In the left navigation, go to **Clients**.then
29
+
{{%tab name="Standard OIDC"%}}
30
30
31
-
3. Select **Create** and provide the following details:
31
+
1. Log in to your Keycloak admin console, for example, `https://<keycloak-server>/admin/master/console/`.
32
32
33
-
- Enter a **Client ID**, for example, `nginx-demo-app`. You will need it later when configuring NGINX Plus.
33
+
2. In the left navigation, go to **Clients**, then
34
34
35
-
- Set **Client Protocol**to **openid-connect**.
35
+
3. Select **Create client**and provide the following details:
36
36
37
-
- Select **Save**.
37
+
- Set **Client type** to **OpenID Connect**.
38
+
39
+
- Enter a **Client ID**, for example, `nginx-demo-app`. You will need it later when configuring NGINX Plus.
40
+
41
+
- Select **Next**.
38
42
39
-
4. In the **Settings**tab of your new client:
43
+
4. In the **Capability Config**section:
40
44
41
-
- Set **Access Type** to `confidential`.
45
+
- Set **Client Authentication** to **On**. This sets the client type to **confidential**.
46
+
47
+
- Select **Next**.
42
48
43
-
- Add a **Redirect URI**, for example:
49
+
5. In the **Login Settings** section:
50
+
51
+
- Add a **Redirect URI**, for example:
44
52
```
45
53
https://demo.example.com/oidc_callback
46
54
```
47
55
- Select **Save**.
48
56
49
-
5. In the **Credentials** tab, make note of the **Client Secret**. You will need it later when configuring NGINX Plus.
57
+
6. In the **Credentials** tab, make note of the **Client Secret**. You will need it later when configuring NGINX Plus.
58
+
59
+
{{%/tab%}}
60
+
61
+
{{%tab name="Using PKCE"%}}
62
+
63
+
1. Log in to your Keycloak admin console, for example, `https://<keycloak-server>/auth/admin/`.
64
+
65
+
2. In the left navigation, go to **Clients**, then
66
+
67
+
3. Select **Create client** and provide the following details:
68
+
69
+
- Set **Client type** to **OpenID Connect**.
70
+
71
+
- Enter a **Client ID**, for example, `nginx-demo-app`. You will need it later when configuring NGINX Plus.
72
+
73
+
- Select **Next**.
74
+
75
+
4. In the **Capability Config** section:
76
+
77
+
- Set **Client Authentication** to **Off**. This sets the client type to **public**.
78
+
79
+
- Unselect the **Direct access grants** in the **Authentication Flow** section.
80
+
81
+
- Select **Next**
82
+
83
+
5. In the **Login Settings** section:
84
+
85
+
- Add a **Redirect URI**, for example:
86
+
```
87
+
https://demo.example.com/oidc_callback
88
+
```
89
+
- Select **Save**.
90
+
91
+
6. In the **Advanced** tab, under the **Advanced Settings** section set the **Proof Key for Code Exchange Code Challenge Method** to **S256**.
92
+
93
+
7. Note that as opposed to standard OIDC flow, PKCE does not use Client Secrets, so there is no Credentials tab. This is expected.
94
+
95
+
{{%/tab%}}
96
+
97
+
{{</tabs>}}
50
98
51
99
### Assign Users or Groups
52
100
@@ -63,7 +111,7 @@ This step is optional, and is necessary if you need to restrict or organize user
63
111
64
112
## Set up NGINX Plus {#nginx-plus-setup}
65
113
66
-
With Keycloak configured, you can enable OIDC on NGINX Plus. NGINX Plus serves as the Rely Party (RP) application — a client service that verifies user identity.
114
+
With Keycloak configured, you can enable OIDC on NGINX Plus. NGINX Plus serves as the Relying Party (RP) application — a client service that verifies user identity.
67
115
68
116
1. Ensure that you are using the latest version of NGINX Plus by running the `nginx -v` command in a terminal:
69
117
@@ -76,7 +124,8 @@ With Keycloak configured, you can enable OIDC on NGINX Plus. NGINX Plus serves a
76
124
nginx version: nginx/1.27.4 (nginx-plus-r34)
77
125
```
78
126
79
-
2. Ensure that you have the values of the **Client ID**, **Client Secret**, and **Issuer** obtained during [Keycloak Configuration](#keycloak-setup).
127
+
2. Ensure that you have the values of the **Client ID**, **Client Secret**, and **Issuer** obtained during
128
+
[Keycloak Configuration](#keycloak-setup) if applicable. PKCE will not have a **Client Secret**.
80
129
81
130
3. In your preferred text editor, open the NGINX configuration file (`/etc/nginx/nginx.conf` for Linux or `/usr/local/etc/nginx/nginx.conf` for FreeBSD).
82
131
@@ -110,7 +159,8 @@ With Keycloak configured, you can enable OIDC on NGINX Plus. NGINX Plus serves a
110
159
111
160
- your actual Keycloak **Client ID** obtained in [Keycloak Configuration](#keycloak-setup) with the [`client_id`](https://nginx.org/en/docs/http/ngx_http_oidc_module.html#client_id) directive
112
161
113
-
- your **Client Secret** obtained in [Keycloak Configuration](#keycloak-setup) with the [`client_secret`](https://nginx.org/en/docs/http/ngx_http_oidc_module.html#client_secret) directive
162
+
- (if not using PKCE) your **Client Secret** obtained in [Keycloak Configuration](#keycloak-setup) with the
- the **Issuer** URL obtained in [Keycloak Configuration](#keycloak-setup) with the [`issuer`](https://nginx.org/en/docs/http/ngx_http_oidc_module.html#client_secret) directive
0 commit comments