Soru

Zorluk: OrtaProgrammatic GCP Interaction via SDK, CLI, and APIs

An enterprise application hosted in an on-premises Kubernetes cluster needs to programmatically upload large batch analytical files to a Google Cloud Storage bucket without using static long-lived service account keys. The security team mandates that the architecture must adhere to the principle of least privilege and prevent credential exfiltration risks. Which of the following configuration steps should the team implement? (Select TWO.)

  1. Configure Workload Identity Federation to establish a trust relationship between the on-premises identity provider and Google Cloud IAM.Cevap
  2. Grant the federated identity permission to impersonate a dedicated service account bound strictly to the minimal Cloud Storage IAM roles required.Cevap
  3. C
    Generate a service account JSON key file and mount it as a secret into the application pod, pointing GOOGLE_APPLICATION_CREDENTIALS to the key path.
  4. D
    Assign the primitive Owner IAM role to the service account to ensure all programmatic API calls execute without permission errors.

Cevap

The team should configure Workload Identity Federation between the on-premises identity provider and Google Cloud IAM, and grant the federated identity permission to impersonate a dedicated service account restricted to the necessary minimal Cloud Storage IAM roles.
Workload Identity Federation allows external applications to authenticate to GCP programmatically using short-lived tokens, eliminating long-lived key management risks. Granting permissions to impersonate a dedicated service account configured with fine-grained GCS access satisfies least-privilege requirements.

Adım Adım Çözüm

1
Establish federated identity trust.
On-premises Kubernetes tokens can be exchanged for short-lived Google Cloud federated tokens.
Eliminates the need for downloading or managing long-lived service account JSON key files.
2
Configure service account impersonation with fine-grained IAM roles.
The application assumes a service account that holds only the minimal permissions necessary for Cloud Storage operations.
Enforces least-privilege security controls without over-granting administrative access.

Anahtar Kavram

Keyless programmatic authentication using Workload Identity Federation and least-privilege Service Account Impersonation.
Bu soruyu puanla