Soru

Zorluk: OrtaConfiguring Billing Accounts and Linking Projects

A lead cloud engineer at a renewable energy analytics firm needs to authorize a junior site reliability engineer (SRE) to link a newly created project, grid-telemetry-prod, to the company's central Cloud Billing account. Following the Google Cloud principle of least privilege, which combination of IAM roles must be granted to the SRE?

  1. Billing Account User (roles/billing.user) on the Cloud Billing account and Project Billing Manager (roles/resourcemanager.projectBillingManager) on the grid-telemetry-prod projectCevap
  2. B
    Billing Account User (roles/billing.user) on the Cloud Billing account and Viewer (roles/viewer) on the grid-telemetry-prod project
  3. C
    Billing Account Administrator (roles/billing.admin) on the Cloud Billing account with no explicit roles granted on the grid-telemetry-prod project
  4. D
    Project Owner (roles/owner) on the grid-telemetry-prod project and Billing Account Creator (roles/billing.creator) at the organization level

Cevap

The correct answer specifies granting Billing Account User (roles/billing.user) on the Cloud Billing account and Project Billing Manager (roles/resourcemanager.projectBillingManager) on the target project.
Linking a Google Cloud project to a Cloud Billing account requires permissions on both resource levels: billing.resourceAssociations.create on the billing account (granted by roles/billing.user) and resourcemanager.projects.createBillingAssignment on the target project (granted by roles/resourcemanager.projectBillingManager). Using these two specific predefined roles strictly satisfies least privilege.

Adım Adım Çözüm

1
Identify the required billing account permission
The identity needs billing.resourceAssociations.create on the billing account, provided by the predefined role Billing Account User (roles/billing.user).
Linking requires authorization to attach projects to the specified billing account.
2
Identify the required project permission
The identity needs resourcemanager.projects.createBillingAssignment on the project, provided by the predefined role Project Billing Manager (roles/resourcemanager.projectBillingManager).
Linking requires authorization to modify the billing configuration of the target project.
3
Apply the principle of least privilege
Combine roles/billing.user on the billing account and roles/resourcemanager.projectBillingManager on the project.
This grants exact necessary rights without using overly broad primitive roles like Owner or Editor.

Anahtar Kavram

Two-sided IAM permission requirement for linking GCP projects to Cloud Billing accounts under least privilege
Bu soruyu puanla