Google Associate Cloud Engineer Practice Test 77
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.
Question 761
A federation configuration uses an external subject claim that contains characters not safely mapped to a stable Google attribute. What should be revised?
- Define an explicit supported attribute mapping or transformation for the identity subject and test representative token claims.
- Use the raw ephemeral job identifier as the permanent IAM subject without a stable mapping.
- 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:Google Cloud workload identity conditions evaluate mapped attributes; malformed or unstable mappings cause denial or unsafe matching.
Incorrect Answers
B:An unstable subject cannot reliably match the configured federated principal across runs.
C:Renaming a resource does not alter the actual effective configuration. It leaves the workload's intended identity and permissions unaddressed.
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: Define an explicit supported attribute mapping or transformation for the identity subject and test representative token claims.
Question 762
A developer tests federation with an access token from an interactive user, but the identity provider only accepts workload-oriented OIDC assertions. What input must be provided?
- Make the external token's audience and the provider's configured allowed audiences agree, using the documented provider resource audience when appropriate.
- Allow tokens from any issuer without verifying audience, signature or mapped principal.
- Grant Organization Owner to the caller rather than validating the intended identity binding.
- Supply the supported external workload token type from the configured issuer, not an unrelated interactive OAuth access token.
Explanation
Correct Answer
D:Security Token Service validates token type, issuer, audience and claims according to the workload identity provider setup.
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: Supply the supported external workload token type from the configured issuer, not an unrelated interactive OAuth access token.
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: Supply the supported external workload token type from the configured issuer, not an unrelated interactive OAuth access token.
C:Organization Owner is excessive privilege and cannot repair an unrelated configuration fault. The necessary distinction is the workload's intended identity and permissions.
Question 763
A workload identity provider is created but its attribute condition allows a branch called main in any repository. What additional assertion matters?
- Enforce trusted mapped claims for the approved repository/workflow and production environment or branch in a provider attribute condition and scoped IAM principalSet.
- Combine the protected branch claim with the exact trusted repository identity and required workflow context.
- Grant a new billing role instead of adjusting the actual token or impersonation permission.
- Disable service-account audit logging and assume the credential issue is resolved.
Explanation
Correct Answer
B:Branch names are common across repositories; trusting branch name alone is not a sufficient deployment boundary.
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: Combine the protected branch claim with the exact trusted repository identity and required workflow context.
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: Combine the protected branch claim with the exact trusted repository identity and required workflow context.
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. The appropriate action here is: Combine the protected branch claim with the exact trusted repository identity and required workflow context.
Question 764
A platform team adds a new external identity provider to an existing identity pool, accidentally allowing it to receive access intended only for the older provider. What should be inspected?
- Enforce trusted mapped claims for the approved repository/workflow and production environment or branch in a provider attribute condition and scoped IAM principalSet.
- Reuse the default Compute Engine service account for every unrelated workload.
- Allow tokens from any issuer without verifying audience, signature or mapped principal.
- Review IAM principalSet membership, attribute mappings and provider conditions so new issuer tokens do not match unintended resource grants.
Explanation
Correct Answer
D:Pool-level IAM bindings can aggregate identities from multiple providers; provider scoping must be considered explicitly.
Incorrect Answers
A: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: Review IAM principalSet membership, attribute mappings and provider conditions so new issuer tokens do not match unintended resource grants.
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: Review IAM principalSet membership, attribute mappings and provider conditions so new issuer tokens do not match unintended resource grants.
C: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: Review IAM principalSet membership, attribute mappings and provider conditions so new issuer tokens do not match unintended resource grants.
Question 765
An external deployment job exchanges a valid federation assertion for a short-lived Google access token, then writes that token string into a configuration file reused for several days. Why does the job later fail and what should it do?
- Access tokens expire; use an external-account credential configuration/provider that repeats the trusted STS exchange and refreshes credentials when needed.
- The token fails because Cloud Storage Nearline class expires after an hour; change the storage class to make bearer tokens permanent.
- Increase the IAM grant to organization Owner; a privileged role extends the expiry of every previously issued STS access token.
- Disable issuer and audience checks on the provider so expired signed tokens remain accepted indefinitely.
Explanation
Correct Answer
A:Access tokens expire; use an external-account credential configuration/provider that repeats the trusted STS exchange and refreshes credentials when needed. Short-lived credentials are intentionally time-limited. Supported external-account flows use current external assertions and token exchange rather than caching one token forever.
Incorrect Answers
B:The token fails because Cloud Storage Nearline class expires after an hour; change the storage class to make bearer tokens permanent. Storage classes have no bearing on the OAuth token lifetime used for Google API authentication.
C:Increase the IAM grant to organization Owner; a privileged role extends the expiry of every previously issued STS access token. Access token expiration is not rewritten by new IAM role grants; broader permissions add risk without fixing credential refresh.
D:Disable issuer and audience checks on the provider so expired signed tokens remain accepted indefinitely. Bypassing token validation is insecure and does not create an appropriate supported refreshing identity provider.
Question 766
An external workload credential configuration points to a token file no longer mounted after a container image update. What should be repaired?
- Access tokens expire; use an external-account credential configuration/provider that repeats the trusted STS exchange and refreshes credentials when needed.
- Correct the credential-source file path or supported executable retrieval before attempting the STS token exchange.
- Allow tokens from any issuer without verifying audience, signature or mapped principal.
- Issue a long-lived service-account JSON key instead of repairing short-lived workload credentials.
Explanation
Correct Answer
B:Workload federation depends on acquiring a fresh external assertion from the configured credential source.
Incorrect Answers
A:A token type must match the consuming API and the configured identity trust. It leaves the workload's intended identity and permissions unaddressed. The appropriate action here is: Correct the credential-source file path or supported executable retrieval before attempting the STS token exchange.
C: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: Correct the credential-source file path or supported executable retrieval before attempting the STS token exchange.
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: Correct the credential-source file path or supported executable retrieval before attempting the STS token exchange.
Question 767
A GitHub OIDC workload identity provider accepts tokens issued for both staging and production jobs, but only production deployments may access the production Google Cloud project. Which assertion control should be added?
- Enforce trusted mapped claims for the approved repository/workflow and production environment or branch in a provider attribute condition and scoped IAM principalSet.
- Leave all tokens trusted because sharing one GitHub OIDC issuer guarantees every job executes in production.
- Require every developer to set a Cloud Billing budget label named production; labels authenticate the OIDC environment.
- Use an arbitrary unvalidated token text field as the environment, without checking that the issuer signs and controls it.
Explanation
Correct Answer
A:Enforce trusted mapped claims for the approved repository/workflow and production environment or branch in a provider attribute condition and scoped IAM principalSet. OIDC attribute conditions should verify issuer-authoritative claims identifying the authorized workload. Scope both the provider and access binding to the intended pipeline.
Incorrect Answers
B:Leave all tokens trusted because sharing one GitHub OIDC issuer guarantees every job executes in production. GitHub has shared issuer infrastructure across distinct repositories and workflows; issuer alone cannot restrict an environment.
C:Require every developer to set a Cloud Billing budget label named production; labels authenticate the OIDC environment. Billing labels do not cryptographically authenticate the job that requested Google Cloud credentials.
D:Use an arbitrary unvalidated token text field as the environment, without checking that the issuer signs and controls it. Trustworthy conditions require mapped, signed attributes with appropriate semantics. An attacker-controlled field is not a reliable security boundary.
Question 768
A regional workload must send Google Cloud API calls from outside Google Cloud but its organization forbids service-account keys. What credential type is consistent?
- Configure Google Cloud Workload Identity Federation to trust approved AWS identity assertions and grant narrowly scoped Google Cloud access.
- Use Workload Identity Federation with supported external-account ADC configuration and scoped cloud authorization.
- Rename the service account but leave the old principal and role bindings unchanged.
- Reuse the default Compute Engine service account for every unrelated workload.
Explanation
Correct Answer
B:Application Default Credentials can use external-account federation without a downloaded private key.
Incorrect Answers
A: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 Workload Identity Federation with supported external-account ADC configuration and scoped cloud authorization.
C:Renaming a resource does not alter the actual effective configuration. The case instead depends on the workload's intended identity and permissions. The appropriate action here is: Use Workload Identity Federation with supported external-account ADC configuration and scoped cloud authorization.
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: Use Workload Identity Federation with supported external-account ADC configuration and scoped cloud authorization.
Question 769
An application obtains federated credentials successfully in test but its production environment uses a different OIDC issuer. What should deployment automation select?
- Enforce trusted mapped claims for the approved repository/workflow and production environment or branch in a provider attribute condition and scoped IAM principalSet.
- Use environment-specific reviewed workload identity provider configuration and validate production issuer, audience and mapped claims.
- 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.
Explanation
Correct Answer
B:Federation settings are bound to an identity provider and workload; testing against one issuer does not establish production trust.
Incorrect Answers
A: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: Use environment-specific reviewed workload identity provider configuration and validate production issuer, audience and mapped claims.
C:Organization Owner is excessive privilege and cannot repair an unrelated configuration fault. It leaves the workload's intended identity and permissions unaddressed. The appropriate action here is: Use environment-specific reviewed workload identity provider configuration and validate production issuer, audience and mapped claims.
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: Use environment-specific reviewed workload identity provider configuration and validate production issuer, audience and mapped claims.
Question 770
An organization's external deployment pipeline uses Workload Identity Federation and impersonates a Google service account. An audit must identify the original external workload behind a suspicious API call. Which evidence is relevant?
- Correlate available STS and IAM Credentials audit events with service-account delegation information, mapped external subject attributes and target-resource logs.
- Examine only the service account's display name; it always encodes the full original external workload and request chain.
- Query Cloud Billing budgets; threshold alerts include external token claims and an authenticated delegation chain.
- Compare Cloud Storage bucket locations; cross-region replication history identifies the external pipeline actor.
Explanation
Correct Answer
A:Correlate available STS and IAM Credentials audit events with service-account delegation information, mapped external subject attributes and target-resource logs. Federation and impersonation can involve multiple authenticated principals. Audit records and principal mapping help reconstruct their relationship when logging is available.
Incorrect Answers
B:Examine only the service account's display name; it always encodes the full original external workload and request chain. A service-account name is static and shared across requests, so it cannot distinguish the external principal that generated an individual token.
C:Query Cloud Billing budgets; threshold alerts include external token claims and an authenticated delegation chain. Budget notifications contain cost state, not the identity assertions and IAM Credentials actor relationships required for this audit.
D:Compare Cloud Storage bucket locations; cross-region replication history identifies the external pipeline actor. Bucket placement and replication do not reveal which identity requested service-account credentials through a federated STS flow.