The problem: permission without shape
An API key scoped to an action is a yes or a no. Within that action, every request is judged by the policy and needs a person’s signed approval. But the policy is the same for every caller, and the key has no end date. Nothing said that this particular agent was trusted for small releases this quarter and nothing more.The idea: authority is its own question
Parmana separates three questions about every request, and records each one separately:- Authority. May this caller have this kind of action decided here at all?
- Business validity. Is this exact action valid for this exact business object, according to the system that owns the facts?
- Execution. Did it run?
How Parmana does it
A grant names:- One caller: the identity the server authenticates from the API key, which the agent cannot claim to be someone else.
- One action, such as releasing goods in an ERP.
- Optional limits, by a field of the request: a minimum and maximum for a number, or a list of the only values allowed.
- A start, defaulting to the moment it is approved, and a required end, at most 366 days later. Grants always end.
- AUTHORIZED: a grant in force, and the request within every limit.
- NOT_AUTHORIZED: no grant, a revoked one, one not yet started, a value outside a limit, missing, or of the wrong type, or no authenticated caller.
- AUTHORITY_EXPIRED: the grant has passed its end.
- AUTHORITY_UNCLEAR: the grants could not be read.
Seen in production
On 11 October I ran a live check against the production server, with a test policy and an action that changes nothing anywhere. Every request carried a valid signed approval, so each refusal shows the grant deciding:- Before any grant: refused, not authorized.
- With a grant up to 100 per request, a request for 50: approved, released once, the grant named in the signed record, verified offline.
- The same grant, a request for 500: refused, above the granted maximum.
- After the grant was revoked: refused.
What it does not do
- Limits are per request. A grant capped at ₹5,000 lets twenty requests of ₹5,000 through in a day. Cumulative limits, “₹50,000 or 20 refunds per day”, are designed, not built. The next post is about them.
- No real action uses grants yet. It is opt in per policy, and no shipped policy opts in. No grant exists in production. The live check used a test policy.
- The re-check at release is tested, not seen live. The gateway, the adapter and the runtime are each tested, but a grant revoked between decision and release cannot be timed through one real request without a test hook.
- The grantee is not checked to exist. API keys live in configuration, not where the grant route can read them. A grant to a key that does not exist is accepted, listed, and has no effect.
- Two credentials, not proven two people. In the live check, the maker and the checker keys were held by one person: me.
- It does not replace approval. A grant narrows what an agent may ask for. A person still signs each action.