Diagram
A decision tree branching on workload location to pick attached service account, Workload Identity Federation for GKE, Workload Identity Federation, impersonation, or service account key as last resort.
How to Choose Safer Authentication Than Keys
Choosing safer authentication means using short-lived, automatically managed credentials instead of creating a downloadable service account key whenever possible. Service account keys are long-lived private keys that let an application sign a JSON Web Token (JWT) and exchange it for an OAuth 2.0 access token in any environment. Because anyone who holds the private key file can authenticate as the service account, a leaked key creates lasting exposure through privilege escalation, spoofing, and hard-to-trace actions.
Domain 2 of 2
167 practice questions
Practice this DomainLast updated