Skip to content

Conversation

markdroth
Copy link
Member

No description provided.

Copy link

@kyessenov kyessenov left a comment

Choose a reason for hiding this comment

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

I'll let @howardjohn confirm, but I think this covers Istio functionality. For a sidecar, the service account token is mounted as "istio-token" JWT with a different audience.

@dimpavloff
Copy link

Hey; may I ask what's needed to progress this proposal? 🙏

@markdroth markdroth marked this pull request as ready for review June 4, 2025 22:53
@markdroth markdroth requested review from ejona86 and dfawley June 4, 2025 22:56
@markdroth
Copy link
Member Author

@dimpavloff Thanks for the ping! There's nothing blocking this other than finding the time to push it forward. :)

Do you have a particular gRPC language in which you're waiting for this feature?

@dimpavloff
Copy link

@dimpavloff Thanks for the ping! There's nothing blocking this other than finding the time to push it forward. :)

Ah, I know the feeling :)

Do you have a particular gRPC language in which you're waiting for this feature?

Yes. At my company we use Go and are keen to adopt gRPC proxyless but we hit istio/istio#53532 which is what led me here.


### JwtTokenFileCallCredentials

Note: This section is intended for gRPC implementations that need to
Copy link
Member

Choose a reason for hiding this comment

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

Java implementation note: We can use JsonWebSignature.parse().getPayload().getExpirationTimeSeconds() to create an AccessToken with appropriate expiration. We could extend OAuth2Credentials and implement refreshAccessToken(). It takes care of stale vs expiration checking. Using JsonWebSignature is essentially re-implementing IdToken, which would probably work today, but technically this is not necessarily an IdToken so we should probably avoid the existing class.

@markdroth markdroth merged commit 0323c30 into grpc:master Jun 16, 2025
1 check passed
@markdroth markdroth deleted the xds_jwt_call_creds branch June 16, 2025 22:54
copybara-service bot pushed a commit to grpc/grpc that referenced this pull request Jun 17, 2025
This is the first part of implementing gRFC A97 (grpc/proposal#492).

Closes #39769

COPYBARA_INTEGRATE_REVIEW=#39769 from markdroth:jwt_token_call_creds fd890a3
PiperOrigin-RevId: 772533750
anniefrchz pushed a commit to anniefrchz/grpc that referenced this pull request Jun 25, 2025
This is the first part of implementing gRFC A97 (grpc/proposal#492).

Closes grpc#39769

COPYBARA_INTEGRATE_REVIEW=grpc#39769 from markdroth:jwt_token_call_creds fd890a3
PiperOrigin-RevId: 772533750
copybara-service bot pushed a commit to grpc/grpc that referenced this pull request Jun 26, 2025
…le call creds (#39772)

This is the second half of gRFC A97 (grpc/proposal#492).

Closes #39772

COPYBARA_INTEGRATE_REVIEW=#39772 from markdroth:jwt_token_call_creds2 727f770
PiperOrigin-RevId: 776233709
paulosjca pushed a commit to paulosjca/grpc that referenced this pull request Aug 23, 2025
This is the first part of implementing gRFC A97 (grpc/proposal#492).

Closes grpc#39769

COPYBARA_INTEGRATE_REVIEW=grpc#39769 from markdroth:jwt_token_call_creds fd890a3
PiperOrigin-RevId: 772533750
paulosjca pushed a commit to paulosjca/grpc that referenced this pull request Aug 23, 2025
…le call creds (grpc#39772)

This is the second half of gRFC A97 (grpc/proposal#492).

Closes grpc#39772

COPYBARA_INTEGRATE_REVIEW=grpc#39772 from markdroth:jwt_token_call_creds2 727f770
PiperOrigin-RevId: 776233709
arjan-bal pushed a commit to grpc/grpc-go that referenced this pull request Sep 16, 2025
…7) (#8431)

Part one for grpc/proposal#492 (A97). 
This is done in a new `credentials/jwt` package to provide file-based
PerRPCCallCredentials. It can be used beyond XDS. The package handles
token reloading, caching, and validation as per A97 .

There will be a separate PR which uses it in `xds/bootstrap`. 

Whilst implementing the above, I considered `credentials/oauth` and
`credentials/xds` packages instead of creating a new one. The former
package has `NewJWTAccessFromKey` and `jwtAccess` which seem very
relevant at first. However, I think the `jwtAccess` behaviour seems more
tailored towards Google services. Also, the refresh, caching, and error
behaviour for A97 is quite different than what's already there and
therefore a separate implementation would have still made sense.
WRT `credentials/xds`, it could have been extended to both handle
transport and call credentials. However, this is a bit at odds with A97
which says that the implementation should be non-XDS specific and, from
reading between the lines, usable beyond XDS.
I think the current approach makes review easier but because of the
similarities with the other two packages, it is a bit confusing to
navigate. Please let me know whether the structure should change.

Relates to istio/istio#53532

RELEASE NOTES:
- credentials: Add `credentials/jwt` package providing file-based JWT
PerRPCCredentials (A97).
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.

6 participants