Authorization: Bearer header.
Use workload identity federation for anything that isn’t a person at a keyboard. A CI job, a cloud service, or a Kubernetes pod already has an identity from its platform. Federation exchanges that identity for a short-lived KERNEL access token, so there’s no long-lived secret to store, rotate, or leak. Each access token lasts five minutes by default, and the SDK requests a new one before it expires, so a workload of any length stays authenticated.
Why federation instead of an API key
By default, a static API key works from anywhere, for anyone who holds it, until someone revokes it. A federated credential doesn’t have that failure mode.Which one to use
When an API key is still the right tool
For some jobs an API key is still a reasonable choice:- Local development. Your laptop has no workload identity. Sign in with
kernel login, or create a personal key with a short expiry. - Environments with no identity provider. A VM at a host that issues no OIDC tokens, or a third-party tool that only accepts a key, can’t federate. Give it a service account API key so the key belongs to your organization, not to the person who created it.
- Access across projects. A federation rule covers one project. A task that needs every project in your organization at once needs an organization-scoped key.
- Features closed to service accounts. Acquiring a browser from a pool, deploying or invoking apps, and managing API keys aren’t available to federated credentials. See what a service account can’t do.
Next steps
Workload identity federation
How the exchange works, and how to connect your first workload.
Move off API keys
Switch an existing workload without downtime.
API keys
Create, scope, rotate, and delete keys.