Soru

Zorluk: OrtaAnalyzing Software Development Lifecycle (SDLC) and CI/CD Pipelines

An organization is analyzing its automated continuous deployment pipeline, which uses Cloud Build to deploy microservice updates to a Google Kubernetes Engine (GKE) cluster and store images in Artifact Registry. An architecture review reveals that the pipeline currently uses the default Cloud Build service account with broad broad-spectrum project access, violating security compliance guidelines. Which IAM configuration strategy should the cloud architect recommend to secure the CI/CD pipeline while adhering to the principle of least privilege?

  1. Configure Cloud Build to execute using a dedicated user-managed service account, and assign only granular predefined roles such as Kubernetes Engine Developer for GKE deployments and Artifact Registry Writer for container image uploads.Cevap
  2. B
    Assign the primitive Editor role to the default Cloud Build service account at the organization node to ensure all present and future build steps execute without permission failures.
  3. C
    Grant the Service Account Admin role to the development team submitting builds so that Cloud Build can dynamically elevate permissions during deployment execution.
  4. D
    Store deployment release configurations and environment state files locally inside the Cloud Build workspace directory to bypass project-level IAM authorization checks.

Cevap

Configure Cloud Build to execute using a dedicated user-managed service account, and assign only granular predefined roles such as Kubernetes Engine Developer for GKE deployments and Artifact Registry Writer for container image uploads.
Configuring Cloud Build to run as a user-managed service account with fine-grained roles (Kubernetes Engine Developer and Artifact Registry Writer) follows Google Cloud security best practices. It ensures the pipeline has necessary operational privileges for GKE deployments and artifact pushes while restricting unnecessary project-level access.

Adım Adım Çözüm

1
Analyze pipeline permission requirements
Identify the minimum operations required: deploying workloads to GKE and pushing artifacts to Artifact Registry.
Security best practices dictate scoping permissions exclusively to actions performed by the automated pipeline.
2
Select service account architecture
Create a dedicated user-managed service account instead of relying on the default Cloud Build service account.
User-managed service accounts allow fine-grained access control bound to specific build triggers and workflows.
3
Attach minimal predefined IAM roles
Grant Kubernetes Engine Developer (roles/container.developer) and Artifact Registry Writer (roles/artifactregistry.writer).
These roles provide exact permissions needed for cluster deployment and image publishing without granting administrative access.

Anahtar Kavram

CI/CD Pipeline Security and Service Account Governance in GCP
Bu soruyu puanla