google-apis-rs / google-cloud-rs

Asynchronous Rust bindings for Google Cloud Platform APIs.
176 stars 48 forks source link

Fall back to using metadata server in datastore Client constructor #49

Closed perrygeo closed 3 years ago

perrygeo commented 3 years ago

This PR modifies the google-cloud-rs client to support GCP workload identity / service accounts.

In the absence of a GOOGLE_APPLICATION_CREDENTIALS env var referencing a service account json file, the client will now fall back to fetching the token from the metadata server . This should allow our ruster code to automatically find the credentials at runtime and is closer to the recommended behavior for client auth found in other languages.

Work in progress.

perrygeo commented 3 years ago

sorry, false alarm. This isn't ready yet :-)