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

Fix universe_domain for ADC and access token auth cases #18272

Conversation

modular-magician
Copy link
Collaborator

GoogleCloudPlatform/magic-modules#9799 was too heavy handed and completely broke ADC and auth token access when universe_domain was configured in Terraform.

This PR sets the universe domain based the following logic:
Pre-auth

  • Set universe domain to configured value initially as a default

Auth

  • access token: keep default UD
  • credentials file: set to universe_domain in file, unset if not found
  • ADC:
    • JSON exists: set to universe_domain in JSON, unset if not found
    • JSON doesn't exist: call creds.UniverseDomain()

Post-auth

  • compare credentials UD to configured UD and throw an error if they don't match

Release Note Template for Downstream PRs (will be copied)

provider: fixed application default credential and access token authorization when `universe_domain` is set

Derived from GoogleCloudPlatform/magic-modules#10517

)

Co-authored-by: Riley Karson <rileykarson@google.com>

[upstream:36e829bdebed31cc09dbf3b2a484d75ba3a21baf]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 9b94017 into hashicorp:main May 29, 2024
2 checks passed
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant