Google Cloud advises teams to remove API keys from development and production workflows and use short-lived credentials and separate identities instead. The guide targets developers whose Gemini prototypes are expanding to real users or multiple team members: exposed keys can, the post says, be abused by automated scrapers, with the resulting usage billed to the customer.
For employees, the post describes Application Default Credentials: team members sign in with their work account and use that access with models in Model Garden, including Gemini, Claude and open models. Applications should run under their own service account with only the permissions they need. Google Cloud also recommends separating development and production projects and managing access through groups.
According to Google, a companion repository includes a scanner that reports files containing strings resembling API keys without displaying the key values. Remaining credentials, such as keys for other services, should be stored in Secret Manager. The post also explains spending caps: these can pause requests, but enforcement is not immediate and any overage is still billed. The feature is marked as a preview and applies only to certain projects and services.
The full guide walks through the setup steps and describes additional limitations. Original source at Google Cloud
🇬🇧 https://cloud.google.com/blog/topics/developers-practitioners/how-to-fix-your-teams-api-keys