
Answer-first summary for fast verification
Answer: Grant the developers the Source Repository Writer role at Repo level
Option A is incorrect because it is too permissive and does not follow the least privilege best practice, granting access to all the repos in that Project. Option B is incorrect as it does not provide permissions to update repositories. Option C is CORRECT as it grants the necessary permissions at the repo level to list, clone, fetch, and update repositories. Option D is incorrect for being too permissive and not adhering to the least privilege best practice. Reference: [Google Cloud Source Repositories Access Control](https://cloud.google.com/source-repositories/docs/configure-access-control#roles_and_permissions_matrix)
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Your company has deployed all its Cloud Source Repositories in a separate GCP Project. You need to grant developers in the dev Project access to commit code to the dev repository in that Project, adhering to Google’s best practice of least privilege. What is the best way to do this?
A
Grant the developers the Source Repository Admin role at Project level
B
Grant the developers the Source Repository Reader role at Project level
C
Grant the developers the Source Repository Writer role at Repo level
D
Grant the developers the Source Repository Admin role at Repo level