Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam Professional Cloud DevOps Engineer topic 1 question 50 discussion

Actual exam question from Google's Professional Cloud DevOps Engineer
Question #: 50
Topic #: 1
[All Professional Cloud DevOps Engineer Questions]

Your organization recently adopted a container-based workflow for application development. Your team develops numerous applications that are deployed continuously through an automated build pipeline to a Kubernetes cluster in the production environment. The security auditor is concerned that developers or operators could circumvent automated testing and push code changes to production without approval. What should you do to enforce approvals?

  • A. Configure the build system with protected branches that require pull request approval.
  • B. Use an Admission Controller to verify that incoming requests originate from approved sources.
  • C. Leverage Kubernetes Role-Based Access Control (RBAC) to restrict access to only approved users.
  • D. Enable binary authorization inside the Kubernetes cluster and configure the build pipeline as an attestor.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
francisco_guerra
Highly Voted 2 years, 10 months ago
this question is a little bit strange, but first we need to remove the invalid answers B: Incorrect An admission controller is a piece of code that intercepts requests to the Kubernetes API server prior to persistence of the object, but after the request is authenticated and authorized. (its for security but not "enforce approvals") C: Incorrect, we need to "enforce approvals" roles apply in the cluster and Ops always could push to production without approval. A: Incorrect, for me this answer sound well but this does not sound that an answer for a gcp exam and this do not enforce the use of the pipeline. D: Correct, they cannot push code to production without approval because their images are not signed.
upvoted 26 times
...
francisco_guerra
Highly Voted 2 years, 10 months ago
I win the exam today so this questions help me a lot
upvoted 15 times
...
jomonkp
Most Recent 5 months, 2 weeks ago
Selected Answer: D
Option D
upvoted 1 times
...
WhyIronMan
1 year, 5 months ago
Selected Answer: A
If you are not familiarised, Pull Requests are one way to bring changes from one branch (e.g. develop) into protected branches (e.g. master, main). 1. First you need to protect the production branch (e.g, master, main) 2. If a developer attempts to push new code to a production (now protected) it will trow a Permission denied error like this: remote: Permission denied to update branch master. To git.com:org/repository.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'git.com:org/repository.git' 3. in order to push their code to production branch, the developers will need to open a Pull Request (If you are using GitLab, it is called Merge Request) and ask someone to Review and Approve your changes. 4. The pipeline points to the protected branch; any new code pushed trigger the pipeline, and runs the tests and then deploy it. This is how we do devops.
upvoted 1 times
Greg123123
1 year, 4 months ago
but you missed the point here "The security auditor is concerned that developers or operators could circumvent". I see why you think pull request is the only way to circumvent the deployment process. But how about the operators? They have access to cluster and can simply redeploy it by some kubectl / cloud build command. So A is not correct.
upvoted 2 times
WhyIronMan
1 year, 4 months ago
That said, I send the question back to you, how about the developers?: "is concerned that developers or operators could circumvent" Developer will push code direct to master, with bug that is not caught by the tests and here we go: you do have a signed imaged, attested, with a BUG or something like that will be deployed so the question depends on the point of view, the combination of both are right and one more thing, D prevent to push to the registry, but the operator can get the kubernetes deployment yaml and point to other GCR...
upvoted 1 times
...
...
...
ramzez4815
1 year, 7 months ago
Selected Answer: D
D is correct answer, binary auth is best practice
upvoted 3 times
...
lxs
1 year, 11 months ago
Correct me if I am wrong, but this question is ambiguous. You can push the code at 3 stages: 1. You can merge a branch to master without Merge Request if the master is not protected 2. You can push the image to container registry to a repository if you have role assigned (only pipeline should be privileged to do). 3. An operator can change the code altering image/yaml using kubectl cli. The ultimate question is which problem are we trying to solve?
upvoted 2 times
...
PhilipKoku
2 years, 3 months ago
Selected Answer: D
D - Binary authorisation
upvoted 3 times
...
DarkMatterOne
2 years, 4 months ago
D https://cloud.google.com/binary-authorization Binary Authorization is a deploy-time security control that ensures only trusted container images are deployed on Google Kubernetes Engine (GKE) or Cloud Run. With Binary Authorization, you can require images to be signed by trusted authorities during the development process and then enforce signature validation when deploying. By enforcing validation, you can gain tighter control over your container environment by ensuring only verified images are integrated into the build-and-release process.
upvoted 2 times
...
maddy94
2 years, 7 months ago
Questions 51-55 is not available.. can someone please help me to get 51-55 questions?
upvoted 3 times
...
zanhsieh
2 years, 10 months ago
Agreed with D. The keywords here is "developers or operators". Option A the operators could push images to production without approval (operators could touch the cluster directly and the cluster cannot do any action against them). Rest same as francisco_guerra.
upvoted 4 times
...
ralf_cc
2 years, 11 months ago
D - PR approval will ensure the automated testing etc., the question is asking how to ensure all code changes go through the pipeline, where automated tests are integrated
upvoted 1 times
...
akg001
2 years, 11 months ago
Answer C is the most close answer. Leverage best practice . answer A is for pulling the code but in the question , the security auditor is concern about pushing the code .
upvoted 1 times
WhyIronMan
1 year, 5 months ago
If you are not familiarised, Pull Requests are one way to bring changes from one branch (e.g. develop) into protected branches (e.g. master, main). In order to push their code to production branch, the developers will need to open a Pull Request (If you are using GitLab, it is called Merge Request) and ask someone to Review and Approve their changes.
upvoted 1 times
...
...
devopsbatch
2 years, 11 months ago
A could be the ans
upvoted 2 times
akg001
2 years, 11 months ago
I think you are right : A https://github.community/t/best-practices-for-protected-branches/10204
upvoted 2 times
...
Feliphus
4 months, 3 weeks ago
IMHO the statement is concert about runnigs unsafe workload on a cluster Kubernet, and not how to protect the code repository, in this other case, pull request approval and an Admission Controller would be fine. Then D is the ans
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...