@openvtc/trust-tasks 0.17.4 → 0.17.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +86 -0
- package/dist/_shared/components.d.ts +17 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/auth/step-up/approve-response/0.3/payload.d.ts +887 -0
- package/dist/auth/step-up/approve-response/0.3/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approve-response/0.3/payload.js +505 -0
- package/dist/auth/step-up/approve-response/0.3/payload.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/persona/claim-types/list/1.0/payload.d.ts +772 -0
- package/dist/persona/claim-types/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/claim-types/list/1.0/payload.js +389 -0
- package/dist/persona/claim-types/list/1.0/payload.js.map +1 -0
- package/dist/rooms/_shared/0.1/room.d.ts +1 -1
- package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
- package/dist/rooms/epoch/chain/0.1/payload.d.ts +490 -0
- package/dist/rooms/epoch/chain/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/epoch/chain/0.1/payload.js +272 -0
- package/dist/rooms/epoch/chain/0.1/payload.js.map +1 -0
- package/dist/rooms/epoch/mint/0.1/payload.d.ts +104 -2
- package/dist/rooms/epoch/mint/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/epoch/mint/0.1/payload.js +57 -0
- package/dist/rooms/epoch/mint/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +17 -0
- package/src/auth/step-up/approve-response/0.3/payload.ts +594 -0
- package/src/index.ts +3 -0
- package/src/persona/claim-types/list/1.0/payload.ts +590 -0
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/epoch/chain/0.1/payload.ts +323 -0
- package/src/rooms/epoch/mint/0.1/payload.ts +63 -2
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/epoch/chain/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { AuthorityPresentation, EpochLink, Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export interface RoomsEpochChainPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The room whose epoch key chain is being fetched.
|
|
12
|
+
*/
|
|
13
|
+
roomId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Must confer the `read` action at this room's scope. Reading the room and reading the parts of it written earlier are the same act, so they take the same grant; a separate one would be a grant nobody could explain.
|
|
16
|
+
*/
|
|
17
|
+
presentation: AuthorityPresentation;
|
|
18
|
+
/**
|
|
19
|
+
* Return only links whose `epoch` is at or below this. The chain is walked downwards, so this is how a member who already holds the top of it asks for the rest. Absent means from the room's current epoch down.
|
|
20
|
+
*/
|
|
21
|
+
fromEpoch?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Maximum links to return, highest `epoch` first. A host MAY return fewer.
|
|
24
|
+
*/
|
|
25
|
+
limit?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
28
|
+
*/
|
|
29
|
+
ext?: Ext;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Success response to rooms/epoch/chain. Type https://trusttasks.org/spec/rooms/epoch/chain/0.1#response. Carries ciphertext a host cannot read: the key that opens a link is a storage key no host ever holds, so a response served to a party holding no epoch key discloses nothing but the number of epochs, which the room's epoch number already told them.
|
|
33
|
+
*/
|
|
34
|
+
export interface RoomsEpochChainResponsePayload {
|
|
35
|
+
roomId: string;
|
|
36
|
+
/**
|
|
37
|
+
* The links, highest `epoch` first. Contiguous within the range returned: a host MUST NOT omit a rung it holds while returning a lower one, because a member cannot walk past a gap and would read the omission as history that had been severed.
|
|
38
|
+
*/
|
|
39
|
+
links: EpochLink[];
|
|
40
|
+
ext?: Ext;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
44
|
+
export type { AuthorityPresentation, EpochLink, Ext };
|
|
45
|
+
|
|
46
|
+
/** Trust Task type URI. */
|
|
47
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/epoch/chain/0.1" as const;
|
|
48
|
+
|
|
49
|
+
/** Stable alias for this specification's request payload shape. */
|
|
50
|
+
export type Payload = RoomsEpochChainPayload;
|
|
51
|
+
|
|
52
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
53
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/epoch/chain/0.1#response" as const;
|
|
54
|
+
|
|
55
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
56
|
+
export type Response = RoomsEpochChainResponsePayload;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* This specification's payload schema, as a value.
|
|
60
|
+
*
|
|
61
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
62
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
63
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
64
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
65
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
66
|
+
*/
|
|
67
|
+
export const PAYLOAD_SCHEMA = {
|
|
68
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
69
|
+
"$id": "https://trusttasks.org/spec/rooms/epoch/chain/0.1",
|
|
70
|
+
"title": "Rooms Epoch Chain — payload",
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"required": [
|
|
74
|
+
"roomId",
|
|
75
|
+
"presentation"
|
|
76
|
+
],
|
|
77
|
+
"properties": {
|
|
78
|
+
"roomId": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"description": "The room whose epoch key chain is being fetched."
|
|
81
|
+
},
|
|
82
|
+
"presentation": {
|
|
83
|
+
"$ref": "#/$defs/AuthorityPresentation",
|
|
84
|
+
"description": "Must confer the `read` action at this room's scope. Reading the room and reading the parts of it written earlier are the same act, so they take the same grant; a separate one would be a grant nobody could explain."
|
|
85
|
+
},
|
|
86
|
+
"fromEpoch": {
|
|
87
|
+
"type": "integer",
|
|
88
|
+
"minimum": 2,
|
|
89
|
+
"description": "Return only links whose `epoch` is at or below this. The chain is walked downwards, so this is how a member who already holds the top of it asks for the rest. Absent means from the room's current epoch down."
|
|
90
|
+
},
|
|
91
|
+
"limit": {
|
|
92
|
+
"type": "integer",
|
|
93
|
+
"minimum": 1,
|
|
94
|
+
"maximum": 500,
|
|
95
|
+
"description": "Maximum links to return, highest `epoch` first. A host MAY return fewer."
|
|
96
|
+
},
|
|
97
|
+
"ext": {
|
|
98
|
+
"$ref": "#/$defs/Ext",
|
|
99
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"$defs": {
|
|
103
|
+
"Response": {
|
|
104
|
+
"$anchor": "response",
|
|
105
|
+
"title": "Rooms Epoch Chain — response payload",
|
|
106
|
+
"description": "Success response to rooms/epoch/chain. Type https://trusttasks.org/spec/rooms/epoch/chain/0.1#response. Carries ciphertext a host cannot read: the key that opens a link is a storage key no host ever holds, so a response served to a party holding no epoch key discloses nothing but the number of epochs, which the room's epoch number already told them.",
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"required": [
|
|
110
|
+
"roomId",
|
|
111
|
+
"links"
|
|
112
|
+
],
|
|
113
|
+
"properties": {
|
|
114
|
+
"roomId": {
|
|
115
|
+
"type": "string"
|
|
116
|
+
},
|
|
117
|
+
"links": {
|
|
118
|
+
"type": "array",
|
|
119
|
+
"description": "The links, highest `epoch` first. Contiguous within the range returned: a host MUST NOT omit a rung it holds while returning a lower one, because a member cannot walk past a gap and would read the omission as history that had been severed.",
|
|
120
|
+
"items": {
|
|
121
|
+
"$ref": "#/$defs/EpochLink"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"ext": {
|
|
125
|
+
"$ref": "#/$defs/Ext"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"Ext": {
|
|
130
|
+
"title": "Ext",
|
|
131
|
+
"description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
|
|
132
|
+
"type": "object",
|
|
133
|
+
"minProperties": 1,
|
|
134
|
+
"additionalProperties": true,
|
|
135
|
+
"propertyNames": {
|
|
136
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"EpochLink": {
|
|
140
|
+
"title": "EpochLink",
|
|
141
|
+
"type": "object",
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"required": [
|
|
144
|
+
"epoch",
|
|
145
|
+
"wrapped",
|
|
146
|
+
"nonce"
|
|
147
|
+
],
|
|
148
|
+
"description": "One rung of a room's epoch key chain: the storage key of epoch `epoch - 1`, sealed under the storage key of `epoch`. A group key schedule offers no way to derive an earlier epoch's key from a later one — that property is what makes removing a member mean something — so without a chain the first membership change makes every record already in the room unopenable by everyone, including whoever wrote it. The chain is the one-way street run deliberately the other way: a member holding the current key walks it backwards to any retained epoch, and a member holding an earlier key still derives nothing later. Removal stays forward-only; reading stays possible. What a chain costs is stated where it is chosen, in the room's retention policy.",
|
|
149
|
+
"properties": {
|
|
150
|
+
"epoch": {
|
|
151
|
+
"type": "integer",
|
|
152
|
+
"minimum": 2,
|
|
153
|
+
"description": "The epoch whose storage key opens this link; it wraps the storage key of `epoch - 1`. Never 1: a room's first epoch has no predecessor, so a link claiming one wraps something that is not an earlier epoch's key."
|
|
154
|
+
},
|
|
155
|
+
"wrapped": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"description": "The wrapped predecessor key, base64url. Bound by AEAD associated data to `roomId` and to this link's own position in the chain, so a link lifted to another rung, or served under another room, fails to open rather than yielding a key that is wrong. The binding is load-bearing rather than decorative: every rung is a fixed-length key sealed under a fixed-length key, so nothing about the ciphertext itself says where it belongs."
|
|
158
|
+
},
|
|
159
|
+
"nonce": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"description": "AEAD nonce, base64url."
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"AuthorityPresentation": {
|
|
166
|
+
"title": "AuthorityPresentation",
|
|
167
|
+
"type": "object",
|
|
168
|
+
"additionalProperties": false,
|
|
169
|
+
"required": [
|
|
170
|
+
"membership",
|
|
171
|
+
"authority"
|
|
172
|
+
],
|
|
173
|
+
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.",
|
|
174
|
+
"properties": {
|
|
175
|
+
"membership": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"description": "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile."
|
|
178
|
+
},
|
|
179
|
+
"authority": {
|
|
180
|
+
"type": "array",
|
|
181
|
+
"minItems": 1,
|
|
182
|
+
"maxItems": 8,
|
|
183
|
+
"items": {
|
|
184
|
+
"type": "string"
|
|
185
|
+
},
|
|
186
|
+
"description": "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent."
|
|
187
|
+
},
|
|
188
|
+
"subjectBinding": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"description": "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this."
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
} as const;
|
|
196
|
+
|
|
197
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
198
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
199
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
200
|
+
"$ref": "#/$defs/Response",
|
|
201
|
+
"$defs": {
|
|
202
|
+
"Response": {
|
|
203
|
+
"$anchor": "response",
|
|
204
|
+
"title": "Rooms Epoch Chain — response payload",
|
|
205
|
+
"description": "Success response to rooms/epoch/chain. Type https://trusttasks.org/spec/rooms/epoch/chain/0.1#response. Carries ciphertext a host cannot read: the key that opens a link is a storage key no host ever holds, so a response served to a party holding no epoch key discloses nothing but the number of epochs, which the room's epoch number already told them.",
|
|
206
|
+
"type": "object",
|
|
207
|
+
"additionalProperties": false,
|
|
208
|
+
"required": [
|
|
209
|
+
"roomId",
|
|
210
|
+
"links"
|
|
211
|
+
],
|
|
212
|
+
"properties": {
|
|
213
|
+
"roomId": {
|
|
214
|
+
"type": "string"
|
|
215
|
+
},
|
|
216
|
+
"links": {
|
|
217
|
+
"type": "array",
|
|
218
|
+
"description": "The links, highest `epoch` first. Contiguous within the range returned: a host MUST NOT omit a rung it holds while returning a lower one, because a member cannot walk past a gap and would read the omission as history that had been severed.",
|
|
219
|
+
"items": {
|
|
220
|
+
"$ref": "#/$defs/EpochLink"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"ext": {
|
|
224
|
+
"$ref": "#/$defs/Ext"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"Ext": {
|
|
229
|
+
"title": "Ext",
|
|
230
|
+
"description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
|
|
231
|
+
"type": "object",
|
|
232
|
+
"minProperties": 1,
|
|
233
|
+
"additionalProperties": true,
|
|
234
|
+
"propertyNames": {
|
|
235
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"EpochLink": {
|
|
239
|
+
"title": "EpochLink",
|
|
240
|
+
"type": "object",
|
|
241
|
+
"additionalProperties": false,
|
|
242
|
+
"required": [
|
|
243
|
+
"epoch",
|
|
244
|
+
"wrapped",
|
|
245
|
+
"nonce"
|
|
246
|
+
],
|
|
247
|
+
"description": "One rung of a room's epoch key chain: the storage key of epoch `epoch - 1`, sealed under the storage key of `epoch`. A group key schedule offers no way to derive an earlier epoch's key from a later one — that property is what makes removing a member mean something — so without a chain the first membership change makes every record already in the room unopenable by everyone, including whoever wrote it. The chain is the one-way street run deliberately the other way: a member holding the current key walks it backwards to any retained epoch, and a member holding an earlier key still derives nothing later. Removal stays forward-only; reading stays possible. What a chain costs is stated where it is chosen, in the room's retention policy.",
|
|
248
|
+
"properties": {
|
|
249
|
+
"epoch": {
|
|
250
|
+
"type": "integer",
|
|
251
|
+
"minimum": 2,
|
|
252
|
+
"description": "The epoch whose storage key opens this link; it wraps the storage key of `epoch - 1`. Never 1: a room's first epoch has no predecessor, so a link claiming one wraps something that is not an earlier epoch's key."
|
|
253
|
+
},
|
|
254
|
+
"wrapped": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"description": "The wrapped predecessor key, base64url. Bound by AEAD associated data to `roomId` and to this link's own position in the chain, so a link lifted to another rung, or served under another room, fails to open rather than yielding a key that is wrong. The binding is load-bearing rather than decorative: every rung is a fixed-length key sealed under a fixed-length key, so nothing about the ciphertext itself says where it belongs."
|
|
257
|
+
},
|
|
258
|
+
"nonce": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"description": "AEAD nonce, base64url."
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"AuthorityPresentation": {
|
|
265
|
+
"title": "AuthorityPresentation",
|
|
266
|
+
"type": "object",
|
|
267
|
+
"additionalProperties": false,
|
|
268
|
+
"required": [
|
|
269
|
+
"membership",
|
|
270
|
+
"authority"
|
|
271
|
+
],
|
|
272
|
+
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.",
|
|
273
|
+
"properties": {
|
|
274
|
+
"membership": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"description": "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile."
|
|
277
|
+
},
|
|
278
|
+
"authority": {
|
|
279
|
+
"type": "array",
|
|
280
|
+
"minItems": 1,
|
|
281
|
+
"maxItems": 8,
|
|
282
|
+
"items": {
|
|
283
|
+
"type": "string"
|
|
284
|
+
},
|
|
285
|
+
"description": "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent."
|
|
286
|
+
},
|
|
287
|
+
"subjectBinding": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"description": "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this."
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
} as const;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
298
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
299
|
+
* per-specification and cannot be derived from the document alone, and
|
|
300
|
+
* item 2 needs the schema this carries.
|
|
301
|
+
*/
|
|
302
|
+
export const SPEC = {
|
|
303
|
+
typeUri: TYPE_URI,
|
|
304
|
+
isBearer: false,
|
|
305
|
+
isProofRequired: true,
|
|
306
|
+
isRecipientRequired: true,
|
|
307
|
+
isIssuedAtRequired: true,
|
|
308
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
309
|
+
} as const;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
313
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
314
|
+
* parties (§7.3 item 5).
|
|
315
|
+
*/
|
|
316
|
+
export const RESPONSE_SPEC = {
|
|
317
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
318
|
+
isBearer: false,
|
|
319
|
+
isProofRequired: true,
|
|
320
|
+
isRecipientRequired: true,
|
|
321
|
+
isIssuedAtRequired: true,
|
|
322
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
323
|
+
} as const;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Source: specs/rooms/epoch/mint/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { AuthorityPresentation, Ext } from "../../../../_shared/components.js";
|
|
6
|
+
import type { AuthorityPresentation, EpochLink, Ext } from "../../../../_shared/components.js";
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
export interface RoomsEpochMintPayload {
|
|
@@ -19,6 +19,10 @@ export interface RoomsEpochMintPayload {
|
|
|
19
19
|
* Must confer the `admin` action at this room's scope. Restricting epoch minting matters: if any key-holder could mint one, any member could evict any other by declining to seal the new key to them — silently, and with no server-side check possible on a room whose membership the host cannot see.
|
|
20
20
|
*/
|
|
21
21
|
presentation: AuthorityPresentation;
|
|
22
|
+
/**
|
|
23
|
+
* The rung of the epoch key chain that this advance produces: the outgoing epoch's storage key sealed under the incoming one. Carried here because minting is the only moment at which one party holds both keys, and a room that advances without producing it silently loses the ability to read everything written before — for every member, including whoever wrote it. Its `epoch` MUST equal `epoch`, and a host MUST reject the request otherwise; a host MUST NOT replace a link it already holds for an epoch, because a second one is either a replay or a re-pointing of the room's history at key material of somebody else's choosing, and the members who already walked the original would never see the difference. Absent where the room does not keep its history readable, and necessarily absent for a room's first epoch, which has no predecessor.
|
|
24
|
+
*/
|
|
25
|
+
link?: EpochLink;
|
|
22
26
|
/**
|
|
23
27
|
* Optional operator-facing rationale, recorded in the room's audit.
|
|
24
28
|
*/
|
|
@@ -38,7 +42,7 @@ export interface RoomsEpochMintResponsePayload {
|
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
41
|
-
export type { AuthorityPresentation, Ext };
|
|
45
|
+
export type { AuthorityPresentation, EpochLink, Ext };
|
|
42
46
|
|
|
43
47
|
/** Trust Task type URI. */
|
|
44
48
|
export const TYPE_URI = "https://trusttasks.org/spec/rooms/epoch/mint/0.1" as const;
|
|
@@ -86,6 +90,11 @@ export const PAYLOAD_SCHEMA = {
|
|
|
86
90
|
"$ref": "#/$defs/AuthorityPresentation",
|
|
87
91
|
"description": "Must confer the `admin` action at this room's scope. Restricting epoch minting matters: if any key-holder could mint one, any member could evict any other by declining to seal the new key to them — silently, and with no server-side check possible on a room whose membership the host cannot see."
|
|
88
92
|
},
|
|
93
|
+
"link": {
|
|
94
|
+
"$ref": "#/$defs/EpochLink",
|
|
95
|
+
"description": "The rung of the epoch key chain that this advance produces: the outgoing epoch's storage key sealed under the incoming one. Carried here because minting is the only moment at which one party holds both keys, and a room that advances without producing it silently loses the ability to read everything written before — for every member, including whoever wrote it. Its `epoch` MUST equal `epoch`, and a host MUST reject the request otherwise; a host MUST NOT replace a link it already holds for an epoch, because a second one is either a replay or a re-pointing of the room's history at key material of somebody else's choosing, and the members who already walked the original would never see the difference. Absent where the room does not keep its history readable, and necessarily absent for a room's first epoch, which has no predecessor.",
|
|
96
|
+
"$comment": "Optional rather than required: this member was added to an already-published version, and requiring it would break every conforming producer. A room that omits it is making the choice the description names, not failing to make one."
|
|
97
|
+
},
|
|
89
98
|
"reason": {
|
|
90
99
|
"type": "string",
|
|
91
100
|
"maxLength": 1024,
|
|
@@ -130,6 +139,32 @@ export const PAYLOAD_SCHEMA = {
|
|
|
130
139
|
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
131
140
|
}
|
|
132
141
|
},
|
|
142
|
+
"EpochLink": {
|
|
143
|
+
"title": "EpochLink",
|
|
144
|
+
"type": "object",
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"required": [
|
|
147
|
+
"epoch",
|
|
148
|
+
"wrapped",
|
|
149
|
+
"nonce"
|
|
150
|
+
],
|
|
151
|
+
"description": "One rung of a room's epoch key chain: the storage key of epoch `epoch - 1`, sealed under the storage key of `epoch`. A group key schedule offers no way to derive an earlier epoch's key from a later one — that property is what makes removing a member mean something — so without a chain the first membership change makes every record already in the room unopenable by everyone, including whoever wrote it. The chain is the one-way street run deliberately the other way: a member holding the current key walks it backwards to any retained epoch, and a member holding an earlier key still derives nothing later. Removal stays forward-only; reading stays possible. What a chain costs is stated where it is chosen, in the room's retention policy.",
|
|
152
|
+
"properties": {
|
|
153
|
+
"epoch": {
|
|
154
|
+
"type": "integer",
|
|
155
|
+
"minimum": 2,
|
|
156
|
+
"description": "The epoch whose storage key opens this link; it wraps the storage key of `epoch - 1`. Never 1: a room's first epoch has no predecessor, so a link claiming one wraps something that is not an earlier epoch's key."
|
|
157
|
+
},
|
|
158
|
+
"wrapped": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"description": "The wrapped predecessor key, base64url. Bound by AEAD associated data to `roomId` and to this link's own position in the chain, so a link lifted to another rung, or served under another room, fails to open rather than yielding a key that is wrong. The binding is load-bearing rather than decorative: every rung is a fixed-length key sealed under a fixed-length key, so nothing about the ciphertext itself says where it belongs."
|
|
161
|
+
},
|
|
162
|
+
"nonce": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"description": "AEAD nonce, base64url."
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
133
168
|
"AuthorityPresentation": {
|
|
134
169
|
"title": "AuthorityPresentation",
|
|
135
170
|
"type": "object",
|
|
@@ -200,6 +235,32 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
200
235
|
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
201
236
|
}
|
|
202
237
|
},
|
|
238
|
+
"EpochLink": {
|
|
239
|
+
"title": "EpochLink",
|
|
240
|
+
"type": "object",
|
|
241
|
+
"additionalProperties": false,
|
|
242
|
+
"required": [
|
|
243
|
+
"epoch",
|
|
244
|
+
"wrapped",
|
|
245
|
+
"nonce"
|
|
246
|
+
],
|
|
247
|
+
"description": "One rung of a room's epoch key chain: the storage key of epoch `epoch - 1`, sealed under the storage key of `epoch`. A group key schedule offers no way to derive an earlier epoch's key from a later one — that property is what makes removing a member mean something — so without a chain the first membership change makes every record already in the room unopenable by everyone, including whoever wrote it. The chain is the one-way street run deliberately the other way: a member holding the current key walks it backwards to any retained epoch, and a member holding an earlier key still derives nothing later. Removal stays forward-only; reading stays possible. What a chain costs is stated where it is chosen, in the room's retention policy.",
|
|
248
|
+
"properties": {
|
|
249
|
+
"epoch": {
|
|
250
|
+
"type": "integer",
|
|
251
|
+
"minimum": 2,
|
|
252
|
+
"description": "The epoch whose storage key opens this link; it wraps the storage key of `epoch - 1`. Never 1: a room's first epoch has no predecessor, so a link claiming one wraps something that is not an earlier epoch's key."
|
|
253
|
+
},
|
|
254
|
+
"wrapped": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"description": "The wrapped predecessor key, base64url. Bound by AEAD associated data to `roomId` and to this link's own position in the chain, so a link lifted to another rung, or served under another room, fails to open rather than yielding a key that is wrong. The binding is load-bearing rather than decorative: every rung is a fixed-length key sealed under a fixed-length key, so nothing about the ciphertext itself says where it belongs."
|
|
257
|
+
},
|
|
258
|
+
"nonce": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"description": "AEAD nonce, base64url."
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
203
264
|
"AuthorityPresentation": {
|
|
204
265
|
"title": "AuthorityPresentation",
|
|
205
266
|
"type": "object",
|