The problem: a valid envelope is not a valid messenger
The signature on an execution authorization proves that Parmana’s policy engine approved an action. It does not prove that the thing presenting it is the gateway, the one component that is supposed to do the releasing, after running its own checks on expiry, content, policy and nonce. If the release layer trusts the envelope alone, then anything that gets hold of a valid envelope looks the same as a legitimate release. In a well-wired system that “anything” should not exist. But “should not exist” is an assumption, and I would rather have a check than an assumption.The idea: two signatures, two questions
So there are two signatures, and each answers one question.- The execution authorization answers: did policy approve this action?
- The gateway attestation answers: is the gateway, holding its own key, releasing this specific authorization right now?
How Parmana does it
Every time the gateway releases an execution, it signs a fresh attestation. The signed content is small: the gateway’s id, the id of the authorization being released, a random nonce, and the time it was issued. The authorization id is the important part. It ties the attestation to one request. An attestation minted for my ₹8,400 refund cannot be reused to vouch for a different request, because the ids will not match. Before the release layer creates any session or issues any credential, it checks three things:- The identity presented matches the configured gateway.
- The signature verifies against the gateway’s public key.
- The authorization id inside the attestation equals the authorization id of the request in front of it.
What it does not do
This is a narrow check, and the source code says so in its own comments. Here is the honest list.- It is not a replay defense by itself. The nonce in the attestation exists so two attestations for the same request can be told apart. Nothing records which nonces have been seen. Replay is stopped elsewhere: the gateway session is single-use, and the authorization’s own nonce is checked against a nonce store upstream.
- It has no expiry of its own. The issue time is signed, but the check does not compare it against a time window. It leans on the authorization’s expiry and nonce check upstream. That is a known, recorded gap, deliberately left alone because changing a shared signing primitive deserves its own piece of work.
- It is not hardware or remote attestation. “Attestation” here does not mean a secure enclave or a measured boot. It proves possession of a private key, nothing about what code is running. Anyone holding the gateway key can mint valid attestations, and my threat model assumes that key is not compromised.
- It is checked inside Parmana’s own server. In the default server, the gateway and the release layer run in the same process, and this is where the attestation is checked. A remote connector service does not receive the attestation and verify it independently. For example, the remote refund connector service authenticates the gateway with a separate transport secret, a different mechanism.
- It only holds if the wrapper is the path in use. The rule “no session without a matching attestation” holds because the checking wrapper is the only path wired in production. That was confirmed by inspecting the code, not enforced by a lock.
- It is not post-quantum. Trust Records and receipts can carry a hybrid signature. Gateway attestations are signed with one algorithm only, and I decided not to change that for now.
- It is a release-time check, not stored evidence. As far as I can see in the code, attestations are not kept in the Trust Record. You cannot pull one up next year in an audit; their job is to stop a bad release at the moment it happens.
- The session layer behind it is in memory, single process. Fine for the current deployment shape, not a fleet design.