The idea
Turn the decision into an object another system can check on its own, with nothing but a public key. Sign it, bind it to the exact content approved, give it a short life, and let it be used once.How Parmana does it
When a policy approves a request, Parmana signs an execution authorization. It is only ever signed after approval: a refused decision never produces one, and no policy can approve without a signed human approval for the action. The signed payload carries:- a unique authorization id and a single-use nonce;
- the decision and business transaction it authorizes, and the policy name and version that decided;
- when it was authorized and when it expires;
- a hash of the exact executable content (action, target, parameters), so ₹18,500 cannot become ₹1,85,000 under it;
- a hash of the exact policy content, and optionally a hash of the facts the decision was evaluated on;
- the authenticated caller and the capability they were allowed.
The part people get wrong: where “single-use” lives
Single-use is only as wide as the nonce store that checks it. If you run three instances of a receiving service and each keeps its own store in memory, the same authorization can be accepted three times, once by each. If one instance restarts, its memory is gone, and an authorization still within its lifetime can be accepted again. Parmana’s own gateway avoids this by default. It records consumed nonces in Postgres, shared by every instance on the same database, and it refuses to start if that store is not configured rather than falling back to memory. An integration test against a real Postgres proves that a nonce consumed through one store instance is still consumed for a fresh instance, and that of two simultaneous inserts of one nonce exactly one wins. But the envelope verifier package ships only an in-memory store, scoped to one process and lost on restart. If you use it in your own system, you must bring a persistent store shared by every instance. The good news is that it only needs to remember a nonce for the maximum lifetime you allow; after that, the expiry check rejects the authorization anyway. Over Parmana’s HTTP API a caller never sees any of this. A repeated business transaction id is refused with a 409 before a second authorization exists, and the human approval carries its own nonce, also accepted once.What it does not do
- It does not re-run the policy. A valid authorization proves that the holder of Parmana’s signing key approved this content, under this policy version, within this window. Why it was approved lives in the signed record, not in the envelope.
- It is only as good as the signing key. Whoever holds the key, or can make the signing service sign, can produce authorizations the verifier accepts. “Not authorized by Parmana” means “not signed with that key”. I learned this the hard way: an earlier default key was publicly exposed before July 2026 and every signature it made is void. It was rotated.
- It only protects systems that use it. The guarantee holds for a receiver that runs the verifier and gates every code path that can act on its result. Parmana enforces nothing at the network level.
- Single-use across a fleet needs a shared store, as above. The verifier package does not provide one.
- The envelope verifier is not published to npm. Today you use it from a clone of the repository.
- A verifier checks one algorithm. Moving from Ed25519 to ML-DSA-65 while still verifying older authorizations is not supported yet.