Google Associate Cloud Engineer Practice Test 67

Question 660

A central automation service must issue short-lived access tokens for an authorized service account without distributing its private key. What should the administrator do?

  1. Obtain a short-lived OAuth 2.0 access token for the authorized service account
  2. Use attached or federated short-lived credentials instead of creating a user-managed key
  3. Request a fresh short-lived credential through the supported authentication flow
  4. Generate an OIDC ID token for the destination audience and satisfy the service's invoker policy
  5. Call IAM Credentials generateAccessToken under a principal with appropriate delegation rights

Explanation

Correct Answer

E:

The IAM Credentials API supports issuing access tokens for a target service account. Authorized callers can use it to avoid exposing user-managed private keys.

Incorrect Answers

A:

This choice is useful to use an OAuth access token for Google Cloud APIs. The stated task is to obtain short-lived credentials for delegated service account access, which requires a different mechanism or permission scope.

B:

An operator would use this action to avoid distributing long-lived service account private keys, chiefly when trying to choose keyless workload authentication; The current requirement is to obtain short-lived credentials for delegated service account access, which remains unresolved by that operation.

C:

The tool can refresh an expired service account credential, but it cannot be substituted for the capability needed to obtain short-lived credentials for delegated service account access. Its operational effect is not equivalent.

D:

It can present an audience-bound identity token to Cloud Run; however, it does not provide the specific operation to obtain short-lived credentials for delegated service account access. The two controls serve different purposes.

Question 661

A GitHub Actions workflow needs to deploy to Google Cloud without storing a Google service account JSON key. Which solution should be used?

  1. Configure a Workload Identity Pool, an OIDC provider, and suitable Google IAM trust or impersonation bindings
  2. Configure provider attribute mapping and attribute conditions using the trusted OIDC claims
  3. Grant the required resource role to the appropriate Workload Identity Federation principal or principal set
  4. Grant the eligible federated principal Workload Identity User on the target service account

Explanation

Correct Answer

A:

Workload Identity Federation exchanges trusted external identity assertions for short-lived Google credentials. Provider mappings and IAM bindings must restrict which workflow principals can obtain access.

Incorrect Answers

B:

While this can restrict federated access by external token attributes, the present task requires an action to authenticate a hosted CI workflow without static Google keys. This operation does not supply the behavior described in the requirements.

C:

Its purpose is to grant an external federated principal direct resource access. That distinction matters: the scenario calls for an action to authenticate a hosted CI workflow without static Google keys, not this separate configuration task.

D:

This approach can authorize federated principal service-account impersonation. The requirement is to authenticate a hosted CI workflow without static Google keys, so it controls a different part of the workflow and leaves that result unaddressed.

Question 662

A security team needs to ensure only runs from a specified repository and branch can use its Google Cloud federation provider. How should the team proceed?

  1. Configure provider attribute mapping and attribute conditions using the trusted OIDC claims
  2. Bind the bucket role to the appropriate GKE workload identity principal
  3. Grant the eligible federated principal Workload Identity User on the target service account
  4. Grant the required resource role to the appropriate Workload Identity Federation principal or principal set
  5. Configure a Workload Identity Pool, an OIDC provider, and suitable Google IAM trust or impersonation bindings

Explanation

Correct Answer

A:

Workload Identity Federation providers can map and constrain external token attributes before granting Google access. An unrestricted provider can admit a larger set of external workloads than intended.

Incorrect Answers

B:

This proposal can authorize a GKE Kubernetes principal directly in IAM, but the failure or goal described here calls for a way to allow one CI repository and branch to authenticate; It changes the wrong control or scope for the requested outcome.

C:

Select this when the goal is to authorize federated principal service-account impersonation. Here the decisive requirement is to allow one CI repository and branch to authenticate, and that outcome is not achieved by this action.

D:

The tool can grant an external federated principal direct resource access, but it cannot be substituted for the capability needed to allow one CI repository and branch to authenticate. Its operational effect is not equivalent.

E:

It can federate a CI OIDC identity into Google Cloud; however, it does not provide the specific operation to allow one CI repository and branch to authenticate. The two controls serve different purposes.

Question 663

An external build identity should directly read a single Cloud Storage bucket without impersonating a Google service account. What is the most direct solution?

  1. Configure provider attribute mapping and attribute conditions using the trusted OIDC claims
  2. Create a user-managed service account dedicated to the inventory application
  3. Grant the required resource role to the appropriate Workload Identity Federation principal or principal set
  4. Grant the eligible federated principal Workload Identity User on the target service account
  5. Configure a Workload Identity Pool, an OIDC provider, and suitable Google IAM trust or impersonation bindings

Explanation

