Default auth_token
expiration is 5 minutes instead of 10 minutes
#474
Labels
bug
Something isn't working
TL;DR
When using Direct Workload Identity Federation, the default expiration time for the
auth_token
is 5 minutes instead of 10 (which is what's been written in the documentation).Expected behavior
The expectation would be for the token to be valid for 10 minutes as mentioned in the
README.md
file in the root.Observed behavior
If I try to print the OIDC JWT token in GitHub Actions, I get:
The ttl for the token then is
exp-iat
=300s
=5m
.If I run some steps that takes more than 5 minutes after I get authenticated, I get:
which agrees with the token expiration.
Action YAML
Additional information
Possible workarounds:
a) Use Identity Federation with Service Accounts. This is not something we want to do, since we want to start moving to the more secure Direct Federation. Reason it works with this is because the
access_token
that is generated using the Service Account has a TTL of 1 hour.b) Instead of using
auth_token
, use thecredentials.json
, installgcloud
binary and configure-docker instead. Example:This way we still get a bigger TTL for the
credentials.json
file that gets generated when running the action.Related issues: #432
Recent comment: #432 (comment)
The text was updated successfully, but these errors were encountered: