Use scope config for compute-engine auth #313
Merged
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.
Currently when getting Google credentials using the
ComputeEngineCredentials
method, it ignores thescopes
variable.In the official Google SDK, you can see that it also has the same logic for getting the credentials from
ComputeEngine
, see https://github.com/googleapis/google-auth-library-java/blob/a7a8d7a4102b0b7c1b83791947ccb662f060eca7/oauth2_http/java/com/google/auth/oauth2/ComputeEngineCredentials.java#L193-L199 and https://github.com/googleapis/google-auth-library-java/blob/a7a8d7a4102b0b7c1b83791947ccb662f060eca7/oauth2_http/java/com/google/auth/oauth2/ComputeEngineCredentials.java#L480-L483 (which is the same URI as https://github.com/apache/incubator-pekko-connectors/blob/67eea4f1dc7e9e0931322ef5c07f305e995b0eb2/google-common/src/main/scala/org/apache/pekko/stream/connectors/google/auth/GoogleComputeMetadata.scala#L33-L34)