An automated analytics pipeline deployed on Cloud Run operates using the runtime service account [email protected]. To complete batch jobs, it must mint short-lived OAuth 2.0 access tokens to impersonate [email protected] without using static credentials. Following the principle of least privilege, which configuration enables this impersonation capability?
- Assign the predefined IAM role roles/iam.serviceAccountTokenCreator on the target bq-exporter service account to principal [email protected].Cevap
- BAssign the predefined IAM role roles/iam.serviceAccountUser on the target bq-exporter service account to principal [email protected].
- CCreate a long-lived service account key file in JSON format for bq-exporter and store it in Secret Manager for Cloud Run to access.
- DBind the Project Editor primitive role to [email protected] across the target project resource hierarchy.
Cevap
Assign the predefined IAM role roles/iam.serviceAccountTokenCreator on the target bq-exporter service account to principal [email protected].
To impersonate a target service account and generate short-lived tokens keylessly, the principal making the call must be granted the roles/iam.serviceAccountTokenCreator role directly on that target service account.
Adım Adım Çözüm
Anahtar Kavram
Service Account Impersonation via Service Account Token Creator Role
Tahmini Süre:1m 30s