Google Associate Cloud Engineer Practice Test 80
Question 790
A GKE cluster is moved to a different project, and old workload identity IAM bindings keep referencing the former project's pool identifier. What must be updated?
- Map supported principal identity attributes and trust scopes for each authorized cluster without accidentally granting unrelated workloads access.
- Grant a new billing role instead of adjusting the actual token or impersonation permission.
- Allow tokens from any issuer without verifying audience, signature or mapped principal.
- Rebind resource IAM to the current authorized workload identity pool and Kubernetes principal identifiers.
Explanation
Correct Answer
D:The pool and resource path identify the cloud trust boundary; an unchanged KSA name doesn't preserve a deleted or moved pool identity.
Incorrect Answers
A:The suggestion does not establish the required issuer, principal or permission boundary. It leaves the workload's intended identity and permissions unaddressed. The appropriate action here is: Rebind resource IAM to the current authorized workload identity pool and Kubernetes principal identifiers.
B:The suggestion does not establish the required issuer, principal or permission boundary. The specific requirement concerns the workload's intended identity and permissions. The appropriate action here is: Rebind resource IAM to the current authorized workload identity pool and Kubernetes principal identifiers.
C:The suggestion does not establish the required issuer, principal or permission boundary. The necessary distinction is the workload's intended identity and permissions. The appropriate action here is: Rebind resource IAM to the current authorized workload identity pool and Kubernetes principal identifiers.
Question 791
A GKE application reads Google Cloud APIs correctly in test but fails in production because the production project enforces an organization policy restricting service-account use. What must be reviewed?
- Verify the applicable cross-project service-account usage organization policy and required role grants on the identity.
- Rename the service account but leave the old principal and role bindings unchanged.
- Disable service-account audit logging and assume the credential issue is resolved.
- Check the effective organization policy and redesign the supported identity binding within approved trust boundaries.
Explanation
Correct Answer
D:Organization constraints can prohibit identity attachment or cross-project use even if individual IAM roles appear sufficient.
Incorrect Answers
A:The suggestion does not establish the required issuer, principal or permission boundary. The specific requirement concerns the workload's intended identity and permissions. The appropriate action here is: Check the effective organization policy and redesign the supported identity binding within approved trust boundaries.
B:Renaming a resource does not alter the actual effective configuration. The necessary distinction is the workload's intended identity and permissions. The appropriate action here is: Check the effective organization policy and redesign the supported identity binding within approved trust boundaries.
C:Changing audit collection cannot grant a denied permission or fix service behavior. The case instead depends on the workload's intended identity and permissions. The appropriate action here is: Check the effective organization policy and redesign the supported identity binding within approved trust boundaries.
Question 792
A developer adds a Google Cloud service-account key as a Kubernetes Secret to debug a GKE identity problem, then forgets to remove it. What should security do?
- Use the Pod's Kubernetes ServiceAccount with GKE Workload Identity Federation and grant its mapped principal only the required bucket permissions.
- Revoke the exposed key and restore the approved metadata-based federated credential flow, removing the secret and its copies.
- Disable service-account audit logging and assume the credential issue is resolved.
- Reuse the default Compute Engine service account for every unrelated workload.
Explanation
Correct Answer
B:Temporary static credentials remain exploitable until revoked and are unnecessary when a functioning workload identity path exists.
Incorrect Answers
A:Changing an unrelated Pod setting leaves the stated cloud feature unresolved. The necessary distinction is the workload's intended identity and permissions.
C:Changing audit collection cannot grant a denied permission or fix service behavior. The case instead depends on the workload's intended identity and permissions. The appropriate action here is: Revoke the exposed key and restore the approved metadata-based federated credential flow, removing the secret and its copies.
D:The suggestion does not establish the required issuer, principal or permission boundary. It leaves the workload's intended identity and permissions unaddressed. The appropriate action here is: Revoke the exposed key and restore the approved metadata-based federated credential flow, removing the secret and its copies.
Question 793
A Pod in project compute has a working GKE federated identity and can call other permitted Google Cloud APIs. It receives PERMISSION_DENIED when reading Secret Manager secret payroll-key in project vault. No IAM grant exists on the target secret for this workload. What should be added?
- Grant Secret Accessor on payroll-key in project vault to the exact federated namespace/KSA principal from project compute.
- Reinstall the GKE metadata server across all nodes; a successful federated call already demonstrates the Pod can obtain credentials.
- Give all service accounts in the source project roles/owner on project vault so the secret can be read without principal mapping.
- Add the Kubernetes default namespace ClusterRole edit; Kubernetes API permissions also grant cross-project Secret Manager access.
Explanation
Correct Answer
A:Grant Secret Accessor on payroll-key in project vault to the exact federated namespace/KSA principal from project compute. The federated principal can be granted narrowly scoped resource IAM in another project. The missing target-secret authorization is the actual boundary blocking this read.
Incorrect Answers
B:Reinstall the GKE metadata server across all nodes; a successful federated call already demonstrates the Pod can obtain credentials. The problem states federation already works; the failure is at resource authorization rather than token retrieval.
C:Give all service accounts in the source project roles/owner on project vault so the secret can be read without principal mapping. Project Owner would greatly overgrant unrelated identities and objects; no broad project grant is necessary for one secret.
D:Add the Kubernetes default namespace ClusterRole edit; Kubernetes API permissions also grant cross-project Secret Manager access. Kubernetes RBAC does not grant access to Google Cloud Secret Manager resources in another project.
Question 794
An application in GKE used Workload Identity Federation for a Kubernetes ServiceAccount in namespace reports. An operator deleted namespace reports and redeployed the workload under a differently named namespace, but the old resource IAM binding remains. Why is access denied?
- A namespace change automatically rewrites existing IAM principal bindings to the new Kubernetes identity after the first Pod starts.
- The Google Cloud billing account stores the namespace mapping and must be relinked to make Pod authentication succeed.
- GKE Workload Identity Federation always grants organization Owner to every replacement Kubernetes namespace.
- The new namespace/Kubernetes ServiceAccount forms a different workload principal; recreate the approved identity or update its scoped IAM binding.
Explanation
Correct Answer
D:The new namespace/Kubernetes ServiceAccount forms a different workload principal; recreate the approved identity or update its scoped IAM binding. A different namespace changes the IAM principal represented by the Pod. Its intended access requires a matching valid principal binding.
Incorrect Answers
A:A namespace change automatically rewrites existing IAM principal bindings to the new Kubernetes identity after the first Pod starts. Federated GKE principal identifiers include Kubernetes workload identity attributes. IAM grants do not silently follow a renamed namespace.
B:The Google Cloud billing account stores the namespace mapping and must be relinked to make Pod authentication succeed. Billing linkage is independent of which Kubernetes principal is authorized to access a resource under GKE Workload Identity Federation.
C:GKE Workload Identity Federation always grants organization Owner to every replacement Kubernetes namespace. GKE does not grant broad organization ownership to all Pods, and deleting a namespace does not cause automatic authorization escalation.
Question 795
A platform team sees cloud audit entries attributed to one shared Google service account for five GKE services and cannot isolate which Pod made a call. What identity design improves attribution?
- Use dedicated workload identities or scoped principal mappings and preserve available KSA context in authentication/audit telemetry.
- Update the KSA annotation and associated approved impersonation IAM policy to the intended Google service account.
- Issue a long-lived service-account JSON key instead of repairing short-lived workload credentials.
- Grant a new billing role instead of adjusting the actual token or impersonation permission.
Explanation
Correct Answer
A:Sharing one impersonated identity across unrelated Pods can obscure per-workload accountability.
Incorrect Answers
B:The suggestion does not establish the required issuer, principal or permission boundary. The specific requirement concerns the correct runtime principal and its bindings. The appropriate action here is: Use dedicated workload identities or scoped principal mappings and preserve available KSA context in authentication/audit telemetry.
C:The suggestion does not establish the required issuer, principal or permission boundary. The necessary distinction is the correct runtime principal and its bindings. The appropriate action here is: Use dedicated workload identities or scoped principal mappings and preserve available KSA context in authentication/audit telemetry.
D:The suggestion does not establish the required issuer, principal or permission boundary. The case instead depends on the correct runtime principal and its bindings. The appropriate action here is: Use dedicated workload identities or scoped principal mappings and preserve available KSA context in authentication/audit telemetry.
Question 796
A Kubernetes CronJob uses a different serviceAccountName than the same application's Deployment and fails only on scheduled runs. What should be aligned?
- Specify the intended Kubernetes ServiceAccount in the Pod template and grant only that KSA principal the required secret permissions.
- Set the CronJob Pod template to its approved workload KSA and corresponding IAM grants independently of the Deployment.
- Grant Organization Owner to the caller rather than validating the intended identity binding.
- Rename the service account but leave the old principal and role bindings unchanged.
Explanation
Correct Answer
B:Separate Kubernetes controllers each define their own Pod identity; a Deployment's serviceAccountName does not apply to CronJobs.
Incorrect Answers
A:Changing an unrelated Pod setting leaves the stated cloud feature unresolved. The necessary distinction is the workload's intended identity and permissions. The appropriate action here is: Set the CronJob Pod template to its approved workload KSA and corresponding IAM grants independently of the Deployment.
C:Organization Owner is excessive privilege and cannot repair an unrelated configuration fault. The case instead depends on the workload's intended identity and permissions. The appropriate action here is: Set the CronJob Pod template to its approved workload KSA and corresponding IAM grants independently of the Deployment.
D:Renaming a resource does not alter the actual effective configuration. It leaves the workload's intended identity and permissions unaddressed. The appropriate action here is: Set the CronJob Pod template to its approved workload KSA and corresponding IAM grants independently of the Deployment.
Question 797
A GKE Pod is denied access to Cloud KMS after key rotation because the KSA federated principal has no role on the replacement key. What needs changing?
- Grant the authorized workload principal the minimum required crypto-key operation on the newly active Cloud KMS key.
- Bind IAM permissions to the specific namespace-qualified workload principal rather than assuming a KSA name is globally unique.
- Rename the service account but leave the old principal and role bindings unchanged.
- Allow tokens from any issuer without verifying audience, signature or mapped principal.
Explanation
Correct Answer
A:KMS authorization is key/resource-specific; possessing access to the old key does not authorize use of its replacement.
Incorrect Answers
B:The suggestion does not establish the required issuer, principal or permission boundary. The case instead depends on the workload's intended identity and permissions. The appropriate action here is: Grant the authorized workload principal the minimum required crypto-key operation on the newly active Cloud KMS key.
C:Renaming a resource does not alter the actual effective configuration. It leaves the workload's intended identity and permissions unaddressed. The appropriate action here is: Grant the authorized workload principal the minimum required crypto-key operation on the newly active Cloud KMS key.
D:The suggestion does not establish the required issuer, principal or permission boundary. The specific requirement concerns the workload's intended identity and permissions. The appropriate action here is: Grant the authorized workload principal the minimum required crypto-key operation on the newly active Cloud KMS key.
Question 798
A microservice runs in GKE Autopilot and its developers request privileged host access to fetch the node service-account token. What should they use?
- Pods using the host network bypass the standard Workload Identity Federation for GKE metadata interception path; use a supported non-host-network design or documented exception path.
- Reuse the default Compute Engine service account for every unrelated workload.
- Use the supported GKE workload metadata/identity mechanism rather than privileged node-token access.
- Allow tokens from any issuer without verifying audience, signature or mapped principal.
Explanation
Correct Answer
C:Application Pods should receive scoped workload credentials, not obtain infrastructure node identity tokens through host access.
Incorrect Answers
A:Changing an unrelated Pod setting leaves the stated cloud feature unresolved. It leaves the workload's intended identity and permissions unaddressed. The appropriate action here is: Use the supported GKE workload metadata/identity mechanism rather than privileged node-token access.
B:The suggestion does not establish the required issuer, principal or permission boundary. The specific requirement concerns the workload's intended identity and permissions. The appropriate action here is: Use the supported GKE workload metadata/identity mechanism rather than privileged node-token access.
D:The suggestion does not establish the required issuer, principal or permission boundary. The necessary distinction is the workload's intended identity and permissions. The appropriate action here is: Use the supported GKE workload metadata/identity mechanism rather than privileged node-token access.
Question 799
An identity incident reveals a Pod's KSA has permission to impersonate multiple unrelated production Google service accounts. What should the access review remove?
- Grant the authorized KSA principal the appropriate service-account Workload Identity User impersonation right or use direct resource principal grants as designed.
- Disable service-account audit logging and assume the credential issue is resolved.
- Restrict that KSA's Workload Identity User grants to the one intended application identity and audit dependent calls.
- Grant Organization Owner to the caller rather than validating the intended identity binding.
Explanation
Correct Answer
C:One Kubernetes principal that can impersonate several high-privilege accounts has an unnecessarily large effective permission surface.
Incorrect Answers
A:The suggestion does not establish the required issuer, principal or permission boundary. The specific requirement concerns the correct runtime principal and its bindings. The appropriate action here is: Restrict that KSA's Workload Identity User grants to the one intended application identity and audit dependent calls.
B:Changing audit collection cannot grant a denied permission or fix service behavior. The necessary distinction is the correct runtime principal and its bindings. The appropriate action here is: Restrict that KSA's Workload Identity User grants to the one intended application identity and audit dependent calls.
D:Organization Owner is excessive privilege and cannot repair an unrelated configuration fault. The case instead depends on the correct runtime principal and its bindings. The appropriate action here is: Restrict that KSA's Workload Identity User grants to the one intended application identity and audit dependent calls.
Question 800
A GKE workload has migrated from impersonating a Google service account to direct Workload Identity Federation for GKE access with resource-scoped IAM grants. The old IAM Service Account impersonation grant for the Pod identity remains. What should security remove?
- Delete the new direct resource IAM binding; direct access never works without leaving the old impersonation path permanently enabled.
- Make the Google service account publicly impersonable so the obsolete legacy configuration remains compatible for future Pods.
- Remove the now-unneeded workload-to-Google-service-account impersonation role binding after verifying the direct federated permissions and dependencies.
- Rename the Kubernetes namespace only; changing the namespace label automatically revokes all old IAM bindings without review.
Explanation
Correct Answer
C:Remove the now-unneeded workload-to-Google-service-account impersonation role binding after verifying the direct federated permissions and dependencies. Old impersonation grants can enable privilege escalation or unnecessary delegation even after direct resource access works. Revoking unused grants closes that path.
Incorrect Answers
A:Delete the new direct resource IAM binding; direct access never works without leaving the old impersonation path permanently enabled. The new direct federation permissions are the intended access mechanism. Deleting them would break the migrated workload rather than remove excess delegation.
B:Make the Google service account publicly impersonable so the obsolete legacy configuration remains compatible for future Pods. Broadening impersonation preserves or increases security risk and is contrary to the keyless direct-resource access design.
D:Rename the Kubernetes namespace only; changing the namespace label automatically revokes all old IAM bindings without review. Namespace renames do not safely revoke a specific IAM role binding on a service account. Explicit least-privilege binding cleanup is required.