-
Notifications
You must be signed in to change notification settings - Fork 533
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: Support ID token for SAs in other than the default universe domain #2921
Conversation
These are truly general purpose requests to the IAM Service Credential API, we just happened to be using them for impersonation only.
@@ -330,11 +330,11 @@ public Task<OidcToken> GetOidcTokenAsync(OidcTokenOptions options, CancellationT | |||
// then initialize the token here. | |||
TokenRefreshManager tokenRefreshManager = null; | |||
tokenRefreshManager = new TokenRefreshManager( | |||
ct => RefreshOidcTokenAsync(tokenRefreshManager, options, ct), Clock, Logger); | |||
ct => RefreshDefultUniverseOidcTokenAsync(tokenRefreshManager, options, ct), Clock, Logger); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defult => Default
public static TheoryData<string, string, string, string> OidcData => new TheoryData<string, string, string, string> | ||
{ | ||
// universe domain, token URL, SA id, expected OIDC URL | ||
{ null, "http://will.be.ignored", "MyId", "http://will.be.ignored/" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"will.be.ignored" sounds wrong if we're later asserting that we've actually made a call to it. (I'd expected tests which demonstrated the more radically different paths taken here, but maybe I just don't understand.)
cf0e35a
to
f2f4599
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jskeet comments adressed and squashed in last commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better, thanks :)
Closes b/333097506