Governing AI inference

AI agents don't escape security controls. They need all five layers.

A defence-in-depth architecture for EMEA enterprises under the EU AI Act, DORA and NIS2.

Kevin Keller ยท kevinkeller.org

Why it matters

Boards, regulators and customers ask the same question

How are you governing the AI systems you're deploying?

The EU AI Act, DORA and NIS2 together make AI governance existential, not optional, for EMEA enterprises.

The stakes

7%

of global annual turnover, or up to EUR 35 million

The EU AI Act's maximum penalty. High-risk AI system obligations apply from 2 August 2026.

The convergence

Three regulations, the same core demands

RequirementEU AI ActDORANIS2
Risk managementArt. 9Art. 6-16Art. 21
Logging and auditArt. 12Art. 12Art. 21(2)(g)
Incident reportingArt. 62Art. 17-23Art. 23
Access controlArt. 15(4)Art. 9(4)(c)Art. 21(2)(i)

The core principle

You cannot rely on prompts to manage agent behaviour

Data that must not be accessed is blocked by authentication and authorisation, not by instructions to the agent.

Layers 1 and 2

Contain the network, verify every identity

  • Network: agents can't call out of, or be called into, their zone
  • Region: cross-region inference is disabled by default and can be allowlisted
  • Autonomous agents: short-lived service credentials or Workload Identity Federation
  • Human-delegated agents: pass the human's identity through, so their RBAC applies

Layers 3, 4 and 5

Authorise outside the agent, stop exfiltration, log everything

  • Authorisation: purpose-specific roles, tag-based masking, row access policies
  • Data protection: TLS 1.2+, AES-256, no egress except approved endpoints, output scanning
  • Audit: immutable logs of every query, tool call and login

You cannot secure what you cannot see.

MCP threats

The tool layer is a real attack surface

ThreatImpact
Tool poisoningAgent performs unintended actions
Confused deputyServer runs with its own privileges
Rug pullApproved tool turns malicious
ExfiltrationData hidden in legitimate-looking calls

Pin tool definitions by hash and treat every tool response as untrusted.

Integration choices

From convenience to control

MCP serverSkill + CLICustom agent
SecretsHeld by the serverCLI's own short-lived authIn process memory
Injection surfaceLargestReducedMinimal
AuditTwo systemsTwo logsOne trail
Best forPrototypingProduction with generic agentsRegulated production

Defence in depth

Every layer covers another's failure

LayerIf bypassed by...Mitigation
NetworkCompromised agentEgress blocked
AuthenticationStolen credentialShort-lived tokens
AuthorisationPrompt injectionRole has no grant
Data protectionData in tool parametersOutput scanning
AuditAll of the aboveInvestigation trail

The takeaway

Enforce every control architecturally: no single layer is enough.

Read the full article

Platform-agnostic principles; practical examples draw on Snowflake's security model