Google Professional Cloud Security Engineer Question 75
Select 3Google Cloud PlatformYou are a Cloud Security Engineer at an organization that uses an on-premises identity provider (IdP) to authenticate users. The organization wants to grant temporary access for workloads running on an on-premises Kubernetes cluster to Google Cloud resources, without using long-lived service account keys. Which of the following steps should you take to configure Workload Identity Federation to achieve this?
- A
Create a workload identity pool in Google Cloud and configure a provider for your on-premises IdP.
- B
Generate a long-lived service account key and store it securely in the Kubernetes cluster.
- C
Grant the Google Cloud service account the necessary IAM roles to access required resources.
- D
Configure the on-premises Kubernetes workloads to exchange tokens with the on-premises IdP and use the tokens to authenticate with the workload identity pool.
- E
Disable Workload Identity Federation and use standard service account key authentication instead.
Show answer and explanation
Correct answers: A, C, D
Explanation
Workload Identity Federation allows you to securely authenticate workloads running outside Google Cloud (e.g., on-premises or in other clouds) to access Google Cloud resources without needing long-lived service account keys. You need to create a workload identity pool, configure a provider for your IdP, assign the appropriate IAM roles to the Google Cloud service account, and configure the workloads to authenticate using tokens provided by the IdP.
- A. Correct.
Correct. Creating a workload identity pool and setting up a provider for your on-premises IdP is a key step in enabling Workload Identity Federation.
- B. Incorrect.
Incorrect. Using long-lived service account keys is against best practices, as it increases the security risk of key exposure.
- C. Correct.
Correct. The Google Cloud service account must have appropriate IAM roles to access the required resources.
- D. Correct.
Correct. Configuring the workloads to exchange tokens with the IdP and authenticate with the workload identity pool is necessary for enabling Workload Identity Federation.
- E. Incorrect.
Incorrect. Disabling Workload Identity Federation negates the purpose of this setup, which is to avoid using long-lived service account keys.