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: crates/notary/server/README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -213,7 +213,7 @@ An optional authorization module is available to only allow requests with a vali
213
213
Please note that only *one* mode can be active at any one time.
214
214
215
215
##### Whitelist mode
216
-
In whitelist mode, an API key is attached in the custom HTTP header `X-API-Key`. The API key whitelist path (as well as the flag to enable/disable this module) can be changed in the config (`authorization` field).
216
+
In whitelist mode, a valid API key needs to be attached in the custom HTTP header `X-API-Key`. The path of the API key whitelist, path (as well as the flag to enable/disable this module), can be changed in the config (`authorization` field).
217
217
218
218
Hot reloading of the whitelist is supported, i.e. modification of the whitelist file will be automatically applied without needing to restart the server. Please take note of the following
219
219
- Avoid using auto save mode when editing the whitelist to prevent spamming hot reloads
@@ -223,6 +223,10 @@ Hot reloading of the whitelist is supported, i.e. modification of the whitelist
223
223
In JWT mode, JSON Web Token is attached in the standard `Authorization` HTTP header as a bearer token. The path to decoding key as well as custom user claims can be changed in the
224
224
config (`authorization` field).
225
225
226
+
Care should be taken when defining custom user claims as the middleware will:
227
+
- accept any claim if no custom claim is defined,
228
+
- as long as user defined claims are found, other unknown claims will be ignored.
229
+
226
230
An example JWT config may look something like this:
0 commit comments