System and Communications Protection (SC) - Google Cloud Platform
Overview
Section titled “Overview”This guide provides gcloud commands and automated methods for collecting evidence related to NIST SP 800-53 and FedRAMP System and Communications Protection (SC) family controls in Google Cloud Platform environments.
Key GCP Services
Section titled “Key GCP Services”- VPC Networks: Virtual Private Cloud networking
- Cloud Armor: DDoS protection and WAF
- Cloud Load Balancing: SSL/TLS termination
- Cloud VPN: Encrypted connections
- Cloud KMS: Encryption key management
- VPC Service Controls: API security perimeters
Control Implementation Commands
Section titled “Control Implementation Commands”SC-7: Boundary Protection
Section titled “SC-7: Boundary Protection”List all VPC networks
gcloud compute networks list --project=PROJECT_IDList all firewall rules
gcloud compute firewall-rules list \ --format="table(name,direction,priority,sourceRanges,allowed[].ports,targetTags)" \ --project=PROJECT_IDCheck for overly permissive firewall rules
gcloud compute firewall-rules list \ --filter="sourceRanges:('0.0.0.0/0')" \ --format="table(name,allowed[].ports,targetTags)" \ --project=PROJECT_IDList Cloud Armor security policies
gcloud compute security-policies list --project=PROJECT_IDCheck VPC peering connections
gcloud compute networks peerings list --network=NETWORK_NAME --project=PROJECT_IDSC-8: Transmission Confidentiality and Integrity
Section titled “SC-8: Transmission Confidentiality and Integrity”List SSL certificates
gcloud compute ssl-certificates list --project=PROJECT_IDCheck HTTPS load balancers
gcloud compute target-https-proxies list --project=PROJECT_IDList VPN tunnels and gateways
gcloud compute vpn-tunnels list --project=PROJECT_IDgcloud compute vpn-gateways list --project=PROJECT_IDCheck Cloud Interconnect attachments
gcloud compute interconnects attachments list --project=PROJECT_IDSC-12: Cryptographic Key Establishment and Management
Section titled “SC-12: Cryptographic Key Establishment and Management”List all Cloud KMS keys
gcloud kms keys list --location=global --keyring=KEYRING_NAME --project=PROJECT_IDCheck key rotation schedules
gcloud kms keys describe KEY_NAME \ --location=LOCATION \ --keyring=KEYRING_NAME \ --format="table(name,rotationPeriod,nextRotationTime)" \ --project=PROJECT_IDList keys by protection level
gcloud kms keys list \ --location=global \ --keyring=KEYRING_NAME \ --filter="versionTemplate.protectionLevel=HSM" \ --project=PROJECT_IDSC-13: Cryptographic Protection
Section titled “SC-13: Cryptographic Protection”Check Cloud Storage bucket encryption
for bucket in $(gsutil ls); do echo "Bucket: $bucket" gsutil encryption get $bucketdoneList disks and their encryption status
gcloud compute disks list \ --format="table(name,zone,diskEncryptionKey.kmsKeyName:label=KMS_KEY)" \ --project=PROJECT_IDCheck default encryption settings for project
gcloud compute project-info describe \ --format="value(defaultServiceAccount,commonInstanceMetadata.items[key='google-compute-default-encrypt'])" \ --project=PROJECT_IDSC-23: Session Authenticity
Section titled “SC-23: Session Authenticity”Check load balancer session affinity
gcloud compute backend-services list \ --format="table(name,sessionAffinity,affinityCookieTtlSec)" \ --project=PROJECT_IDList instances with secure boot enabled
gcloud compute instances list \ --filter="shieldedInstanceConfig.enableSecureBoot=true" \ --format="table(name,shieldedInstanceConfig.enableSecureBoot)" \ --project=PROJECT_IDSC-28: Protection of Information at Rest
Section titled “SC-28: Protection of Information at Rest”Check bucket lifecycle policies for data retention
for bucket in $(gsutil ls); do echo "Bucket: $bucket" gsutil lifecycle get $bucketdoneList all customer-managed encryption keys (CMEK) usage
gcloud asset search-all-resources \ --scope=projects/PROJECT_ID \ --query="kmsKey:*" \ --format="table(name,assetType,kmsKey)"Automated Evidence Collection Scripts
Section titled “Automated Evidence Collection Scripts”Network Security Audit
Section titled “Network Security Audit”#!/bin/bash# Comprehensive network security audit
PROJECT_ID="YOUR_PROJECT_ID"OUTPUT_DIR="sc_audit_$(date +%Y%m%d)"mkdir -p $OUTPUT_DIR
# Firewall rules auditecho "=== Firewall Rules Audit ==="gcloud compute firewall-rules list --format=json > $OUTPUT_DIR/firewall_rules.json
# Find risky firewall rulesecho "=== Risky Firewall Rules ==="gcloud compute firewall-rules list \ --filter="sourceRanges:('0.0.0.0/0') AND allowed.ports:('22' OR '3389' OR '23')" \ --format=json > $OUTPUT_DIR/risky_firewall_rules.json
# VPC configurationecho "=== VPC Networks ==="gcloud compute networks list --format=json > $OUTPUT_DIR/vpc_networks.json
# SSL certificatesecho "=== SSL Certificates ==="gcloud compute ssl-certificates list --format=json > $OUTPUT_DIR/ssl_certificates.json
# VPN configurationecho "=== VPN Configuration ==="gcloud compute vpn-tunnels list --format=json > $OUTPUT_DIR/vpn_tunnels.jsongcloud compute vpn-gateways list --format=json > $OUTPUT_DIR/vpn_gateways.json
# Cloud Armor policiesecho "=== Cloud Armor Policies ==="gcloud compute security-policies list --format=json > $OUTPUT_DIR/cloud_armor_policies.jsonEncryption Audit
Section titled “Encryption Audit”#!/bin/bash# Audit encryption across all resources
PROJECT_ID="YOUR_PROJECT_ID"OUTPUT_DIR="encryption_audit_$(date +%Y%m%d)"mkdir -p $OUTPUT_DIR
# KMS keys inventoryecho "=== KMS Keys ==="for keyring in $(gcloud kms keyrings list --location=global --format="value(name)"); do gcloud kms keys list --keyring=$keyring --location=global --format=json >> $OUTPUT_DIR/kms_keys.jsondone
# Disk encryption auditecho "=== Disk Encryption ==="gcloud compute disks list \ --format="json(name,zone,diskEncryptionKey,sourceImageEncryptionKey)" > $OUTPUT_DIR/disk_encryption.json
# Check for unencrypted disksecho "=== Unencrypted Disks ==="gcloud compute disks list \ --filter="diskEncryptionKey.kmsKeyName:NULL" \ --format="table(name,zone)" > $OUTPUT_DIR/unencrypted_disks.txt
# Storage bucket encryptionecho "=== Storage Bucket Encryption ==="for bucket in $(gsutil ls); do echo "Bucket: $bucket" >> $OUTPUT_DIR/bucket_encryption.txt gsutil encryption get $bucket >> $OUTPUT_DIR/bucket_encryption.txt echo "---" >> $OUTPUT_DIR/bucket_encryption.txtdoneMonitor Network Security Events
Section titled “Monitor Network Security Events”#!/bin/bash# Monitor security-related network events
# Monitor firewall denialsgcloud logging read \ "resource.type=\"gce_subnetwork\" AND jsonPayload.rule_details.action=\"deny\"" \ --project=PROJECT_ID \ --format="table(timestamp,jsonPayload.rule_details.reference,jsonPayload.connection.src_ip,jsonPayload.connection.dest_ip)" \ --freshness=24h
# Monitor VPN connection issuesgcloud logging read \ "resource.type=\"vpn_gateway\" AND severity>=WARNING" \ --project=PROJECT_ID \ --format="table(timestamp,textPayload)" \ --freshness=24h
# Monitor SSL certificate expirationfor cert in $(gcloud compute ssl-certificates list --format="value(name)"); do expiry=$(gcloud compute ssl-certificates describe $cert --format="value(expireTime)") echo "Certificate: $cert expires on $expiry"doneVPC Service Controls Audit
Section titled “VPC Service Controls Audit”#!/bin/bash# Audit VPC Service Controls configuration
# List all access policiesgcloud access-context-manager policies list
# List service perimetersgcloud access-context-manager perimeters list \ --policy=POLICY_ID \ --format="table(name,title,perimeterType,status.resources)"
# Check for dry-run perimetersgcloud access-context-manager perimeters list \ --policy=POLICY_ID \ --filter="perimeterType=PERIMETER_TYPE_DRY_RUN"
# List access levelsgcloud access-context-manager levels list \ --policy=POLICY_ID \ --format="table(name,title,basic.conditions.ipSubnetworks)"Additional Resources
Section titled “Additional Resources”Page provenance
Community-maintained guidance. Use the edit link below to propose a sourced correction.
Was this page useful?
Help us prioritize the next improvement.