Skip to content

Conversation

@ebarlas
Copy link
Contributor

@ebarlas ebarlas commented Oct 28, 2025

A new JSON Web Key Set (JWKS) background reloading feature is being added to the JWT Realm in Elasticsearch.

This documentation change briefly outlines the capability and the four new settings for configuring it.

  • pkc_jwkset_reload.enabled - Enable/disable automatic reloading (default: false)
  • pkc_jwkset_reload.file_interval - File check interval (default: 5 minutes)
  • pkc_jwkset_reload.url_interval_min - Minimum URL reload interval (default: 60 minutes)
  • pkc_jwkset_reload.url_interval_max - Maximum URL reload interval (default: 5 days)

@ebarlas ebarlas requested a review from a team as a code owner October 28, 2025 19:55
@ebarlas ebarlas requested a review from a team October 28, 2025 19:55
@github-actions
Copy link

github-actions bot commented Oct 28, 2025

🔍 Preview links for changed docs

Copy link
Contributor

@jfreden jfreden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the Elasticsearch PR for anyone on the docs team that is reviewing: elastic/elasticsearch#136996

LGTM but probably good to have someone from the docs team review too.

We should also wait for the ES PR to be merged before merging this.

: The file name or URL to a JSON Web Key Set (JWKS) with the public key material that the JWT Realm uses for verifying token signatures. A value is considered a file name if it does not begin with `https`. The file name is resolved relative to the {{es}} configuration directory. If a URL is provided, then it must begin with `https://` (`http://` is not supported). {{es}} automatically caches the JWK set and will attempt to refresh the JWK set upon signature verification failure, as this might indicate that the JWT Provider has rotated the signing keys.
: The file name or URL to a JSON Web Key Set (JWKS) with the public key material that the JWT Realm uses for verifying token signatures. A value is considered a file name if it does not begin with `https`. The file name is resolved relative to the {{es}} configuration directory. If a URL is provided, then it must begin with `https://` (`http://` is not supported). {{es}} automatically caches the JWK set and will attempt to refresh the JWK set upon signature verification failure, as this might indicate that the JWT Provider has rotated the signing keys. Background JWKS reloading can also be configured with the setting `pkc_jwkset_reload.enabled`.

`pkc_jwkset_reload.enabled`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good with a sentence on why this is useful. Something like:

When your JWT provider regularly rotates signing keys, JWKS background reloading can be enabled to proactively fetch updated keys rather than waiting for a signature verification failure.

Copy link
Contributor

@kilfoyle kilfoyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🏎️
Just a small suggestion about defaults. Thanks @ebarlas!

@kilfoyle kilfoyle self-requested a review October 29, 2025 14:45
@kilfoyle
Copy link
Contributor

kilfoyle commented Oct 29, 2025

@ebarlas, @shainaraskas pointed out to me that these settings should also be added to the Elasticsearch reference docs, I think on this page (docs source is here). These should probably be included in your associated code PR.

We'll also need "applies to" tags for each setting. I've added comment for that.

@kilfoyle
Copy link
Contributor

Looks perfect now @ebarlas! 🙏

@ebarlas ebarlas force-pushed the jwt-jwks-reloading branch from 9156e13 to 8831a42 Compare October 30, 2025 17:32
@ebarlas ebarlas merged commit 98ee10a into elastic:main Oct 30, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants