Flashcardsfor IT Certifications

D4: Service Account Permissions & Assignment

Google Cloud Associate Cloud Engineer exam practice questions · 12 flashcards

Question
Service account as identity vs as resource?
1 / 12

Tip: Space flips the card, ← / → navigate.

Last updated: · Report an error on this page

Show all 12 Service Account Permissions & Assignment practice questions and answers
  1. Service account as identity vs as resource?
    Identity: it receives roles on resources. Resource: users receive roles on the SA.
  2. How do you grant a role to a service account?
    --member=serviceAccount:SA_EMAIL in add-iam-policy-binding.
  3. Which role lets a user attach an SA to a VM or service?
    Service Account User (roles/iam.serviceAccountUser) on the SA.
  4. How do you assign an SA to a VM?
    gcloud compute instances create ... --service-account=SA_EMAIL --scopes=cloud-platform.
  5. What are access scopes?
    Legacy OAuth limits on VMs; best practice: cloud-platform scope plus IAM roles.
  6. Can you change a VM's service account while running?
    No; stop the VM first.
  7. How do you set Cloud Run's identity?
    gcloud run deploy --service-account=SA_EMAIL.
  8. Which role manages SAs (create/delete)?
    Service Account Admin (roles/iam.serviceAccountAdmin).
  9. How do you grant access on the SA itself?
    gcloud iam service-accounts add-iam-policy-binding SA_EMAIL --member=... --role=...
  10. Why are SA keys risky?
    Long-lived credentials that can leak; prefer attached SAs, impersonation or federation.
  11. Max user-managed keys per SA?
    10.
  12. How do you list an SA's keys?
    gcloud iam service-accounts keys list --iam-account=SA_EMAIL.