A lead security engineer is configuring access controls for an internal compliance service that needs to retrieve sensitive API tokens stored in Secret Manager within a specific project named `corp-sec-vault`. The service executes under a dedicated service account named `[email protected]`. The compliance service does not require administrative capabilities, such as creating, updating, or deleting secret metadata. To adhere strictly to Google Cloud security best practices and the principle of least privilege, which IAM configuration should the security engineer apply?
- Grant the Secret Manager Secret Accessor role (roles/secretmanager.secretAccessor) to the service account at the `corp-sec-vault` project level.Cevap
- BGrant the Editor role (roles/editor) to the service account at the `corp-sec-vault` project level.
- CGrant the Secret Manager Secret Accessor role (roles/secretmanager.secretAccessor) to the service account at the parent Folder level.
- DGrant the Owner role (roles/owner) to the service account at the `corp-sec-vault` project level.
Cevap
Grant the predefined role Secret Manager Secret Accessor (roles/secretmanager.secretAccessor) to the service account scoped specifically to the target project.
Granting the predefined Secret Manager Secret Accessor role at the project level restricts the service account to only reading secret payloads inside the target project. This satisfies the requirement without exposing administrative controls or granting access to other projects in the resource hierarchy.
Adım Adım Çözüm
Anahtar Kavram
Principle of Least Privilege and Resource Hierarchy Scope in GCP IAM
Tahmini Süre:1m 30s