A software engineer needs to deploy new revisions to an existing Cloud Run service and view application logs in a specific Google Cloud project. The engineer must not be able to modify service IAM policies, delete the service, or manage other infrastructure in the project. Which role assignment follows Google's recommended practice of least privilege?
- Grant the Cloud Run Developer role (roles/run.developer) on the specific Cloud Run service and the Logs Viewer role (roles/logging.viewer) at the project level.Cevap
- BGrant the Editor role (roles/editor) at the project level.
- CGrant the Cloud Run Admin role (roles/run.admin) at the project level.
- DGrant the Logs Viewer role (roles/logging.viewer) at the organization level to automatically inherit deployment rights down to the project service.
Cevap
Granting the Cloud Run Developer role on the specific Cloud Run service paired with the Logs Viewer role at the project level provides the minimal permissions necessary to deploy new revisions and inspect logs without allowing service deletion or project-wide administrative control.
Granting Cloud Run Developer scoped directly to the targeted Cloud Run service alongside Logs Viewer at the project level adheres strictly to least privilege by enabling revision deployments and log viewing while prohibiting service deletion, IAM policy edits, or broad project access.
Adım Adım Çözüm
Anahtar Kavram
Principle of Least Privilege using Predefined IAM Roles