Governance AI on Azure and Databricks for Data Engineers

AI governance doesn’t require buying new tools. Just layer AI on top of the controls you already have, layer by layer, from the model down to the data.

For some time now, I’ve been observing and analyzing how teams approach AI governance in data environments on Azure and Databricks. More and more often I hear the same thing: “let’s slow down with AI, security first.” And I keep seeing the same pattern: “let’s write a skill that will forbid AI from reading certain tables.”

I’m worried that this is how we try to solve problems we already had before the AI era, patching them with yet another layer of AI. And a skill is just an instruction for the model: it can ignore it, misunderstand it, or interpret it the wrong way. It’s like a “do not enter” sticker on a door without a lock. A similar pattern to my previous post “Maybe IT Was Never About the Technology? Code Is Cheap, ‘Why’ Is Getting Expensive”: instead of adding a new tool, it’s better to use years of experience and what we already have.

So my analysis leads to the opposite conclusion: we don’t need new tools. We layer AI on top of existing controls that already work, layer by layer, from the model down to the data. The deeper the layer, the harder the control. Databricks itself puts it similarly: AI governance is fundamentally data governance (source).

Two paths from an AI agent: model calls go agent → Layer 2 gateway → Layer 5 detection → LLM provider, while data queries go agent → Layer 3 infrastructure → Layer 4 Unity Catalog (the real block) → data. Layer 1 instructions are only a sticker without a lock

Layer 1: The model, i.e. instructions and policies #

Structured system instructions, skills, and agent configuration. The first, soft line: they document the rules and build awareness on the model’s side.

Note: this layer alone is insufficient and largely ineffective. The model can ignore the instruction or misunderstand it, so treat it as documentation of the rules, not as a block. Don’t stop here, and don’t treat it as the solution.

Layer 2: The gateway, i.e. a single control point for model calls #

Every model call should go through a gateway: who can call which model and which tools (MCP), guardrails on input and output, cost limits, and a full log: prompt, response, tokens, latency. You have a few technical options to choose from:

  • Unity Gateway (provided by Databricks, works “out of the box” together with Unity Catalog): model routing, guardrails as service policies, rate limits, and logs in inference tables, i.e. regular tables you can query with SQL (docs).
  • Your own proxy in front of external providers, e.g. LiteLLM or Azure API Management: full control over traffic, but it’s another component to maintain, and then you also handle logging yourself.
  • Models in your own tenant: instead of sending data to an external provider, you use models served directly in your Databricks environment (they show up as system.ai in the docs). Then the data physically has nowhere to leak.
  • Optionally, a small local model as a filter: it redacts the query before it goes to a big external model.

Bonus: the mindset shift #

Because the gateway sits at the platform level, not at the level of a specific model, you can freely swap models and providers without rebuilding anything. And it’s exactly this ease of swapping that shows the belief “this model or that provider is the best” is a myth: none of them is best at everything, and an architecture that lets you swap them proves it by itself.

Layer 3: Infrastructure #

The goal here is that every possible path to the data is closed or under control. These building blocks complement each other perfectly because each catches a different vector:

  • Identity (Entra ID, managed identity): who can authenticate at all. Without this, there’s no point going further. And no secrets in notebooks: yes, I know, we all promise that, and then db_password ends up in the code anyway.
  • Secrets (Key Vault): keys and passwords, including model keys (BYOK), are only retrieved from Key Vault, with logged access.
  • Network channel (private endpoints + egress control): probably the most interesting block. Even an authenticated user can try to pull data “outside”, so we close the path at the network level: a private endpoint (Private Link) means traffic to storage and models doesn’t leave the public internet, and outbound traffic control (egress) via Azure Firewall and NSGs blocks unapproved destination addresses. On top of that, Purview Network Data Security captures and classifies what AI apps actually send outside (Microsoft Learn).
  • Rules (Azure Policy): enforce the above across the whole tenant, so nobody can “turn off security” on their own resource (CAF).
  • Monitoring (Defender for Cloud): detects anomalies and threats in AI workloads (CAF).
  • Content control (Purview DLP + DSPM for AI): scans prompts and blocks sensitive data before it leaves the organization (Microsoft Learn).

In short: Entra says “who”, Key Vault “with what”, the network channel “which way”, Azure Policy “whether allowed”, Defender “whether something bad is already happening”, and DLP/DSPM “what exactly went out”. Only together does it make sense.

Layer 4: Data architecture #

Here the control is physical. Unity Catalog enforces row filters, column masks, and ABAC policies at query time, regardless of whether the query comes from a human, a script, or an AI agent (Microsoft Learn).

Raw PII stays in a separate “vault”, and teams get tokenized data: the identifier lets you join records, but without the key stored outside the tenant, it identifies nothing. It’s the same logic as pseudonymization in GDPR (art. 4(5)). On top of that: synthetic data in dev environments, so PII never appears there at all.

Layer 5: Detection and evidence #

Even the best controls are worth verifying, because only then do you know they actually work. The simplest way is canaries: fake PII records planted in the data. If any of them shows up in the gateway logs as sent to a provider, you have an instant, 100% certain alarm. On top of that, a PII classifier scanning all prompts from inference tables, plus DLP alerts. And finally a report: a single query over system tables answers “who had access to this data via AI”.

Bottom line #

The first layer (instructions for the model) is only documentation of the rules, insufficient on its own. The real block sits in the data layer, and the network channel and the gateway close the whole thing. By the way, gateway logs will be needed anyway: the EU AI Act (art. 12) requires high-risk systems to automatically log events, with the main deadline of 2 August 2026 for Annex III systems (EUR-Lex).

References #

  1. Governing AI agents at scale with Unity Catalog
  2. AI Gateway (Unity Gateway)
  3. Private endpoints (Azure Private Link)
  4. Outbound (egress) traffic control in Azure
  5. Network security groups (NSGs)
  6. Purview Network Data Security (DLP)
  7. Cloud Adoption Framework for AI: platform governance
  8. Purview Data Security Posture Management (DSPM) for AI
  9. Unity Catalog: row filters and column masks
  10. GDPR (Reg. 2016/679), art. 4(5) pseudonymisation
  11. EU AI Act (Reg. 2024/1689), art. 12 automatic logging