CIS Google Cloud Platform Foundation Benchmark v1.2.0/Identity and Access Management/13 of 83
1.13Ensure API keys are restricted to use by only specified Hosts and Apps
Control family: Identity and Access Management
Control description
Unrestricted keys are insecure because they can be viewed publicly, such as from within a browser, or they can be accessed on a device where the key resides. It is recommended to restrict API key usage to trusted hosts, HTTP referrers and apps.
How to implement
ResponsibilityCustomerYou configure and operate this in your own cloud accounts.
If an API key must exist, it should only work from the places it belongs: named websites, server addresses or mobile apps. A key restricted that way is far less useful to someone who copies it from a page or an app.
Before you start
The same on every cloud, before the steps in the tabs.
- For each API key that must stay, record where it is used: the websites, server addresses or mobile apps allowed to send it.
- Make an application restriction a condition of approving a new key.
Evidence
- The API key inventory with the allowed applications for each key
Not applicable. This benchmark covers Google Cloud only.
Not applicable. This benchmark covers Google Cloud only.
On Google Cloud the tasks add an application restriction to each key in APIs & Services, then watch with Security Command Center.
Task 1Restrict where each key can be used
- Sign in to the Google Cloud console at console.cloud.google.com and open APIs & Services > Credentials.
- In the API keys section, on the row of the key, choose Actions > Edit API key.
- Under Application restrictions, choose the type that fits: websites (HTTP referrers), IP addresses, Android apps or iOS apps.
- Choose Add an item, enter each allowed site, address range or app, and choose Done.
- Choose Save; the change can take a few minutes.
- Check it: a request with the key from an unlisted site or address is refused.
Task 2Keep it checked with the Security Health Analytics finding API_KEY_APPS_UNRESTRICTED
- Open Security Command Center > Findings for the organization (Security Health Analytics runs on the Premium tier for most detectors).
- In the query editor, filter on category API_KEY_APPS_UNRESTRICTED with state ACTIVE, and select Apply.
- Open each finding, read the resource and the explanation it gives, and add an application restriction to the key it names.
- Check it: after the next Security Health Analytics scan, no active API_KEY_APPS_UNRESTRICTED finding remains.
Evidence
- The Edit API key page of each key, showing its application restriction
- Security Command Center, with no active API_KEY_APPS_UNRESTRICTED finding
Console steps as of 5 November 2026. Not every step has been confirmed in a live console yet, and menus and labels can move between releases, so look for the nearest match if one has changed.