credentials: add GcpServiceAccountIdentityCallCredentials call credentials type (gRFC A83).#8974
Open
Pranjali-2501 wants to merge 1 commit intogrpc:masterfrom
Open
credentials: add GcpServiceAccountIdentityCallCredentials call credentials type (gRFC A83).#8974Pranjali-2501 wants to merge 1 commit intogrpc:masterfrom
GcpServiceAccountIdentityCallCredentials call credentials type (gRFC A83).#8974Pranjali-2501 wants to merge 1 commit intogrpc:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8974 +/- ##
==========================================
- Coverage 83.13% 82.95% -0.18%
==========================================
Files 411 412 +1
Lines 32704 32779 +75
==========================================
+ Hits 27187 27191 +4
- Misses 4140 4193 +53
- Partials 1377 1395 +18
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements
GcpServiceAccountIdentityCallCredentials, a new call credentials type required by gRFC A83: xDS GCP Authentication Filter. This credential fetches and manages GCP Service Account Identity tokens for a given audience, allowing gRPC services running on GCP to authenticate RPCs.Implementation Details & gRFC Deviations
The gRFC provides detailed specifications for how this credential should manually fetch tokens from the GCE metadata server, extract the exp field, and manually calculate refresh intervals (e.g., refreshing 30 seconds early).
However, we have decided to use google auth library to fetch the token.
In Go, the standard Google API authentication packages (golang.org/x/oauth2/google) only provide access tokens, which are fundamentally different from the identity tokens required here.
To properly fetch identity tokens, we have decided to use the officially supported Google Auth library for Go:
cloud.google.com/go/auth/credentials/idtoken.The library causes the following behavioral difference from gRFC.
Behavioral Guarantees Implemented:
RELEASE NOTES: N/A