Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCP Auth: Modifying incorrect audience string for GCE #2064

Merged
merged 3 commits into from
Oct 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/provider/auth_gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func (l *AuthLoginGCP) getJWT(ctx context.Context) (string, error) {
if metadata.OnGCE() {
// If we are running on GCE instance we can get the JWT token
// from the meta-data service.
audience := fmt.Sprintf("%s/vault", l.params[consts.FieldRole])
audience := fmt.Sprintf("vault/%s", l.params[consts.FieldRole])
c := metadata.NewClient(nil)
resp, err := c.Get(
fmt.Sprintf("instance/service-accounts/default/identity?audience=%s&format=full", audience),
Expand Down