metadata-ingestion/docs/sources/gcs/gcs_pre.md
The gcs module ingests metadata from Gcs into DataHub. It is intended for production ingestion workflows and module-specific capabilities are documented below.
This connector ingests Google Cloud Storage datasets into DataHub. It allows mapping an individual file or a folder of files to a dataset in DataHub.
To specify the group of files that form a dataset, use path_specs configuration in ingestion recipe. This source leverages Interoperability of GCS with S3
and uses DataHub S3 Data Lake integration source under the hood. Refer section Path Specs from S3 connector for more details.
Before running ingestion, ensure network connectivity to the source, valid authentication credentials, and read permissions for metadata APIs required by this module.
The GCS source supports three authentication methods:
hmac, default): Long-lived key-based authentication using Google Cloud Storage HMAC keys. Suitable for simple setups and service accounts outside GCP.workload_identity): Keyless authentication using Application Default Credentials. The recommended option when DataHub runs inside GKE with Workload Identity enabled — no credential config required.workload_identity_federation): Keyless, token-based authentication for workloads running outside GCP (AWS, Azure, on-premises). Exchanges an external identity token for short-lived GCP credentials via GCP's STS endpoint.This is the simplest option for DataHub running inside GKE. No credential files or secrets are needed — the pod's Kubernetes Service Account is used automatically.
Enable Workload Identity on your GKE cluster — Enable Workload Identity.
Create a Google Service Account (GSA) with "Storage Object Viewer" role.
Bind your Kubernetes Service Account (KSA) to the GSA:
gcloud iam service-accounts add-iam-policy-binding GSA_EMAIL \
--role roles/iam.workloadIdentityUser \
--member "serviceAccount:PROJECT_ID.svc.id.goog[NAMESPACE/KSA_NAME]"
kubectl annotate serviceaccount KSA_NAME \
--namespace NAMESPACE \
iam.gke.io/gcp-service-account=GSA_EMAIL
Set auth_type: workload_identity in your recipe. No credential or WIF config fields are needed.
Use this when DataHub runs outside GCP and you want keyless authentication without distributing service account key files.
gcp_wif_configuration), inline dict (gcp_wif_configuration_json), or JSON string (gcp_wif_configuration_json_string). The JSON string option is useful for injecting from a secrets manager.