Skip to content

feat: Support ID token for SAs in other than the default universe domain#2921

Merged
amanda-tarafa merged 2 commits intogoogleapis:mainfrom
amanda-tarafa:id-token
Jan 28, 2025
Merged

feat: Support ID token for SAs in other than the default universe domain#2921
amanda-tarafa merged 2 commits intogoogleapis:mainfrom
amanda-tarafa:id-token

Conversation

@amanda-tarafa
Copy link
Contributor

Closes b/333097506

These are truly general purpose requests to the IAM Service Credential API, we just happened to be using them for impersonation only.
@amanda-tarafa amanda-tarafa requested review from a team and jskeet January 28, 2025 00:49
TokenRefreshManager tokenRefreshManager = null;
tokenRefreshManager = new TokenRefreshManager(
ct => RefreshOidcTokenAsync(tokenRefreshManager, options, ct), Clock, Logger);
ct => RefreshDefultUniverseOidcTokenAsync(tokenRefreshManager, options, ct), Clock, Logger);
Copy link
Collaborator

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/" },
Copy link
Collaborator

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.)

Copy link
Contributor Author

@amanda-tarafa amanda-tarafa left a 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.

Copy link
Collaborator

@jskeet jskeet left a comment

Choose a reason for hiding this comment

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

Much better, thanks :)

@amanda-tarafa amanda-tarafa merged commit ee422c6 into googleapis:main Jan 28, 2025
3 checks passed
@amanda-tarafa amanda-tarafa deleted the id-token branch January 28, 2025 08:38
amanda-tarafa added a commit to amanda-tarafa/google-api-dotnet-client that referenced this pull request Jun 6, 2025
Features:

- googleapis#2950 Support ExternalAccountAuthorizedUserCredential
- googleapis#2921 Support ID token for SAs in other than the default universe domain
amanda-tarafa added a commit to amanda-tarafa/google-api-dotnet-client that referenced this pull request Jun 9, 2025
Features:

- googleapis#2950 Support ExternalAccountAuthorizedUserCredential
- googleapis#2921 Support ID token for SAs in other than the default universe domain
amanda-tarafa added a commit that referenced this pull request Jun 9, 2025
Features:

- #2950 Support ExternalAccountAuthorizedUserCredential
- #2921 Support ID token for SAs in other than the default universe domain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants