Skip to main content

โญ Repository โ†’ ๐Ÿ“ Compliance Engine โ†’ ๐Ÿ“ CloudAware โ†’ ๐Ÿ“ Google โ†’ ๐Ÿ“ GCE

๐Ÿ›ก๏ธ Google GCE Instance OS Login is not enabled๐ŸŸข

  • Contextual name: ๐Ÿ›ก๏ธ Instance OS Login is not enabled๐ŸŸข
  • ID: /ce/ca/google/compute-engine/instance-oslogin
  • Tags:
  • Policy Type: COMPLIANCE_POLICY
  • Policy Categories: SECURITY

Logicโ€‹

Similar Policiesโ€‹

Descriptionโ€‹

Open File

Descriptionโ€‹

OS login binds SSH certificates to IAM users and facilitates effective SSH certificate management.

Rationaleโ€‹

Enabling osLogin ensures that SSH keys used to connect to instances are mapped with IAM users. Revoking access to IAM user will revoke all the SSH keys associated with that particular user. It facilitates centralized and automated SSH key pair management which is useful in handling cases like response to compromised SSH key pairs and/or revocation of external/third-party/Vendor users.

Impactโ€‹

Enabling OS Login on project disables metadata-based SSH key configurations on all instances from a project. Disabling OS Login restores SSH keys that you have configured in project or instance meta-data.

Auditโ€‹

From Google Cloud Consoleโ€‹
  1. Go to the VM compute metadata page by visiting https://console.cloud.google.com/compute/metadata.
  2. Ensure that key enable-oslogin is present with value set to TRUE.
  3. Because instances can override project settings, ensure that no instance has custom metadata with key enable-oslogin and value FALSE.

... see more

Remediationโ€‹

Open File

Remediationโ€‹

From Google Cloud Consoleโ€‹

  1. Go to the VM compute metadata page by visiting: https://console.cloud.google.com/compute/metadata.
  2. Click Edit.
  3. Add a metadata entry where the key is enable-oslogin and the value is TRUE.
  4. Click Save to apply the changes.
  5. For every instance that overrides the project setting, go to the VM Instances page at https://console.cloud.google.com/compute/instances.
  6. Click the name of the instance on which you want to remove the metadata value.
  7. At the top of the instance details page, click Edit to edit the instance settings.
  8. Under Custom metadata, remove any entry with key enable-oslogin and the value is FALSE
  9. At the bottom of the instance details page, click Save to apply your changes to the instance.

From Google Cloud CLIโ€‹

  1. Configure oslogin on the project:

         gcloud compute project-info add-metadata --metadata enable-oslogin=TRUE
  2. Remove instance metadata that overrides the project setting.

         gcloud compute instances remove-metadata <INSTANCE_NAME> --keys=enable-oslogin

... see more

policy.yamlโ€‹

Open File

Linked Framework Sectionsโ€‹

SectionSub SectionsInternal RulesPoliciesFlagsCompliance
๐Ÿ’ผ CIS GCP v1.2.0 โ†’ ๐Ÿ’ผ 4.4 Ensure oslogin is enabled for a Project - Level 1 (Automated)1no data
๐Ÿ’ผ CIS GCP v1.3.0 โ†’ ๐Ÿ’ผ 4.4 Ensure Oslogin Is Enabled for a Project - Level 1 (Automated)1no data
๐Ÿ’ผ CIS GCP v2.0.0 โ†’ ๐Ÿ’ผ 4.4 Ensure Oslogin Is Enabled for a Project - Level 1 (Automated)1no data
๐Ÿ’ผ CIS GCP v3.0.0 โ†’ ๐Ÿ’ผ 4.4 Ensure Oslogin Is Enabled for a Project - Level 1 (Automated)1no data
๐Ÿ’ผ Cloudaware Framework โ†’ ๐Ÿ’ผ Secure Access55no data
๐Ÿ’ผ FedRAMP High Security Controls โ†’ ๐Ÿ’ผ AC-2 Account Management (L)(M)(H)10835no data
๐Ÿ’ผ FedRAMP Low Security Controls โ†’ ๐Ÿ’ผ AC-2 Account Management (L)(M)(H)4no data
๐Ÿ’ผ FedRAMP Moderate Security Controls โ†’ ๐Ÿ’ผ AC-2 Account Management (L)(M)(H)935no data
๐Ÿ’ผ ISO/IEC 27001:2022 โ†’ ๐Ÿ’ผ 5.15 Access control1430no data
๐Ÿ’ผ NIST CSF v2.0 โ†’ ๐Ÿ’ผ DE.CM-01: Networks and network services are monitored to find potentially adverse events118no data
๐Ÿ’ผ NIST CSF v2.0 โ†’ ๐Ÿ’ผ DE.CM-03: Personnel activity and technology usage are monitored to find potentially adverse events81no data
๐Ÿ’ผ NIST CSF v2.0 โ†’ ๐Ÿ’ผ PR.AA-01: Identities and credentials for authorized users, services, and hardware are managed by the organization38no data
๐Ÿ’ผ 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 duties91no data
๐Ÿ’ผ NIST CSF v2.0 โ†’ ๐Ÿ’ผ PR.DS-10: The confidentiality, integrity, and availability of data-in-use are protected111no data
๐Ÿ’ผ NIST SP 800-53 Revision 5 โ†’ ๐Ÿ’ผ AC-2 Account Management132034no data
๐Ÿ’ผ SOC 2 โ†’ ๐Ÿ’ผ CC6.1-4 Identifies and Authenticates Users46no data
๐Ÿ’ผ SOC 2 โ†’ ๐Ÿ’ผ CC6.1-6 Manages Points of Access57no data
๐Ÿ’ผ SOC 2 โ†’ ๐Ÿ’ผ CC6.1-8 Manages Identification and Authentication1824no data
๐Ÿ’ผ SOC 2 โ†’ ๐Ÿ’ผ CC6.1-9 Manages Credentials for Infrastructure and Software34no data