SECURITY GUIDE
Scoping PCI DSS in the cloud: shrink the cardholder data environment
Published ยท 4 min read
Scope is the biggest cost lever in PCI DSS. Every system in scope needs controls, evidence and assessor time. A smaller scope means a smaller audit, a smaller attack surface and fewer late-night surprises. In the cloud, scope is mostly an architecture decision you make early.
Tip
The cheapest system to secure is the one that never sees a card number. Design so that as little of your estate as possible touches account data.
What "in scope" means
Scope covers the people, processes and technology that store, process or transmit account data, plus anything that is connected to them or could affect their security. Three groups matter in practice:
- The cardholder data environment (CDE). Systems that store, process or transmit account data.
- Connected-to systems. Anything with a path to the CDE, such as a shared network, a shared directory or a deployment pipeline.
- Security-impacting systems. Anything that could change the security of the CDE, such as identity, logging, key management and patching tools.
A system outside the CDE can still be in scope if it can reach it or control it. That is how cloud scope grows without anyone deciding it should.
Four ways to shrink scope
| Pattern | What it does | Watch out for |
|---|---|---|
| Hosted payment fields or redirect | Card entry happens on the payment provider's page, so your servers never receive the number | Your page may still carry script obligations, see payment page scripts |
| Tokenization | You store a token instead of the card number | The token service is in scope for whoever runs it |
| Isolation | The CDE lives in its own account, subscription or project with its own network | Isolation reduces scope only if it is really enforced and tested |
| Removal | Stop storing data you do not need, and purge old data | Backups, snapshots and logs often keep copies |
Which self-assessment questionnaire applies depends on how you take payments. Ask your acquirer or assessor, because getting this wrong changes your whole workload.
Cloud traps that quietly add scope
- A shared identity provider or directory that administers both CDE and non-CDE systems
- Shared logging, monitoring or security tooling with access into the CDE
- CI/CD pipelines that deploy into the CDE
- Jump hosts and VPN access that reach CDE networks
- A shared network hub, transit gateway or peering that connects environments
- Key management where one team administers keys for everyone
- Multi-tenant container clusters that run CDE and non-CDE workloads together
- Snapshots, images and backups made from systems that held card data
- Debug logs, error traces and analytics that capture card numbers by accident
- Support and ticketing tools where staff paste customer data
For each one, ask the same question: can this system reach, change or observe the CDE? If yes, it is in scope, or it needs a control that breaks the path.
Segmentation is a design choice you must prove
PCI DSS does not require segmentation, but it is the usual way to keep scope small. Segmentation controls have to be tested. Requirement 11.4.5 asks for penetration testing of segmentation controls at least every 12 months, and 11.4.6 asks service providers to do it every six months.
A useful test looks like this:
- From a non-CDE network, try to reach CDE hosts on every port and protocol.
- Try to reach management planes and metadata services.
- Try to use shared identities to cross the boundary.
- Record what you tried and what was blocked.
All of those attempts should fail, and the evidence should be kept.
A guardrail that helps: limit regions
Fewer regions means less to inventory and monitor. On AWS you can enforce approved regions for a PCI account with a service control policy. This is an example to adapt and test, not a drop-in policy.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyOutsideApprovedRegions",
"Effect": "Deny",
"NotAction": ["iam:*", "organizations:*", "support:*", "sts:*"],
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:RequestedRegion": ["eu-west-1", "eu-central-1"]
}
}
}
]
}
Azure Policy and Google Cloud organization policies can enforce the same idea with allowed locations.
Diagrams and scope confirmation
- Requirement 1.2.3 asks for accurate network diagrams.
- Requirement 1.2.4 asks for accurate diagrams of how account data flows.
- Requirement 12.5.2 asks you to document and confirm your scope at least every 12 months, and after significant changes.
A simple data-flow table is easier to keep current than a drawing alone:
| Step | Source | Destination | Data | Protocol | Stored? |
|---|---|---|---|---|---|
| 1 | Customer browser | Payment provider fields | Card number | TLS | No |
| 2 | Payment provider | Your API | Token | TLS | Token only |
| 3 | Your API | Order database | Token and order ID | TLS | Yes |
Find card data you did not mean to keep
Scope tends to grow because card numbers end up in places nobody planned. Scan storage buckets, databases, logs and ticketing systems for card-number patterns on a schedule, and treat a hit as an incident to fix, not just a finding to log. The cloud providers offer data discovery tools, and there are third-party options.
Checklist
- Decide how card entry happens, and choose hosted fields or redirect if you can
- Put the CDE in its own account, subscription or project
- List every system that can reach, change or observe it
- Remove or isolate shared tooling that does not need CDE access
- Enforce approved regions
- Test segmentation at least every 12 months, and keep the evidence
- Keep current network and data-flow diagrams
- Confirm scope every 12 months and after big changes
- Scan for stray card data on a schedule