Professional Cloud Security Engineer
Prepare and test your skills
Prepare and test your skills
Google Cloud encrypts all data at rest by default using Google-managed encryption keys, but organizations often require greater control to satisfy strict compliance and governance requirements. Depending on the level of operational control and sovereignty needed, security teams can select between three primary customer-managed alternatives:
Integrating customer-managed keys across services such as BigQuery, Cloud Storage, and Cloud SQL requires precise alignment between network regions and security policies. The Cloud KMS key must reside in the exact same region or multi-region as the resource it protects to prevent cross-region operational failures. In addition, the target service's Google-managed service agent must hold the roles/cloudkms.cryptoKeyEncrypterDecrypter role on the specific key resource.
Managing the key lifecycle involves balancing automated key rotation policies with disaster recovery controls. Disabling or destroying a key immediately renders all data encrypted with that key permanently inaccessible, establishing a hard cryptographic erasure boundary. Security administrators must audit key access logs continuously and monitor key rotation lifecycles to protect operational availability while maintaining defense in depth.
Securing data in transit requires layered cryptographic controls that span external, hybrid, and internal network boundaries. Organizations use Cloud VPN with IPsec tunnels or Cloud Interconnect with MACsec to maintain confidentiality across hybrid and multi-cloud links. Internal traffic between Google Cloud services is automatically authenticated and encrypted using Application Layer Transport Security (ALTS) alongside modern TLS configurations. For administrative sessions, routing user traffic through Identity-Aware Proxy (IAP) provides context-aware authentication and end-to-end encryption before traffic reaches backend compute instances.
While transit and storage controls protect static and moving data, encryption in use safeguards active memory during live computation. Confidential Computing creates hardware-based Trusted Execution Environments (TEEs) that isolate workloads from the underlying host operating system and hypervisor without requiring application code changes. Organizations deploy Confidential VMs or Confidential Space to process sensitive datasets across several hardware-isolated architectures:
Cryptographic trust extends across storage and hardware components through verified roots of trust. Administrators can enable confidential modes for Hyperdisk Balanced to isolate block storage cryptographic operations inside a hardware enclave. Integrated hardware roots of trust like Titan and Caliptra continuously verify platform integrity and provide attestation proofs before sensitive workloads execute.
Client-side encryption safeguards data before it ever reaches cloud infrastructure, giving organizations full control over application payloads. Google recommends using the Tink cryptographic library, which provides uniform APIs across multiple programming languages to simplify complex cryptographic tasks. Tink enforces standard cryptographic practices and prevents common implementation errors when encrypting data before writing it to databases or object stores.
A four-step process flow of envelope encryption with Tink: the application generates a local Data Encryption Key (DEK), Cloud KMS wraps it with a Key Encryption Key (KEK), the ciphertext and wrapped DEK are stored together in Cloud Storage or BigQuery, and the wrapped DEK is returned to Cloud KMS to unwrap for local decryption. The animation moves a dot along each arrow in order, showing that the plaintext DEK is never stored.
At the core of this pattern is envelope encryption, which optimizes performance and key management at scale:
When applications store structured records in analytical platforms like BigQuery, field-level encryption protects sensitive fields without requiring whole-table encryption. BigQuery uses Authenticated Encryption with Associated Data (AEAD) functions and keysets to encrypt and decrypt individual columns directly within SQL queries. This approach ensures that only analysts with specific key access can read cleartext values, while unauthorized users see only ciphertext.
For broader compliance needs, Sensitive Data Protection provides advanced de-identification techniques that preserve data utility for analytical workloads:
These de-identification transformations can be combined with CMEK-backed keys and automated across enterprise data pipelines using Dataflow templates, creating a scalable compliance architecture.
Customer-Managed Encryption Keys (CMEK) store keys in Cloud Key Management Service (Cloud KMS) using software, hardware-backed Cloud HSM, or external mechanisms. Customer-Supplied Encryption Keys (CSEK) require clients to provide raw keys with every API call to Cloud Storage or Compute Engine, ensuring Google never stores the key material. External Key Management (Cloud EKM) stores keys in a third-party key manager outside Google Cloud to provide the highest regulatory sovereignty at the cost of dependencies on external network latency and availability.
The Cloud Key Management Service (Cloud KMS) key must reside in the exact same region or multi-region as the resource it protects to prevent cross-region operational failures. In addition, the target service's Google-managed service agent must be granted the roles/cloudkms.cryptoKeyEncrypterDecrypter role on that specific key resource.
An application generates a unique Data Encryption Key (DEK) locally to encrypt a data payload, and then wraps that DEK with a centralized Key Encryption Key (KEK) managed in Cloud Key Management Service (Cloud KMS). The application stores the encrypted DEK alongside the ciphertext and discards the plaintext DEK from memory. During decryption, the application sends the wrapped DEK to Cloud KMS to unwrap it with the KEK, enabling local decryption of the payload.
Confidential Computing establishes hardware-based Trusted Execution Environments (TEEs) that isolate active memory and workloads from the underlying host operating system and hypervisor without requiring application code changes. This memory protection is achieved through hardware architectures like AMD SEV or SEV-SNP, Intel TDX, and NVIDIA Confidential Computing for GPU memory. Hardware roots of trust such as Titan and Caliptra continuously verify platform integrity and provide attestation proofs before sensitive workloads execute.
A security engineer is configuring end-to-end encryption in transit between application microservices and a Google Cloud SQL for PostgreSQL database instance. The database instance is provisioned using a shared Certificate Authority (shared CA) mode and is accessed over Private Service Connect (PSC).
To satisfy strict compliance and zero-trust policies, client connections must enforce complete cryptographic server identity verification to prevent spoofing and Man-in-the-Middle (MitM) attacks.
Which configuration should the security engineer implement?
Configure a Cloud KMS Customer-Managed Encryption Key (CMEK) to sign database sessions and set the client to sslmode=require.
Retrieve the instance DNS name from Cloud SQL, create a DNS record for it in a VPC private Cloud DNS zone, and configure the database client to connect to that DNS name using sslmode=verify-full.
Configure the database client to connect directly to the Private Service Connect endpoint's internal IP address with sslmode=verify-full.
Connect directly to the Private Service Connect IP address and set the PostgreSQL client connection parameter to sslmode=verify-ca.