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

feat: adds universe domain support for compute credentials #1346

Merged
merged 19 commits into from
Jan 6, 2024

Conversation

TimurSadykov
Copy link
Member

This adds universe domain support to GCE credentials.

In case explicit universe_domain was provided - it takes priority
Otherwise - GCE credential tries to obtain a universe domain from Metadata service

If request fails with 404 or request returns an empty string - universe domain is set to GDU
If any other error - throws a retryable exception

@TimurSadykov TimurSadykov requested review from a team as code owners December 26, 2023 18:30
@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Dec 26, 2023
Copy link

@einobie einobie left a comment

Choose a reason for hiding this comment

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

Ok

@@ -83,134 +85,152 @@ public void setIdToken(String idToken) {
@Override
public LowLevelHttpRequest buildRequest(String method, String url) throws IOException {
if (url.equals(ComputeEngineCredentials.getTokenServerEncodedUrl())) {
return getMockRequestForTokenEndpoint(url);
Copy link
Member Author

Choose a reason for hiding this comment

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

This diff might be tricky to read. What I did is I factored out all the if-statements contents in a separate private methods. Some are big statements that made this method hard to read.

Copy link

sonarcloud bot commented Jan 6, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@TimurSadykov TimurSadykov merged commit 7e26861 into main Jan 6, 2024
20 checks passed
@TimurSadykov TimurSadykov deleted the tpc-stage2 branch January 6, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants