Skip to main contentChat with us

ISO 27001:2022 Annex A  ·  Technological Control

A.8.31
Separation of development, test and production environments

To protect the production environment and its data from compromise caused by development and testing activities.

Last reviewed: June 12, 2026  ·  Authored by TÜV SÜD & BSI Certified Lead Auditors

Control Definition

Development, test, and production environments must be kept separate from one another and each secured in its own right, with the organization defining and enforcing the degree of separation needed to protect the live environment — covering the environments themselves, access to them, and the movement of code and data between them.

Control Objective

To protect the production environment and its data from compromise caused by development and testing activities.

What This Really Means

Production is the operating theater; development is the training lab. Nobody objects to experiments in the lab — the control exists to stop experiments happening on the patient. Every requirement in A.8.31 reduces to that one idea: the place where you try things must not be able to hurt the place where your customers live.

In practice, separation has several layers. Infrastructure: each environment runs in its own cloud account, subscription, or project — not just a naming prefix on shared resources. Access: developers hold broad rights in development and minimal, just-in-time rights in production, with separate credentials and secrets per environment so nothing leaks across. Code: changes move in one direction only, promoted from development through test into production via a controlled deployment path (A.8.32), never edited live. Data: the only sanctioned flow runs the other way, and production data enters lower environments only masked or anonymized (A.8.11, A.8.33). Add the human-error layer — environment-colored console banners, hostnames that say where you are — and you have the whole control.

The standard deliberately does not prescribe an architecture. It requires you to determine the level of separation your risk demands and then actually enforce it. That flexibility is what makes the control workable for a five-person startup: full segregation of duties may be impossible, but separate credentials, pipeline-only deployments, and logged break-glass access are compensating controls auditors accept — provided they are deliberate and documented rather than accidental.

For auditors, the heart of A.8.31 is two questions: who can touch production, and how does code get there? The classic findings cluster around the same patterns — a developer holding standing production admin "for convenience", the same secrets reused across environments, and last week's production customer data sitting unmasked in staging.

Why It Matters

A remarkable share of outages and breaches begin as an innocent action in the wrong place: an untested change applied directly to production, a load-test script pointed at the live database, a debug endpoint left enabled. Development and test environments are also softer targets by design — verbose logging, relaxed access, weaker monitoring — so when they contain production data or working production credentials, attackers do not need to attack production at all. They walk in through the environment nobody watches.

Separation is also what makes your other controls real. Testing only means something if production cannot change without passing it; change approvals are decorative if any engineer can hotfix live systems directly. Auditors know this, which is why a hole in A.8.31 tends to cascade into findings against neighboring controls.

When environments blur together, organizations face:

  • Untested changes hitting live systems – a direct production edit skips every test gate; one wrong configuration flag or query becomes an outage or a data-corruption incident
  • Production data leaking through soft environments – unmasked customer records copied into test inherit test's weaker controls, so a breached staging server becomes a reportable personal-data breach
  • Credential bleed-through – secrets shared or reused across environments mean a compromised development machine yields working production keys
  • Fat-finger disasters – identical-looking consoles invite running the right command in the wrong place; deleting the production database believing it was staging is an entire genre of postmortem
  • Unenforceable change control – if developers can write to production directly, A.8.32 approvals and pipeline gates can be bypassed silently, and the auditor will read both controls as failed

Regional Compliance Context

The classic A.8.31 violation — unmasked production data refreshed into test — carries a regulatory edge in this region. Under India's DPDP Act 2023, copying customer personal data into a development or test environment is still processing: purpose limitation and breach obligations apply to the staging copy exactly as they do to production, and CERT-In's 6-hour incident-reporting window does not distinguish between a breached production database and a breached staging server holding the same records. Saudi and UAE PDPL regimes take the same position for Gulf-market personal data. If non-production environments hold real personal data, they are inside your data protection scope — masking it (A.8.11) is almost always cheaper than securing test to production grade.

Implementation Guidance

1

Document Your Environment Model and Separation Rules

Define which environments exist (typically development, test or staging, and production), the level of separation between them, and the rules for moving code and data across boundaries. Capture this in your secure development or operations policy with a named owner — usually the engineering lead or CISO. A one-page diagram of environments, promotion paths, and data flows is worth more to an auditor than ten pages of prose.

