Question 150
The administrator needs to authenticate Cloud Run service-to-Google-API calls through a managed service identity without baking keys into containers. Which of these solutions directly satisfies the goal?
Explanation
Correct Answer
Cloud Run workload identity for APIs directly provides the mechanism to authenticate Cloud Run service-to-Google-API calls through a managed service identity without baking keys into containers. Before rollout, the team should deploy Cloud Run with an explicit runtime service account holding just the necessary target API roles. Successful behavior means that Cloud Run requests to the authorized API use its runtime identity automatically.
Incorrect Answers
Workload Identity Federation audience mapping fits a different requirement: to prevent tokens issued for a different relying party from authenticating to an organization's provider. Its direct acceptance evidence is that authorized external tokens pass audience validation while unrelated tokens are rejected; it is not the most specific solution to authenticate Cloud Run service-to-Google-API calls through a managed service identity without baking keys into containers.
GKE Workload Identity Federation fits a different requirement: to allow a Kubernetes Pod to call Google Cloud services under a scoped workload identity instead of a node-wide credential. Its direct acceptance evidence is that the intended Pod can call the authorized API while other Pods lack the delegated permissions; it is not the most specific solution to authenticate Cloud Run service-to-Google-API calls through a managed service identity without baking keys into containers.
External workload identity federation pool fits a different requirement: to let a trusted GitHub Actions workflow obtain access to Google Cloud without exporting long-lived service account keys. Its direct acceptance evidence is that only eligible workflow subjects exchange a valid token for Google Cloud access; it is not the most specific solution to authenticate Cloud Run service-to-Google-API calls through a managed service identity without baking keys into containers.






Associate Cloud Engineer Practice Tests