[vault] Licences: the domi-licence key, the strict payload parser, the licence grant (0.21.0) #29
Reference in New Issue
Block a user
Delete Branch "feature/licence"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Atrium Domi's Day 2 (Mark's decision): paid Domi licences are signed automatically after payment, under a scoped grant, with no card each time. The byte format is Fundamentum
docs/LICENCE.md(licence v1, atrium-v0.4.0). This core does the signing.What
licence.rs(new):domi-licence: Ed25519, made by Mark's click, never exported. Only its 32-byte public key leaves.custos_sign::ed25519_plain, ed25519-dalek, no custom crypto.parse_payloadis the spec's strict parser on a payload: �2.4 steps 1�4 and 7 for a licence, �4.1 for a revocation list, with the spec's error codes. Caps are 4004 and 61 348 bytes, the file caps minus thesig:line, so every signed file passes the service's size check.licence_grant_set/_revoke, Mark's click,standing-granted/standing-revoked) holds an allowlist of app ids.licence_ask(payload, Caller { app, domi_signed }, now):licence-issue,issuedmore than 24 h from this clock, a licence id signed before (replay), a revocationseqnot above the highest signed (rollback), a full log;licence_signchecks again, signs, and logs time, how, the licence id and its apps, or the seq and count. It never logs the signature, the payload or the nickname.signing.rs:licencemember, which older cores ignore and drop on save. The grant is then gone (fail closed) and the key stays.check(),set_scopeand the Android key form.custos-sign:ed25519_plain.Tests
cargo test --workspace: 291 passed, 0 failed.licence::tests(7):verify_strictover the exact payload, and the same id again is a replay;Self-review
KeyKind,SignKindorOutcomevariant, so older cores parse the vault unchanged. The new state sits in an optional member.signing.rs'slicence_signature. Every refusal carries a code, never bytes. The service's own anti-rollback check (LICENCE.md �4.2) is the second line if an older vault is restored.