Professional Cloud Security Engineer Exam QuestionsBrowse all questions from this exam

Professional Cloud Security Engineer Exam - Question 172


You're developing the incident response plan for your company. You need to define the access strategy that your DevOps team will use when reviewing and investigating a deployment issue in your Google Cloud environment. There are two main requirements:

✑ Least-privilege access must be enforced at all times.

✑ The DevOps team must be able to access the required resources only during the deployment issue.

How should you grant access while following Google-recommended best practices?

Show Answer
Correct Answer: D

To ensure least-privilege access and temporary access are both enforced, creating a service account with limited list/view permissions and then giving the Service Account User Role on this service account to the DevOps team is the best practice. This allows the team to utilize the service account only when needed during a deployment issue, and their access can be easily revoked afterwards. By granting roles to the service account rather than individual users, you maintain a higher degree of control and flexibility in managing access.

Discussion

27 comments
Sign in to comment
Baburao
Sep 3, 2022

I think the answer should D. Option B gives them "Always On" permissions but the question asks for "Just in time" permissions. So, this is possible only with a Service Account. Once the incident response team resolves the issue, the service account key can be disabled.

pfilourenco
Jul 30, 2023

You can create "Just in time" permissions with IAM conditions.

GHOST1985Option: D
Sep 16, 2022

answer should be D

AwesomeGCPOption: D
Oct 9, 2022

D. Create a service account, and grant it limited list/view permissions. Give the Service Account User Role on this service account to the DevOps team.

AzureDP900
Nov 4, 2022

D is right

shayke
Jan 4, 2023

ans is D

soltium
Oct 12, 2022

I think its B, option D lacks Service Account Token Creator Role so the DevOps team can't impersonate the SA.

mikez2023
Feb 18, 2023

Should be D, as the service account user role can impersonate. Service Account User (roles/iam.serviceAccountUser): This role includes the iam.serviceAccounts.actAs permission, which allows principals to indirectly access all the resources that the service account can access. For example, if a principal has the Service Account User role on a service account, and the service account has the Cloud SQL Admin role (roles/cloudsql.admin) on the project, then the principal can impersonate the service account to create a Cloud SQL instance.

cyberpunk21
Aug 24, 2023

Too many ifs' bro with B as they said custom role we just put a condition to the role

cyberpunk21
Aug 24, 2023

Too many ifs' bro with B as they said custom role we just put a condition to the role

pfilourencoOption: B
Jul 30, 2023

I will go to B, since only with custom roles you can have Least-privilege access enforced at all times. And you can create "Just in time" permissions with IAM conditions.

cyberpunk21Option: B
Aug 24, 2023

I go with B, if we consider D we need to assume too many things and B is simple custom role with JIT condition can address all the issues.

ymkk
Aug 29, 2023

Between B and D, I choose D Because option B Granting IAM roles to the DevOps team directly would give them ongoing, not temporary, access.

JoaquinJimenezGarciaOption: B
Dec 6, 2023

B follows the google best practices

NachtwakerOption: B
Mar 6, 2024

B or D, I prefer B because of traceability, impersonating an account is harder to audit in relation to using personal account.

ITIFR78Option: B
Aug 22, 2023

B is more relvant

desertlotus1211
Sep 9, 2023

The real answer shouldn be 'breakglass' tool.

rglearnOption: B
Sep 25, 2023

Answer should be B

glb2Option: B
Mar 19, 2024

Answer is B, it sets least-privilege access.

shanwfordOption: D
Apr 24, 2024

Its (D) according https://cloud.google.com/iam/docs/best-practices-service-accounts "Some applications only require access to certain resources at specific times or under specific circumstances....In such scenarios, using a single service account and granting it access to all resources goes against the principle of least privilege"

Pime13Option: B
Dec 11, 2024

i vote B. Options A and C grant broader permissions than necessary, which does not align with the least-privilege principle. Option D involves using a service account, which is not the best practice for granting temporary access to human users. By creating a custom IAM role, you ensure that the DevOps team has the precise permissions needed for their tasks, and you can easily adjust or revoke these permissions as necessary

KLeiOption: D
Dec 25, 2024

IAM role to DevOps team member is wrong - not fulfill least privilege principle Service account with "limited list/view permissions" to DevOps team member is correct - least privilege principle - more flexibility

akg001Option: B
Aug 13, 2023

B is right answer.

dija123Option: D
Mar 6, 2024

I go with D, While B seems to allows defining specific permissions, it adds complexity to the access control strategy and might still grant more access than necessary.

dija123Option: D
Mar 13, 2024

Any DevOps Engineer knows verywell, it is D

BettoxicityOption: D
Apr 1, 2024

D. -Least Privilege: By creating a service account with restricted permissions (limited list/view access to specific resources), you adhere to the principle of least privilege. The DevOps team can only access the information needed for investigation without broader project-level control. -Temporary Access: Service accounts are not tied to individual users. Once the investigation is complete, you can simply revoke access to the service account from the DevOps team, effectively removing their access to the resources. This ensures temporary access for the specific incident.

jujanosoOption: D
Jul 13, 2024

D. This approach allows the creation of a service account with specific limited permissions necessary for investigating deployment issues. The DevOps team can then be granted the Service Account User role on this service account. This setup ensures that the DevOps team can use the service account with appropriate permissions only when needed, fulfilling both requirements of least-privilege access and temporary access

Mr_MIXER007Option: D
Sep 2, 2024

D. Create a service account, and grant it limited list/view permissions. Give the Service Account User Role on this service account to the DevOps team. This option allows you to create a service account with limited access rights (list/view), and the DevOps team will be able to use this service account only when needed. This is consistent with the principle of least privilege and incident-only access.

Mr_MIXER007Option: D
Sep 2, 2024

D. Create a service account, and grant it limited list/view permissions. Give the Service Account User Role on this service account to the DevOps team. This option allows you to create a service account with limited access rights (list/view), and the DevOps team will be able to use this service account only when needed. This is consistent with the principle of least privilege and incident-only access.

BPzenOption: D
Nov 30, 2024

Why Option D is Best: Least-Privilege Access: Permissions are limited to only what is necessary for the investigation by tailoring the service account’s IAM role. Controlled Access: By managing the service account or its impersonation permissions, you can ensure the DevOps team can access the resources only during deployment issues.

MauratayOption: B
Mar 1, 2025

It follows best practices and has traceability