Trendi

Securing the AI Stack: Connectors, Egress Controls, and the Four Rings of Defense

When security teams audit enterprise AI deployments, the most critical vulnerabilities rarely sit inside the foundation model itself. They live in the plumbing around it—specifically, the connectors, network boundaries, and access controls that wire models into real-world data and actions.

If you are building or reviewing AI agents, here is how to lock down the architecture from the connector layer out to the network edge.

The Connector Layer: Treat It Like a Supply Chain

Model Context Protocol (MCP) servers and similar connectors sit directly in front of databases, file systems, cloud APIs, and sometimes raw command execution. That makes them a software supply chain, not just a configuration file.

Three controls are essential here:

  • Validate at the boundary: Never pass a client token straight through to a downstream API. Forwarding a user’s token unchanged breaks the audience restriction it was issued under, leaving the downstream system unable to reason about who is actually calling. Validate the incoming token at your boundary, then obtain a separate, strictly scoped credential for the downstream call.
  • Pin tool descriptions: Tool descriptions are read directly into the model’s context, making them a prime prompt-injection vector. Because the specification allows a server to modify those descriptions after approval, you must pin versions and alert whenever a definition changes.
  • Inventory everything—especially local connectors: Developers frequently install local connectors that never make it onto an official asset list, often running under the developer’s own credentials.

Build your connector inventory now and record five details for every entry:

  1. The owner
  2. The pinned version
  3. The credential it uses
  4. The downstream permissions that credential carries
  5. The date its tool definition last changed

Make one rule non-negotiable: Every remote connector must authenticate its clients and use its own scoped downstream credential.

Default-Deny Egress: Breaking the Lethal Trifecta

Nearly every AI data exfiltration path ends the same way: an outbound request leaving your environment. If you could only deploy one control, start with a default-deny egress boundary. Nothing leaves unless it is explicitly on an allow list.

Keep both the agent runtime (where HTTP clients, shells, and file writers execute) and model inference inside the same perimeter so a single egress policy governs both. For most systems, the entire allow list consists of just three destinations:

  • Your hosted model provider (named explicitly)
  • Your vector store
  • Your internal APIs

You should be able to recite your allow list in a design review. If nobody can, that is your finding for the day. By denying everything else by default, you eliminate the need to chase threat feeds or maintain blocklists of bad destinations. Even if an agent encounters untrusted instructions while holding sensitive data, the attack stops at the boundary. Clever prompting cannot argue with a network policy.

One critical caveat: Network rules alone will not stop data from riding out through an already-approved service. If a tool accepts a URL as input, validate destinations at the application layer, restrict domains and protocols, and block redirects. For every approved destination, ask if it can be turned into a tunnel—watch for redirects, webhooks, URL parameters, image-fetching endpoints, file uploads, and DNS requests.

Putting the Four Rings Into One Workflow

Security controls work best when they reinforce one another. Consider an AI assistant handling inbound customer support emails—an inherently untrusted input where a user can inject instructions deliberately or by accident.

  1. Data Access (Scoped Queue): The ticket queue is scoped to a single tenant. The queue enforces the boundary, not the model’s judgment; the assistant never searches a shared store to decide which records belong to whom.
  2. Model Access (Gateway & Dedicated Identity): Every request hits a gateway that verifies workload identity, enforces token caps, logs the call, and routes to one approved model version—no shared credentials or platform-wide grants.
  3. Agent Access (Draft vs. Send): The agent is authorized to read and draft a reply, not send it. Because sending is externally visible and hard to reverse, a human must approve it. That approval screen must display the real recipient and full message—never a vague "looks good?" prompt that trains rubber-stamping.
  4. Network Access (One Way Out): Sending to the customer is the only approved external path. Private endpoints and default-deny egress block everything else.

In your next design review, ask four questions separately:

  • Which model can this identity invoke?
  • Which records can it retrieve?
  • Which actions can the agent perform?
  • Where can the resulting data be sent?

If the answer to any of these is "everything," the boundary is too broad.

Four Failure Patterns—and the Controls That Close Them

The same four issues surface repeatedly in AI access reviews. All of them stem from forgetting that access controls have a lifecycle.

Four failure patterns and the controls that close them
Failure Pattern The Risk The Control
Shared Service Accounts One identity reused across agents and apps with overly broad permissions. Delegated identity & least privilege: Give each workload its own identity to cap blast radius and preserve attribution.
Index-Time Permissions Access rules baked in at indexing go stale the moment someone changes roles. Query-time filtering: Resolve live entitlements on every retrieval. Revoking access should never require a reindex.
Tool Sprawl Every unused tool wired to an agent is another capability a manipulated model can abuse. Per-task allow lists & pruning: Grant only what the current workflow needs and regularly retire unused tools.
Standing Approval Human-in-the-loop stops working the second a user clicks "Always Allow." Approve on impact: Automate low-risk, reversible actions; require fresh approval for anything external or destructive.

Carry four final questions into every AI access review: What credential is used? When are permissions evaluated? Which tools are still necessary? And who owns and retires the identity? Answer those consistently, and your AI architecture will hold up under pressure.

← News and resources