This article explains how you can connect your Google Cloud Organization account with PingSafe for detecting security vulnerabilities continuously
Prerequisites to Onboard GCP organization:
- User should have either GCP managed both "Owner & Organization Administrator" roles OR below permissions attached to existing user role:
iam.roles.create
iam.roles.get
iam.serviceAccounts.create
iam.serviceAccounts.setIamPolicy
resourcemanager.organizations.getIamPolicy
resourcemanager.organizations.setIamPolicy
resourcemanager.projects.getIamPolicy
resourcemanager.projects.setIamPolicy
- Click on the Settings ⚙️ button in the top right corner.
- From the left navigation panel click on "Cloud Configuration" button.
- Click on the "Add account" button in the top right corner.
- Click on the “Connect” button present under “Google Cloud Platform”.
- From the GCP console, make a note of your "ProjectID" & "OrganizationID".
- Select “Organization” from the “Onboard” option, fill in the “ProjectID”, “OrganizationID” and select the “Scan” Mode.
- Detect Mode: PingSafe has read-only access to the resources in your Google Cloud account.
- Detect & Auto remediate: PingSafe have read/write access to the resources. You will have to enable/disable this feature for each plugin that supports auto remediation.
- Enabling GCP Log Event integration during project/ organization onboarding. If you already have an existing Pub/Sub topic flowing gcp audit logs, you can enter that in the text box and click on "Next". We recommend leaving it empty (In this case PingSafe will create a new topic for
- Click on the “Next” button.
- Download the Terraform script and navigate to the Google Cloud Shell.
- Please remove any existing terraform (*.tf) or terraform state files (*.tfstate), as conflicts may arise once we upload PingSafe's terraform scripts.
rm *.tf*
- Upload the “Terraform” file which was downloaded above.
- Execute the below command in the same directory where the terraform file has been uploaded.
terraform init && terraform apply
- Enter “Yes” when prompted for confirmation.
- Wait for the command to get executed successfully.
- After the terraform code is successfully executed, observe that the “Service Account Key (JSON)” file has been created.
- Upload the downloaded file in PingSafe, review the credentials and click on the “Next” button.
- Delete the terraform script(.tf) and state(.tfstate) file from the gcp cloudshell.
- Select the “Projects'' to be linked to PingSafe. You can change it in PingSafe settings anytime.
- Click Next.
- Now enabled all the APIs required for PingSafe to communicate with GCP projects.
Download the “Terraform” scripts and navigate to the Google Cloud Shell. - Upload the “Terraform” script to the cloudshell and execute the below command.
terraform init && terraform apply
- Select the “I verify that the script has been executed successfully” tickbox and Click on the “Next” button.
- Select the “Compliance (optional)” and click on the “Finish” button.
- Note the GCP organization has been successfully onboarded to the PingSafe.