How a Biscuit gets narrower
- Issuer grants read and write → Holder adds read onlysigns block 1
- Holder adds read only → API checks every blockappends block 2
- API checks every block → Read request allowed
- API checks every block → Write request refused
The issuer signs an authority block granting read and write on invoices. A holder appends a block adding a read-only check with a one-day expiry. The receiving API runs an authorizer that checks every block. A read request is allowed; a write request is refused because it fails the appended check.
Most bearer tokens are fixed at issue. If a service holds a broad token and wants to hand a narrower one to a sub-task, it has to ask the issuer for a new token. Biscuit, an open-source token format, removes that round trip. Any holder can append a block that adds restrictions, sign it as part of a chain, and pass the result on. Verifiers check the whole chain with the issuer’s public key alone.
How a Biscuit token works
A Biscuit is a sequence of blocks, serialised with Protocol Buffers and usually transported as base64url.
- Authority block. Written and signed by the issuer. It states the initial facts and rights, such as who the user is and what they may do.
- Attenuation blocks. Appended by any holder. Each can add checks that restrict the token. None can widen it.
- Signature chain. Each block is signed with a key carried by the previous block, ending with a proof. The default algorithm is Ed25519. Removing or altering a block breaks the chain.
Authorization logic is written in a Datalog dialect: facts, rules, checks, and, on the verifier side, policies.
A worked example
The issuer’s authority block:
user("ada");
right("invoices", "read");
right("invoices", "write");
A service that only needs to read, for one day, appends:
check if operation("read");
check if time($t), $t <= 2026-10-25T00:00:00Z;
The receiving API runs an authorizer that adds facts about the request and a policy:
resource("invoices");
operation("read");
time(2026-10-24T12:00:00Z);
allow if right($res, $op), resource($res), operation($op);
Every check in every block must succeed, and an allow policy must match.
A write request with this token fails the appended check, even though the
authority block granted write.
Biscuit, JWT, and Macaroons compared
| JWT | Macaroon | Biscuit | |
|---|---|---|---|
| Signature | Issuer signs once (HMAC or public key) | HMAC chain | Public-key chain |
| Verifier needs | Issuer’s key | Root secret | Issuer’s public key |
| Holder can narrow it offline | No | Yes | Yes |
| Authorization logic | Claims only; logic lives in the verifier | Caveat strings | Datalog facts, rules, and checks |
| Third-party verification | Yes with public keys | Only parties holding the secret | Yes |
When to use Biscuit
Biscuit suits systems where authority is passed down a chain: a gateway calls a service, which calls a worker, and each hop should hold less than the last. It fits delegated authorization, sharing links with built-in limits, and capability-style designs where the token itself says what may be done. Where a hop needs a different audience or issuer, token exchange still applies. Because each block records a hop, attenuation chains are also what let you trace delegated authority and revoke it.
Pitfalls
- Unbounded tokens. Always put an expiry check in the authority block or the first attenuation.
- Permissive policies.
allow if trueon the authorizer side undoes the value of the token’s facts. Write policies that match specific rights. - Forgetting revocation. Offline verification means you must distribute revocation lists to verifiers and decide what they do when a list is stale.
- Over-long chains. Each block adds size and verification work. Cap the depth.
- Treating attenuation as identity. A narrowed token still speaks for the original subject; if you need to know which service narrowed it, record that in the block.
How QuorumAuth handles Biscuit tokens
QuorumAuth issues Biscuit tokens alongside JWTs and verifies them in its SDKs. In its tested behaviour:
- A valid Biscuit is verified locally after the SDK fetches the issuer’s keys on first use, and carries a future expiry.
- A service can attenuate a Biscuit locally. The narrowed token verifies with only the delegated scope, cannot regain the scope it gave up, cannot widen beyond its parent, carries its delegation depth, and names both the service that acted and the service it is addressed to.
- Each attenuation appends one block and increases the depth by one, and each block stays distinguishable from the issuer’s authority block.
- A token with a single flipped byte fails signature verification, and attenuating a tampered token is rejected.
- Revoked tokens are refused by nonce. The token library beneath QuorumAuth’s SDKs accepts a stale revocation list for at most seven days past its validity, then reports the state as unknown, and the SDK refuses.
Biscuit is one format among several: QuorumAuth keeps one policy, whichever token format a system receives.
Frequently asked questions
How is a Biscuit different from a JWT?
Both are signed and verifiable offline. A JWT cannot be changed after signing. A Biscuit can be narrowed by any holder, and carries authorization logic, not just claims.
How is a Biscuit different from a Macaroon?
Both support offline attenuation. Macaroons use HMAC chains, so verifiers need the root secret. Biscuits use public-key signatures, so verifiers need only the public key.
Can attenuation add permissions?
No. A new block can only add checks that must also pass. It can never remove a check or relax one from an earlier block.
Can a Biscuit be revoked?
Each block carries a revocation identifier. Verifiers refuse tokens whose identifiers appear on a revocation list they hold.