apache / apache/arrow-rs-object-store

Support GCP Workload Identity Federation

Open
#258 6 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
322
Forks
212
Avg merge
5d 2h
Merged PRs (30d)
10

Description

**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**

I am accessing GCP resources from AWS using GCP Workload Identity Federation.

**Describe the solution you'd like**

Be able to access GCP resources from AWS using GCP GCP Workload Identity Federation using object_store.

https://cloud.google.com/docs/authentication/provide-credentials-adc#wlif

**Describe alternatives you've considered**

Is there a way to export my workload identity credentials to a form object_store can understand similar to AWS STS GetSessionToken (my knowledge of GCP is more limited)?

**Additional context**

- Currently errors with `GCP credential error: A configuration file was passed in but was not used` at https://github.com/apache/arrow-rs/blob/master/object_store/src/gcp/credential.rs#L431
- There are different types of Application Default Credentials files other than https://github.com/apache/arrow-rs/blob/master/object_store/src/gcp/credential.rs#L405-L411, see https://cloud.google.com/docs/authentication/provide-credentials-adc#wlif
The One for workload identity federation looks like:

```json
{
"audience": "//iam.googleapis.com/projects/111111534588/locations/global/workloadIdentityPools/abc",
"credential_source": {
"environment_id": "id123",
"regional_cred_verification_url": "https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15"
},
"service_account_impersonation": {
"token_lifetime_seconds": 3600
},
"service_account_impersonation_url": "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/acct@acb123.iam.gserviceaccount.com:generateAccessToken",
"subject_token_type": "urn:ietf:params:aws:token-type:aws4_request",
"token_url": "https://sts.googleapis.com/v1/token",
"type": "external_account"
}
```
- The process for exchanging credentials over REST API is documented here: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#generate-automatic

Contributor guide

Open the contributing guide

Research direction

Start in object_store/src/gcp/credential.rs, especially the credential handling around lines 405-431. Read the linked Google Cloud Workload Identity Federation documentation and the REST credential-exchange process to understand the external_account configuration shown in the issue. Done means object_store can use this configuration to access GCP resources from AWS without the current configuration-file error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, google-cloud, rust
Domain
authentication, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.