Secure
A Secure system protects identities, data, workloads and supply chains by default, not by checklist. Every edition of the BuiltForProd Baseline puts controls above every account, subscription or project that hold even against its administrator, gives people and pipelines one identity plane with no long-lived keys, encrypts data where it rests and moves, and runs detection from the first day.
How the layers fit
Each layer catches what the previous one cannot. The defense in depth page explains the principle; the sections below name what implements it in each edition.
How each edition delivers it
Every edition has the same six parts: preventive rules set above the units, groups and federated identities instead of users and keys, encryption with per-stage keys for secrets, a hub network with isolation domains, detection switched in one file, environments/core/security/security.hcl, and a supply chain scanned before every plan.
| Part | AWS Enterprise Baseline | Azure Enterprise Baseline | GCP Enterprise Baseline |
|---|---|---|---|
| Preventive | Three SCPs, the tag policy, the account baseline | Azure Policy at mg-acme: guardrails, regions, audit protection, tags | 19 organization policy constraints, IAM deny policies |
| Identity | IAM Identity Center, GitHub OIDC, EKS Pod Identity | Entra groups, Conditional Access, PIM, federated managed identities | Google groups, Privileged Access Manager, Workload Identity Federation |
| Secrets keys | KMS key per stage | Key Vault key per stage | Cloud KMS key per stage |
| Edge | Firewall Manager WAF on every load balancer | Front Door WAF policy from the Baseline's template | Cloud Armor policy from the Baseline's template |
| Detection | GuardDuty, Security Hub, Access Analyzer | Microsoft Defender for Cloud plans in every subscription | Security Command Center, 13 log-based detections, Artifact Analysis |
AWS Enterprise Baseline
Three service control policies (SCPs) attach to both organizational units and cannot be overridden from inside an account. acme-security-guardrails denies creating IAM users, login profiles and access keys, protects the S3 public-access block except for platform automation and SSO roles, and denies any action without MFA by a principal that is not an SSO session, an acme-* automation role, a service principal or a role tagged mfa-exempt. acme-region-restriction denies activity outside the home region, the regions with folders and us-east-1. acme-audit-protection denies stopping, deleting or updating CloudTrail and the AWS Config recorder. Every account gets default EBS encryption, the account-wide S3 public-access block and AWS Config recording. The service control policies explainer has the statements.
People sign in through IAM Identity Center only, with twelve permission sets assigned by ACME_* group: engineers hold PowerUser in sandbox, dev and staging and ReadOnly in prod, and auditor permission sets deny reading S3 objects, parameters, secrets, database data and log events. Pipelines authenticate through GitHub OIDC into the auto account: each blueprint repository has one role per stage that chains only into acme-terraform-deployer of that stage's account, Baseline plans and drift checks use a read-only role, and only the reviewed Baseline apply in the prod GitHub Environment can write to every account; workloads use EKS Pod Identity, with IRSA only for Fluent Bit. Customer-managed KMS keys with annual rotation protect the audit bucket, CloudTrail and one SOPS key per stage; bucket policies deny TLS below 1.2, CloudFront enforces TLSv1.2_2021, and load balancers listen on HTTPS only. The DocumentDB master password is written with write-only arguments, so it never reaches a plan or state.
Spokes route private traffic to the Transit Gateway and leave through the hub; isolation domains keep prod and nonprod on separate route tables. Firewall Manager attaches a baseline AWS WAF web ACL to every application load balancer in the workload accounts. EventBridge sends GuardDuty findings of severity 7 and above to the acme-security-alerts SNS topic and runs the SSM Automation that removes public access from an S3 bucket Security Hub reports as public.
| Service | Default | What it does |
|---|---|---|
| GuardDuty | On | Threat detection with S3 data events, EKS audit logs and EBS malware protection |
| Security Hub | On | Posture checks and finding aggregation; CIS v5, FSBP, PCI DSS v4.0.1 and tagging standards available |
| IAM Access Analyzer | On | External-access analyzer in the management account; unused-access analyzer (90 days) in security |
| Inspector | Off | EC2, ECR and Lambda vulnerability scanning |
| Macie | Off | S3 sensitive-data discovery |
| Shield Advanced | Off | DDoS protection for listed resources |
Every infrastructure repository runs tofu fmt, tflint, Checkov and Trivy before a plan; code repositories fail on fixable HIGH and CRITICAL image vulnerabilities; actions are pinned to commit SHAs and ECR tags are immutable.
Azure Enterprise Baseline
Azure Policy is assigned at mg-acme, so no subscription Owner can remove it. The acme-security-guardrails initiative denies storage accounts with shared-key access, public blob access, plain HTTP or TLS below 1.2, network interfaces with public IP addresses, and Key Vaults without soft delete or purge protection; it audits open management ports, Key Vault public network access and Kubernetes clusters reachable other than over HTTPS; and a custom definition denies role assignments to individual users. The region restriction denies other locations, the audit protection initiative uses DenyAction to block deleting diagnostic settings, the audit workspace and the audit storage, and the tag policy audits by default. acme-core-public holds the one exemption, for public blobs.
People get access only through 13 ACME_* Microsoft Entra groups plus ACME_BreakGlass. Five Conditional Access policies require MFA, block legacy authentication and require phishing-resistant MFA for privileged roles; they start report-only. With enable_pim, Owner and Security Admin move to PIM elevation groups whose membership is activated for at most 12 hours with MFA and a justification. Auditors hold Security Reader and the custom role acme-security-auditor, which has no data actions. Each blueprint repository signs in through one federated managed identity per stage, which accepts only that stage's GitHub Environment, and pods use Microsoft Entra Workload ID.
Every storage account has infrastructure encryption, HTTPS only and TLS 1.2. The audit storage uses a customer-managed RSA 3072 key rotated every 365 days, and the SOPS vault holds one RSA 4096 key per stage. Cosmos DB for MongoDB vCore accepts Microsoft Entra principals only and Azure Managed Redis has access keys disabled, so the application holds no database password. In the default egress mode Azure Firewall carries the isolation domains and the egress, the network security group of each workload subnet denies inbound traffic from the internet, the application vaults and the data stores sit behind private endpoints, and Front Door is the public entry of the web app, with a WAF policy in Prevention mode built from the Baseline's policies/waf-template.json.
Service (security.hcl) | Default | Price or scope as the code states it |
|---|---|---|
| Defender for Containers | On | About $7 per vCore of AKS nodes; runtime threat detection and registry image scanning |
| Defender for Storage | On | $10 per storage account; activity and sensitive-data threat detection |
| Defender for Key Vault, Resource Manager | On | $0.02 per 10,000 operations; about $4 per million management operations |
| Defender for Servers, Cosmos DB, CSPM, APIs | Off | Servers $15 per server; CSPM about $5 per billable resource |
| Storage malware scanning, Microsoft Sentinel | Off | $0.15 per GB scanned; $2.46 per GB in the analytics tier |
| DDoS Network Protection | Off | $2,944 per month for 100 public IPs |
plan.yml runs the guard scripts, tflint with the azurerm ruleset, Checkov as the gate and Trivy before any plan. Images are built in Azure Container Registry, which accepts Entra authentication only, and every pushed tag is locked against overwrite and deletion.
GCP Enterprise Baseline
19 organization policy constraints at the organization node bind every folder and project, project Owners included. By group: identity and keys (no service account key creation or upload, no automatic Editor grant for default service accounts, IAM members only from your Cloud Identity customer, workload identity pools only for GitHub's issuer); storage (public access prevention, uniform bucket-level access); compute (no external VM IPs, OS Login, Shielded VMs, no serial ports, no default network); networking (peering and Shared VPC hosts only under acme-core-network); services (Cloud Run ingress internal and load balancer only, no public Cloud SQL, contacts only on your domain); and locations (gcp.resourceLocations). IAM deny policies keep the audit sinks and buckets from being deleted or changed outside a short exception list, and keep the auditor groups from reading objects, secrets, table data and workload logs.
People get access only through 14 Google groups. The lead groups reach Owner only through Privileged Access Manager entitlements of at most 12 hours, on by default. Pipelines authenticate through Workload Identity Federation as one CI service account per blueprint repository and stage, and pods are IAM principals directly through Workload Identity Federation for GKE. Data is encrypted by Google by default; the central audit log bucket and the archive use a customer-managed Cloud KMS key, and each stage has a SOPS key, both rotated every 365 days. Firestore is reached over TLS with MONGODB-OIDC and Memorystore for Valkey with TLS and IAM authentication, so no data store password exists.
Production and non-production are separate VPCs peered only with the hub. A hierarchical firewall policy runs first, and each domain's network firewall policy ends by denying and logging every egress it did not allow. No VM has an external IP; egress leaves through Cloud NAT. Each public endpoint of the web app has a Cloud Armor policy built from the Baseline's policies/cloud-armor-template.json. Engineers reach private resources through Identity-Aware Proxy, not a VPN. GKE nodes are private, Dataplane V2 enforces network policy, and the application namespace enforces the Pod Security Standard restricted.
Switch (security.hcl, network.hcl) | Default | What it does, with the price the code states |
|---|---|---|
scc_tier | Standard | Security Command Center at the organization; Premium from $15,000 per year when subscribed |
enable_data_access_logs | On | Data Access audit logs for every service; $0.50 per GiB after 50 GiB per project per month |
enable_artifact_analysis | On | Vulnerability scanning on push, about $0.26 per image |
enable_cis_alerts | On | 13 log-based detections over the central audit bucket, free |
enable_scc_notifier | Off | Cloud Run notifier that logs findings and removes public bindings outside acme-core-public |
enable_cloud_armor_enterprise | Off | Hierarchical Cloud Armor policy on the plat folder, $3,000 per month |
enable_vpc_sc, enforce_vpc_sc | Off | VPC Service Controls perimeter around the plat projects, dry run first, free |
enable_ngfw_standard_threat_intel | Off | Threat-intelligence deny rules on the organization firewall policy |
Pre-commit runs the guard scripts, tflint with the google ruleset, Checkov and Trivy; plan.yml repeats the guards, tflint and Checkov. Artifact Registry tags are immutable.
How you verify it
AWS Enterprise Baseline
- Organizations console in the management account: three SCPs attached to the
coreandplatOUs. - IAM console in any member account: no IAM users;
acme-terraform-deployerpresent with a trust policy limited toacme-*-deployerroles in theautoaccount, andacme-terraform-readerlimited toacme-*-readerroles. - Security Hub summary in the
securityaccount: findings from every enrolled account, with GuardDuty and Access Analyzer as integrated products.
Azure Enterprise Baseline
az policy assignment list --scope /providers/Microsoft.Management/managementGroups/mg-acme, or the portal under Policy, Assignments:acme-sec-guard,acme-regions,acme-audit-protand the tag assignment.- Access control (IAM) of any subscription: role assignments to groups and identities, none to an individual user.
- Microsoft Defender for Cloud, Environment settings: the same plans on in every subscription.
GCP Enterprise Baseline
gcloud org-policies list --organization=161616161616: the 19 constraints.- IAM, Deny policies at the organization:
acme-audit-protection,acme-sa-protectionandacme-auditor-no-data. - Security Command Center findings view: findings from every project, with
acme-plat-sandboxmuted.
In every edition, security.hcl in the Baseline repository shows the switches above with their prices, and the security posture summary is the same material condensed into one page for a reviewer.