You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I've found an issue when settings TopicAdminClient with endpoint.
Current behavior:
When i try to set TopicAdminClient with credentials out of a json(String) and endpoint different then the global "pubsub.googleapis.com" end point i get an UnauthenticatedException.
When i use ADC authentication and set the environment variable GOOGLE_APPLICATION_CREDENTIALS to point to a json file with the same content i can set to all endpoints with no errors.
When i try to set TopicAdminClient with credentials out of a json(String) and use the global endpoint pubsub.googleapis.com" i get no errors.
Expected behavior:
To be able to use both authentication ways and set any endpoint without encountering any error.
Example:
...
ServiceAccountCredentials cred = ServiceAccountCredentials
.fromStream(new ByteArrayInputStream(jsonCredentials.getBytes())); // json as String
CredentialsProvider credentialsProvider = FixedCredentialsProvider.create(cred);
TopicAdminSettings topicAdminSettings = TopicAdminSettings.newBuilder()
.setCredentialsProvider(credentialsProvider) // credentials out of given json file
.setEndpoint(endpoint) // endpoint different then global endpoint
.build();
TopicAdminClient topicAdminClient = TopicAdminClient.create(topicAdminSettings);
topicAdminClient.getTopic(someTopic);
the code above produce the following exception: com.google.api.gax.rpc.UnauthenticatedException: io.grpc.StatusRuntimeException: UNAUTHENTICATED: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.'
The text was updated successfully, but these errors were encountered:
Hi,
I've found an issue when settings TopicAdminClient with endpoint.
Current behavior:
Expected behavior:
To be able to use both authentication ways and set any endpoint without encountering any error.
Example:
the code above produce the following exception:
com.google.api.gax.rpc.UnauthenticatedException: io.grpc.StatusRuntimeException: UNAUTHENTICATED: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.'
The text was updated successfully, but these errors were encountered: