Skip to content

Fix audience and scopes when using WIF and non-default universes.#522

Open
juliocc wants to merge 1 commit intogoogle-github-actions:mainfrom
juliocc:main
Open

Fix audience and scopes when using WIF and non-default universes.#522
juliocc wants to merge 1 commit intogoogle-github-actions:mainfrom
juliocc:main

Conversation

@juliocc
Copy link

@juliocc juliocc commented Feb 4, 2026

Fixes #521

@juliocc juliocc requested a review from a team as a code owner February 4, 2026 16:10
@juliocc juliocc requested review from R2wenD2 and verbanicm February 4, 2026 16:10
Copy link

@R2wenD2 R2wenD2 left a comment

Choose a reason for hiding this comment

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

I have one question about the scope change.

@juliocc
Copy link
Author

juliocc commented Feb 13, 2026

I have one question about the scope change.

I somehow missed the notification. I've answered the question inline.

@MPV
Copy link

MPV commented Mar 13, 2026

@juliocc Thanks for your efforts on this.

In the meanwhile, we tried the workaround listed here:

...but went back to running on top of your work here in this PR, but also noted that the action doesn't write the universe_domain to the credfile:

  • const data: Record<string, any> = {
    type: `external_account`,
    audience: this.#audience,
    subject_token_type: `urn:ietf:params:oauth:token-type:jwt`,
    token_url: `${this._endpoints.sts}/token`,
    credential_source: {
    url: requestURL,
    headers: {
    Authorization: `Bearer ${this.#githubOIDCTokenRequestToken}`,
    },
    format: {
    type: `json`,
    subject_token_field_name: `value`,
    },
    },
    };

...so we had to do some juggling like this:

Skärmavbild 2026-03-13 kl  10 43 58

...to make it work with Terraform, which otherwise failed with:

Error: Universe domain mismatch: 'masked-sovereign-domain.here' supplied directly to Terraform with no matching universe domain in credentials. Credentials with no 'universe_domain' set are assumed to be in the default universe.

@R2wenD2 R2wenD2 enabled auto-merge (squash) March 13, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Audience seems to be ignored

3 participants