In PCI DSS, scope is everything. Any system that stores, processes, or transmits cardholder data—the cardholder data environment (CDE)—is in scope, and so is anything connected to it or able to affect its security, unless segmentation proves otherwise. Good segmentation shrinks the number of systems that must meet every PCI requirement, which reduces audit effort, cost, and risk. Weak segmentation pulls half your estate into scope and makes every change a compliance event.
Segmentation approach
- ReduceTokenise or outsource card handling where possible
- IsolateDedicated accounts and networks for the CDE
- RestrictExplicit allow-lists for every flow in and out
- MonitorLogs, file integrity, alerts on CDE boundaries
- ProveSegmentation testing and evidence
1. The best segmentation is less card data
Before designing networks, ask whether you need card data at all. Hosted payment pages, payment-provider JavaScript fields, and tokenisation services can keep primary account numbers out of your systems entirely, so only the provider's environment handles them. What remains in your estate is a token that is useless to an attacker. Many teams find that the right architecture reduces their CDE to a small integration service—or removes it.
2. Isolate the CDE at the account level
In the cloud, the strongest boundary is a separate account, subscription, or project. Place CDE workloads in dedicated accounts under their own organisational unit with stricter guardrails: approved regions only, mandatory encryption and logging, no public IP addresses except through controlled ingress, and restricted administrative access. Shared services such as CI/CD, logging, and identity that connect to the CDE are typically considered connected-to systems and need their own controls.
3. Network controls with explicit allow-lists
Inside and around the CDE, deny by default and allow only documented flows. Use security groups that reference other security groups rather than broad CIDR ranges, route egress through inspection, and keep the CDE's VPC or virtual network unpeered from non-CDE networks except through controlled paths. Every rule should map to a documented business justification, which PCI DSS requires you to review.
resource "aws_security_group" "cde_db" {
name = "cde-tokenvault-db"
description = "CDE token vault database - only payment API may connect"
vpc_id = aws_vpc.cde.id
tags = { pci_scope = "cde" }
}
resource "aws_vpc_security_group_ingress_rule" "db_from_payment_api" {
security_group_id = aws_security_group.cde_db.id
referenced_security_group_id = aws_security_group.payment_api.id
ip_protocol = "tcp"
from_port = 5432
to_port = 5432
description = "Payment API to token vault (change ticket PCI-142)"
}
# Deliberately no egress rules: with the standalone rule resources, the
# group has no outbound access, so the database cannot initiate connections.How does your cloud measure up?
Score your setup across foundation, delivery, reliability, security, and cost in 3 minutes—instant results, no email needed.
4. Segmentation inside Kubernetes
If card data flows through a Kubernetes cluster, the cluster's shared components—nodes, control plane access, CNI, and add-ons—can pull the whole cluster into scope. The cleanest option is a dedicated cluster for CDE workloads. If that is not practical, combine dedicated node pools with taints, strict namespace isolation, default-deny network policies, separate service identities, and admission policies, and agree with your assessor whether that design is acceptable.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-all
namespace: cde-payments
spec:
podSelector: {}
policyTypes: ["Ingress", "Egress"]
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-gateway-to-tokenizer
namespace: cde-payments
spec:
podSelector:
matchLabels:
app: tokenizer
policyTypes: ["Ingress"]
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: payment-gateway
podSelector:
matchLabels:
app: gateway
ports:
- protocol: TCP
port: 84435. Private connectivity to cloud services
CDE workloads still call cloud APIs for storage, keys, and queues. Use private endpoints so this traffic never crosses the internet, and add endpoint policies that restrict which resources can be reached through them. This prevents a compromised CDE workload from writing card data to an attacker's bucket through your own network path.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": ["s3:GetObject", "s3:PutObject"],
"Resource": [
"arn:aws:s3:::example-cde-tokenvault-backups/*",
"arn:aws:s3:::example-cde-artifacts/*"
]
}
]
}6. Administrative access and shared tooling
Attackers rarely break segmentation through the network; they use administrative paths. Require MFA for all access into the CDE, use separate administrator roles for CDE accounts, avoid shared bastion hosts by using session-manager style access with full logging, and make sure CI/CD pipelines deploying into the CDE use dedicated, restricted roles. Monitoring and logging agents that run in the CDE send data out—treat their destinations as connected systems and protect them accordingly.
7. Logging and monitoring at the boundary
- Flow logs for CDE networks, with alerts on traffic that violates expected patterns.
- Audit logs for every administrative action in CDE accounts, retained per your policy.
- File integrity or change detection on critical system files and configurations.
- Daily review of security events, which in practice means automated alerting with documented triage.
8. Prove segmentation works
PCI DSS requires penetration testing that validates segmentation controls when segmentation is used to reduce scope—at least annually for merchants and more frequently for service providers, and after significant changes. Make testing easier by keeping an up-to-date network diagram and data-flow diagram, codifying rules so they can be reviewed, and running automated reachability analysis between non-CDE and CDE networks after every infrastructure change. Cloud tools such as network reachability analysers can confirm that no path exists where none should.
Common segmentation failures
- Card data in application logs, analytics exports, or support tickets outside the CDE.
- A shared CI/CD runner with broad credentials into both CDE and non-CDE accounts.
- Peered networks with permissive routes added for a temporary migration and never removed.
- Kubernetes clusters where CDE and non-CDE pods share nodes without isolation.
- Undocumented firewall rules with no business justification or owner.
Keep diagrams and reality in sync
PCI DSS expects current network and data-flow diagrams, and assessors compare them with the actual environment. Diagrams drawn by hand drift within weeks. Generate as much as possible from infrastructure as code and cloud inventories, review them on every significant change, and store them with the change record. When the diagram, the code, and the reachability checks agree, segmentation testing becomes a confirmation rather than a discovery exercise.
Treat any change that could affect the CDE boundary—new peering, new pipeline role, new shared service—as a significant change that triggers a segmentation re-check.
Checklist
- Tokenisation or hosted payment flows to minimise card data in your systems.
- Dedicated CDE accounts under a restricted organisational unit.
- Default-deny networking with documented, reviewed allow rules.
- Dedicated clusters or strongly isolated namespaces and nodes for CDE workloads.
- Private endpoints with resource-restricted endpoint policies.
- Separate, MFA-protected admin access and restricted pipeline roles.
- Boundary logging, change detection, and reviewed alerts.
- Current network and data-flow diagrams, automated reachability checks, and periodic segmentation testing.
Segmentation that holds up is simple enough to explain on one diagram and strict enough that every exception has a ticket. Our Cloud Posture Hardening and Control & Evidence Ready modules design and evidence these boundaries for payment workloads.
Key takeaways
- Reduce CHD scope with clear trust boundaries before buying more tools.
- Segmentation must be technically enforced and evidenced—not only drawn.
- Tokenization and managed payment services often shrink scope more than DIY.
FAQ
Is a VPC enough for PCI segmentation?
Not by itself. You need controlled connectivity, identity boundaries, logging, and proof that out-of-scope systems cannot reach CHD stores.
What fails PCI cloud reviews most often?
Flat networks, shared admin jump boxes into CDE, weak key management, and incomplete flow diagrams that disagree with the live environment.