2

Separate the Infrastructure Itself

Run each environment in its own cloud account, subscription, or project — the cloud-native equivalent of separate domains — or at minimum in separate VPCs and resource groups with network controls between them. Share no databases, queues, or storage between production and anything else. Make production networks unreachable from development except through the controlled deployment path.

3

Issue Separate Credentials and Secrets per Environment

Create distinct IAM roles, service accounts, API keys, and database users for each environment, and scope secret stores per environment so a leaked development secret opens nothing in production. Prohibit reuse outright. If any production secret has ever been used in a lower environment, rotate it now.

4

Make Production Access Just-in-Time, Not Standing

Remove standing developer admin rights in production (A.8.2). Humans get least-privilege, time-boxed, logged access granted on request; deployments run through the pipeline's service identity rather than personal accounts. Pair this with centralized logs and APM so engineers can debug production behavior without shelling into production systems.

5

Control Data Flowing Into Non-Production

Allow production data into test only masked, pseudonymized, or anonymized (A.8.11), with test data selected and protected per A.8.33. Build a sanctioned masked-refresh job so the safe route is also the convenient route, generate synthetic data where feasible, and require a documented, expiring exception for anything else.

6

Make Environments Impossible to Confuse

Add environment-colored banners to admin consoles, put environment names in shell prompts and hostnames, and use separate browser profiles for production work. These cues cost nearly nothing and prevent the most expensive class of human error — executing the right command against the wrong system.

7

Monitor the Boundary and Review It

Alert on production changes that did not arrive through the pipeline (configuration drift detection), review production access rights quarterly, and include separation checks in internal audits — verifying that compilers, debug modes, and development tooling are absent from production and that no unmasked personal data sits in test. Feed findings into the risk register.

Audit Evidence

During your ISO 27001 certification audit, auditors will expect to see the following evidence to demonstrate compliance with A.8.31:

Documentation

  • Documented environment architecture: environments, separation level, promotion path, and data-flow rules
  • Access control matrix or IAM policy export showing who holds what rights in each environment
  • Quarterly production access review records with the resulting removals
  • Exception register for production data used in testing, including masking or compensating controls and expiry dates
  • CI/CD configuration showing the promotion path and the deployment identity used for production releases

Interviews

  • Platform or DevOps engineer on how a change travels from a laptop to production and whether anyone can shortcut the path
  • A developer on what access they hold in production and how they debug live issues without standing admin rights
  • Engineering manager or CTO on how the chosen separation level was risk-assessed for the team's size and architecture

Observations

  • Live cloud console or IAM review confirming separate accounts or projects per environment with differing role assignments
  • Effective production permissions of a sampled developer account compared against their development permissions
  • Inspection of a test or staging dataset for unmasked production personal data

Practitioner Insights

Saundhi Chauhan

In small teams the same three engineers build, test, and operate everything, and they keep standing production admin "because someone has to fix the 2 a.m. outage". The fix is not hiring more people — it is removing standing access. The same humans, working through just-in-time elevation with logging, pipeline-only deployments, and a break-glass account for genuine emergencies, are a perfectly auditable model. What auditors will not accept is "we are small" presented as the entire justification, with no compensating controls and no record that anyone thought it through.

Saundhi Chauhan · ISO 27001, 27701 Lead Auditor
Surendra Pal Singh

The most reliable finding I encounter in this control is not the access model — it is the data. Environments are immaculately separated for code while production customer data is refreshed into staging every week, unmasked, justified as "we need realistic data for testing". When I trace data flows during an audit, the staging environment usually has weaker logging, broader access, and thinner monitoring, yet holds the same records as production. Treat the data-flow diagram as part of the control: if production data crosses the boundary unmasked, your real perimeter is your weakest environment.

Surendra Pal Singh · CISO, DPO, CISA, ISO 27001, 27701, 42001 Lead Auditor

Common Challenges & Solutions

Challenge

A five-engineer startup cannot give different people responsibility for development and production.

Solution

Separate identities instead of people: the same engineer uses different credentials per environment, production elevation is granted just-in-time with logging and expiry, and risky changes get a second pair of eyes at the pull-request stage. Document this as your risk-assessed separation level — deliberate compensating controls in writing pass audits; an informal "everyone has access to everything" does not.

