Open
Conversation
✅ Deploy Preview will be available once build job completes!
|
sjberman
reviewed
Mar 10, 2026
| - **Secret type**: The secret must be of type `Opaque` with a key named `auth` containing the JWKS data in JSON format. | ||
| - **realm**: (Optional) The realm parameter sets the authentication realm displayed in the WWW-Authenticate header when authentication fails. | ||
| - **keyCache**: (Optional) Specifies how long NGINX Plus caches the JWKS keys in memory. Valid values include time units like `10s`, `1m`, `1h`. This reduces the need to re-read the secret file for each request. If not specified, keys are cached indefinitely until NGINX is reloaded. | ||
|
|
Contributor
There was a problem hiding this comment.
I think we should also mention (either now or once we support remote), that this example uses File and what that means.
salonichf5
reviewed
Mar 11, 2026
|
|
||
| JWT authentication in NGINX Gateway Fabric validates JSON Web Tokens using JSON Web Key Sets (JWKS). The JWKS contains the public keys used to verify the JWT signatures. When a request arrives with a JWT in the `Authorization` header, NGINX Plus validates the token against the configured JWKS before forwarding the request to your application. | ||
|
|
||
| This guide demonstrates JWT authentication using a local JWKS file stored in a Kubernetes Secret. |
Contributor
There was a problem hiding this comment.
should we mention explicitly that remote JWT is excluded currently to avoid any confusion
salonichf5
reviewed
Mar 11, 2026
Comment on lines
+225
to
+226
| - **realm**: (Optional) The realm parameter sets the authentication realm displayed in the WWW-Authenticate header when authentication fails. | ||
| - **keyCache**: (Optional) Specifies how long NGINX Plus caches the JWKS keys in memory. Valid values include time units like `10s`, `1m`, `1h`. This reduces the need to re-read the secret file for each request. If not specified, keys are cached indefinitely until NGINX is reloaded. |
Contributor
There was a problem hiding this comment.
Suggested change
| - **realm**: (Optional) The realm parameter sets the authentication realm displayed in the WWW-Authenticate header when authentication fails. | |
| - **keyCache**: (Optional) Specifies how long NGINX Plus caches the JWKS keys in memory. Valid values include time units like `10s`, `1m`, `1h`. This reduces the need to re-read the secret file for each request. If not specified, keys are cached indefinitely until NGINX is reloaded. | |
| - **keyCache**: (Optional) Controls how long NGINX Plus caches the JWKS keys in memory. Supported values use standard time units such as 10s, 1m, or 1h. Caching avoids reloading the JWKS from the Secret for every request, improving performance. If not specified, the keys remain cached indefinitely and are only refreshed when NGINX is reloaded. |
sounds clearer I think
salonichf5
approved these changes
Mar 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Checklist
Before sharing this pull request, I completed the following checklist:
Footnotes
Potentially sensitive information includes personally identify information (PII), authentication credentials, and live URLs. Refer to the style guide for guidance about placeholder content. ↩