A DevOps engineer is configuring a specialized service account for an automated CI/CD deployment pipeline. The pipeline must deploy new Cloud Functions (2nd gen) instances and configure Cloud Scheduler triggers strictly within a single target Google Cloud project named `proj-services-prod`. The service account must not be granted permissions beyond what is necessary to perform these tasks, nor should it acquire access to any neighboring projects. Which IAM role configuration meets these requirements while adhering to Google Cloud recommended best practices?
- Grant the service account the Cloud Functions Admin (roles/cloudfunctions.admin) and Cloud Scheduler Admin (roles/cloudscheduler.admin) roles on the target project proj-services-prod.Cevap
- BGrant the service account the Editor (roles/editor) role on the target project proj-services-prod.
- CGrant the service account the Cloud Functions Admin (roles/cloudfunctions.admin) and Cloud Scheduler Admin (roles/cloudscheduler.admin) roles at the parent Folder level containing proj-services-prod.
- DGrant the service account the Owner (roles/owner) role at the Organization level.
Cevap
Grant the service account the predefined Cloud Functions Admin (roles/cloudfunctions.admin) and Cloud Scheduler Admin (roles/cloudscheduler.admin) roles directly on the target project proj-services-prod.
Granting specific predefined roles (Cloud Functions Admin and Cloud Scheduler Admin) at the target project level grants exactly the privileges needed for pipeline execution without over-privileging the service account or leaking permissions to sibling projects.
Adım Adım Çözüm
Anahtar Kavram
Applying Least Privilege using Predefined Roles and Precise Hierarchy Scoping