Correct Answer

C:

Eligible Google Cloud resources can authorize federated external principals directly through IAM. Service-account impersonation is optional when the target API supports direct federation access.

Incorrect Answers

A:

Its purpose is to restrict federated access by external token attributes. That distinction matters: the scenario calls for an action to read a bucket through federation without impersonation, not this separate configuration task.

B:

This approach can create a dedicated nonhuman application principal. The requirement is to read a bucket through federation without impersonation, so it controls a different part of the workflow and leaves that result unaddressed.

D:

Using this action would authorize federated principal service-account impersonation, not read a bucket through federation without impersonation. Its function is different from the specific change described in the scenario.

E:

While this can federate a CI OIDC identity into Google Cloud, the present task requires an action to read a bucket through federation without impersonation. This operation does not supply the behavior described in the requirements.

Question 664

An OIDC CI provider was created successfully, but the job cannot impersonate the intended deployment service account. Which implementation matches this requirement?

  1. Grant the eligible federated principal Workload Identity User on the target service account
  2. Configure Workload Identity Federation using a suitable AWS provider and credential configuration
  3. Configure provider attribute mapping and attribute conditions using the trusted OIDC claims
  4. Configure a Workload Identity Pool, an OIDC provider, and suitable Google IAM trust or impersonation bindings
  5. Grant the required resource role to the appropriate Workload Identity Federation principal or principal set

Explanation

Correct Answer

A:

The provider trust establishes external authentication, while a service-account policy controls who may impersonate it. Creating a pool alone does not confer access to every Google service account.

Incorrect Answers

B:

For the stated need to fix CI federation token exchange to a deployment identity, this would instead authenticate an AWS workload through federation; it supports the separate task to connect EC2 workloads to Google APIs without static keys, not the required configuration.

C:

This mechanism is intended to restrict federated access by external token attributes. It does not implement the required action to fix CI federation token exchange to a deployment identity, even though both are relevant to the same general service.

D:

Select this when the goal is to federate a CI OIDC identity into Google Cloud. Here the decisive requirement is to fix CI federation token exchange to a deployment identity, and that outcome is not achieved by this action.

E:

Administrators use it to grant an external federated principal direct resource access, rather than to fix CI federation token exchange to a deployment identity. Applying it would change the wrong component of this deployment.

Question 665

An application on AWS must access Google Cloud APIs without copying a Google-managed private key into an EC2 instance. Which action is most appropriate?

  1. Create an appropriate Azure-compatible federation provider and map trusted identity claims
  2. Configure Workload Identity Federation using a suitable AWS provider and credential configuration
  3. Grant the required dataset or resource permissions to its authorized federated principal or impersonated identity
  4. Recognize that the credential configuration describes an external token source and exchange flow

Explanation

Correct Answer

B:

Federation can exchange AWS workload identity evidence for Google credentials. This removes the need to distribute a long-lived Google service account key to the AWS workload.

Incorrect Answers

A:

Using this action would federate an Azure application identity into Google Cloud, not connect EC2 workloads to Google APIs without static keys. Its function is different from the specific change described in the scenario.

C:

This setting would authorize the federated principal on the target resource. That behavior does not establish the requested ability to connect EC2 workloads to Google APIs without static keys; it addresses an adjacent concern instead.

D:

This choice is useful to interpret external account federation configuration. The stated task is to connect EC2 workloads to Google APIs without static keys, which requires a different mechanism or permission scope.

Question 666

An Azure-hosted deployment system should use its native identity to obtain short-lived authorization for Google Cloud resources. Which solution should be used?

  1. Grant the required dataset or resource permissions to its authorized federated principal or impersonated identity
  2. Configure Workload Identity Federation using a suitable AWS provider and credential configuration
  3. Recognize that the credential configuration describes an external token source and exchange flow
  4. Grant the required resource role to the appropriate Workload Identity Federation principal or principal set
  5. Create an appropriate Azure-compatible federation provider and map trusted identity claims

Explanation

Correct Answer

E:

Workload Identity Federation supports relevant external identity providers and tokens. Restrictive attribute mappings and role bindings determine which Azure workload identities receive access.

Incorrect Answers

A:

Administrators use it to authorize the federated principal on the target resource, rather than to authorize Azure automation without Google key files. Applying it would change the wrong component of this deployment.

B:

Its purpose is to authenticate an AWS workload through federation. That distinction matters: the scenario calls for an action to authorize Azure automation without Google key files, not this separate configuration task.

C:

While this can interpret external account federation configuration, the present task requires an action to authorize Azure automation without Google key files. This operation does not supply the behavior described in the requirements.

D:

