Question 670
A team wants to grant a particular GKE application's Kubernetes service account direct access to a Cloud Storage bucket. Which action is most appropriate?
- Check the GKE node identity and Artifact Registry image-pull permissions
- Bind the bucket role to the appropriate GKE workload identity principal
- Configure Workload Identity Federation for GKE and run the Pod with its authorized Kubernetes service account
- Prefer supported Workload Identity Federation for GKE over distributing user-managed keys
- Configure the supported Kubernetes service account annotation and grant the workload permission to impersonate the IAM service account
Explanation
Correct Answer
B:Direct IAM principal bindings can authorize Kubernetes service accounts through Workload Identity Federation for GKE. The binding targets the workload principal rather than indiscriminately authorizing every node.
Incorrect Answers
A:This setting would troubleshoot node image-pull identity for private artifacts. That behavior does not establish the requested ability to grant one Pod workload access to a bucket; it addresses an adjacent concern instead.
C:Using this action would configure Kubernetes workload keyless authentication, not grant one Pod workload access to a bucket. Its function is different from the specific change described in the scenario.
D:For the stated need to grant one Pod workload access to a bucket, this would instead replace Kubernetes static key injection with workload federation; it supports the separate task to eliminate embedded service account keys from Pods, not the required configuration.
E:This choice is useful to map Kubernetes identity to an IAM service account. The stated task is to grant one Pod workload access to a bucket, which requires a different mechanism or permission scope.
Question 671
An application uses the GKE pattern in which its Kubernetes service account impersonates a separate Google IAM service account. Which solution should be used?
- Bind the bucket role to the appropriate GKE workload identity principal
- Configure the supported Kubernetes service account annotation and grant the workload permission to impersonate the IAM service account
- Use the full workload identity principal identifier including its namespace and Kubernetes service account
- Check the GKE node identity and Artifact Registry image-pull permissions
- Configure Workload Identity Federation for GKE and run the Pod with its authorized Kubernetes service account
Explanation
Correct Answer
B:The impersonation pattern associates the Kubernetes identity with a Google service account and requires an appropriate trust binding. Simply using the service account's email in application code does not establish authorization.
Incorrect Answers
A:While this can authorize a GKE Kubernetes principal directly in IAM, the present task requires an action to enable GKE workload service-account impersonation. This operation does not supply the behavior described in the requirements.
C:In a workflow for gke least-privilege workload identities, it can identify GKE workloads using namespace-qualified principals; This question instead asks how to enable GKE workload service-account impersonation; substituting the former action would leave that distinct technical requirement unmet.
D:The result of this choice would be to troubleshoot node image-pull identity for private artifacts. The requested outcome, to enable GKE workload service-account impersonation, is handled at a different layer or through another operation.
E:This mechanism is intended to configure Kubernetes workload keyless authentication. It does not implement the required action to enable GKE workload service-account impersonation, even though both are relevant to the same general service.
Question 672
A GKE Pod can call Google APIs but pulling a private container image from Artifact Registry still fails on the node. How should the team proceed?
- Configure Workload Identity Federation for GKE and run the Pod with its authorized Kubernetes service account
- Bind the bucket role to the appropriate GKE workload identity principal
- Create a user-managed service account dedicated to the inventory application
- Configure the supported Kubernetes service account annotation and grant the workload permission to impersonate the IAM service account
- Check the GKE node identity and Artifact Registry image-pull permissions
Explanation
Correct Answer
E:Container image pulling happens as part of node runtime activity and can require node identity authorization. The Pod's application API identity does not automatically supply image-pull permissions to the node.
Incorrect Answers
A:Using this action would configure Kubernetes workload keyless authentication, not fix Artifact Registry image pulls on GKE nodes. Its function is different from the specific change described in the scenario.
B:It can authorize a GKE Kubernetes principal directly in IAM; however, it does not provide the specific operation to fix Artifact Registry image pulls on GKE nodes. The two controls serve different purposes.
C:This choice is useful to create a dedicated nonhuman application principal. The stated task is to fix Artifact Registry image pulls on GKE nodes, which requires a different mechanism or permission scope.
D:The tool can map Kubernetes identity to an IAM service account, but it cannot be substituted for the capability needed to fix Artifact Registry image pulls on GKE nodes. Its operational effect is not equivalent.
Question 673
A GKE workload must read one Cloud Storage bucket without a mounted JSON key, and neighboring workloads in the namespace must not gain the same access. Which TWO practices provide a least-privilege identity path? (Choose TWO.)
- Grant every node's default service account Storage Admin at project scope
- Grant the bucket permission only to that workload identity principal, or to its narrowly scoped impersonated Google service account
- Run the Pod under a dedicated Kubernetes service account with the supported GKE workload identity mechanism
- Mount one shared user-managed private key secret into every Pod in the namespace
Explanation
Correct Answers
B:Resource IAM should name the intended workload identity rather than all Pods or node identities. Direct federation and supported service-account impersonation are distinct configurations.
C:A dedicated Kubernetes service account helps separate the Pod's Google API identity from neighboring workloads. Workload Identity Federation for GKE avoids storing a Google private key in the Pod.
Incorrect Answers
A:Node-wide project administration would expose unrelated workloads to excessive storage authority. It defeats application-level isolation and is unnecessary for a single bucket read.
D:A shared private key spreads long-lived credentials across unrelated workloads. It defeats the keyless and least-privilege identity requirements of the design.
Question 674
A platform team needs to distinguish identically named Kubernetes service accounts in different cluster namespaces. What should be configured?
- Assign distinct Kubernetes service accounts and matching IAM access per deployment
- Prefer supported Workload Identity Federation for GKE over distributing user-managed keys
- Use the full workload identity principal identifier including its namespace and Kubernetes service account
- Grant the required object-write permission to that exact workload principal on the bucket
Explanation
Correct Answer
C:Kubernetes service account names are namespaced. IAM principal identifiers for GKE workloads include context that distinguishes service accounts with the same name in separate namespaces.
Incorrect Answers
A:This mechanism is intended to separate workload principals between Kubernetes deployments. It does not implement the required action to avoid ambiguity between same-named Kubernetes service accounts, even though both are relevant to the same general service.
B:The tool can replace Kubernetes static key injection with workload federation, but it cannot be substituted for the capability needed to avoid ambiguity between same-named Kubernetes service accounts. Its operational effect is not equivalent.
D:Select this when the goal is to grant a GKE workload the necessary storage write permission. Here the decisive requirement is to avoid ambiguity between same-named Kubernetes service accounts, and that outcome is not achieved by this action.
Question 675
An engineer proposes placing a service account JSON key in a Kubernetes Secret for every production deployment. Which action is most appropriate?
- Bind the bucket role to the appropriate GKE workload identity principal
- Grant the required object-write permission to that exact workload principal on the bucket
- Assign distinct Kubernetes service accounts and matching IAM access per deployment
- Use the full workload identity principal identifier including its namespace and Kubernetes service account
- Prefer supported Workload Identity Federation for GKE over distributing user-managed keys
Explanation
Correct Answer
E:Federated Pod identities remove the need for long-lived service account private keys in Kubernetes Secrets. Compromised Secrets can otherwise expose reusable credentials outside the cluster.
Incorrect Answers
A:The choice is aimed at a different purpose: to grant one Pod workload access to a bucket; Even if it can authorize a GKE Kubernetes principal directly in IAM, that would not accomplish the stated requirement to eliminate embedded service account keys from Pods.
B:Its purpose is to grant a GKE workload the necessary storage write permission. That distinction matters: the scenario calls for an action to eliminate embedded service account keys from Pods, not this separate configuration task.
C:Using this action would separate workload principals between Kubernetes deployments, not eliminate embedded service account keys from Pods. Its function is different from the specific change described in the scenario.
D:This setting would identify GKE workloads using namespace-qualified principals. That behavior does not establish the requested ability to eliminate embedded service account keys from Pods; it addresses an adjacent concern instead.
Question 676
A Pod with properly configured GKE workload identity receives permission denied when writing to one Cloud Storage bucket. Which solution should be used?
- Configure Workload Identity Federation using a suitable AWS provider and credential configuration
- Prefer supported Workload Identity Federation for GKE over distributing user-managed keys
- Assign distinct Kubernetes service accounts and matching IAM access per deployment
- Use the full workload identity principal identifier including its namespace and Kubernetes service account
- Grant the required object-write permission to that exact workload principal on the bucket
Explanation
Correct Answer
E:Authentication proves which workload is calling; IAM authorization still determines whether writes are allowed. Broadening cluster-level permissions alone will not grant the bucket's object permission.
Incorrect Answers
A:This alternative addresses workload federation for external cloud identities by allowing a team to authenticate an AWS workload through federation; The incident, however, requires the different action to resolve bucket IAM denial for a GKE Pod, so its central configuration remains unchanged.
B:This mechanism is intended to replace Kubernetes static key injection with workload federation. It does not implement the required action to resolve bucket IAM denial for a GKE Pod, even though both are relevant to the same general service.
C:Administrators use it to separate workload principals between Kubernetes deployments, rather than to resolve bucket IAM denial for a GKE Pod. Applying it would change the wrong component of this deployment.
D:Select this when the goal is to identify GKE workloads using namespace-qualified principals. Here the decisive requirement is to resolve bucket IAM denial for a GKE Pod, and that outcome is not achieved by this action.
Question 677
A developer wants to create a downloadable private key for an application, but the environment supports attached workload credentials. What is the best next step?
- Create a replacement key, migrate the client, then remove the old key under a controlled rotation plan
- Use attached or federated short-lived credentials instead of creating a user-managed key
- Disable or delete the exposed key promptly and replace the affected authentication path
- Enforce the applicable organization policy constraint disabling service account key creation
Explanation
Correct Answer
B:Google recommends avoiding user-managed service account keys where supported alternatives exist. Long-lived private keys are harder to protect and revoke when copied into code repositories or hosts.
Incorrect Answers
A:It can rotate a legacy service account key safely; however, it does not provide the specific operation to choose keyless workload authentication. The two controls serve different purposes.
C:This setting would revoke a potentially exposed service account private key. That behavior does not establish the requested ability to choose keyless workload authentication; it addresses an adjacent concern instead.
D:Using this action would block new user-managed service account key creation, not choose keyless workload authentication. Its function is different from the specific change described in the scenario.
Question 678
A security organization must prevent new user-managed service account keys from being created across its managed projects. Which configuration best meets the requirement?
- Enforce the applicable organization policy constraint disabling service account key creation
- Use attached or federated short-lived credentials instead of creating a user-managed key
- Disable or delete the exposed key promptly and replace the affected authentication path
- Prefer supported Workload Identity Federation for GKE over distributing user-managed keys
- Create a replacement key, migrate the client, then remove the old key under a controlled rotation plan
Explanation
Correct Answer
A:Organization policy constraints can restrict creation of user-managed service account keys. This centrally reduces the risk of new long-lived credentials being exported from projects.
Incorrect Answers
B:The result of this choice would be to avoid distributing long-lived service account private keys. The requested outcome, to enforce an organization-wide key issuance restriction, is handled at a different layer or through another operation.
C:While this can revoke a potentially exposed service account private key, the present task requires an action to enforce an organization-wide key issuance restriction. This operation does not supply the behavior described in the requirements.
D:The choice is aimed at a different purpose: to eliminate embedded service account keys from Pods; Even if it can replace Kubernetes static key injection with workload federation, that would not accomplish the stated requirement to enforce an organization-wide key issuance restriction.
E:Its purpose is to rotate a legacy service account key safely. That distinction matters: the scenario calls for an action to enforce an organization-wide key issuance restriction, not this separate configuration task.
Question 679
A service account key was accidentally committed to a public repository and may be compromised. What should be configured?
- Enforce the relevant organization policy restriction on cross-project service account usage
- Use attached or federated short-lived credentials instead of creating a user-managed key
- Enforce the applicable organization policy constraint disabling service account key creation
- Disable or delete the exposed key promptly and replace the affected authentication path
- Create a replacement key, migrate the client, then remove the old key under a controlled rotation plan
Explanation
Correct Answer
D:Disabling or deleting a compromised user-managed key prevents new authentication with that key. The team should also investigate exposure and move the workload to safer credentials where possible.
Incorrect Answers
A:This alternative addresses cross-project service account use by allowing a team to restrict cross-project service account usage centrally; The incident, however, requires the different action to contain a leaked workload credential, so its central configuration remains unchanged.
B:This choice is useful to avoid distributing long-lived service account private keys. The stated task is to contain a leaked workload credential, which requires a different mechanism or permission scope.
C:Select this when the goal is to block new user-managed service account key creation. Here the decisive requirement is to contain a leaked workload credential, and that outcome is not achieved by this action.
E:It can rotate a legacy service account key safely; however, it does not provide the specific operation to contain a leaked workload credential. The two controls serve different purposes.
Question 680
A legacy process still requires a downloaded service account key and the current key is nearing its retirement date. Which action is most appropriate?
- Use attached or federated short-lived credentials instead of creating a user-managed key
- Create a replacement key, migrate the client, then remove the old key under a controlled rotation plan
- Disable or delete the exposed key promptly and replace the affected authentication path
- Enforce the applicable organization policy constraint disabling service account key creation
- Replace the downloaded key workflow with supported short-lived service account impersonation
Explanation
Correct Answer
B:Key rotation limits exposure time for any one long-lived credential but does not eliminate key risks. Verify the workload uses the replacement before deleting the previous key.
Incorrect Answers
A:While this can avoid distributing long-lived service account private keys, the present task requires an action to replace an aging private key without interrupting the client. This operation does not supply the behavior described in the requirements.
C:Its purpose is to revoke a potentially exposed service account private key. That distinction matters: the scenario calls for an action to replace an aging private key without interrupting the client, not this separate configuration task.
D:This approach can block new user-managed service account key creation. The requirement is to replace an aging private key without interrupting the client, so it controls a different part of the workflow and leaves that result unaddressed.
E:The technical effect is to avoid static keys for command-line administrative automation, not to replace an aging private key without interrupting the client; That distinction matters here because the first operation serves replace a CLI key file with ephemeral credentials, rather than the scenario's required result.