Google Associate Cloud Engineer Practice Test 76
Question 750
A service account no longer used by production can still mint short-lived credentials for a privileged deployment identity because its Token Creator binding remains. What access cleanup is appropriate?
- Leave the binding indefinitely because a dormant service account cannot issue credentials once no workload references it.
- Remove obsolete impersonation/Token Creator permissions after dependency review and monitor for unexpected future credential-minting attempts.
- Grant an additional Basic Owner role to the dormant identity so IAM stops checking the old Token Creator binding.
- Rename the account to retired; changing the display label invalidates every service-account delegation grant automatically.
Explanation
Correct Answer
B:Remove obsolete impersonation/Token Creator permissions after dependency review and monitor for unexpected future credential-minting attempts. Service-account delegation is explicit IAM access. Revoking obsolete grants closes a remaining path to privileged short-lived credentials.
Incorrect Answers
A:Leave the binding indefinitely because a dormant service account cannot issue credentials once no workload references it. A principal that retains Token Creator may still mint credentials if it can authenticate; being unused operationally does not remove its permissions.
C:Grant an additional Basic Owner role to the dormant identity so IAM stops checking the old Token Creator binding. Additional Owner access escalates rather than reduces the risk and does not cancel Token Creator authority.
D:Rename the account to retired; changing the display label invalidates every service-account delegation grant automatically. Display-name changes do not reliably revoke grants to an IAM principal. The role binding itself must be removed or narrowed.
Question 751
A GitHub Actions workflow deploys Google Cloud resources with a JSON service-account key stored in repository secrets. Security requires keyless, short-lived credentials restricted to the production repository and deployment environment. Which design fits?
- Commit a second copy of the same JSON key to the deployment workflow so that the key remains available when repository secrets are rotated.
- Create one Google Cloud service-account key per GitHub Actions run and store the generated private key in the build artifact repository.
- Configure Google Cloud Workload Identity Federation for GitHub OIDC with trusted repository/environment attribute conditions and scoped resource or service-account access.
- Give all identities from the GitHub shared OIDC issuer organization-level Owner access because the issuer identity is already validated.
Explanation
Correct Answer
C:Configure Google Cloud Workload Identity Federation for GitHub OIDC with trusted repository/environment attribute conditions and scoped resource or service-account access. Workload Identity Federation exchanges approved GitHub OIDC assertions for short-lived Google credentials. Attribute conditions restrict the shared issuer to the approved repository/environment.
Incorrect Answers
A:Commit a second copy of the same JSON key to the deployment workflow so that the key remains available when repository secrets are rotated. A duplicated static key is still a long-lived credential and adds exposure rather than eliminating the key-based authentication method.
B:Create one Google Cloud service-account key per GitHub Actions run and store the generated private key in the build artifact repository. Per-run private keys still require sensitive key generation and handling; token exchange with an external identity is the recommended keyless pattern.
D:Give all identities from the GitHub shared OIDC issuer organization-level Owner access because the issuer identity is already validated. GitHub's OIDC issuer is multi-tenant; merely trusting the issuer does not identify an approved repository. Pool-wide Owner would be severely overprivileged.
Question 752
A workload identity pool trusts OIDC tokens from an entire public GitHub organization, allowing unknown repositories to request Google Cloud tokens. What trust restriction is needed?
- Map and require the exact approved repository or environment attributes in the workload identity provider's attribute condition.
- The approved issuer URI, token audience, JWKS/discovery endpoint and mapped attributes; update provider trust only after confirming the new issuer is authorized.
- Issue a long-lived service-account JSON key instead of repairing short-lived workload credentials.
- Allow tokens from any issuer without verifying audience, signature or mapped principal.
Explanation
Correct Answer
A:Federation trust should bind tokens to an authorized workload, not broadly accept every token from an issuer.
Incorrect Answers
B: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: Map and require the exact approved repository or environment attributes in the workload identity provider's attribute condition.
C: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: Map and require the exact approved repository or environment attributes in the workload identity provider's attribute condition.
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: Map and require the exact approved repository or environment attributes in the workload identity provider's attribute condition.
Question 753
A workload identity provider accepts an external OIDC issuer, but an STS token exchange fails because the assertion audience is not one of the audiences configured for that provider. What must the operator correct?
- Grant the external principal an unrestricted IAM project Owner role; Owner disables the token-audience validation.
- Make the external token's audience and the provider's configured allowed audiences agree, using the documented provider resource audience when appropriate.
- Upload a service-account JSON private key to the identity provider so the external issuer stops checking audiences.
- Rename the Google Cloud project display name to match the OIDC issuer and retry without changing the audience claim.
Explanation
Correct Answer
B:Make the external token's audience and the provider's configured allowed audiences agree, using the documented provider resource audience when appropriate. The configured audience protects against accepting a token minted for another relying party. An approved provider audience and corresponding external assertion must match.
Incorrect Answers
A:Grant the external principal an unrestricted IAM project Owner role; Owner disables the token-audience validation. STS validates the assertion audience as part of the trust exchange before resource IAM permissions matter; Owner does not cure a rejected audience.
C:Upload a service-account JSON private key to the identity provider so the external issuer stops checking audiences. A private key is unnecessary and introduces a credential leak; it would not repair the existing OIDC assertion contract.
D:Rename the Google Cloud project display name to match the OIDC issuer and retry without changing the audience claim. Human-readable project names do not determine the JWT audience accepted by the workload identity pool provider.
Question 754
An external OIDC identity provider changes its published issuer URL and signing keys. A Google Cloud workload identity pool provider still trusts the old issuer and token validation now fails. What must security validate?
- The approved issuer URI, token audience, JWKS/discovery endpoint and mapped attributes; update provider trust only after confirming the new issuer is authorized.
- Increase a Cloud SQL read replica count; database capacity automatically repairs OIDC issuer and signature mismatches.
- Disable OIDC signature validation so any new issuer can obtain short-lived Google Cloud credentials from the pool.
- Move the workload's VM to a different zone; a zone change updates the provider's trusted OIDC issuer.
Explanation
Correct Answer
A:The approved issuer URI, token audience, JWKS/discovery endpoint and mapped attributes; update provider trust only after confirming the new issuer is authorized. Federation relies on a trusted issuer, signed token verification and expected audience/attributes. An authorized migration must update that trust accurately.
Incorrect Answers
B:Increase a Cloud SQL read replica count; database capacity automatically repairs OIDC issuer and signature mismatches. Database replication has no relation to external token issuer identity, OIDC discovery or signature verification.
C:Disable OIDC signature validation so any new issuer can obtain short-lived Google Cloud credentials from the pool. Accepting unvalidated assertions undermines federation authentication and could let unauthorized external workloads obtain cloud access.
D:Move the workload's VM to a different zone; a zone change updates the provider's trusted OIDC issuer. Compute Engine zone selection does not change which issuer or signing keys the workload identity pool provider trusts.
Question 755
An external workload uses a token whose subject changes every run, but the federation policy maps only exact subjects and blocks deploys. What mapping should be redesigned?
- Define an explicit supported attribute mapping or transformation for the identity subject and test representative token claims.
- Allow tokens from any issuer without verifying audience, signature or mapped principal.
- Use stable approved workload claims and safe attribute conditions rather than relying on ephemeral job IDs as permanent identities.
- Disable service-account audit logging and assume the credential issue is resolved.
Explanation
Correct Answer
C:Federated principals need dependable identity attributes for policy matching while preserving authorized workload boundaries.
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: Use stable approved workload claims and safe attribute conditions rather than relying on ephemeral job IDs as permanent identities.
B: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 stable approved workload claims and safe attribute conditions rather than relying on ephemeral job IDs as permanent identities.
D:Changing audit collection cannot grant a denied permission or fix service behavior. The case instead depends on the workload's intended identity and permissions.
Question 756
A workload identity pool role binding grants deployment access to every GitHub Actions identity in the pool, but only repository ID 20300177 and approved workflow branches should deploy. Which restriction is appropriate?
- Continue using the whole-pool principalSet because all GitHub Actions tokens from one issuer represent the same trusted repository.
- Change only the Google Cloud project display name; GitHub token claims automatically follow human-readable project names.
- Map and require immutable approved repository-owner/repository identifiers and allowed workflow/branch claims, using a scoped principalSet and provider conditions.
- Grant organization Owner to the pool; broader privilege makes token validation safer and prevents other repositories from appearing.
Explanation
Correct Answer
C:Map and require immutable approved repository-owner/repository identifiers and allowed workflow/branch claims, using a scoped principalSet and provider conditions. Google documents mapping repository claims and enforcing attribute conditions; immutable numeric repository IDs reduce namespace-reuse risks.
Incorrect Answers
A:Continue using the whole-pool principalSet because all GitHub Actions tokens from one issuer represent the same trusted repository. A shared GitHub issuer can mint tokens for many organizations and repositories. A pool-wide IAM grant can admit unrelated pipelines.
B:Change only the Google Cloud project display name; GitHub token claims automatically follow human-readable project names. Project naming does not constrain the GitHub OIDC assertion and cannot prove which repository initiated a deployment.
D:Grant organization Owner to the pool; broader privilege makes token validation safer and prevents other repositories from appearing. Owner increases blast radius without reducing which identities may federate or use the role binding.
Question 757
A batch application running on AWS needs to call a protected Google Cloud API without storing a Google service-account private key. It already has an authorized AWS workload identity. Which Google authentication pattern applies?
- Copy a Google Cloud service-account JSON key into an AWS environment variable and never rotate it.
- Grant the AWS instance a Cloud Billing account number; a payer ID functions as a federated identity token.
- Make the target Google API public because AWS principals cannot authenticate to Google Cloud.
- Configure Google Cloud Workload Identity Federation to trust approved AWS identity assertions and grant narrowly scoped Google Cloud access.
Explanation
Correct Answer
D:Configure Google Cloud Workload Identity Federation to trust approved AWS identity assertions and grant narrowly scoped Google Cloud access. Workload Identity Federation exchanges validated external workload identity for short-lived Google credentials or direct resource access under IAM.
Incorrect Answers
A:Copy a Google Cloud service-account JSON key into an AWS environment variable and never rotate it. A durable JSON private key is a high-risk secret that the cross-cloud federation requirement is intended to eliminate.
B:Grant the AWS instance a Cloud Billing account number; a payer ID functions as a federated identity token. Billing account identifiers allocate charges; they are not signed identity assertions used for secure cross-cloud workload authentication.
C:Make the target Google API public because AWS principals cannot authenticate to Google Cloud. Google supports federated access from AWS; the resource need not be made public to avoid a stored Google private key.
Question 758
A workload hosted on Azure uses a Google Cloud JSON service-account key copied into Azure Key Vault to query BigQuery. Security now prohibits long-lived Google private keys. Which supported design should replace the secret?
- Keep the same private key in two vaults; duplicating storage makes it short-lived and removes its impersonation risk.
- Disable BigQuery IAM; an Azure tenant can then authenticate using its subscription ID alone.
- Create an external Cloud Storage signed URL and use it as a permanent substitute for BigQuery query credentials.
- Use a Google workload identity pool provider for the approved Azure identity and obtain scoped short-lived Google credentials without a private key.
Explanation
Correct Answer
D:Use a Google workload identity pool provider for the approved Azure identity and obtain scoped short-lived Google credentials without a private key. Google Workload Identity Federation supports Azure as an external provider and allows keyless, short-lived access based on validated identity.
Incorrect Answers
A:Keep the same private key in two vaults; duplicating storage makes it short-lived and removes its impersonation risk. Copying a persistent key to multiple locations does not alter its lifecycle or eliminate the consequences of compromise.
B:Disable BigQuery IAM; an Azure tenant can then authenticate using its subscription ID alone. Azure subscriptions are not automatically authorized BigQuery principals. Cloud resource IAM remains required.
C:Create an external Cloud Storage signed URL and use it as a permanent substitute for BigQuery query credentials. Storage signed URLs authorize specific object requests and cannot serve as generic BigQuery API authentication credentials.
Question 759
A federated GitHub principal can authenticate with Google Cloud STS but cannot read the target Cloud Storage bucket. Which second step is required?
- Bind the required storage-reading role at the authorized bucket scope to the service account principal.
- Grant Organization Owner to the caller rather than validating the intended identity binding.
- Grant a new billing role instead of adjusting the actual token or impersonation permission.
- Grant the federated principal or its approved impersonated service account the necessary bucket-level read role.
Explanation
Correct Answer
D:Successful authentication through federation does not automatically authorize resource-level operations.
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: Grant the federated principal or its approved impersonated service account the necessary bucket-level read role.
B:Organization Owner is excessive privilege and cannot repair an unrelated configuration fault. The necessary distinction is the correct runtime principal and its bindings. The appropriate action here is: Grant the federated principal or its approved impersonated service account the necessary bucket-level read role.
C: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: Grant the federated principal or its approved impersonated service account the necessary bucket-level read role.
Question 760
A CI workflow exchanges a trusted GitHub OIDC assertion for Google federated credentials. It is configured to impersonate deployment-sa, but generating the service-account access token is denied. The deployment-sa resource roles are already correct. Which authorization must be reviewed?
- Give the CI principal Storage Object Admin on every bucket; bucket data access automatically confers service-account impersonation rights.
- Re-enable the GitHub OIDC issuer without any IAM role on deployment-sa; successful federation alone guarantees impersonation of every target account.
- Grant the CI principal roles/owner on the production organization rather than specifying a target service account.
- Grant the approved external workload principal roles/iam.workloadIdentityUser on deployment-sa for the configured impersonation flow, and verify the precise principal mapping.
Explanation
Correct Answer
D:Grant the approved external workload principal roles/iam.workloadIdentityUser on deployment-sa for the configured impersonation flow, and verify the precise principal mapping. For the documented WIF service-account impersonation path, Workload Identity User on the target service account authorizes the mapped external principal to obtain its short-lived credential.
Incorrect Answers
A:Give the CI principal Storage Object Admin on every bucket; bucket data access automatically confers service-account impersonation rights. Storage data privileges control object operations, not the ability to mint a target service-account credential.
B:Re-enable the GitHub OIDC issuer without any IAM role on deployment-sa; successful federation alone guarantees impersonation of every target account. Federation authenticates an external identity, but impersonation of a particular service account requires a separate authorized grant.
C:Grant the CI principal roles/owner on the production organization rather than specifying a target service account. Broad Owner is excessive and does not express the reviewed principal-to-service-account trust boundary.