-
Notifications
You must be signed in to change notification settings - Fork 131
How do I apply a io.grpc.CallCredentials
to ServiceOptions
?
#18
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
Comments
I assume that you are using the Spanner client library, as you are referencing the The short answer for the Spanner client library is: No, that is currently not possible. The slightly longer answer: Based on your question however, I do assume that it is not your goal specify different credentials per gRPC call, but that you would just like to use the |
Your assumption is correct. It's a static principal, but not a static set of credentials, since refreshing may occur between underlying retries behind the gRPC stub. |
I'm not sure I understand what you mean with your last comment. If you provide credentials through the normal Could you explain a little bit more in detail what the reason is that you want to use |
There are several bespoke things going on here, primarily in Google's monorepo:
So, whether or not a client library does some intelligence above the gRPC stub, we still are limited in what the underlying substrate will accept. What we have is an internal type that passes the type check and supports I've not been able to track how a |
This might be a byproduct of |
Allow the user to supply io.grpc.CallCredentials instead of only com.google.auth.Credentials. Any CallCredentials supplied will take precedence above the Credentials set on SpannerOptions. Fixes #6373
@Capstan Would the proposed change in googleapis/google-cloud-java#6426 solve your problem? It adds the possibility of setting a |
That looks good, yes. I need to forward this to my colleague who'd be consuming it. |
/cc @tsalomie |
Adds support for using CallCredentials that could vary per call instead of only static credentials passed in at startup. Fixes #18
/cc @xiesheng211 |
* feat: add support for CallCredentials Adds support for using CallCredentials that could vary per call instead of only static credentials passed in at startup. Fixes #18 * fix: declare dependency usage
I have a private class that generates
io.grpc.CallCredentials
to authorize to Cloud Spanner. Apparently theServiceOptions.Builder.setCredentials
only knows aboutcom.google.auth.Credentials
. I know that the Cloud Spanner communication is done over gRPC. Is there a way to apply myCallCredentials
?The text was updated successfully, but these errors were encountered: