Google Professional Cloud Security Engineer exam dumps

Google Professional Cloud Security Engineer practice question 81 of 501

Professional Cloud Security Engineer. Expert level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Security Engineer Question 81

Select 3Google Cloud Platform

You are a Cloud Security Engineer tasked with enabling a Compute Engine instance to access a Cloud Storage bucket without using its own service account key. Instead, you decide to use service account impersonation to enhance security. Which steps should you take to properly configure service account impersonation?

  1. A

    Grant the 'roles/iam.serviceAccountTokenCreator' role to the Compute Engine instance's service account on the target service account.

  2. B

    Grant the 'roles/storage.objectViewer' role to the Compute Engine instance's service account on the Cloud Storage bucket.

  3. C

    Grant the 'roles/storage.objectViewer' role to the target service account on the Cloud Storage bucket.

  4. D

    Update the Compute Engine instance to use the target service account directly by assigning it in the configuration.

  5. E

    Configure the Compute Engine instance to request temporary credentials via the generateAccessToken API for impersonating the target service account.

Show answer and explanation

Correct answers: A, C, E

Explanation

Service account impersonation enhances security by avoiding the need to manage and distribute service account keys. To enable a Compute Engine instance to access resources via impersonation, you must grant the 'roles/iam.serviceAccountTokenCreator' role to the instance's service account on the target service account, give the target service account appropriate permissions for the resource, and ensure the instance requests temporary credentials using APIs such as generateAccessToken. This approach aligns with best practices for least privilege and keyless authentication.

  • A. Correct.

    Correct: The 'roles/iam.serviceAccountTokenCreator' role is required to allow the Compute Engine instance's service account to impersonate the target service account.

  • B. Incorrect.

    Incorrect: Granting this role directly to the Compute Engine instance's service account does not follow the principle of least privilege and is not necessary when using service account impersonation.

  • C. Correct.

    Correct: The target service account needs the appropriate permissions (e.g., 'roles/storage.objectViewer') on the Cloud Storage bucket to perform the desired actions.

  • D. Incorrect.

    Incorrect: Directly assigning the target service account to the Compute Engine instance bypasses the benefit of service account impersonation and is less secure.

  • E. Correct.

    Correct: The Compute Engine instance must request temporary credentials via the generateAccessToken API to impersonate the target service account.

Timed practice exam

Take a Google Professional Cloud Security Engineer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam