Every query decided, inline or from the logs
Put InsightAIShield in the path with a wire-protocol proxy or the query gateway, or start in monitor mode from the audit logs you already keep. One engine decides in every case, and every decision is recorded the same way.
PostgreSQL and MySQL clients connect as they always have
The proxy speaks the database’s own wire protocol. A client, BI tool or ETL job points at the proxy; each statement is decided by the engine, rewritten if a rule says so, and forwarded, or refused with a database error the client understands (ERROR 42501: InsightAIShield blocked this query). Readers for the SQL Server TDS, Oracle TNS, Presto and Hive wire formats extract the user, database and statement for the same engine.
- CONTROL mode — block and rewrite in the path
- Start and stop — each proxy from the Enforcement page
- The database user maps to a person — so the policy and the record name who ran it
- Control commands pass —
BEGIN,SET,SHOWare allowed and logged, so drivers work
For apps and AI agents that send SQL over HTTP
Apps and agents post SQL to the query gateway, or call it through the Python SDK. InsightAIShield decides it, rewrites it, runs it read-only and transforms the response: tokenized or hashed columns come back as tokens. A blocked query raises Blocked with the server’s reason, so an agent can’t mistake a refusal for an empty answer.
- The client holds no policy — and no key; every call is decided by the server
- Agents act as themselves — with an API key, under their own policy
from insightshield_sdk import Shield, Blocked shield = Shield("https://shield.example.com", api_key="…") # an agent acting as itself res = shield.query("core_banking", "select account_number, balance from accounts where customer_id = 100042") res.rows, res.decision, res.sql # masked / tokenized as the policies say safe = shield.guard_prompt(prompt, model="us.anthropic.claude-sonnet-4-5") # masked text, or Blocked shield.check_tool("query_gateway", source="core_banking", sql=sql) # before an MCP tool runs
Prove a policy on real traffic before you enforce it
Paste or stream lines from pgaudit, Snowflake QUERY_HISTORY, Redshift user-activity logs or CloudTrail (Redshift Data API and Athena). Each statement is decided as if it had come through a proxy and recorded as SNIFF: what would have been blocked or rewritten. Nothing is blocked, because the query already ran.
- Four log formats — pgaudit, Snowflake query history, Redshift user activity, CloudTrail
- Same record — a SNIFF event looks like a CONTROL event, with the “would” decision
Where people stay in charge
- Monitor mode records what a policy would do; switching a source to enforce is a person’s change.
- A policy version goes live only when a second lead, not the person who proposed it, approves it.