Skip to main content

πŸ“ Google GCE Instance is configured to use the Default Service Account 🟒

  • Contextual name: πŸ“ Instance is configured to use the Default Service Account 🟒
  • ID: /ce/ca/google/compute-engine/instance-use-default-service-account
  • Located in: πŸ“ Google GCE

Flags​

Our Metadata​

  • Policy Type: COMPLIANCE_POLICY
  • Policy Category:
    • SECURITY

Similar Policies​

Logic​

Description​

Open File

Description​

It is recommended to configure your instance to not use the default Compute Engine service account because it has the Editor role on the project.

Rationale​

When a default Compute Engine service account is created, it is automatically granted the Editor role (roles/editor) on your project which allows read and write access to most Google Cloud Services. This role includes a very large number of permissions. To defend against privilege escalations if your VM is compromised and prevent an attacker from gaining access to all of your project, you should either revoke the Editor role from the default Compute Engine service account or create a new service account and assign only the permissions needed by your instance. To mitigate this at scale, we strongly recommend that you disable the automatic role grant by adding a constraint to your organization policy.

The default Compute Engine service account is named [PROJECT_NUMBER]-compute@developer.gserviceaccount.com.

Audit​

From Google Cloud Console​
  1. Go to the VM instances page by visiting: https://console.cloud.google.com/compute/instances.

... see more

Remediation​

Open File

Remediation​

From Google Cloud Console​

  1. Go to the VM instances page by visiting: https://console.cloud.google.com/compute/instances.
  2. Click on the instance name to go to its VM instance details page.
  3. Click STOP and then click EDIT.
  4. Under the section API and identity management, select a service account other than the default Compute Engine service account. You may first need to create a new service account.
  5. Click Save and then click START.

From Google Cloud CLI​

  1. Stop the instance:

         gcloud compute instances stop <INSTANCE_NAME>
  2. Update the instance:

         gcloud compute instances set-service-account <INSTANCE_NAME> --service-account=<SERVICE_ACCOUNT>
  3. Restart the instance:

         gcloud compute instances start <INSTANCE_NAME>

policy.yaml​

Open File

Linked Framework Sections​

SectionSub SectionsInternal RulesPoliciesFlags
πŸ’Ό CIS GCP v1.2.0 β†’ πŸ’Ό 4.1 Ensure that instances are not configured to use the default service account - Level 1 (Automated)1
πŸ’Ό CIS GCP v1.3.0 β†’ πŸ’Ό 4.1 Ensure That Instances Are Not Configured To Use the Default Service Account - Level 1 (Automated)1
πŸ’Ό CIS GCP v2.0.0 β†’ πŸ’Ό 4.1 Ensure That Instances Are Not Configured To Use the Default Service Account - Level 1 (Automated)1
πŸ’Ό CIS GCP v3.0.0 β†’ πŸ’Ό 4.1 Ensure That Instances Are Not Configured To Use the Default Service Account - Level 1 (Automated)1
πŸ’Ό Cloudaware Framework β†’ πŸ’Ό Secure Access53
πŸ’Ό FedRAMP High Security Controls β†’ πŸ’Ό IA-5 Authenticator Management (L)(M)(H)61432
πŸ’Ό FedRAMP Low Security Controls β†’ πŸ’Ό IA-5 Authenticator Management (L)(M)(H)132
πŸ’Ό FedRAMP Moderate Security Controls β†’ πŸ’Ό IA-5 Authenticator Management (L)(M)(H)432
πŸ’Ό ISO/IEC 27001:2022 β†’ πŸ’Ό 8.2 Privileged access rights710
πŸ’Ό ISO/IEC 27001:2022 β†’ πŸ’Ό 8.9 Configuration management12
πŸ’Ό NIST CSF v1.1 β†’ πŸ’Ό PR.AC-1: Identities and credentials are issued, managed, verified, revoked, and audited for authorized devices, users and processes1930
πŸ’Ό NIST CSF v2.0 β†’ πŸ’Ό PR.AA-01: Identities and credentials for authorized users, services, and hardware are managed by the organization38
πŸ’Ό NIST CSF v2.0 β†’ πŸ’Ό PR.AA-03: Users, services, and hardware are authenticated32
πŸ’Ό NIST CSF v2.0 β†’ πŸ’Ό PR.AA-05: Access permissions, entitlements, and authorizations are defined in a policy, managed, enforced, and reviewed, and incorporate the principles of least privilege and separation of duties88
πŸ’Ό NIST SP 800-53 Revision 5 β†’ πŸ’Ό IA-5 Authenticator Management1816
πŸ’Ό PCI DSS v3.2.1 β†’ πŸ’Ό 2.1 Always change vendor-supplied defaults and remove or disable unnecessary default accounts before installing a system on the network.18
πŸ’Ό PCI DSS v3.2.1 β†’ πŸ’Ό 2.1.1 For wireless environments connected to the cardholder data environment or transmitting cardholder data, change ALL wireless vendor defaults at installation, including but not limited to default wireless encryption keys, passwords, and SNMP community strings.2
πŸ’Ό PCI DSS v4.0.1 β†’ πŸ’Ό 2.2.2 Vendor default accounts are managed.8
πŸ’Ό PCI DSS v4.0.1 β†’ πŸ’Ό 2.3.1 For wireless environments connected to the CDE or transmitting account data, all wireless vendor defaults are changed at installation or are confirmed to be secure.2
πŸ’Ό PCI DSS v4.0.1 β†’ πŸ’Ό 2.3.2 For wireless environments connected to the CDE or transmitting account data, wireless encryption keys that are changed.2
πŸ’Ό PCI DSS v4.0 β†’ πŸ’Ό 2.2.2 Vendor default accounts are managed.8
πŸ’Ό PCI DSS v4.0 β†’ πŸ’Ό 2.3.1 For wireless environments connected to the CDE or transmitting account data, all wireless vendor defaults are changed at installation or are confirmed to be secure.2
πŸ’Ό PCI DSS v4.0 β†’ πŸ’Ό 2.3.2 For wireless environments connected to the CDE or transmitting account data, wireless encryption keys that are changed.2
πŸ’Ό SOC 2 β†’ πŸ’Ό CC6.3-1 Creates or Modifies Access to Protected Information Assets3
πŸ’Ό SOC 2 β†’ πŸ’Ό CC6.3-2 Removes Access to Protected Information Assets3
πŸ’Ό SOC 2 β†’ πŸ’Ό CC6.3-3 Uses Access Control Structures14