Intrigued by the art of cloud architecture? Discover how to design, develop, and manage robust, secure, scalable, and dynamic solutions on Google Cloud as you prepare for the Professional Cloud Architect exam!
Google Cloud automatically protects your data with default encryption at rest using the AES-256 algorithm before it is written to physical storage. This protection is applied at multiple layers, including the infrastructure, storage devices, and backups, so data is always redundantly safe. To manage encryption at massive scale, Google uses envelope encryption: a Data Encryption Key (DEK) encrypts a chunk of data, and a Key Encryption Key (KEK) encrypts (or "wraps") the DEK. The encrypted DEK is stored near the data to keep latency low, while the central KEKs are kept securely in a protected repository.
For organizations that need more control, Customer-Managed Encryption Keys (CMEK) let you manage your own keys through Cloud Key Management Service (KMS). This gives you administrative control over the key lifecycle, such as setting rotation schedules and access policies, plus full auditing of when and how keys are used. It also helps meet compliance rules that require customer key ownership. A higher-control option is Customer-Supplied Encryption Keys (CSEK), where you provide your own raw keys for services like Compute Engine. However, CSEK places a heavy administrative burden because Google does not store these keys. Many organizations now prefer Cloud External Key Manager (EKM) to keep keys in a third-party system outside Google Cloud while maintaining better availability.
Google also protects data in transit using mutual authentication and encrypted internal communications, with short-lived tickets to prove a service is acting on behalf of a specific user. Choosing the right encryption strategy balances operational efficiency with compliance needs. Default encryption is best for a fully managed service with no extra cost or effort. CMEK and CSEK are essential when you must legally prove exclusive control over cryptographic material.
Cloud Key Management Service (Cloud KMS) is a central tool for managing cryptographic keys across Google Cloud. It handles the entire key lifecycle: creation, use, automated rotation, and retirement. Using a centralized service ensures encryption is consistent across different cloud resources. The key lifecycle includes several critical stages:
Properly managing these stages, including rotating certificate authority keys, helps prevent long-term exposure if a single key version is ever compromised.
Identity and Access Management (IAM) enforces the principle of least privilege by granting specific roles at the key or key ring level. For example, the Cloud KMS Admin role allows key maintenance, while the CryptoKey Encrypter/Decrypter role is strictly for using the keys. Assigning permissions at the most granular level reduces the risk of unauthorized access. Key Access Justifications adds an extra layer of security by requiring a reason code for every key access request, working with Access Approval to give full visibility and control over when and why data is decrypted. For sensitive items like passwords or API keys, use Secret Manager instead of Cloud KMS—choosing the right tool for each type of sensitive information is a critical part of security and compliance design.
Secret Manager centralizes the storage and management of sensitive information like API keys, passwords, and certificates. By decoupling this sensitive configuration from application source code, you keep credentials out of version control systems and make them easier to manage, audit, and secure across different cloud environments. Secret Manager uses envelope encryption internally: a Data Encryption Key (DEK) is encrypted by a Key Encryption Key (KEK) managed through Cloud Key Management Service (Cloud KMS). This ensures data remains unreadable even if the physical storage device is compromised.
Controlling access to secrets relies on Identity and Access Management (IAM) and the Principle of Least Privilege. Developers should avoid static keys and instead use Workload Identity or Service Accounts to gain programmatic access. Restricting access to the minimum necessary subset of secrets prevents unauthorized users from seeing data they do not need. Security experts recommend avoiding environment variables or local file systems to store secrets, because these can be easily leaked during an attack. Instead, applications should pull secrets directly from the Secret Manager API using official client libraries.
Key administration tasks include:
Prepare and test your skills
Prepare and test your skills
Customer-Managed Encryption Keys (CMEK) let you manage your own keys and lifecycles inside Cloud Key Management Service (Cloud KMS), whereas Customer-Supplied Encryption Keys (CSEK) require you to supply raw keys that Google does not store. Cloud External Key Manager (EKM) allows you to maintain keys in a third-party system outside Google Cloud while providing better availability than CSEK. Choosing among these options allows organizations to balance operational efficiency against strict regulatory requirements for key control.
Envelope encryption secures data by using a Data Encryption Key (DEK) to encrypt a chunk of data, and then wrapping the DEK with a Key Encryption Key (KEK). The encrypted DEK is stored near the data to maintain low latency, while the central KEKs are secured separately in a protected repository. Google Cloud uses this process automatically for default encryption at rest and internally within services like Secret Manager.
Secret Manager should be used specifically for storing and managing sensitive application credentials like API keys, passwords, and certificates, while Cloud KMS is designed for managing cryptographic keys. Secret Manager decouples sensitive configuration from application source code and eliminates the need to rely on insecure environment variables or local file systems. It also handles administrative tasks like secret rotation, versioning, and access auditing while using Cloud KMS internally for envelope encryption.
An enterprise organization is modernizing a multi-tier web application deployed across Google Cloud compute services. The application currently loads third-party API keys, TLS certificates, and database passwords from local plaintext configuration files bundled inside the container images and source code repository.
The security architect has established the following requirements:
Which solution should the architect implement?