A security engineer needs to configure access for an application service account running in a dedicated project named `finance-prod-app`. The service account requires access to retrieve and read secret values stored within Secret Manager in this project. To comply with corporate security standards, the service account must not have access to secrets in any other project within the organization, nor should it have permissions to create, update, or delete secret metadata. Which IAM role binding strategy adheres to the principle of least privilege while meeting these requirements?
- Grant the Secret Manager Secret Accessor role (roles/secretmanager.secretAccessor) to the service account on the finance-prod-app project.Cevap
- BGrant the Secret Manager Secret Accessor role (roles/secretmanager.secretAccessor) to the service account on the parent Folder containing the finance-prod-app project.
- CGrant the Primitive Editor role (roles/editor) to the service account on the finance-prod-app project.
- DGrant the Primitive Viewer role (roles/viewer) to the service account on the Organization resource.
Cevap
Granting the predefined Secret Manager Secret Accessor role (roles/secretmanager.secretAccessor) at the specific project resource scope (finance-prod-app) adheres strictly to the principle of least privilege.
The predefined role 'roles/secretmanager.secretAccessor' specifically grants the permission 'secretmanager.versions.access' required to read secret payloads. Binding this role at the project level restricts access to secrets within that project alone, fulfilling both operational and security requirements under the principle of least privilege.
Adım Adım Çözüm
Anahtar Kavram
Managing IAM Roles and Permissions - Least Privilege Scope and Predefined Roles