Overview
LowerPlane connects to Google Cloud Platform using a service account with read-only IAM roles. This provides visibility into your GCP security posture without any write access.
Prerequisites
Before connecting GCP to LowerPlane, ensure you have:
- A Google Cloud project with billing enabled
- Owner or IAM Admin permissions on the project
- A service account with the following roles:
- Security Reviewer (
roles/iam.securityReviewer) — Read IAM policies and service account details
- Compute Viewer (
roles/compute.viewer) — Read Compute Engine resources and firewall rules
- Monitoring Editor (
roles/monitoring.editor) — Access monitoring metrics and alerting policies
Services Monitored
| GCP Service | What LowerPlane Collects |
|---|
| Security Command Center | Security findings and vulnerability reports |
| Cloud Asset Inventory | Complete resource inventory across all projects |
| IAM | Service accounts, roles, and policy bindings |
| Cloud Logging | Audit log configuration and export settings |
| Cloud Storage | Bucket IAM and encryption settings |
| Compute Engine | Firewall rules and instance configurations |
| GKE | Kubernetes cluster security settings |
Manual Setup
Step 1: Create a Service Account
- Go to Google Cloud Console
- Select your project from the top dropdown
- Navigate to IAM & Admin > Service Accounts
- Click Create Service Account
- Enter the following:
- Name:
lowerplane-service-account
- Description:
Read-only service account for LowerPlane compliance monitoring
- Click Create and Continue
Step 2: Assign Roles
Add the following roles to the service account:
| Role | ID | Purpose |
|---|
| Security Reviewer | roles/iam.securityReviewer | Read IAM policies and service account details |
| Compute Viewer | roles/compute.viewer | Read Compute Engine resources and firewall rules |
| Monitoring Editor | roles/monitoring.editor | Access monitoring metrics and alerting policies |
| Viewer | roles/viewer | General read-only access to project resources |
| Security Center Findings Viewer | roles/securitycenter.findingsViewer | Read Security Command Center findings (if enabled) |
Click Continue, then Done.
Step 3: Create a Service Account Key
- Open the service account you just created
- Go to the Keys tab
- Click Add Key > Create new key
- Select JSON as the key type
- Click Create
A JSON key file will download automatically. Store this file securely — it provides access to your GCP project.
Step 4: Enable Required APIs
Navigate to APIs & Services > Library and enable the following APIs:
| API | Purpose |
|---|
| Cloud Resource Manager API | List projects and organizations |
| Cloud Asset API | Inventory all resources |
| Security Command Center API | Security findings (if available on your plan) |
| IAM API | Service account and policy details |
| Cloud Logging API | Audit log configuration |
| Compute Engine API | Firewall rules, instances, and network configuration |
| Cloud Monitoring API | Metrics and alerting policies |
Step 5: Connect in LowerPlane
- Go to Integrations in LowerPlane
- Find Google Cloud Platform and click Connect
- Enter your project ID (or multiple project IDs, comma-separated)
- Paste the full contents of the JSON key file into the Service Account Key field
- Click Connect
LowerPlane will validate the service account and begin syncing.
Automated Setup via Cloud Shell
You can automate the entire setup using Google Cloud Shell. Open Cloud Shell and follow these steps:
Set your project
gcloud config set project YOUR_PROJECT_ID
Create the setup script
cat > ./lowerplane-setup.sh << 'SCRIPT'
#!/bin/bash
# LowerPlane GCP Setup — run in Google Cloud Shell
# Creates a service account, assigns roles, enables APIs, and downloads the key.
#
# Usage:
# For single project: just run the script
# For multiple projects: edit EXTRA_PROJECTS below
SA="lowerplane-service-account"
KEY_FILE="$HOME/lowerplane-key.json"
CURRENT_PROJECT="$(gcloud config get-value project 2>/dev/null)"
# ── Validate project ─────────────────────────────────────────────────
if [ -z "$CURRENT_PROJECT" ] || [ "$CURRENT_PROJECT" = "(unset)" ]; then
echo ""
echo " ✗ No GCP project is set. Run one of the following first:"
echo ""
echo " gcloud config set project YOUR_PROJECT_ID"
echo ""
echo " List your projects with: gcloud projects list"
echo ""
exit 1
fi
# Verify the project actually exists and is accessible
if ! gcloud projects describe "$CURRENT_PROJECT" > /dev/null 2>&1; then
echo ""
echo " ✗ Project '$CURRENT_PROJECT' not found or not accessible."
echo " Check the project ID and your permissions."
echo ""
exit 1
fi
# Add additional project IDs here (space-separated) to grant cross-project access
EXTRA_PROJECTS=""
PROJECTS=("$CURRENT_PROJECT" $EXTRA_PROJECTS)
SA_EMAIL="$SA@$CURRENT_PROJECT.iam.gserviceaccount.com"
echo ""
echo "═══════════════════════════════════════════"
echo " LowerPlane GCP Integration Setup"
echo "═══════════════════════════════════════════"
echo " Service Account: $SA"
echo " Primary Project: $CURRENT_PROJECT"
echo " SA Email: $SA_EMAIL"
[ -n "$EXTRA_PROJECTS" ] && echo " Additional: $EXTRA_PROJECTS"
echo ""
# ── 1. Create service account ────────────────────────────────────────
echo "→ Step 1/4: Creating service account..."
if gcloud iam service-accounts describe "$SA_EMAIL" \
--project="$CURRENT_PROJECT" > /dev/null 2>&1; then
echo " ✓ Already exists"
else
if gcloud iam service-accounts create "$SA" \
--project="$CURRENT_PROJECT" \
--display-name="LowerPlane" \
--description="Read-only service account for LowerPlane compliance monitoring"; then
echo " ✓ Created"
else
echo " ✗ Failed to create service account. Check your permissions."
exit 1
fi
fi
echo ""
# ── 2. Assign roles to each project ─────────────────────────────────
echo "→ Step 2/4: Assigning IAM roles..."
ROLES=(
roles/viewer
roles/iam.securityReviewer
roles/compute.viewer
roles/monitoring.editor
)
for PROJECT in "${PROJECTS[@]}"; do
echo " Project: $PROJECT"
for ROLE in "${ROLES[@]}"; do
if gcloud projects add-iam-policy-binding "$PROJECT" \
--member="serviceAccount:$SA_EMAIL" \
--role="$ROLE" \
--quiet --no-user-output-enabled 2>/dev/null; then
echo " ✓ $ROLE"
else
echo " ✗ $ROLE (may need org-level access)"
fi
done
done
echo ""
# ── 3. Enable required APIs ──────────────────────────────────────────
echo "→ Step 3/4: Enabling APIs..."
APIS=(
cloudresourcemanager.googleapis.com
compute.googleapis.com
iam.googleapis.com
logging.googleapis.com
monitoring.googleapis.com
storage-component.googleapis.com
container.googleapis.com
sqladmin.googleapis.com
)
FAILED_APIS=()
for API in "${APIS[@]}"; do
echo -n " Enabling $API... "
if gcloud services enable "$API" \
--project="$CURRENT_PROJECT" \
--quiet; then
echo "✓"
else
echo "✗"
FAILED_APIS+=("$API")
fi
done
echo ""
if [ ${#FAILED_APIS[@]} -eq 0 ]; then
echo " ✓ All APIs enabled"
else
echo " ⚠ Failed to enable the following APIs:"
for API in "${FAILED_APIS[@]}"; do
echo " - $API"
done
fi
# ── 4. Create and download key ───────────────────────────────────────
echo "→ Step 4/4: Creating service account key..."
# Remove stale key file from a previous run
[ -f "$KEY_FILE" ] && rm -f "$KEY_FILE"
if gcloud iam service-accounts keys create "$KEY_FILE" \
--iam-account="$SA_EMAIL" \
--project="$CURRENT_PROJECT" 2>/dev/null; then
echo " ✓ Key saved to $KEY_FILE"
else
echo " ✗ Failed to create key. Verify the service account exists and you"
echo " have the iam.serviceAccountKeys.create permission."
exit 1
fi
# Trigger browser download in Cloud Shell (no-op outside Cloud Shell)
cloudshell download "$KEY_FILE" 2>/dev/null || true
echo ""
echo "═══════════════════════════════════════════"
echo " ✓ Setup complete!"
echo "═══════════════════════════════════════════"
echo ""
echo " Next steps:"
echo " 1. Copy the key file contents:"
echo " cat $KEY_FILE"
echo " 2. Go to LowerPlane → Integrations → GCP → Connect"
echo " 3. Enter project ID: $CURRENT_PROJECT"
[ -n "$EXTRA_PROJECTS" ] && echo " (additional: $EXTRA_PROJECTS)"
echo " 4. Paste the full JSON key contents"
echo " 5. Click Connect"
echo ""
echo " ⚠ Store the key securely. Delete it after pasting into LowerPlane:"
echo " rm $KEY_FILE"
SCRIPT
Make it executable and run
chmod +x ./lowerplane-setup.sh
./lowerplane-setup.sh
Copy the key
Once the script completes, copy the key file contents:cat ~/lowerplane-key.json
Paste the full JSON output into LowerPlane when connecting the GCP integration. Clean up
After pasting the key into LowerPlane, delete it from Cloud Shell:rm ~/lowerplane-key.json ./lowerplane-setup.sh
To monitor multiple projects, edit the EXTRA_PROJECTS variable at the top of the script before running. The script will grant the service account access to each project.
Multiple Project IDs
LowerPlane supports monitoring multiple GCP projects with a single service account. To set this up:
- Enter comma-separated project IDs in the Project ID field when connecting (e.g.,
project-prod, project-staging, project-dev)
- Grant the service account access to each additional project:
- Go to IAM & Admin > IAM in each project
- Click Grant Access
- Enter the service account email (
lowerplane-service-account@YOUR_PROJECT.iam.gserviceaccount.com)
- Assign the same roles listed above (Security Reviewer, Compute Viewer, Monitoring Editor, Viewer)
- Organization-level access (optional): Instead of granting access per project, assign roles at the organization level for visibility across all projects
Create the service account in your central/management project, then grant it cross-project access. This keeps credential management in one place.
Required APIs
The following APIs must be enabled in each project you want to monitor:
| API | Service | Enable Command |
|---|
cloudresourcemanager.googleapis.com | Cloud Resource Manager | gcloud services enable cloudresourcemanager.googleapis.com |
cloudasset.googleapis.com | Cloud Asset Inventory | gcloud services enable cloudasset.googleapis.com |
securitycenter.googleapis.com | Security Command Center | gcloud services enable securitycenter.googleapis.com |
iam.googleapis.com | IAM | gcloud services enable iam.googleapis.com |
logging.googleapis.com | Cloud Logging | gcloud services enable logging.googleapis.com |
compute.googleapis.com | Compute Engine | gcloud services enable compute.googleapis.com |
monitoring.googleapis.com | Cloud Monitoring | gcloud services enable monitoring.googleapis.com |
The Security Command Center API may require the Security Command Center to be activated at the organization level. If you cannot enable it, LowerPlane will still collect data from all other services.
Automated Tests
When GCP is connected, LowerPlane automatically creates and runs tests including:
- Organization policy constraints are enforced
- VPC firewall rules do not allow unrestricted access
- Cloud Storage buckets are not publicly accessible
- Cloud Storage bucket encryption is enabled
- Service account keys are rotated within 90 days
- Audit logging is configured for all services
- Binary authorization is enabled for GKE clusters