ASSOCIATE-CLOUD-ENGINEER · Question #304
Your company is moving its continuous integration and delivery (CI/CD) pipeline to Compute Engine instances. The pipeline will manage the entire cloud infrastructure through code. How can you ensure…
The correct answer is D. - Create multiple service accounts, one for each pipeline with the appropriate minimal Identity and. Option D is correct because creating dedicated service accounts per pipeline with minimal permissions follows the Principle of Least Privilege - each pipeline only has the exact permissions it needs, so a compromised pipeline cannot affect resources outside its scope. This is a…
Question
Options
- A
- Attach a single service account to the compute instances.
- B
- Add a step for human approval to the CI/CD pipeline before the execution of the infrastructure
- C
- Attach a single service account to the compute instances.
- D
- Create multiple service accounts, one for each pipeline with the appropriate minimal Identity and
How the community answered
(50 responses)- A8% (4)
- B4% (2)
- C16% (8)
- D72% (36)
Explanation
Option D is correct because creating dedicated service accounts per pipeline with minimal permissions follows the Principle of Least Privilege - each pipeline only has the exact permissions it needs, so a compromised pipeline cannot affect resources outside its scope. This is a Google Cloud security best practice for automated workloads managing infrastructure as code.
Options A and C are identical (a duplicate error in the question) and both are wrong for the same reason: a single shared service account grants all pipelines the same permissions, meaning any one pipeline has more access than it needs and a breach exposes your entire infrastructure.
Option B is wrong because requiring human approval addresses change governance, not permissions. It does nothing to limit what the pipeline can access - it only adds a gate before it acts. It's a useful complementary control but does not solve the permissions problem.
Memory tip: Think "one key per door" - just as you wouldn't give every employee a master key to every room, you shouldn't give every pipeline a master service account. Multiple accounts = blast radius containment.
Topics
Community Discussion
No community discussion yet for this question.