Google PCA: Security, Compliance and Data Protection Architecture — Study Guide
Part of the Google Professional Cloud Architect — Study Guide. Practice with verified answers in the Google exam hub, or take timed practice tests on ExamRoll.io.
Overview
Security, compliance, and data protection in Google Cloud are built on shared responsibility and defense in depth. Google secures the underlying infrastructure, while you architect secure identities, networks, applications, and data handling. Adopt Zero Trust as a guiding model: never implicitly trust the network, continuously verify identity and context, and strictly enforce least privilege. Design for compromise: assume credentials can leak, endpoints can be probed, and internal services can be misused. Compensate with multiple controls (preventive, detective, responsive), strong cryptography and key management, robust monitoring, and practiced incident response.
Trade-offs are inevitable. Stronger controls can increase latency, operational complexity, and costs. Your architecture should explicitly weigh risks against usability and performance while preserving provable compliance and forensics readiness.
Identity and Access Architecture
Principles and model
- Least privilege by default: grant the smallest set of permissions required to complete a task, and prefer predefined roles or custom roles over primitive roles (Owner, Editor, Viewer).
- Separation of duties: split roles across builders (CI/CD), deployers, operators, and security. Use break-glass accounts with strong controls and logging for emergencies.
- Zero Trust enforcement: use context-aware access to verify user, device, location, and risk; require strong MFA; and continuously evaluate session context.
- Organization policy and IAM Deny: codify guardrails (for example, disallow service account key creation, restrict domain sharing) and use deny policies to enforce non-negotiable boundaries.
IAM implementation and service-account strategy
- Establish a hierarchy-driven access model: folders reflect lines of business or environments (prod, non-prod); projects isolate blast radius and billing; service accounts (SAs) represent workloads.
- One workload, one service account: avoid sharing SAs across unrelated services. Tag permissions to the deployment scope (project) and resource scope.
- Prefer short-lived credentials via Service Account Impersonation and Workload Identity Federation. Disable user-managed service account keys; if unavoidable, isolate use, rotate frequently, and monitor with audit logs.
- Use Access Boundaries to restrict what an impersonated SA can access at request time (for example, limit GCS object paths), containing blast radius even if a privileged SA is misused.
- Conditional IAM: apply resource-level conditions (time, IP, principal attributes) to constrain access. Example: disallow production access except from corporate IP ranges and during change windows.
Failure modes and trade-offs
- Over-privileged roles (e.g., Editor at project scope) inflate risk; prefer granular roles and validate via policy analyzers.
- Service account key sprawl in CI/CD and local scripts is a common breach vector; with impersonation, some legacy tools may need adaptation.
- IAM Deny policies are powerful but can be difficult to troubleshoot; stage and test changes in non-production with explicit dry runs.
Example (impersonation without creating keys):
- gcloud auth print-access-token –impersonate-service-account=svc-ci@proj.iam.gserviceaccount.com
Data Protection and Cryptography
- Cloud KMS and key management models
- Native encryption at rest is default. For additional control, use Customer-Managed Encryption Keys (CMEK) with services like BigQuery, Cloud Storage, Compute Engine disks, Pub/Sub, and GKE persistent volumes.
- Design a key hierarchy by environment and data domain. Use separate keyrings per location and separate keys per application or dataset to confine blast radius.
- Rotation: enable scheduled rotation and deprecate older key versions gracefully with envelope encryption for applications. Validate consumer compatibility before increasing rotation frequency.
- External Key Manager (EKM) and External Key Access (EKA) place keys outside Google Cloud for regulatory control. Trade-offs include added latency and dependency on external HSM availability; plan for degraded-mode operations.
- Enforce IAM least privilege on CryptoKeys. Use key-level audit logs for access evidence.
Example (CMEK with rotation):
gcloud kms keyrings create app-ring –location=us-central1
gcloud kms keys create data-key –keyring=app-ring –location=us-central1 –purpose=encryption –rotation-period=90d
Application-level encryption
- Use envelope encryption (for example, Tink) to encrypt sensitive fields at the application tier, enabling selective access and tenant data isolation. Derive per-tenant keys to minimize cross-tenant impact.
- Validate integrity (AEAD) to prevent tampering and replay.
Secret Manager and secret lifecycle
- Store credentials, tokens, and API keys as versioned secrets; never in images, Git, or instance metadata. Grant IAM at the secret or project level to the runtime service account.
- Rotation: automate using Pub/Sub-triggered Cloud Functions/Cloud Run to create a new version, update dependents, and revoke old versions. Prefer replacing long-lived DB passwords with IAM-based database auth or short-lived tokens.
- Configuration security: separate non-secret config (ConfigMap, environment variables) from secrets. Prevent secret exposure in logs and error messages.
Example (add new secret version):
gcloud secrets versions add db-password –data-file=password.txt –secret=db-password
Compute hardening and confidential computing
- Shielded VMs: enable secure boot, vTPM, and integrity monitoring to protect against bootkits and rootkits. Enforce via organization policy and validate in CI/CD pipelines.
- Confidential VMs: memory encryption by default protects data-in-use with minimal configuration changes; evaluate performance impact for high-throughput, crypto-heavy workloads.
- Hardened images: start from Google-optimized or CIS-hardened baselines; manage patching with OS Config, and disable unnecessary packages and ports.
Network and Edge Security
Network segmentation and egress control
- Segment by tier and sensitivity using separate VPCs, subnets, and hierarchical firewall policies. Combine identity-aware firewall tags with service-to-service constraints (for example, GKE NetworkPolicy) to enforce east-west controls.
- Control egress with Cloud NAT, DNS policies, and restricted Private Google Access to minimize data exfiltration. Use explicit egress allowlists and proxy inspection where justified.
VPC Service Controls (VPC SC)
- Build service perimeters around projects hosting data-in-scope to mitigate exfiltration from Google-managed APIs (GCS, BigQuery, Secret Manager, Pub/Sub, etc.).
- Access levels: define context conditions (user identity, IP ranges, device posture) that must be satisfied to access perimetized services.
- Use perimeter bridges for controlled multi-perimeter workflows and egress rules to restrict destinations. Test with dry-run mode to avoid breaking pipelines.
- Limitations: does not protect traffic to Compute Engine IPs directly; complement with firewall and egress controls. Some tools and hybrid patterns may require perimeter-aware service accounts and Private Service Connect to restricted VIPs.
Edge and application protection
- Cloud Armor: defend HTTP(S) applications behind the global external load balancer with L3/L4/L7 DDoS mitigation, IP allow/deny lists, geo-based controls, and rate limiting.
- WAF rules: apply preconfigured managed rules and custom signatures for OWASP Top 10; tune to reduce false positives. Attach per backend service to tailor policies by API version or app component.
- API protection: front APIs with API Gateway or Apigee for authentication, quota, schema validation, and threat detection; integrate Cloud Armor for edge enforcement; consider reCAPTCHA Enterprise and bot controls where appropriate.
- Trade-offs: deeper inspection can add latency and operational noise. Stage rules in preview mode, monitor logs, and progressively enforce.
Security Operations, Monitoring, and Compliance
Security Command Center (SCC) and threat detection
- SCC aggregates asset inventory and findings across projects and organizations. Use it to baseline posture (public buckets, open firewall rules), track drift, and drive remediation workflows.
- Premium threat detection includes Event Threat Detection, VM Threat Detection, and Container Threat Detection to identify malware, cryptomining, and anomalous behavior.
- Integrate findings with ticketing and SOAR pipelines; define suppression/exception policies with expiration to avoid alert fatigue.
Vulnerability and artifact security
- Use Artifact Analysis to scan container images for CVEs; enforce deploy-time policies with Binary Authorization and signed attestations from CI.
- Patch management via OS Config; monitor exposure windows and automate rollouts with canaries.
Audit logs, privacy, and evidence
- Cloud Audit Logs provide Admin Activity and System Event logs by default; Data Access logs can be enabled per service and are chargeable. Route logs to BigQuery for analytics and to Cloud Storage for immutable retention and legal hold.
- Data classification: use Cloud DLP to discover and classify PII, apply labels and tags, and map to protection levels (CMEK, VPC SC, Confidential VMs).
- Privacy and data residency: constrain locations via organization policy; align CMEK and storage locations with regulatory requirements.
- Legal holds and retention: enable bucket retention policies and holds; use Object Versioning where needed. Document chain of custody for forensic images and logs to produce defensible evidence.
Incident response and forensic readiness
- Prepare runbooks, access paths, and automation. Ensure responders have least-privileged access and audit is enabled across org, folders, and projects.
- Containment: isolate instances by removing from load balancers, applying deny egress firewall rules, or moving projects into stricter org policies; disable compromised service accounts and rotate secrets and keys.
- Forensics: snapshot disks and export images for offline analysis; preserve logs via exports. Use packet mirroring where applicable. Avoid modifying evidence; work from copies.
- Recovery: rebuild from trusted images, rehydrate secrets, and validate with smoke and security tests. Conduct post-incident reviews and feed lessons into guardrails and detections.
Practical Problem Scenario
NimbusPay, a fintech SaaS, must process PCI-tagged data across multi-tenant microservices on Google Cloud, enforce data residency in the EU, protect against API-layer attacks, and produce auditable evidence of controls. They will roll out a new v2 API while keeping v1 live under the same hostname.
Approach:
- Partition projects and identities
- Create separate projects per environment and microservice tiers (ingest, processing, reporting). Assign a unique workload service account per service. Rationale: isolates blast radius and maps least privilege to discrete workloads.
- Enforce Zero Trust and least privilege
- Grant predefined/custom roles to service accounts and devops groups; apply conditional IAM to restrict production access to corporate IPs and hours. Rationale: reduces lateral movement and accidental changes.
- Remove static service account keys
- Disable user-managed SA keys via organization policy. Use Service Account Impersonation for CI/CD and operations; apply Access Boundaries limiting GCS paths per tenant. Rationale: eliminates a frequent credential leak vector and constrains data access even if tokens are stolen.
- Protect data with CMEK and regional controls
- Create Cloud KMS keyrings and keys in europe-west regions; enable CMEK for BigQuery datasets, GCS buckets, and Persistent Disks. Configure scheduled rotation and version monitoring. Rationale: provable cryptographic control aligned to EU residency and PCI.
- Adopt application-layer encryption for card data
- Use envelope encryption (Tink AEAD) with per-tenant data keys wrapped by CMEK; store only ciphertext in databases. Rationale: field-level protection and minimized scope during incident triage.
- Centralize secrets and rotate automatically
- Store DB creds and API tokens in Secret Manager with per-service IAM. Implement Pub/Sub-triggered rotation jobs that create new versions and update deployments. Where possible, switch to IAM DB authentication for Cloud SQL. Rationale: auditable secret lifecycle with minimal downtime.
- Segment networks and control egress
- Use hierarchical firewall policies to enforce web→API→DB flows; deny web→DB directly. Enable Cloud NAT with egress allowlists and Private Google Access (restricted) for Google APIs. Rationale: constrains east-west movement and blocks unsanctioned exfiltration.
- Wrap data services with VPC Service Controls
- Place BigQuery, GCS, and Secret Manager projects in a service perimeter; define access levels requiring corporate IP and managed devices. Test with dry-run, then enforce. Rationale: mitigates data exfiltration via stolen tokens or misconfigured clients.
- Secure the edge and APIs
- Front the global HTTPS load balancer with Cloud Armor managed rules and rate limiting. Use path-based routing to separate /v1 and /v2 to distinct backend services and apply tailored WAF policies per version. Integrate Apigee for auth, quotas, and schema validation. Rationale: layered API protection, smooth v1→v2 transition, and minimized false positives.
- Harden compute and attest artifacts
- Enable Shielded VMs and Confidential VMs for processing nodes; adopt CIS-hardened base images. Scan images in Artifact Registry, require signed attestations with Binary Authorization for GKE. Rationale: protects boot chain and data-in-use, and enforces supply-chain trust.
- Monitor posture and threats with SCC
- Enable SCC Premium to detect risky configs and runtime threats; integrate with ticketing for SLAs. Suppress accepted risks with expiration dates. Rationale: continuous assurance and actionable signal.
- Log, retain, and produce evidence
- Route Admin Activity, Data Access, and VPC Flow Logs to BigQuery and Cloud Storage with retention policies and legal holds. Tag datasets with residency and sensitivity labels. Rationale: supports investigations and external audits with scoped access.
- Prepare incident response and forensics
- Create runbooks to isolate compromised services by moving projects into a quarantine folder with stricter policies, disabling implicated SAs, and snapshotting disks for offline analysis. Rationale: fast containment with preserved evidence.
Short commands that support the rollout:
- gcloud kms keyrings create pci-ring –location=europe-west1
- gcloud kms keys create tenant-wrap –keyring=pci-ring –location=europe-west1 –purpose=encryption –rotation-period=90d
- gcloud access-context-manager levels create corp-devices –title=corp-devices –basic-level-spec=‘ipSubnetworks: [“203.0.113.0/24”]’
With these steps, NimbusPay achieves layered protection (identity, crypto, network, and edge), verifiable compliance, controlled API evolution under one hostname, and readiness to detect, contain, and recover from incidents.
← Networking · All domains · Reliability →
Practice these questions → · Timed practice on ExamRoll.io →
Pass the whole exam — not just this question
You found this answer. Get every verified question and explanation in one place, and save hours of prep. Free to start.
Pass your exam →