Repository navigation
[feature](vault) Support keyless GCS vaults with GKE Workload Identity - #66484
cyriltovena wants to merge 1 commit into
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
/review |
### What problem does this PR solve? Issue Number: close apache#65432 Related PR: apache#65433 Problem Summary: GCP storage vaults require long-lived HMAC keys, so GKE deployments cannot use the pod identity supplied by Workload Identity Federation. Add a GCP-only credentials provider that obtains short-lived OAuth2 access tokens from the metadata server and applies them through the shared object-storage client used by BE and recycler. Validate and normalize the configuration across FE, Meta Service, BE, and recycler; fail closed when no token is available; preserve HMAC rollback semantics; serialize vault refreshes; cache and refresh tokens safely; and reject unsupported presigned URLs explicitly. ### Release note Support keyless GCS storage vault authentication on GKE with Workload Identity Federation using s3.credentials_provider_type=gcp_workload_identity. ### Check List (For Author) - Test: Unit tests added but not executed locally because the checkout lacks the Doris third-party build bundle. Protobuf syntax, diff checks, and a focused syntax check against the pinned AWS SDK pass. LLVM 16 formatting and the full FE/BE/cloud suites are pending PR CI. - Behavior changed: Yes (adds GKE Workload Identity authentication for GCP storage vaults) - Does this need documentation: Yes (follow-up website documentation is required)
f81d990 to
dc037ae
Compare
|
/review |
|
+1, we need this for Doris on GKE with Workload Identity: today our storage vault only works with a long-lived HMAC key. The same bearer-token path would also let Iceberg REST catalogs use vended GCS tokens (#68671); we'll send that PR once this one lands. |
|
Superseeded by #68540 ? |
|
Hi @cyriltovena thanks for you contribution. |
|
Thanks @cyriltovena for working on this. I compared the current implementations: #68540 covers the core keyless GCS storage-vault use case here, including GKE Workload Identity. In #68540, So the configuration corresponding to this PR's This is functional overlap, rather than identical changes: this PR also has endpoint restrictions and vault-refresh/connectivity hardening that #68540 does not reproduce in the same way. Any still-needed pieces could be carried over separately. |
What problem does this PR solve?
Issue Number: close #65432
Problem:
GCP storage vaults require long-lived HMAC access keys. GKE deployments using Workload Identity Federation therefore cannot authenticate the vault data path with the pod identity and short-lived Google credentials.
Solution:
Add
gcp_workload_identity, a GCP-only storage-vault credentials provider. The shared C++ object-storage client used by BE and recycler obtains OAuth2 access tokens from the GKE/GCE metadata server and appliesAuthorization: Bearer ...to every GCS XML API request while AWS SigV4 signing remains anonymous.CREATE STORAGE VAULT gcs_vault PROPERTIES ( "type" = "S3", "s3.endpoint" = "storage.googleapis.com", "s3.region" = "us-central1", "s3.bucket" = "my-bucket", "s3.root.path" = "doris", "provider" = "GCP", "s3.credentials_provider_type" = "gcp_workload_identity" );The implementation:
https://storage.googleapis.combefore bearer authentication;NotSupportedresult for presigned URLs.Upgrade compatibility:
The persisted credential-provider enum is new. Do not create or alter a Workload Identity vault during a mixed-version rollout; upgrade every BE and recycler consumer before enabling it. Explicit HMAC or role credentials take precedence if a stale unknown enum value survives a rollback transition.
Security Impact:
This removes the need to distribute long-lived HMAC secrets on GKE. Metadata acquisition uses a fixed metadata hostname with the required
Metadata-Flavor: Googleheader, disables AWS IMDS discovery, redirects, and proxies, and uses bounded timeouts. Storage requests are restricted to the canonical GCS HTTPS endpoint, and missing tokens fail closed.Testing:
SHOW CREATEoutput.git diff --check origin/masterpasses.protoc --proto_path=gensrc/proto --descriptor_set_out=/dev/null gensrc/proto/cloud.protopasses.Release note
Support keyless GCS storage vault authentication on GKE with Workload Identity Federation using
"s3.credentials_provider_type" = "gcp_workload_identity".Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)