Skip to main content

Triage and Remediation

Remediation

Using Console

To remediate the “Disable Serial Port Access Support at Organization Level” misconfiguration in GCP using the GCP console, follow these steps:
  1. Open the GCP console and navigate to the “IAM & Admin” section.
  2. Click on “Organization” and select your organization from the dropdown menu.
  3. Click on the “Policies” tab and scroll down to the “Compute Engine” section.
  4. Locate the policy for “Serial Port Access” and click on the “Edit” button next to it.
  5. In the policy editor, select “Deny” for the “SerialPortAccess” permission.
  6. Click on “Save” to update the policy.
This will disable Serial Port Access Support at the organization level in GCP. Note that this change may take some time to propagate across all resources in your organization.

To remediate the misconfiguration “Disable Serial Port Access Support at Organization Level” for GCP using GCP CLI, follow these steps:
  1. Open the GCP CLI and log in to your GCP account using your credentials.
  2. Run the following command to disable serial port access support at the organization level:
  1. Once the command is executed successfully, the serial port access support will be disabled at the organization level.
  2. Verify the changes by running the following command:
This command will display the organization’s details, including the serial port access support status. If the serial port access support is disabled, it will be reflected in the output.Note: The above command is in alpha state and may change in the future. It is recommended to check the latest documentation before executing the command.
To disable Serial Port Access Support at the Organization Level in GCP using Python, you can follow these steps:
  1. First, you need to authenticate with the GCP API using a Service Account. You can create a Service Account with the necessary permissions in the GCP Console and download the Service Account Key as a JSON file.
  2. Install the Google Cloud SDK and the necessary Python libraries for interacting with the GCP API. You can do this by running the following command in your terminal:
  1. Import the necessary libraries and authenticate with the GCP API using the Service Account Key:
  1. Use the organizations.patch method to update the enableSerialPortAccess field of the Organization resource. Set the value of enableSerialPortAccess to False to disable Serial Port Access Support at the Organization Level:
  1. Verify that Serial Port Access Support has been disabled at the Organization Level by checking the enableSerialPortAccess field of the Organization resource:
And that’s it! You have successfully remediated the misconfiguration by disabling Serial Port Access Support at the Organization Level in GCP using Python.
This updates the existing Org Policy in-place (no resource replacement / outage).To verify, terraform plan should show an update (or creation) of google_org_policy_policy.disable_serial_port_access with rules[0].enforce changing to true and no other unrelated changes.