An operator would use this action to grant an external federated principal direct resource access, chiefly when trying to read a bucket through federation without impersonation; The current requirement is to authorize Azure automation without Google key files, which remains unresolved by that operation.

Question 667

A developer sees an external-account credential configuration file and assumes it contains a Google service account private key. How should the team proceed?

  1. Recognize that the credential configuration describes an external token source and exchange flow
  2. Configure a Workload Identity Pool, an OIDC provider, and suitable Google IAM trust or impersonation bindings
  3. Grant the required dataset or resource permissions to its authorized federated principal or impersonated identity
  4. Create an appropriate Azure-compatible federation provider and map trusted identity claims
  5. Configure Workload Identity Federation using a suitable AWS provider and credential configuration

Explanation

Correct Answer

A:

Federated external-account configurations specify how to obtain and exchange external credentials. They are not equivalent to a downloaded JSON private key for a user-managed service account.

Incorrect Answers

B:

For the stated need to distinguish federation config from a service account key, this would instead federate a CI OIDC identity into Google Cloud; it supports the separate task to authenticate a hosted CI workflow without static Google keys, not the required configuration.

C:

It can authorize the federated principal on the target resource; however, it does not provide the specific operation to distinguish federation config from a service account key. The two controls serve different purposes.

D:

The tool can federate an Azure application identity into Google Cloud, but it cannot be substituted for the capability needed to distinguish federation config from a service account key. Its operational effect is not equivalent.

E:

This choice is useful to authenticate an AWS workload through federation. The stated task is to distinguish federation config from a service account key, which requires a different mechanism or permission scope.

Question 668

A federated workload authenticates correctly but cannot read a protected dataset in the target project. What is the most direct solution?

  1. Create an appropriate Azure-compatible federation provider and map trusted identity claims
  2. Grant the required dataset or resource permissions to its authorized federated principal or impersonated identity
  3. Recognize that the credential configuration describes an external token source and exchange flow
  4. Prefer supported Workload Identity Federation for GKE over distributing user-managed keys
  5. Configure Workload Identity Federation using a suitable AWS provider and credential configuration

Explanation

Correct Answer

B:

Successful federation only establishes an authenticated principal. The target resource still evaluates applicable IAM permissions and other authorization constraints.

Incorrect Answers

A:

Its purpose is to federate an Azure application identity into Google Cloud. That distinction matters: the scenario calls for an action to resolve federation success with resource permission denial, not this separate configuration task.

C:

This approach can interpret external account federation configuration. The requirement is to resolve federation success with resource permission denial, so it controls a different part of the workflow and leaves that result unaddressed.

D:

In a workflow for gke least-privilege workload identities, it can replace Kubernetes static key injection with workload federation; This question instead asks how to resolve federation success with resource permission denial; substituting the former action would leave that distinct technical requirement unmet.

E:

This setting would authenticate an AWS workload through federation. That behavior does not establish the requested ability to resolve federation success with resource permission denial; it addresses an adjacent concern instead.

Question 669

A GKE Pod already has the appropriate bucket IAM permissions for its Kubernetes identity, but still relies on a mounted JSON key; the team needs keyless authentication. What should be configured?

  1. Bind the bucket role to the appropriate GKE workload identity principal
  2. Check the GKE node identity and Artifact Registry image-pull permissions
  3. Configure the supported Kubernetes service account annotation and grant the workload permission to impersonate the IAM service account
  4. Configure Workload Identity Federation for GKE and run the Pod with its authorized Kubernetes service account

Explanation

Correct Answer

D:

Workload Identity Federation for GKE can authenticate Pods to supported Google APIs using Kubernetes identities. With existing resource IAM grants, the workload no longer needs a long-lived key mounted in the container.

Incorrect Answers

A:

Select this when the goal is to authorize a GKE Kubernetes principal directly in IAM. Here the decisive requirement is to switch an authorized GKE Pod away from a mounted private key, and that outcome is not achieved by this action.

B:

This mechanism is intended to troubleshoot node image-pull identity for private artifacts. It does not implement the required action to switch an authorized GKE Pod away from a mounted private key, even though both are relevant to the same general service.

C:

The tool can map Kubernetes identity to an IAM service account, but it cannot be substituted for the capability needed to switch an authorized GKE Pod away from a mounted private key. Its operational effect is not equivalent.

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?

  1. Check the GKE node identity and Artifact Registry image-pull permissions
  2. Bind the bucket role to the appropriate GKE workload identity principal
  3. Configure Workload Identity Federation for GKE and run the Pod with its authorized Kubernetes service account
  4. Prefer supported Workload Identity Federation for GKE over distributing user-managed keys
  5. 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.

Associate Cloud Engineer Practice Tests