More Info:

Security risks involved in using API-Keys appear below: • API keys are simple encrypted strings • API keys do not identify the user or the application making the API request • API keys are typically accessible to clients, making it easy to discover and steal an API key To avoid the security risk in using API keys, it is recommended to use standard authentication flow instead.

Risk Level

High

Address

Security, Reliability

Compliance Standards

CISGCP, CBP, HITRUST, SOC2, NISTCSF

Triage and Remediation

Remediation

To remediate the misconfiguration of API keys not being created for a project in GCP, you can follow the below steps using the GCP console:

  1. Go to the GCP console and select the project for which you want to remediate the misconfiguration.

  2. Navigate to the “APIs & Services” section from the left-hand side menu.

  3. Click on the “Credentials” tab from the top menu.

  4. On the Credentials page, you will see a list of all the existing credentials for the project.

  5. Look for any API keys that have been created for the project. If you find any, select them and click on the “Delete” button to remove them.

  6. If there are no API keys, then the misconfiguration is already remediated.

  7. To prevent API keys from being created in the future, you can go to the “APIs & Services” section and click on the “Restrict keys” button.

  8. On the Restrict keys page, select the “Do not restrict key” option and click on the “Save” button.

  9. This will prevent any API keys from being created for the project in the future.

By following these steps, you can remediate the misconfiguration of API keys not being created for a project in GCP.

Additional Reading: