An enterprise application running locally on a developer's workstation needs temporary access to Google Cloud resources using a dedicated service account. To follow Google Cloud security best practices, you want to enable service account impersonation without creating long-lived credentials. Which IAM role must be granted to the developer on the target service account?
- Service Account Token Creator (roles/iam.serviceAccountTokenCreator)Cevap
- BService Account Key Admin (roles/iam.serviceAccountKeyAdmin) to generate and download a JSON private key file
- COwner (roles/owner) at the project level to provide full control over all service account operations
- DOrganization Admin (roles/resourcemanager.organizationAdmin) at the organization level so permissions inherit downward to all service accounts
Cevap
The Service Account Token Creator role (roles/iam.serviceAccountTokenCreator) granted directly on the target service account enables impersonation and generation of short-lived credentials without key file export.
Granting the Service Account Token Creator role (roles/iam.serviceAccountTokenCreator) on the target service account provides the user with permission to impersonate the service account and generate short-lived credentials. This approach follows Google Cloud security best practices by avoiding long-lived JSON service account keys.
Adım Adım Çözüm
Anahtar Kavram
Service Account Impersonation