Skip to content

auth/utils/cijwt: introduce WithHostTokenFunc#1221

Merged
matheuscscp merged 1 commit into
mainfrom
jwt-from-func
Jun 2, 2026
Merged

auth/utils/cijwt: introduce WithHostTokenFunc#1221
matheuscscp merged 1 commit into
mainfrom
jwt-from-func

Conversation

@matheuscscp

@matheuscscp matheuscscp commented May 28, 2026

Copy link
Copy Markdown
Member

Parameterize the API for JWTs that are issued through a network call. actionsoidc.FetchToken will now be passed in transparently.

This moves the 50% lifetime cache logic to the transport, to avoid all the different FetchToken functions that will be passed repeating the JWT parsing for extracting the expiration (for the cache logic).

This will be useful in flux push artifact and flux-mirror sync for fetching OIDC tokens from cloud providers like GCP and Azure (AWS does not support it). In this case, the token will be used to authenticate on a third party service that accepts generic OIDC (these are not IAM credentials for targeting GCP/Azure services, those are covered by auth/gcp and auth/azure instead).

@matheuscscp
matheuscscp requested a review from stefanprodan May 28, 2026 16:59
@matheuscscp
matheuscscp requested a review from a team as a code owner May 28, 2026 16:59
@matheuscscp matheuscscp added enhancement New feature or request area/security Security related issues and pull requests labels May 28, 2026

@stefanprodan stefanprodan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from jwt-from-path to main June 2, 2026 08:48
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
@matheuscscp
matheuscscp merged commit 02551b1 into main Jun 2, 2026
13 checks passed
@matheuscscp
matheuscscp deleted the jwt-from-func branch June 2, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/security Security related issues and pull requests enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants