Remediation
From Google Cloud Consoleβ
Leaving Keys in Placeβ
-
Go to
APIs & Services\Credentialsusing https://console.cloud.google.com/apis/credentials -
In the section
API Keys, Click theAPI Key Name. The API Key properties display on a new page. -
In the
Key restrictionssection, set the application restrictions to any ofHTTP referrers,IP addresses,Android apps,iOS apps. -
Click
Save. -
Repeat steps 2,3,4 for every unrestricted API key.
Note: Do not set
HTTP referrersto wild-cards(* or *.[TLD] or .[TLD]/)allowing access to any/wide HTTP referrer(s) Do not setIP addressesand referrer toany host (0.0.0.0 or 0.0.0.0/0 or ::0)
Removing Keysβ
Another option is to remove the keys entirely.
- Go to
APIs & Services\Credentialsusing https://console.cloud.google.com/apis/credentials - In the section
API Keys, select the checkbox next to each key you wish to remove - Select
Deleteand confirm.