Repository navigation
Conversation
locker95
force-pushed
the
fix/aws-renew-auth-type
branch
20 times, most recently
from
November 11, 2026 19:20
4bd4ccb to
10c953d
Compare
locker95
force-pushed
the
fix/aws-renew-auth-type
branch
7 times, most recently
from
November 18, 2026 01:14
6185b62 to
bfdc517
Compare
locker95
force-pushed
the
fix/aws-renew-auth-type
branch
10 times, most recently
from
November 25, 2026 07:28
f273f8c to
7c5a934
Compare
locker95
force-pushed
the
fix/aws-renew-auth-type
branch
from
November 25, 2026 19:46
7c5a934 to
34c4711
Compare
pathLoginRenew read auth_type from the token metadata only and fell back to ec2 when it was missing. auth_type is only present there when it is listed in iam_metadata/ec2_metadata, so IAM logins with a config that leaves it out were renewed as EC2 tokens and failed with "instance_id" not found in auth metadata. Store auth_type in InternalData at login, like the other values that renewal relies on, and read it with getMetadataValue so older leases that only carry it in Metadata keep working.
locker95
force-pushed
the
fix/aws-renew-auth-type
branch
from
November 26, 2026 07:48
34c4711 to
303a078
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #32183
AWS auth renewal picked the renew path from
auth_typein the token metadata, and that key is only there when it's listed iniam_metadata/ec2_metadata. With something likeiam_metadata=account_id, IAM tokens got renewed as EC2 and failed with"instance_id" not found in auth metadata.This puts
auth_typeintoInternalDataat login (same ascanonical_arn,role_nameetc. that renew already reads from there) and reads it back withgetMetadataValue, so it still falls back toMetadataand thenec2for older leases.Added a test that logs in through the mock STS server with
auth_typeleft out ofiam_metadataand renews; it fails on main with the error from the issue.go test ./builtin/credential/aws/passes.