A company already writes permissions into its systems: grants in the database, roles in Kubernetes, sudo rules on its servers. We turned each of these rule languages into a gate table and ran the real system beside it, as judge, on the same actions. On twenty systems, everything that had to pass passed and nothing that must not pass did. Where a system's own rule language lets through more than its author meant, the table closes the gap.
## Why it matters
An owner should not have to rewrite their permissions for the gate. If the database already says who may read which column, the gate should give the same answer before the agent's query ever reaches the database. And the only fair judge of "the same answer" is the system itself.
## How we tested
For each system we wrote its maker's rule language as a table. Then we generated random rule sets and random actions, and asked both the gate and the real software, installed and unchanged. A system counts as done when both answers are yes: everything that had to pass passed, and nothing that must not pass did.
## The systems done so far
Twenty, among them: PostgreSQL grants and row-level security, MySQL grants (judged by MariaDB), the shell and files, the network (judged by the kernel firewall), Redis, git pushes, sudo, object storage policies (MinIO), Kubernetes pod security and access roles, HTTP APIs described by an OpenAPI document, mail (Postfix), Terraform plans (Open Policy Agent), pip, systemd services and timers, a user directory (OpenLDAP), MongoDB, tool servers (MCP) and MQTT (Mosquitto).
## Some of the numbers
- PostgreSQL 16 grants: 39,721 of 39,721 actions that had to pass passed; 80,279 of 80,279 that must not pass did not.
- MongoDB 8.0 roles: 11,161 of 11,161, and 28,831 of 28,831.
- Kubernetes access roles, judged by the matching code of Kubernetes 1.34: 41,762 of 41,762, and 48,238 of 48,238.
- sudo 1.9.15: 10,726 of 10,726, and 19,274 of 19,274.
- Mail through Postfix 3.8: 1,289 of 1,289, and 3,598 of 3,598.
## Where the table is stricter than the system
Writing the tables showed places where a rule language lets through more than its author meant. A sudo wildcard also matches spaces, so a rule for `ls /var/log/*` also lets the same line list another file elsewhere. Postfix delivers an address written another way (in quotes, or with a `+` tag) that its own access list did not recognise as closed. A Mosquitto subscription is always granted. In these cases the gate closes the gap on purpose, and the cases are counted apart from the comparison.
## Next
Stripe's own API is being measured now: the table is compiled from the API description Stripe publishes, and Stripe itself, in test mode, is the judge.
This update is not available.