lquerel / gcp-bigquery-client

GCP BigQuery Client (Rust)
Apache License 2.0
92 stars 60 forks source link

Enable to handle Workload Identity #4

Closed komi1230 closed 2 years ago

komi1230 commented 2 years ago

Workload Identity is released as a new way to auth in this January. This crate couldn't auth with Workload Identity.

To use Workload Identity, we have to get access token from Google server like this:

$ curl -s -H 'Metadata-Flavor: Google' http://metadata/computeMetadata/v1/instance/service-accounts/default/token

ref: https://github.com/vmware-tanzu/velero/issues/1657#issuecomment-514688510

komi1230 commented 2 years ago

Thanks ! That's true, this was a really ugly change. I introduced with_workload_identity without changing public API. Could you review again ?

lquerel commented 2 years ago

Thanks for this quick update. I just had a quick look at the code and it looks good to me. I will spend a little more time after my day job to merge the code and publish a new version of this crate.

lquerel commented 2 years ago

Thanks for your contribution. The version 0.9.1 is now available on crates.io