GCP Generative AI Leader Practice Question 59: IAM Least Privilege AI
Google Cloud Generative AI Leader · Test 6 · question 9 of 10
A company's data science team needs to call a deployed model endpoint to generate predictions, but does not need to create, delete, or manage the underlying infrastructure. An administrator is about to grant the whole team the project-level Owner role so no one has to ask for access again.
Which approach best follows the security principle of least privilege for this situation?
Show answer and explanation
Answer:
Least privilege means granting each identity only the permissions it needs to do its actual job, nothing more. The data science team's job here is calling a model endpoint for predictions, so it should receive the narrow predefined role that permits that action, while permissions to create, modify, or delete AI infrastructure go only to the people who actually perform those tasks. Google Cloud's guidance specifically warns against granting broad basic roles like Owner or Editor in production, because they carry far more access than most identities require and widen the blast radius if credentials are ever compromised.
- A is wrong because Owner is a basic role with near-universal access across the project, vastly exceeding what calling an endpoint requires, and Google explicitly recommends against granting it unless there is no alternative. - C is wrong for the same reason as A, made worse by extending that broad access to every project in the entire organization instead of just one. - D is wrong because sharing one static service account key removes individual accountability and makes it impossible to see or revoke one person's access without affecting everyone, which is a security anti-pattern regardless of the role attached to the key.
Reference: Use IAM securely