[vault] Provision: the provision audit body member (checked entries, no value member, append-only, newest 5 000; docs/FORMAT.md)
This commit is contained in:
@@ -129,6 +129,42 @@ UTF-8 JSON, held in zeroizing buffers while being encrypted or parsed:
|
||||
An older Custos drops `folder` and `attachments` when it saves.
|
||||
- `signing` (optional, core 0.9.0): signing keys for releases and the audit log of every signing request
|
||||
(docs/SIGNING.md). An older Custos drops it when it saves, so every Custos that saves the vault must be 0.9.0 or later.
|
||||
- `provision` (optional, core 0.11.0): the Provisio audit, every outcome of a server's *ask* or *offer* (the app's
|
||||
docs/10_provisio.md). An older Custos ignores it when it reads and drops it when it saves, so every Custos that
|
||||
saves the vault must be 0.11.0 or later. See "The provision audit" below.
|
||||
|
||||
### The provision audit (core 0.11.0)
|
||||
|
||||
```json
|
||||
"provision": {
|
||||
"audit": [
|
||||
{ "at": 1793750100000, "direction": "offer", "host": "nixos-vm", "item": "fabrica/gitea-read-token",
|
||||
"store": "vault", "run": "deploy-7", "kind": "Gitea token, read:repository", "code": "684361",
|
||||
"outcome": "accepted", "replaced": true }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
| Member | |
|
||||
| :-- | :-- |
|
||||
| `at` | Unix milliseconds |
|
||||
| `direction` | `ask` (the server asked for a secret) or `offer` (the server offered one) |
|
||||
| `host` | the name the factor service gave, 1–253 characters `[A-Za-z0-9.-]` |
|
||||
| `item` | `^[a-z0-9][a-z0-9._-]{0,63}(/[a-z0-9][a-z0-9._-]{0,63}){0,3}$`, as the factor service checks it |
|
||||
| `store` | `vault`, `claude` or `cloud` |
|
||||
| `run` | optional, `[A-Za-z0-9._-]{1,64}` |
|
||||
| `kind` | optional, at most 200 characters, no control characters (an offer's label; an ask's `--generate` recipe) |
|
||||
| `code` | the match code: six ASCII digits |
|
||||
| `outcome` | `approved`, `generated`, `accepted`, `refused`, `out-of-scope`, `invalid` or `expired` |
|
||||
| `replaced` | `true` when an accepted offer replaced an existing item |
|
||||
|
||||
- **No value, ever.** There is no member that holds a secret: every member is something the server sent in the
|
||||
clear through the mailbox (host, item, store, run, kind) or derives from a public key (`code`). A recorded
|
||||
entry is checked against the table above; an entry that does not fit is refused, not stored.
|
||||
- **Append-only.** The API records an entry and lists them (oldest first); nothing edits or removes one, except
|
||||
that the log keeps the newest 5 000 entries and drops the oldest beyond that.
|
||||
- Readers ignore members of an entry they do not know. A file whose `provision` has an `outcome`, `direction` or
|
||||
`store` this core does not know does not open (`Corrupted`), as for `signing`.
|
||||
|
||||
### Item types and their fields (v1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user