Overview
Implement defense-in-depth security for MCP Server on GKE with 67 security controls achieving CIS GKE Benchmark compliance and SOC 2 readiness.Security Controls
67 controls across 7 layers
Compliance
CIS, SOC 2, HIPAA-ready
Zero Trust
Network policies, mTLS, Workload Identity
Automated Scanning
Daily compliance checks
7-Layer Security Architecture
Layer 2: Compute (Shielded Nodes)
- Secure Boot (verify boot integrity)
- vTPM (hardware-based key storage)
- Integrity monitoring (detect tampering)
Automatic in GKE Autopilot
Layer 3: Network
- Private nodes (no public IPs)
- VPC-native networking
- Network policies (zero-trust)
- Cloud Armor (DDoS protection)
Layer 4: Data
- Encryption at rest (Google-managed or CMEK)
- Encryption in transit (TLS required)
- Secret Manager (no secrets in Git)
Layer 6: Application
- Binary Authorization (image signing)
- Container vulnerability scanning
- Pod Security Standards (restricted)
Quick Security Setup
1. Enable Binary Authorization
2. Configure Private Cluster
- Private Nodes Only
- Fully Private
3. Restrict Control Plane Access
4. Enable Security Posture Dashboard
Security Checklist
Infrastructure ✅
- GKE Security Posture enabled
- Audit logging enabled
- Shielded nodes (automatic in Autopilot)
- Workload Identity enabled
- VPC Service Controls (optional, high-security)
Network ✅
- Private nodes (no public IPs)
- VPC-native networking
- Network policies enforced
- Cloud NAT for egress
- Private endpoint (optional)
- Cloud Armor (enable via variable)
Application ✅
- Binary Authorization ready
- Container scanning (Trivy in CI/CD)
- Pod security standards (restricted)
- Non-root containers
- Read-only root filesystem
- Capabilities dropped (ALL)
Data ✅
- Encryption at rest (Google-managed)
- CMEK (optional, compliance)
- Encryption in transit (TLS)
- Secrets in Secret Manager
- No secrets in Git/ConfigMaps
- No service account keys
Identity ✅
- Workload Identity (no SA keys)
- IAM least privilege
- Per-workload service accounts
- RBAC policies
- SA key creation disabled (org policy)
Security Testing
Automated Scans
Run daily compliance scans:- Terraform security (Trivy, tfsec, Checkov)
- Kubernetes manifests (Trivy, kube-score)
- CIS GKE Benchmark (kube-bench)
- Secret scanning (Gitleaks, TruffleHog)
Manual Security Review
Check for Privileged Containers
Check for Privileged Containers
Should return: 0
Verify Network Policies
Verify Network Policies
At least 2 policies should exist
Audit Workload Identity
Audit Workload Identity
Review IAM Bindings
Review IAM Bindings
Compliance Frameworks
CIS GKE Benchmark
GKE Autopilot is pre-configured to meet CIS Benchmark requirements.
- ✅ 4.1.1 Workload Identity enabled
- ✅ 4.2.1 Network Policy enabled
- ✅ 4.3.1 Private cluster enabled
- ✅ 4.5.1 Audit Logging enabled
SOC 2 Type II
Required controls (all implemented):- ✅ Access control (Workload Identity + RBAC)
- ✅ Encryption (at rest + in transit)
- ✅ Audit logging (all access logged)
- ✅ Change management (Terraform + GitOps)
- ✅ Monitoring & alerting (Cloud Operations)
- ✅ Incident response (runbooks documented)
HIPAA Compliance
Requirements:- ✅ Encryption at rest (enable CMEK recommended)
- ✅ Encryption in transit (TLS required)
- ✅ Audit logs (configure 6+ year retention)
- ✅ Access controls (IAM + RBAC)
- ✅ Business Associate Agreement (sign with Google)
Security Monitoring
Critical Metrics
- Binary Auth Denials
- Privileged Pods
- Network Policy Violations
Incident Response
Security Incident Runbook
Related Documentation
Binary Authorization
Image signing and policy enforcement
Operations Runbooks
Security operations and incident response
Compliance Scanning
Automated security and compliance scanning
Security Best Practices
Additional security hardening best practices