More Info:

Ensure Kubernetes cluster nodes do use the default service account. Kubernetes cluster nodes should use customized service accounts that have minimal privileges to run. This reduces the attack surface in the case of a malicious attack on the cluster.

Risk Level

Medium

Address

Security

Compliance Standards

HITRUST, SOC2, NISTCSF, PCIDSS

Triage and Remediation

Remediation

To remediate the misconfiguration “Default Service Accounts Should Not Be Used” in GCP using GCP console, please follow these steps:

  1. Open the GCP Console and navigate to the “IAM & Admin” section.

  2. Click on “Service Accounts” in the left-hand menu.

  3. Identify the default service accounts that are being used in your project. The default service accounts are “App Engine default service account” and “Compute Engine default service account”.

  4. Click on the default service account you want to remediate.

  5. Click on the “Edit” button at the top of the page.

  6. Scroll down to the “Roles” section and remove any unnecessary roles that have been assigned to the default service account.

  7. Click on “Save” to apply the changes.

  8. Repeat steps 4-7 for all default service accounts being used in your project.

  9. Create new service accounts with the appropriate roles and permissions for your project.

  10. Update your applications and services to use the new service accounts instead of the default service accounts.

By following these steps, you will have successfully remediated the misconfiguration “Default Service Accounts Should Not Be Used” in GCP using GCP console.

Additional Reading: