Impart Security

Third Party
Related Documentation
Made by
Compatible Protocols
http https
Minimum Version
Kong Gateway - 2.8
Third Party: This plugin is developed, tested, and maintained by Impart Security.

Impart is a runtime enforcement platform purpose-built to stop AI attacks in real time. The Impart Security plugin lets Kong Gateway detect and block threats against your LLM, agent, and MCP traffic inline. It stops malicious prompts before they reach your model, unsafe actions before they reach your agent, and abusive calls before they reach your MCP tools.

Integrating the Impart Security plugin into your Kong Gateway allows you to:

  • Block LLM attacks: Stop prompt injection and jailbreak attempts with deterministic, sequence-aware enforcement, not best-effort regex
  • Control agent behavior: Block unsafe actions and excessive agency before an agent executes them in production.
  • Protect the MCP layer: Apply runtime controls over MCP tool calls and block unauthorized or abusive MCP traffic.
  • Stop zero-day attacks fast: Enforce AI-generated, human-reviewed, code-based detection rules that update in minutes, not days.
  • Protect APIs and web apps too: Block legacy threats like injection, enumeration, and credential stuffing using the same WAF and API security engine.

Unlike tools that only generate alerts and tickets, Impart enforces policy inline, in the request path, at the moment an attack happens.

How it works

The Impart Security plugin inspects HTTP traffic, including LLM, agent, and MCP requests, and streams it to an Impart Inspector running inside your own environment. The inspector evaluates each request against your rules and returns a verdict. Based on that verdict, the plugin either forwards the request upstream or blocks it inline.

Because the inspector runs inside your infrastructure, sensitive request and response data never leaves your environment. The integration adds minimal latency, and fails open if the inspector is unreachable, so your gateway stays available.

 
sequenceDiagram
autonumber
    participant Client
    participant Plugin as Kong Gateway
Impart Plugin participant Inspector as Impart Inspector
(your environment) participant Upstream as Upstream
(LLM, agent, or MCP tool) Client->>Plugin: Send request Plugin->>Inspector: Stream request metadata Inspector->>Inspector: Evaluate against rules Inspector->>Plugin: Verdict alt If request is malicious Plugin->>Client: Block request else If request is allowed Plugin->>Upstream: Forward request Upstream->>Client: Return response end

Figure 1: Request flow showing how the Impart Security plugin streams traffic to a locally-run Impart Inspector for real-time policy enforcement. Malicious requests are blocked inline; allowed requests are forwarded upstream.

Threats Impart helps you catch

Some of the most dangerous AI attack patterns don’t show up in any single request. Instead, they only appear as a pattern across a session. Because the Impart Security plugin correlates signals across requests, not just within one, it can catch threats a single-message filter would miss entirely.

Excessive agent tool use. An AI agent starts calling far more distinct tools than its task requires. This is a common signature of a compromised or hijacked agent. For example, an agent may have been prompt-injected into exploring your entire tool surface, or may be testing which tools it can reach with a stolen identity. Any one of those tool calls looks completely legitimate on its own; only the pattern across a session gives it away. Left unchecked, this kind of agent drift can mean data loss, runaway cost, or actions taken on your users’ behalf that can’t be undone. Impart tracks how many distinct tools a caller invokes within a session and flags or blocks callers that cross normal thresholds, catching an agent that’s drifted outside its intended scope before it can do real damage.

MCP catalog drift (“rug-pull” attacks). An MCP server changes the tools, prompts, or resources it advertises after a client has already started trusting its catalog, or serves a tool that was never advertised in the first place. This is a supply-chain-style attack: a server can look completely benign during initial discovery, then swap in a malicious tool mid-session once trust is established. Nothing about a single tool invocation reveals the swap; only comparing it against what was originally advertised does. A successful rug-pull can expose sensitive data or trigger unauthorized actions across every session that trusted the server, the kind of supply-chain compromise that’s expensive to detect and worse to explain to customers. Impart snapshots the catalog an MCP server advertises and checks every later invocation in that session against it, flagging tools that were never advertised or catalogs that changed mid-session.

Persistent LLM prompt injection. An attacker sends prompt injection or jailbreak attempts repeatedly, often adjusting their approach each time to stay just under the radar of a single-message filter. One borderline prompt may not be conclusive enough to block without risking false positives on real users, but an attacker who keeps trying is a much clearer signal of intent, and a filter with no memory has no way to notice the pattern. A determined attacker who eventually succeeds can extract sensitive data, generate brand-damaging output, or trigger a compliance incident. What matters isn’t whether the first attempt gets through; it’s whether the hundredth one does. Impart tracks flagged prompt-injection attempts per session, IP, and device, and escalates enforcement, temporarily blocking a source once it crosses a violation threshold, catching persistent attackers a single-message scan alone would miss.

Install the Impart plugin

You can install the Impart Security plugin via LuaRocks. A Lua plugin is distributed in .rock format, which is a self-contained package that can be installed locally or from a remote server.

  1. Install the Impart Security plugin:

    luarocks install kong-plugin-impart
  2. Update your loaded plugins list in Kong Gateway.

    In your kong.conf, append impart to the plugins field. Make sure the field isn’t commented out.

    plugins = bundled,impart
  3. Restart Kong Gateway:

    kong restart

Enable the plugin

This plugin requires an Impart Inspector running in your environment. Navigate to the Impart console for step-by-step instructions.

Once the inspector is running, enable the Impart plugin and set config.inspector_rpc_addr to the inspector’s socket address.

Test the plugin

After enabling the plugin, send a request through your Kong route as usual to confirm it passes through normally:

curl -i http://localhost:8000/your-route

A request that matches one of your configured detection rules is blocked before it reaches the upstream, returning an HTTP 403 response by default (the status code and response body are configurable per rule from the Impart console).

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!