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
The default algorithm is 'HS256', for symmetric key validation. When using HS256, the value for `auth_jwt_key` should be specified in binhex format. It is recommended to use at least 256 bits of data (32 pairs of hex characters or 64 characters in total) as in the example above. Note that using more than 512 bits will not increase the security. For key guidelines please see NIST Special Publication 800-107 Recommendation for Applications Using Approved Hash Algorithms, Section 5.3.2 The HMAC Key.
51
53
52
-
The configuration also supports the `auth_jwt_algorithm` 'RS256', for RSA 256-bit public key validation. If using "auth_jwt_algorithm RS256;", then the `auth_jwt_key` field must be set to your public key.
54
+
The configuration also supports the `auth_jwt_algorithm` 'RS256', for RSA 256-bit public key validation. If using "auth_jwt_algorithm RS256;", then the `auth_jwt_key` field must be set to your public key**OR**`auth_jwt_use_keyfile` should be set to `on` with the `auth_jwt_keyfile_path` set to the public key path (which defaults to `"/app/pub_key"`).
53
55
That is the public key, rather than a PEM certificate. I.e.:
54
56
55
57
```
@@ -64,6 +66,13 @@ oQIDAQAB
64
66
-----END PUBLIC KEY-----";
65
67
```
66
68
69
+
**OR**
70
+
71
+
```
72
+
auth_jwt_use_keyfile on;
73
+
auth_jwt_keyfile_path "/etc/nginx/pub_key.pem";
74
+
```
75
+
67
76
A typical use would be to specify the key and loginurl on the main level
68
77
and then only turn on the locations that you want to secure (not the login page).
69
78
Unauthorized requests are given 302 "Moved Temporarily" responses with a ___location of the specified loginurl.
0 commit comments