Guardrails: Organization Policy
IAM says who can act. Organization Policy says what is allowed at all, no matter who asks. Policies attach at the organization, folder or project level and are inherited.
| Constraint | What it does |
|---|---|
constraints/gcp.resourceLocations | Allow resources only in chosen regions (data residency) |
constraints/iam.disableServiceAccountKeyCreation | Stop key file creation |
constraints/compute.vmExternalIpAccess | Block public IPs on VMs |
constraints/storage.uniformBucketLevelAccess | Force uniform bucket access |
constraints/iam.allowedPolicyMemberDomains | Only your domain can be granted access |
constraints/compute.requireShieldedVm | Require Shielded VMs |
Encryption
- At rest: Google encrypts all customer data by default with Google-managed keys
- In transit: TLS between you and Google and between Google services
- Envelope encryption: data is encrypted with a data key, and the data key is encrypted by a key in KMS
| Key option | Who manages the key | Use when |
|---|---|---|
| Google-managed (default) | Most workloads | |
| CMEK (customer-managed, Cloud KMS) | You control rotation, disable, destroy | Compliance asks for key control |
| CMEK with Cloud HSM | Keys in hardware security modules | Stricter assurance |
| Cloud EKM | Keys stay in an external key manager | Keys must remain outside Google |
| CSEK | You supply the key on each request | Rare, limited products |
Cloud KMS in Practice
- Key rings and keys are in a location that should match the data
- Separate key admins from key users
- Destroying a key makes data unreadable (there is a scheduled destruction delay as a safety net)
Secret Manager
- Store passwords, API keys, certificates here, not in code, images or environment files
- Versions allow rotation and rollback
- Cloud Run and GKE can mount secrets directly
Audit Logs
| Log type | Content | Default |
|---|---|---|
| Admin Activity | Changes to configuration (create VM, change IAM) | Always on, free |
| Data Access | Reads and writes of data | Off for most services (turn on where needed), may cost |
| System Event | Google system actions | Always on |
| Policy Denied | Access blocked by security policy | On |
Send logs to a log bucket, BigQuery or Cloud Storage with a sink, and keep them in a separate security project.
Sensitive Data Protection (DLP)
- Finds and protects personal data such as card numbers, emails and national IDs in Cloud Storage, BigQuery and Datastore
- Actions: inspect, mask, tokenize, de-identify
- Useful for PII handling and privacy compliance
Compliance Basics
- Google Cloud has certifications such as ISO 27001, SOC 2, PCI DSS and supports HIPAA with a signed agreement. You still must configure services correctly
- Assured Workloads applies controls for regulated sectors
- Download audit reports from the Compliance Reports Manager
- Use Access Transparency and Access Approval to see and approve Google staff access in sensitive cases
Practice
- Apply an organization policy limiting resources to one region
- Create a key and a bucket that uses it as CMEK
- Store a password in Secret Manager and read it from a VM
- Turn on Data Access logs for Cloud Storage and read one entry
- Run a DLP inspection on a sample file
Conclusion
Organization Policy sets guardrails, Cloud KMS gives key control, Secret Manager keeps secrets out of code, audit logs record activity and DLP finds sensitive data. Combine them for governance and compliance.

