Google Cloud Secret Manager
What you'll learn: How Google Cloud Platform provides a managed service to store, access, and audit secrets with built-in IAM integration and automatic replication across regions.
What is Google Cloud Secret Manager?
Google Cloud Secret Manager is GCP's fully managed secrets storage service, similar to AWS Secrets Manager and Azure Key Vault (which you've already learned about). It stores API keys, passwords, certificates, and other sensitive data as encrypted "secret versions" that your applications can retrieve at runtime.
Think of it as a secure vault that lives in Google Cloud, where each secret can have multiple versions (for rotation), and access is controlled by the same IAM policies you use for other GCP resources.
Core Features
IAM Integration: Access control works through standard GCP IAM roles like roles/secretmanager.secretAccessor. You grant service accounts or users permission to read specific secrets, following the principle of least privilege you learned earlier.
Automatic Replication: Secrets are automatically replicated across multiple locations within a region or globally, depending on your replication policy. This provides high availability without manual configuration—if one zone fails, your app can still retrieve secrets from replicas.
Secret Versions: Every time you update a secret, Secret Manager creates a new version. You can access specific versions or always retrieve the latest, making rotation seamless without breaking existing deployments.
Basic Usage Pattern
Applications authenticate using workload identity or service account keys, then request secrets by name. The Secret Manager API validates IAM permissions, retrieves the encrypted secret, decrypts it server-side, and returns the plaintext value over an encrypted channel.
All access attempts are logged to Cloud Audit Logs, giving you the audit trail you learned about in the secrets lifecycle lesson.
Key Takeaway: Google Cloud Secret Manager centralizes secret storage with native GCP IAM integration and automatic multi-zone replication, enabling secure access control and high availability for your application secrets.