ISO/IEC 27001:2022 data governance framework for enterprise LLM deployment — Reference Architecture
The control that resolves this is a Classification-Routed Multi-Cloud Estate, evaluated before the request reaches a model provider rather than audited afterwards. In regulated enterprise the binding constraint is ISO/IEC 27001:2022, and the question it actually asks is is this risk on the register with a named owner and a treatment. The shape below holds p95 ≤ 600ms over REST over HTTPS, and ships with a standard-library implementation that runs as written.
Where the rollout actually stalls
Workloads span several providers and regions, and the decision of which model may see which data lives in prompt text, a wiki page, or a developer's judgement. That is not a control, so the governance board cannot approve the estate even though every individual component is defensible.
What ISO/IEC 27001:2022 specifically requires
ISO 27001 is a management-system standard: the auditor checks that risks are identified, owned, treated and reviewed on a cycle. A perfect technical control that is absent from the risk register is a nonconformity.
The artifact that satisfies it is risk register entries with owners, treatments and review dates. The way teams most often fail it: a technically sound control that no Statement of Applicability references, so it cannot be evidenced.
Risk register with acceptance criteria
Each row carries an acceptance parameter rather than an adjective, because "low latency" cannot be signed off. Retention here is bound by per the data class retention schedule, enforced automatically.
| Category | Risk | Control | Acceptance parameter |
|---|---|---|---|
| ISO/IEC 27001:2022 | Controls exist technically but are absent from the SoA and register | Generate register entries from the deployed control set so the register cannot drift from the system | 100% of deployed controls map to an SoA entry with an owner and a review date |
| Data privacy | Restricted data routed to a provider that retains prompts | Attested zero-retention required for RESTRICTED; gate fails closed with a reason | 0 RESTRICTED requests to retaining destinations; every deny carries a reason |
| Data privacy | Classification lost on derived artifacts (embeddings, caches) | Propagate the classification tag into every derived store and enforce it on read | Lineage audit: 100% of embedding records carry a classification tag |
| Data privacy | Detector false positives train staff to bypass the gate | Validate candidates (Luhn, checksum, format) before escalating classification | False-positive rate under 2% on a labelled sample; reviewed monthly |
| Latency SLA | Classification added to every request path | Compiled patterns, bounded input scan, no network call in the gate | Classifier p95 under 3ms for payloads up to 32KB |
| Cost control | Everything routed to the most expensive compliant destination | Preference-ordered destinations; cheapest lawful option wins | Share of traffic on dedicated capacity tracked; only RESTRICTED lands there |
| Operational | A destination's properties change without anyone noticing | Attestations are versioned data; drift detector alerts on change | Attestation drift alert within 24h; routing re-evaluated on change |
| Operational | Region requirement satisfied at the gateway but not at the provider | Pin provider endpoint per region and assert the served region in the response | Region assertion failure rate 0; mismatches fail the request |
Implementation parameter matrix
Every value below is a parameter you can hold a vendor or an internal team to. Adjectives are not acceptance criteria.
| Deployment vector | Multi-region active-active with per-region data planes |
|---|---|
| Security standard | ISO/IEC 27001:2022 |
| Applicable regimes | SOC 2 Type II, ISO/IEC 27001:2022, GDPR |
| Latency SLA | p95 ≤ 600ms — interactive surfaces need sub-second; batch jobs do not |
| Integration protocol | REST over HTTPS — the widest compatibility and the easiest audit story |
| Idempotency control | an Idempotency-Key header, honoured for 24h |
| Throughput envelope | ~2k rps per gateway node before connection churn dominates |
| Middleware requirement | policy decision point in front of the model gateway |
| Data classes in scope | PII, commercial-in-confidence data |
| Retention obligation | per the data class retention schedule, enforced automatically |
| Data residency | contracted processing region, asserted on every response |
| Contractual instrument | DPA plus a disclosed subprocessor list |
| Systems of record | SAP, Salesforce, Workday |
| Primary failure mode | a retried POST creating a duplicate record |
What the auditor will ask
- Where is this control in the risk register and the Statement of Applicability, who owns it, and when was it last reviewed?
Register entries are generated from the deployed control set, so every control has an SoA reference, a named owner and a review date that cannot silently lapse. - What function decides which destination may see RESTRICTED data, and where does it run?
The routing gate, evaluated before egress. It is a deterministic function of the data's classification and the destination's attested properties, and it fails closed when no destination is lawful. - Show me the recorded reason for a denial last week.
Every allow and every deny is written to the decision log with the reason — which destinations were rejected and on which property — so a denial is explainable months later. - When a document is embedded, does the embedding carry its classification — and is that enforced on read?
Yes. The classification tag propagates into every derived store, including embeddings, caches and eval sets, and is enforced on read as well as write. - What happens when a provider adds a subprocessor you have not disclosed?
The drift detector alerts when a destination's attested properties change, and routing is re-evaluated against the new attestation. Attestations are versioned data, not a one-off questionnaire. - How do you prove processing stayed in the contracted region?
The provider endpoint is pinned per region and the served region is asserted on the response; a mismatch fails the request rather than completing it quietly.
The request path
Classification-Routed Multi-Cloud Estate — the request path, with the decision points that must exist before the first model call:
flowchart TB
IN[Request payload] --> CLS[Deterministic classifier<br/>regex + Luhn/checksum]
CLS --> LV{Classification}
LV -->|PUBLIC / INTERNAL| D1[shared-us]
LV -->|CONFIDENTIAL| D2[eu-pooled<br/>DPA required]
LV -->|RESTRICTED| D3[eu-dedicated<br/>zero-retention + subprocessors]
LV -->|no lawful destination| DN[Deny + reason]
D1 --> LOG[(Decision log)]
D2 --> LOG
D3 --> LOG
DN --> LOG
D3 --> LIN[Lineage tag on<br/>embeddings / cache / evals]
ATT[Destination attestations] -.-> LV
ATT --> DR[Drift detector]The parts you have to build
- Deterministic classifier — Pattern plus validator (Luhn, checksum) so the gate does not cry wolf.
- Destination attestations — Region, max class, retention, DPA, subprocessor disclosure — as data.
- Routing gate — First lawful destination in preference order; cost can never override a control.
- Decision log — A recorded reason for every allow AND every deny.
- Lineage tags — Classification travels with derived artifacts: embeddings, caches, evals.
- Drift detector — Alerts when a destination's attested properties change.
Implementation artifact — Classification-driven routing gate with recorded reasons
Standard-library Python, no external dependencies, runs as written. Executed by the publish gate: if it raises, this page does not ship. Wire it behind REST over HTTPS; the failure mode it guards against is a retried POST creating a duplicate record. The output you hand the assessor is the Statement of Applicability extract.
"""Classification-driven routing gate for a multi-cloud LLM estate.
Why this shape: "which model may see this data" is a governance decision, and
if it lives in prompt text or a developer's judgement it is not a control. It
has to be a deterministic function of the data's classification and the
destination's attested properties, evaluated before egress.
The gate below is the smallest thing that an actual data-governance board will
accept: classification in, allowed destinations out, with a recorded reason for
every allow and every deny.
"""
import re
from dataclasses import dataclass
from enum import IntEnum
class Class(IntEnum):
PUBLIC = 0
INTERNAL = 1
CONFIDENTIAL = 2
RESTRICTED = 3 # PII / PHI / material non-public
DETECTORS = {
"email": re.compile(r"[\w.+-]+@[\w-]+\.[\w.]{2,}"),
"iban": re.compile(r"\b[A-Z]{2}\d{2}[A-Z0-9]{10,30}\b"),
"card": re.compile(r"\b(?:\d[ -]?){13,19}\b"),
"ssn": re.compile(r"\b\d{3}-\d{2}-\d{4}\b"),
"mrn": re.compile(r"\bMRN[:\s-]*\d{6,10}\b", re.I),
}
def luhn(number: str) -> bool:
"""Card detectors without Luhn produce false positives on order numbers,
and a gate that cries wolf gets switched off."""
digits = [int(c) for c in re.sub(r"\D", "", number)]
if len(digits) < 13:
return False
checksum, parity = 0, len(digits) % 2
for i, d in enumerate(digits):
if i % 2 == parity:
d *= 2
if d > 9:
d -= 9
checksum += d
return checksum % 10 == 0
def classify(text: str, floor: Class = Class.INTERNAL) -> tuple:
"""-> (classification, evidence). Deterministic and explainable."""
found = []
for name, rx in DETECTORS.items():
for m in rx.finditer(text or ""):
if name == "card" and not luhn(m.group(0)):
continue
found.append(name)
break
return (Class.RESTRICTED if found else floor), sorted(set(found))
@dataclass(frozen=True)
class Destination:
name: str
region: str
max_class: Class
zero_retention: bool
dpa_signed: bool
subprocessors_disclosed: bool
class Denied(Exception):
pass
def route(text: str, destinations: list, required_region: str = None) -> dict:
"""Pick the first destination whose ATTESTED properties cover the data.
Order matters: destinations are supplied in preference order (cheapest or
fastest first) and the gate takes the first one that is lawful, so cost
optimisation can never override a control.
"""
level, evidence = classify(text)
reasons = []
for d in destinations:
if d.max_class < level:
reasons.append(f"{d.name}: max_class {d.max_class.name} < {level.name}")
continue
if required_region and d.region != required_region:
reasons.append(f"{d.name}: region {d.region} != {required_region}")
continue
if level >= Class.RESTRICTED and not d.zero_retention:
reasons.append(f"{d.name}: retains prompts, unusable for {level.name}")
continue
if level >= Class.CONFIDENTIAL and not d.dpa_signed:
reasons.append(f"{d.name}: no DPA on file")
continue
if level >= Class.RESTRICTED and not d.subprocessors_disclosed:
reasons.append(f"{d.name}: subprocessors undisclosed")
continue
return {"allowed": True, "destination": d.name,
"classification": level.name, "evidence": evidence,
"rejected": reasons}
raise Denied(f"no lawful destination for {level.name} data: {reasons}")
if __name__ == "__main__":
dests = [
Destination("shared-us", "us-east-1", Class.INTERNAL, False, True, False),
Destination("eu-pooled", "eu-west-1", Class.CONFIDENTIAL, False, True, True),
Destination("eu-dedicated", "eu-west-1", Class.RESTRICTED, True, True, True),
]
print(route("Summarise this quarter's churn drivers.", dests))
print(route("Patient MRN 4471902 reports side effects.", dests,
required_region="eu-west-1"))
try:
route("Card 4111111111111111 was declined.",
[d for d in dests if not d.zero_retention])
except Denied as e:
print("correctly denied:", str(e)[:96])
The ISO/IEC 27001:2022 control, as code
Statement of Applicability with operating evidence. This is the artifact an assessor asks for under ISO/IEC 27001:2022 specifically — it is not the same control as the one above, and a system that implements one does not thereby implement the other. It executes under the same publish gate.
"""Annex A control to evidence mapping behind a Statement of Applicability.
ISO/IEC 27001:2022 turns on the SoA: every Annex A control is either applicable
with a justification and evidence, or excluded with a justification. The audit
failure is an applicable control whose evidence is a policy document rather
than a record that the control operated.
"""
ANNEX_A_2022 = {
"A.5.23": "Information security for use of cloud services",
"A.8.2": "Privileged access rights",
"A.8.10": "Information deletion",
"A.8.12": "Data leakage prevention",
"A.8.15": "Logging",
"A.8.16": "Monitoring activities",
"A.8.24": "Use of cryptography",
"A.8.28": "Secure coding",
}
EVIDENCE_KINDS = {"record", "configuration", "test_result"}
NON_EVIDENCE = {"policy", "intent", "roadmap"}
class StatementOfApplicability:
def __init__(self, scope: str):
self.scope = scope
self.entries: dict[str, dict] = {}
def apply(self, control: str, justification: str,
evidence_ref: str, evidence_kind: str) -> None:
if control not in ANNEX_A_2022:
raise KeyError(f"{control} is not an Annex A:2022 control")
if evidence_kind in NON_EVIDENCE:
raise ValueError(
f"{control}: {evidence_kind!r} describes intent, not operation")
if evidence_kind not in EVIDENCE_KINDS:
raise ValueError(f"{control}: unknown evidence kind {evidence_kind!r}")
self.entries[control] = {"applicable": True, "justification": justification,
"evidence_ref": evidence_ref,
"evidence_kind": evidence_kind}
def exclude(self, control: str, justification: str) -> None:
if control not in ANNEX_A_2022:
raise KeyError(f"{control} is not an Annex A:2022 control")
if len(justification.split()) < 5:
raise ValueError(f"{control}: exclusion needs a real justification")
self.entries[control] = {"applicable": False, "justification": justification}
def unaddressed(self) -> list[str]:
return sorted(set(ANNEX_A_2022) - set(self.entries))
def certifiable(self) -> dict:
gaps = self.unaddressed()
applied = [c for c, e in self.entries.items() if e["applicable"]]
return {"scope": self.scope, "applied": sorted(applied),
"excluded": sorted(c for c, e in self.entries.items()
if not e["applicable"]),
"unaddressed": gaps, "certifiable": not gaps}
if __name__ == "__main__":
soa = StatementOfApplicability("LLM platform, production tenant")
soa.apply("A.5.23", "Model inference is a cloud service",
"cfg://gateway/allowed-providers.yaml", "configuration")
soa.apply("A.8.2", "Operators hold privileged access to prompts",
"rec://iam/quarterly-access-review-2026Q3", "record")
soa.apply("A.8.10", "Retention is enforced on prompt logs",
"test://retention/expiry-suite-2026-10", "test_result")
soa.apply("A.8.12", "Egress to model providers can leak data",
"cfg://dlp/egress-classifier.yaml", "configuration")
soa.apply("A.8.15", "All inference events are logged",
"rec://audit/chain-head-2026-10-16", "record")
soa.apply("A.8.16", "Anomalous usage is monitored",
"rec://siem/llm-usage-alerts", "record")
soa.apply("A.8.24", "TLS and at-rest encryption",
"test://crypto/tls-config-scan", "test_result")
soa.exclude("A.8.28", "No application code is developed within this scope "
"boundary; the platform is configured, not coded")
report = soa.certifiable()
assert report["certifiable"], report
assert len(report["applied"]) == 7 and len(report["excluded"]) == 1, report
try:
soa.apply("A.8.15", "we have a logging policy",
"doc://policies/logging.pdf", "policy")
raise AssertionError("accepted a policy document as operating evidence")
except ValueError:
pass
partial = StatementOfApplicability("partial")
partial.apply("A.8.15", "logging", "rec://x", "record")
assert not partial.certifiable()["certifiable"]
assert len(partial.certifiable()["unaddressed"]) == 7
print("ISO/IEC 27001:2022 SoA evidence mapping: OK")
print(f" applied {len(report['applied'])}, excluded {len(report['excluded'])}, "
f"unaddressed {len(report['unaddressed'])}")
Related architectures
- Part of enterprise ai data governance.
- The same control appears in fedRAMP Moderate data governance framework for enterprise LLM deployment.
- This pattern also governs SOC 2 Type II data governance framework for enterprise LLM deployment.
- SOX data governance framework for enterprise LLM deployment applies the same mechanism under a different obligation.
- EU AI Act data governance framework for enterprise LLM deployment applies the same mechanism under a different obligation.
- If this is the blocker in front of you: enterprise AI infrastructure review.
Enterprise infrastructure review
If you are carrying this blocker, the useful next step is not a demo. It is a review of your actual request path against the control points above:
- Which of the 6 components exist in your estate today, and which are assumed
- Your current numbers against the 7 acceptance parameters, starting with p95 ≤ 600ms
- Which ISO/IEC 27001:2022 control questions you cannot yet answer, and what closes each gap