A policy engine that fails closed and rewrites the SQL
Grants say who may read what; rules say how it comes back. The engine evaluates every statement location by location, store by store and field by field, rewrites it in the source’s own dialect, and refuses anything it can’t decide safely.
Grants and rules, as YAML you can diff
A policy names who it applies to (groups, users or kinds such as AI agents), the sources it covers, its mode (enforce, or monitor: effects recorded, never applied), its grants and its rules. Identity mappings bring directory groups and attributes from LDAP or OIDC to the right policy. When two rules protect one column, the stronger wins: block, then tokenize, hash, redact, mask, skip.
- Rule types — 19, across location, store and field
- Targets — a glob over
source.schema.table.column, ortag:PCI,class:card_number - Exemptions — any field rule may name exempt groups, such as fraud analysts
- Export and import — every policy as YAML, for review in your own repository
| Level | Rule types | What they do |
|---|---|---|
| Any level | LOCATION_ACCESS IP_CHECK TIMED_ACCESS META_TAG META_PROPERTY | Only from these places, networks or hours; only for entities with these tags or properties. An unknown location is denied. |
| Store (table) | SQL_COMMAND LIMIT FILTER DISALLOW_JOIN DISALLOW_SENSITIVE_JOIN | Commands denied or allowed, a row cap, a row filter bound to the person’s attributes, joins refused. |
| Field (column) | MASK REDACT SKIP_EQ SKIP_GE SKIP_LE FILTER_FLD TOKENIZE HASH BLOCK_FIELD | Mask or redact in the SQL; null out values past a bound; tokenize or hash in the response; never readable. |
When the engine isn’t sure, the answer is no, with the reason
No applicable policy, an unknown table, SQL that can’t be parsed, a rule with bad parameters, an unknown location for a location rule, a missing attribute for a row filter, or any engine error: each is a block. There is no internal-network bypass, and a timed rule outside its window denies.
- Unknown location — a warehouse query from a client with no location is refused under the location rule
- Unparseable SQL — refused and recorded, never passed through
- Monitor first — a policy in monitor mode records what it would do on real traffic
- Every reason kept — the rule, the policy and its version on every decision
Paste a query, pick who runs it, see what would run
The simulator shows the decision, the original SQL beside the rewritten SQL, what happens to the response (tokenized or hashed columns), every reason and what monitor-only policies would do. Nothing is recorded or run. Masks are applied where the base column is read, so an alias or an outer query can’t undo them; the smallest limit wins, rendered as LIMIT, TOP or FETCH FIRST for the dialect.
- Dialect-aware — PostgreSQL, MySQL, Snowflake, SQL Server, Oracle and the rest, through one SQL tree
- Row filters — bound to the principal’s attributes, such as their region
Draft, propose, simulate on last week, activate with a second lead
Every change is a new version with its YAML and a hash. A version is replayed on recent recorded activity to show how many decisions would change, compared with the version before it in a diff, and activated only by a lead who neither wrote nor proposed it. The policy author agent turns plain English into a draft and simulates it; it never activates anything.
- Diff — rules added, removed and changed between any two versions
- Replay — the last 7 days of queries, re-decided with the draft
- Plain-English drafts — unknown words become open questions, never invented sources or groups
- Four eyes — the proposer can’t approve their own version
Where people stay in charge
- A policy version goes live only when a second lead, not the person who proposed it, approves it.
- The policy author agent drafts and simulates; it never activates a policy.