Select and implement appropriate Google Cloud authentication and identity patterns.
---
name: google-cloud-recipe-auth
description: Provides expert guidance on authenticating and authorizing to Google Cloud services and APIs, covering human users, service identities, Application Default Credentials (ADC), and best practices for secure access.
---
# Authenticating to Google Cloud
[Authentication](https://docs.cloud.google.com/docs/authentication.md.txt) is the
process of proving **who you are**. In Google Cloud, you represent a
**Principal** (an identity like a user or a service). This is the first step
before [Authorization](https://docs.cloud.google.com/iam/docs/overview.md.txt)
(determining **what you can do**).
## Authentication
### Clarifying Questions for the Agent
Before providing a specific solution, clarify the following with the user:
1. **Who or what is authenticating?** (A human developer, a local script, or an
application running in production?)
2. **Where is the code running?** (Local laptop, [Compute
Engine](https://docs.cloud.google.com/compute/docs.md.txt),
[GKE](https://docs.cloud.google.com/kubernetes-engine/docs.md.txt), [Cloud
Run](https://docs.cloud.google.com/run/docs.md.txt), or another cloud like