Skip to content

auth/utils/cijwt: introduce WithHostTokenFunc#1221

Open
matheuscscp wants to merge 1 commit into
jwt-from-pathfrom
jwt-from-func
Open

auth/utils/cijwt: introduce WithHostTokenFunc#1221
matheuscscp wants to merge 1 commit into
jwt-from-pathfrom
jwt-from-func

Conversation

@matheuscscp
Copy link
Copy Markdown
Member

@matheuscscp matheuscscp commented May 28, 2026

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).

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
@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
Copy link
Copy Markdown
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

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