More Info:

Multiple Cloud Functions should not have same IAM roles.

Risk Level

Medium

Address

Security

Compliance Standards

CBP

Triage and Remediation

Remediation

To remediate the misconfiguration “Multiple Cloud Functions Should Not Use Same IAM Role” for GCP using the GCP console, follow these steps:

  1. Login to the GCP console: https://console.cloud.google.com/
  2. Navigate to the Cloud Functions page by clicking on the hamburger menu on the top left corner and selecting “Cloud Functions” under the “Compute” section.
  3. Select the function that is using the same IAM role as another function.
  4. Click on the “Edit” button on the top of the Cloud Function page.
  5. Scroll down to the “Cloud Function Details” section and click on the “Show Advanced Settings” button.
  6. Under the “Cloud Function IAM” section, click on the “Change” button next to the “Service account” field.
  7. In the “Select a service account” dialog box, select “Create a new service account” and give it a name.
  8. Click on the “Create” button and wait for the service account to be created.
  9. Select the newly created service account from the drop-down list and click on the “Save” button at the bottom of the page.
  10. Repeat the above steps for all the other functions that are using the same IAM role.

By following the above steps, you have successfully remediated the misconfiguration “Multiple Cloud Functions Should Not Use Same IAM Role” for GCP using the GCP console.

Additional Reading: