Exact Request Binding

A critical vulnerability in naive approval systems is parameter tampering or scope drift:
  • A human approves: delete_user(id=99)
  • The agent executes: delete_user(id=1) (the admin account!)
Dmint completely eliminates this vulnerability through Exact Request Binding. An approval in Dmint is not a general permission; it is a cryptographic assertion authorizing one exact byte sequence of parameters.

The Request Binding Envelope

Before any approval check or persistence occurs, Dmint constructs an immutable request binding envelope:

Why RFC 8785 Canonicalization (JCS)?

In standard JSON, the following payloads are semantically identical in Python dictionaries, but have different raw string representations:
If we hashed raw JSON strings, benign differences in key order or spacing would produce different SHA-256 digests, breaking approvals or allowing subtle malleability attacks. Dmint uses RFC 8785 JSON Canonicalization Scheme (JCS):
  1. Sorted Keys: Dictionary keys are sorted lexicographically by UTF-16 code units.
  2. Whitespace Stripped: No whitespace outside of string literals.
  3. Deterministic Numbers: Floats and integers follow strict IEEE 754 canonical formatting.
  4. UTF-8 Output: Enforces strict UTF-8 character encoding without escaping unnecessary characters.

Cryptographic Fingerprint Computation

For example:
Produces the SHA-256 fingerprint:

What Request Binding Protects Against

Argument Malleability

Changing {"id": 42} to {"id": 43} produces a different SHA-256 hash. The pre-existing approval will be rejected immediately with DMT_REQUEST_MISMATCH.

Cross-Tool Spoofing

An approval granted for postgres.query cannot be submitted to mysql.query even if the query string is identical.

Agent Hijacking

An approval requested by agent-analytics cannot be intercepted and executed by agent-scraper.

Epoch Replay

When deploying a new version of your application, changing the deployment_epoch automatically invalidates all previous pending or approved records.