Keys / Google Cloud

GOOGLE_APPLICATION_CREDENTIALS

The path to a JSON credential file that Google Cloud libraries sign in with. It holds a file path, not a key; the file can be a service account key.

Expires
keys never, unless your organization sets a limit
API
create, list, disable and delete keys, with the IAM API

Get it

Create one on console.cloud.google.com/iam-admin/serviceaccounts. The steps aren't recorded yet.

Set it

GOOGLE_APPLICATION_CREDENTIALS=...

Application Default Credentials in Google's auth libraries for Python, Node.js, Go and Java read it when you don't pass credentials. Or keep it out of .env with keypin: keypin run -- npm run dev

Replace it

  1. Google recommends avoiding key files: on Google Cloud, attach a service account to the resource instead; elsewhere, point GOOGLE_APPLICATION_CREDENTIALS at a Workload Identity Federation configuration file.
  2. If you still need a key, open the service account on the Service accounts page and add a new JSON key. A service account can have up to 10 keys. Organizations created since May 3, 2024 block key creation by default.
  3. Put the new file on every machine that uses the old one and point GOOGLE_APPLICATION_CREDENTIALS at it.
  4. Disable the old key and check that your apps still work. Then delete it; a deleted key can't be restored.

Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.

Sources, checked 2026-11-16