A security audit workload needs to periodically list and view all user-managed service accounts and their associated keys within a Google Cloud project named `corp-analytics-prod`. The workload must be granted only the minimum necessary permissions to view service account configurations without the ability to create, delete, modify, or impersonate any service account. Following Google Cloud security best practices and the principle of least privilege, which action should you take?
- Create a dedicated service account for the workload and grant it the predefined `roles/iam.serviceAccountViewer` role on the project.Cevap
- BCreate a dedicated service account for the workload and grant it the primitive `roles/viewer` role on the project.
- CCreate a dedicated service account, grant it the `roles/iam.serviceAccountAdmin` role at the project level, and define a deny policy at the folder level to restrict modification actions.
- DCreate a dedicated service account, grant it the `roles/iam.serviceAccountKeyAdmin` role on the project, and download a service account JSON key file for local authentication.
Cevap
Create a dedicated service account for the workload and grant it the predefined `roles/iam.serviceAccountViewer` role on the project.
The correct option grants the predefined role `roles/iam.serviceAccountViewer` to the dedicated service account. This predefined role includes the specific read-only permissions (`iam.serviceAccounts.get`, `iam.serviceAccounts.list`, `iam.serviceAccountKeys.get`, `iam.serviceAccountKeys.list`) required to audit service account configurations while preventing any modifications, key creations, or impersonation actions.
Adım Adım Çözüm
Anahtar Kavram
Least Privilege Service Account Management
Tahmini Süre:1m 30s