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

Expose credentials.NewRequestInfoContext as a public (experimental) API #8080

Open
vadimsht opened this issue Feb 12, 2025 · 3 comments
Open
Assignees
Labels
Area: Auth Includes regular credentials API and implementation. Also includes advancedtls, authz, rbac etc. Type: Feature New features or improvements in behavior

Comments

@vadimsht
Copy link

Use case(s) - what problem will this feature solve?

We have a Go library that reuses gRPC code generator and many of APIs, but uses an alternative transport layer (simple HTTP request/responses): http://go.chromium.org/luci/grpc/prpc The can historically be traced to lack of HTTP2 support on Google Appengine and it solves the same problem as solved by grpc-web proxy, except without a proxy.

We are morphing this library to be closer and closer to the real gRPC client, to do a full switch at some point.

As part of that, it would be nice to be able to use PerRPCCredentials. Unfortunately, many implementations of this interface call credentials.RequestInfoFromContext(ctx) to check the security level etc. And this is impossible to setup without access to internal https://pkg.go.dev/google.golang.org/grpc/internal/credentials#NewRequestInfoContext

Proposed Solution

Please consider making this API public. This will also likely help with unit-testing PerRPCCredentials implementations.

@vadimsht vadimsht added the Type: Feature New features or improvements in behavior label Feb 12, 2025
@eshitachandwani eshitachandwani self-assigned this Feb 13, 2025
@eshitachandwani
Copy link
Member

Hey @vadimsht , thank you for your suggestion regarding making credentials.NewRequestInfoContext public.
This request requires careful consideration and discussion with other maintainers, as it involves exposing internal APIs. We need to assess the potential impact on security and future development. I will discuss it with other maintainers and get back to you !

@vadimsht
Copy link
Author

Hi! Any updates?

@eshitachandwani
Copy link
Member

Hey @vadimsht , I had a discussion with other maintainers and we have agreed to make it externally available. Though it might take some time before we get to it. I will keep this issue open to track the progress.

@purnesh42H purnesh42H added the Area: Auth Includes regular credentials API and implementation. Also includes advancedtls, authz, rbac etc. label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Auth Includes regular credentials API and implementation. Also includes advancedtls, authz, rbac etc. Type: Feature New features or improvements in behavior
Projects
None yet
Development

No branches or pull requests

3 participants