Skip to content

[JWT] Enable configurable early token refresh in Java Client #22314

@damienburke

Description

@damienburke

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

Same as this #13951 - but to support the "simpler" JWT auth workflow/client setup.

Solution

Similar to AuthenticationOAuth2 - firstly AuthenticationToken will need to cache the authenticating JWT in a transient volatile field.

This value will also be injected into AuthenticationDataToken - and getCommandData will now return this value - and not lazily generate a new token.

Meanwhile, a scheduled task will be created, similar to #13951 to refresh the cached token.

Respect backwards compatibility.

Alternatives

Complete #13951 - and use it. In some cases though, using the OAuth client is not appropriate. For example, when using Vault as an OIDC - while also providing apps a Vault agent to do the Vault auth - a clientID and secretID are not needed by the app (as again the OIDC/Vault auth is abstracted away)

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions