tech/google/cloud/security

SECURITY

GCP security skill (stub). Use when: (1) modelling Cloud IAM policies — principals, roles, conditions, policy-simulator,

production gcloud CLI, Secret Manager v1, KMS v1, Cloud Armor (HTTPS LB)
requires: tech/google/cloud

GCP Security (stub)

Status: stub. Production depth pending. Contribute production patterns via PR.

In scope

AreaKey services
IdentityCloud IAM, Workload Identity Federation, IAM Conditions, Policy Simulator
SecretsSecret Manager (replication, rotation, version mgmt)
EncryptionCloud KMS (CMEK, HSM, External Keys, auto-rotation)
Edge securityCloud Armor (WAF rules, bot management, rate limits, DDoS)
Data perimeterVPC Service Controls (egress/ingress rules around GCP APIs)
AuditCloud Audit Logs, Access Transparency, Access Approval

Quick start

# Secret Manager — store + mount
gcloud secrets create db-url --replication-policy automatic
echo -n "postgres://..." | gcloud secrets versions add db-url --data-file=-

# Cloud Run mounts the latest version as an env var
gcloud run services update my-service --region africa-south1 \
  --set-secrets DB_URL=db-url:latest

# KMS — create a key ring + key for encrypting Cloud SQL / BQ at rest with CMEK
gcloud kms keyrings create my-ring --location africa-south1
gcloud kms keys create bq-cmek \
  --location africa-south1 --keyring my-ring \
  --purpose encryption --rotation-period 90d --next-rotation-time +90d

Gotchas (high-level)

See Also