Challenge

Developers insist they need production access to debug live issues.

Solution

Remove the need before removing the access. Centralized logging, APM, and error tracking move debugging into tooling instead of production shells; read-only roles cover most investigation; break-glass elevated access that auto-expires and notifies a second person covers true emergencies. In most teams, "we need prod access" turns out to mean "we need prod logs".

Challenge

Test environments quietly fill with production data because synthetic data never reproduces the bug.

Solution

Build the sanctioned path: an automated job that copies production data through masking (A.8.11) into test on a schedule, so the compliant option is also the most convenient one. Anything outside that path requires a documented exception with an expiry date. Then scan non-production stores periodically for real personal data to verify the rule is holding.

Challenge

Cost pressure means environments share a cluster or database server and are only logically separated.

Solution

Logical separation can be acceptable when it is risk-assessed and real: separate namespaces, separate database instances and users, network policies between workloads, and absolutely no shared credentials or secrets. Record the rationale and the compensating controls. When budget allows one upgrade, move production into its own account or project first — that single change buys most of this control.

Challenge

Urgent fixes get pushed straight to production, bypassing test, and the team calls it pragmatism.

Solution

Design the fast lane instead of pretending it will not be used: small-batch changes, an automated smoke-test stage that takes minutes, and a defined emergency change procedure (A.8.32) with retrospective review. Then alert on any production change that did not come through the pipeline, so bypasses become visible events with owners rather than silent habits.

Frequently Asked Questions

Does ISO 27001 require physically separate infrastructure for each environment?
No. The control requires you to determine and enforce a degree of separation sufficient to protect production — it does not prescribe an architecture. Separate cloud accounts or projects per environment are the practical gold standard; logical separation on shared infrastructure can pass if it is risk-assessed and genuinely enforced through distinct credentials, network controls, and unshared secrets.
How many environments do we need — is development plus production enough?
The control names development, test, and production but does not mandate a count. A two-environment model can be defensible for small products if real testing happens before promotion and the rules are documented; most teams converge on development, staging, and production because staging is where realistic pre-release verification lives. What fails audits is not the number of environments — it is testing in production because there was nowhere else to test.
Can developers ever have production access?
Yes — the control does not ban it; it requires that access be deliberate, minimal, and controlled. Read-only access to logs and telemetry is usually uncontroversial. The classic finding is standing administrative access held "for convenience"; the accepted pattern is just-in-time elevation with logging, expiry, and a recorded reason (see A.8.2).
Is it acceptable to test with production data?
Only when it is protected to an equivalent level, which in practice means masked, pseudonymized, or anonymized before it crosses the boundary (A.8.11), and selected and protected per A.8.33. Unmasked personal data in a test environment is simultaneously an audit finding and a live regulatory exposure under laws like the DPDP Act and GDPR.
We run serverless and managed PaaS — does environment separation still apply?
Yes, it just changes shape. Separation maps to separate stages, accounts, or projects, separate function configurations, and separate secrets and service identities per environment. The control is about blast radius and access, not servers — a development-stage function holding production credentials is exactly the failure A.8.31 targets.
How do A.8.31 and A.8.32 change management relate?
A.8.31 builds the lanes; A.8.32 governs the traffic. Separation makes the promotion path physically real — changes must travel from development through test into production — while change management supplies the approvals, testing evidence, and rollback planning for each trip. Auditors typically test the two together by tracing one change end to end.

Written By Expert Auditors

Saundhi Chauhan
Saundhi Chauhan
Lead Auditor
ISO 27001 Lead AuditorISO 27701 Lead Auditor
Surendra Pal Singh
Surendra Pal Singh
Chief Information Security Officer & Data Protection Officer
CISODPOCISAMCSEITILISO 27001 Lead AuditorISO 27701 Lead AuditorISO 42001 Lead Auditor
Last reviewed: June 2026Content verified by certified lead auditors

Get in touch

Book a free consultation or send us your requirements. We respond within 24 hours.

Quick Call

Pick a time slot

Send Requirements

Get a custom quote in 24 hours

We're Online

⚠️ Business inquiries only. Personal email addresses will be rejected.

24hr Response
Free Consultation
No Obligations