A cloud engineer needs to grant a newly hired developer access to view Cloud Storage objects in a specific project using the gcloud CLI while following Google Cloud security best practices. What is the correct sequence of steps to configure this access?
- 1Identify the precise predefined role required for read-only access to storage objects (roles/storage.objectViewer).
- 2Identify the principal's Google Cloud identity (e.g., user email address).
- 3Execute the command `gcloud projects add-iam-policy-binding PROJECT_ID --member='user:[email protected]' --role='roles/storage.objectViewer'`.
- 4Verify the binding by inspecting the project's IAM policy using `gcloud projects get-iam-policy PROJECT_ID`.
Cevap
The correct workflow follows four sequential steps: first identifying the least-privilege predefined role (`roles/storage.objectViewer`), identifying the target user identity, adding the IAM policy binding via `gcloud projects add-iam-policy-binding`, and verifying the binding using `gcloud projects get-iam-policy`.
The correct sequence begins by planning access: selecting the least-privilege predefined role (`roles/storage.objectViewer`) and establishing the user's principal identifier. Next, the administrator applies the policy change using `gcloud projects add-iam-policy-binding`. Finally, standard operational best practices dictate verifying the applied policy with `gcloud projects get-iam-policy`.
Adım Adım Çözüm
Anahtar Kavram
Managing IAM Roles and Resource Access Permissions via gcloud CLI using least privilege principles
Tahmini Süre:1m 30s