A security team needs to configure cross-project permissions for a audit service account named `[email protected]` in project `finance-prod`. The security group `[email protected]` must be allowed to generate short-lived OAuth2 access tokens for this service account to run security scans without using long-lived key files. Additionally, the service account itself requires read-only access to Cloud Storage objects stored in a separate project named `finance-data`. Following Google Cloud security best practices, which TWO actions should the security team perform? (Select TWO.)
- Grant the Service Account Token Creator role (roles/iam.serviceAccountTokenCreator) to group:[email protected] on the service account [email protected].Answer
- Grant the Storage Object Viewer role (roles/storage.objectViewer) to serviceAccount:[email protected] on project finance-data.Answer
- CCreate and download a JSON service account private key file for [email protected] and distribute it to members of [email protected].
- DGrant the Editor role (roles/editor) to serviceAccount:[email protected] on project finance-data.
- EGrant the Service Account User role (roles/iam.serviceAccountUser) to group:[email protected] at the organization level so they inherit access to read objects in project finance-data.
Answer
To establish short-lived credential delegation and cross-project storage access according to Google Cloud security best practices, the administrator must grant the Service Account Token Creator role (roles/iam.serviceAccountTokenCreator) to group:[email protected] directly on the service account resource, and grant the Storage Object Viewer role (roles/storage.objectViewer) to the service account identity on project finance-data.
To allow external identities to generate short-lived access tokens for a service account without key exports, Google Cloud requires assigning the Service Account Token Creator role (roles/iam.serviceAccountTokenCreator) to the user group on the specific service account resource. Additionally, granting the predefined Storage Object Viewer role (roles/storage.objectViewer) to the service account identity on the target project satisfies least-privilege data access requirements.
Step-by-Step Solution
Key Concept
Service Account Delegation and Cross-Project Least Privilege IAM Architecture