@openvtc/trust-tasks 0.21.2 → 0.21.4
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 +85 -0
- package/dist/auth/passkey/admin-list/0.1/payload.d.ts +484 -0
- package/dist/auth/passkey/admin-list/0.1/payload.d.ts.map +1 -0
- package/dist/auth/passkey/admin-list/0.1/payload.js +257 -0
- package/dist/auth/passkey/admin-list/0.1/payload.js.map +1 -0
- package/dist/git-ns/namespace/list/0.1/payload.d.ts +1343 -0
- package/dist/git-ns/namespace/list/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/namespace/list/0.1/payload.js +704 -0
- package/dist/git-ns/namespace/list/0.1/payload.js.map +1 -0
- package/dist/git-ns/repo/list/0.1/payload.d.ts +1377 -0
- package/dist/git-ns/repo/list/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/list/0.1/payload.js +744 -0
- package/dist/git-ns/repo/list/0.1/payload.js.map +1 -0
- package/dist/git-ns/view/0.5/payload.d.ts +1722 -0
- package/dist/git-ns/view/0.5/payload.d.ts.map +1 -0
- package/dist/git-ns/view/0.5/payload.js +1024 -0
- package/dist/git-ns/view/0.5/payload.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/vta/services/report/0.1/payload.d.ts +618 -0
- package/dist/vta/services/report/0.1/payload.d.ts.map +1 -0
- package/dist/vta/services/report/0.1/payload.js +322 -0
- package/dist/vta/services/report/0.1/payload.js.map +1 -0
- package/dist/vta/services/update/1.1/payload.d.ts +490 -0
- package/dist/vta/services/update/1.1/payload.d.ts.map +1 -0
- package/dist/vta/services/update/1.1/payload.js +269 -0
- package/dist/vta/services/update/1.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/auth/passkey/admin-list/0.1/payload.ts +338 -0
- package/src/git-ns/namespace/list/0.1/payload.ts +883 -0
- package/src/git-ns/repo/list/0.1/payload.ts +909 -0
- package/src/git-ns/view/0.5/payload.ts +1095 -0
- package/src/index.ts +6 -0
- package/src/vta/services/report/0.1/payload.ts +419 -0
- package/src/vta/services/update/1.1/payload.ts +326 -0
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/services/update/1.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/services/update/1.1";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/services/update/1.1#response";
|
|
9
|
+
/**
|
|
10
|
+
* This specification's payload schema, as a value.
|
|
11
|
+
*
|
|
12
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
13
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
14
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
15
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
16
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
17
|
+
*/
|
|
18
|
+
export const PAYLOAD_SCHEMA = {
|
|
19
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
20
|
+
"$id": "https://trusttasks.org/spec/vta/services/update/1.1",
|
|
21
|
+
"title": "VTA Services — Update — payload",
|
|
22
|
+
"description": "Request payload for vta/services/update. Replaces the settings on a transport that is already advertised. Refused when the transport is not currently enabled — that case is `enable`, and conflating the two would let a typo silently advertise a service the operator meant to change.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"service",
|
|
27
|
+
"config"
|
|
28
|
+
],
|
|
29
|
+
"properties": {
|
|
30
|
+
"service": {
|
|
31
|
+
"$ref": "#/$defs/ServiceKind"
|
|
32
|
+
},
|
|
33
|
+
"config": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"description": "Kind-specific settings. Which member applies is decided by `service`, and the two must agree — a `rest` request carrying `mediatorDid` is malformed, not a request with an ignored field. `didcomm` and `tsp` take `mediatorDid`; `rest` and `webauthn` take `url`.",
|
|
37
|
+
"properties": {
|
|
38
|
+
"mediatorDid": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1,
|
|
41
|
+
"description": "Mediator to route through. Applies to `didcomm` and `tsp`."
|
|
42
|
+
},
|
|
43
|
+
"url": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1,
|
|
46
|
+
"description": "Endpoint to advertise. Applies to `rest` and `webauthn`. MUST be `https://`, with no fragment and no userinfo — the agent refuses anything else, because this value ends up in a signed DID document that clients will fetch."
|
|
47
|
+
},
|
|
48
|
+
"force": {
|
|
49
|
+
"type": "boolean",
|
|
50
|
+
"description": "`didcomm` only: skip the mediator handshake except for DID resolution. Absent means the handshake runs, which is the safe reading — this carries no schema-level default on purpose, because a default would materialise the field into a `rest` or `webauthn` config where it has no meaning. The handshake is what proves the mediator is reachable and willing, so forcing past it can advertise a mediator that cannot actually deliver."
|
|
51
|
+
},
|
|
52
|
+
"handshakeTimeoutSecs": {
|
|
53
|
+
"type": "integer",
|
|
54
|
+
"minimum": 1,
|
|
55
|
+
"description": "`didcomm` only: trust-ping round-trip budget. Default 10."
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"ext": {
|
|
60
|
+
"$ref": "#/$defs/Ext"
|
|
61
|
+
},
|
|
62
|
+
"drainTtlSecs": {
|
|
63
|
+
"type": "integer",
|
|
64
|
+
"minimum": 0,
|
|
65
|
+
"description": "Mediated transports only (`didcomm`, `tsp`): how long the replaced mediator keeps accepting delivery for correspondents still holding the previous DID document. Refused for `rest` and `webauthn`. Absent takes the agent's default. The agent may raise a value below its floor to the floor — and does, over a request that arrived through the mediator being replaced — and one mediator carrying both mediated transports drains once for both, so read `drainUntil` in the result for the window actually applied."
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"$defs": {
|
|
69
|
+
"Response": {
|
|
70
|
+
"$anchor": "response",
|
|
71
|
+
"title": "VTA Services — Update — response payload",
|
|
72
|
+
"description": "Success response to vta/services/update. Type https://trusttasks.org/spec/vta/services/update/1.1#response.",
|
|
73
|
+
"type": "object",
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"required": [
|
|
76
|
+
"result"
|
|
77
|
+
],
|
|
78
|
+
"properties": {
|
|
79
|
+
"result": {
|
|
80
|
+
"$ref": "#/$defs/ServiceMutationResult"
|
|
81
|
+
},
|
|
82
|
+
"ext": {
|
|
83
|
+
"$ref": "#/$defs/Ext"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"Ext": {
|
|
88
|
+
"title": "Ext",
|
|
89
|
+
"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.",
|
|
90
|
+
"type": "object",
|
|
91
|
+
"minProperties": 1,
|
|
92
|
+
"additionalProperties": true,
|
|
93
|
+
"propertyNames": {
|
|
94
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"ServiceMutationResult": {
|
|
98
|
+
"title": "ServiceMutationResult",
|
|
99
|
+
"description": "The outcome of a change to an advertised service. Every member describes the **log entry the change produced**, because that is what the change actually is: the agent's DID document is the record, and a consumer that treats the response as a mere acknowledgement will miss that a redeploy may be required.",
|
|
100
|
+
"type": "object",
|
|
101
|
+
"additionalProperties": false,
|
|
102
|
+
"required": [
|
|
103
|
+
"logEntryVersionId",
|
|
104
|
+
"effectiveAt"
|
|
105
|
+
],
|
|
106
|
+
"properties": {
|
|
107
|
+
"logEntryVersionId": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"minLength": 1,
|
|
110
|
+
"description": "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history."
|
|
111
|
+
},
|
|
112
|
+
"effectiveAt": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"format": "date-time",
|
|
115
|
+
"description": "RFC 3339 instant the change took effect — the same instant stamped on the new log entry."
|
|
116
|
+
},
|
|
117
|
+
"drainUntil": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"format": "date-time",
|
|
120
|
+
"description": "Present when the change scheduled a DIDComm drain. Its absence means no drain was scheduled, NOT that a drain finished instantly: a consumer reporting 'done' on an absent value would be right, and one reporting it on a present value would be wrong."
|
|
121
|
+
},
|
|
122
|
+
"drainingMediator": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"description": "The mediator being drained, when `drainUntil` is present."
|
|
125
|
+
},
|
|
126
|
+
"vtaDid": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"description": "The agent's own DID — subject of the log entry this change wrote. Carried so a caller can follow up without a second round trip."
|
|
129
|
+
},
|
|
130
|
+
"serverless": {
|
|
131
|
+
"type": "boolean",
|
|
132
|
+
"description": "True when the agent's DID is self-hosted. **The change is persisted locally but NOT published**: the operator must fetch the updated `did.jsonl` and redeploy before any verifier sees it. A consumer that ignores this reports success for a change no one else can observe yet.",
|
|
133
|
+
"default": false
|
|
134
|
+
},
|
|
135
|
+
"ext": {
|
|
136
|
+
"$ref": "#/$defs/Ext"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"ServiceKind": {
|
|
141
|
+
"title": "ServiceKind",
|
|
142
|
+
"description": "Which transport a task is acting on. This is the discriminator: it selects which member of `config` is meaningful, and a payload naming one kind with another's config is malformed rather than merely ignored.",
|
|
143
|
+
"type": "string",
|
|
144
|
+
"enum": [
|
|
145
|
+
"didcomm",
|
|
146
|
+
"rest",
|
|
147
|
+
"tsp",
|
|
148
|
+
"webauthn"
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
154
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
155
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
156
|
+
"$ref": "#/$defs/Response",
|
|
157
|
+
"$defs": {
|
|
158
|
+
"Response": {
|
|
159
|
+
"$anchor": "response",
|
|
160
|
+
"title": "VTA Services — Update — response payload",
|
|
161
|
+
"description": "Success response to vta/services/update. Type https://trusttasks.org/spec/vta/services/update/1.1#response.",
|
|
162
|
+
"type": "object",
|
|
163
|
+
"additionalProperties": false,
|
|
164
|
+
"required": [
|
|
165
|
+
"result"
|
|
166
|
+
],
|
|
167
|
+
"properties": {
|
|
168
|
+
"result": {
|
|
169
|
+
"$ref": "#/$defs/ServiceMutationResult"
|
|
170
|
+
},
|
|
171
|
+
"ext": {
|
|
172
|
+
"$ref": "#/$defs/Ext"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"Ext": {
|
|
177
|
+
"title": "Ext",
|
|
178
|
+
"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.",
|
|
179
|
+
"type": "object",
|
|
180
|
+
"minProperties": 1,
|
|
181
|
+
"additionalProperties": true,
|
|
182
|
+
"propertyNames": {
|
|
183
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"ServiceMutationResult": {
|
|
187
|
+
"title": "ServiceMutationResult",
|
|
188
|
+
"description": "The outcome of a change to an advertised service. Every member describes the **log entry the change produced**, because that is what the change actually is: the agent's DID document is the record, and a consumer that treats the response as a mere acknowledgement will miss that a redeploy may be required.",
|
|
189
|
+
"type": "object",
|
|
190
|
+
"additionalProperties": false,
|
|
191
|
+
"required": [
|
|
192
|
+
"logEntryVersionId",
|
|
193
|
+
"effectiveAt"
|
|
194
|
+
],
|
|
195
|
+
"properties": {
|
|
196
|
+
"logEntryVersionId": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"minLength": 1,
|
|
199
|
+
"description": "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history."
|
|
200
|
+
},
|
|
201
|
+
"effectiveAt": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"format": "date-time",
|
|
204
|
+
"description": "RFC 3339 instant the change took effect — the same instant stamped on the new log entry."
|
|
205
|
+
},
|
|
206
|
+
"drainUntil": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"format": "date-time",
|
|
209
|
+
"description": "Present when the change scheduled a DIDComm drain. Its absence means no drain was scheduled, NOT that a drain finished instantly: a consumer reporting 'done' on an absent value would be right, and one reporting it on a present value would be wrong."
|
|
210
|
+
},
|
|
211
|
+
"drainingMediator": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"description": "The mediator being drained, when `drainUntil` is present."
|
|
214
|
+
},
|
|
215
|
+
"vtaDid": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"description": "The agent's own DID — subject of the log entry this change wrote. Carried so a caller can follow up without a second round trip."
|
|
218
|
+
},
|
|
219
|
+
"serverless": {
|
|
220
|
+
"type": "boolean",
|
|
221
|
+
"description": "True when the agent's DID is self-hosted. **The change is persisted locally but NOT published**: the operator must fetch the updated `did.jsonl` and redeploy before any verifier sees it. A consumer that ignores this reports success for a change no one else can observe yet.",
|
|
222
|
+
"default": false
|
|
223
|
+
},
|
|
224
|
+
"ext": {
|
|
225
|
+
"$ref": "#/$defs/Ext"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"ServiceKind": {
|
|
230
|
+
"title": "ServiceKind",
|
|
231
|
+
"description": "Which transport a task is acting on. This is the discriminator: it selects which member of `config` is meaningful, and a payload naming one kind with another's config is malformed rather than merely ignored.",
|
|
232
|
+
"type": "string",
|
|
233
|
+
"enum": [
|
|
234
|
+
"didcomm",
|
|
235
|
+
"rest",
|
|
236
|
+
"tsp",
|
|
237
|
+
"webauthn"
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
/**
|
|
243
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
244
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
245
|
+
* per-specification and cannot be derived from the document alone, and
|
|
246
|
+
* item 2 needs the schema this carries.
|
|
247
|
+
*/
|
|
248
|
+
export const SPEC = {
|
|
249
|
+
typeUri: TYPE_URI,
|
|
250
|
+
isBearer: false,
|
|
251
|
+
isProofRequired: true,
|
|
252
|
+
isRecipientRequired: true,
|
|
253
|
+
isIssuedAtRequired: true,
|
|
254
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
255
|
+
};
|
|
256
|
+
/**
|
|
257
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
258
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
259
|
+
* parties (§7.3 item 5).
|
|
260
|
+
*/
|
|
261
|
+
export const RESPONSE_SPEC = {
|
|
262
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
263
|
+
isBearer: false,
|
|
264
|
+
isProofRequired: true,
|
|
265
|
+
isRecipientRequired: true,
|
|
266
|
+
isIssuedAtRequired: true,
|
|
267
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
268
|
+
};
|
|
269
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vta/services/update/1.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgDH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,qDAA8D,CAAC;AAKvF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,8DAAuE,CAAC;AAKzG;;;;;;;;G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AAkB,EAAE;oBAClB,MAAM,EAAE,QAAQ;oBAChB,aAAa,EAAE,2DAA2D;iBAC3E;gBACD,QAAQ,EAAE;oBACR,MAAM,EAAE,QAAQ;oBAChB,aAAa,EAAE,kIAAkI;iBAClJ;gBACD,YAAY,EAAE;oBACZ,MAAM,EAAE,SAAS;oBACjB,aAAa,EAAE,mRAAmR;oBAClS,SAAS,EAAE,KAAK;iBACjB;gBACD,KAAK,EAAE;oBACL,MAAM,EAAE,aAAa;iBACtB;aACF;SACF;QACD,aAAa,EAAE;YACb,OAAO,EAAE,aAAa;YACtB,aAAa,EAAE,iNAAiN;YAChO,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE;gBACN,SAAS;gBACT,MAAM;gBACN,KAAK;gBACL,UAAU;aACX;SACF;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/auth/passkey/admin-list/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* An administrator lists one subject's passkeys of one purpose — for example a member's step-up passkeys — as non-secret metadata, so they can tell which to revoke. The owner's own listing is auth/passkey/list, which takes no subject; this task exists because a subject in that payload is refused by design.
|
|
11
|
+
*/
|
|
12
|
+
export interface AuthPasskeyAdminList {
|
|
13
|
+
/**
|
|
14
|
+
* The VID whose credentials are listed. A request, never a grant: the consumer authorises the producer over this subject from its own state.
|
|
15
|
+
*/
|
|
16
|
+
subject: string;
|
|
17
|
+
/**
|
|
18
|
+
* Which credentials to list: `session` (sign-in) or `stepUp` (the step-up-only passkeys of auth/passkey/enroll/invite 0.2). REQUIRED, with no default, so an administrator reads exactly the inventory they asked for and a consumer can refuse one it does not disclose to administrators.
|
|
19
|
+
*/
|
|
20
|
+
purpose: "session" | "stepUp";
|
|
21
|
+
/**
|
|
22
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
23
|
+
*/
|
|
24
|
+
ext?: Ext;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/passkey/admin-list/0.1#response.
|
|
28
|
+
*/
|
|
29
|
+
export interface AuthPasskeyAdminListResponsePayload {
|
|
30
|
+
/**
|
|
31
|
+
* Echo of payload.subject.
|
|
32
|
+
*/
|
|
33
|
+
subject: string;
|
|
34
|
+
/**
|
|
35
|
+
* Echo of payload.purpose.
|
|
36
|
+
*/
|
|
37
|
+
purpose: "session" | "stepUp";
|
|
38
|
+
/**
|
|
39
|
+
* Every credential of that purpose currently bound to the subject, newest registeredAt first. MAY be empty: a member holding none is not an error.
|
|
40
|
+
*/
|
|
41
|
+
credentials: ListedCredential[];
|
|
42
|
+
/**
|
|
43
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
44
|
+
*/
|
|
45
|
+
ext?: Ext;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The administrator's view of one credential: an identifier, a label, two instants and the signature counter. Never key material, never the credential public key, never attestation.
|
|
49
|
+
*/
|
|
50
|
+
export interface ListedCredential {
|
|
51
|
+
/**
|
|
52
|
+
* Durable identifier of the credential, as auth/passkey/revoke/start takes it. Opaque to the producer: echoed verbatim, never parsed.
|
|
53
|
+
*/
|
|
54
|
+
credentialId: string;
|
|
55
|
+
/**
|
|
56
|
+
* Label captured at enrolment. Untrusted free text; absent when none was given. Consumers MUST NOT synthesize one.
|
|
57
|
+
*/
|
|
58
|
+
deviceLabel?: string;
|
|
59
|
+
/**
|
|
60
|
+
* When the credential was bound to the subject.
|
|
61
|
+
*/
|
|
62
|
+
registeredAt: string;
|
|
63
|
+
/**
|
|
64
|
+
* When the credential last completed an assertion. Absent if it never has, or if the consumer does not track use.
|
|
65
|
+
*/
|
|
66
|
+
lastUsedAt?: string;
|
|
67
|
+
/**
|
|
68
|
+
* The WebAuthn signature counter the consumer last recorded for the credential. Absent when the consumer does not track it. Zero is a real value: many platform authenticators never increment the counter.
|
|
69
|
+
*/
|
|
70
|
+
signCount?: number;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
74
|
+
export type { Ext };
|
|
75
|
+
|
|
76
|
+
/** Trust Task type URI. */
|
|
77
|
+
export const TYPE_URI = "https://trusttasks.org/spec/auth/passkey/admin-list/0.1" as const;
|
|
78
|
+
|
|
79
|
+
/** Stable alias for this specification's request payload shape. */
|
|
80
|
+
export type Payload = AuthPasskeyAdminList;
|
|
81
|
+
|
|
82
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
83
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/passkey/admin-list/0.1#response" as const;
|
|
84
|
+
|
|
85
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
86
|
+
export type Response = AuthPasskeyAdminListResponsePayload;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* This specification's payload schema, as a value.
|
|
90
|
+
*
|
|
91
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
92
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
93
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
94
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
95
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
96
|
+
*/
|
|
97
|
+
export const PAYLOAD_SCHEMA = {
|
|
98
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
99
|
+
"$id": "https://trusttasks.org/spec/auth/passkey/admin-list/0.1",
|
|
100
|
+
"title": "Auth — Passkey Admin List",
|
|
101
|
+
"description": "An administrator lists one subject's passkeys of one purpose — for example a member's step-up passkeys — as non-secret metadata, so they can tell which to revoke. The owner's own listing is auth/passkey/list, which takes no subject; this task exists because a subject in that payload is refused by design.",
|
|
102
|
+
"type": "object",
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"required": [
|
|
105
|
+
"subject",
|
|
106
|
+
"purpose"
|
|
107
|
+
],
|
|
108
|
+
"properties": {
|
|
109
|
+
"subject": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"minLength": 1,
|
|
112
|
+
"description": "The VID whose credentials are listed. A request, never a grant: the consumer authorises the producer over this subject from its own state."
|
|
113
|
+
},
|
|
114
|
+
"purpose": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"enum": [
|
|
117
|
+
"session",
|
|
118
|
+
"stepUp"
|
|
119
|
+
],
|
|
120
|
+
"description": "Which credentials to list: `session` (sign-in) or `stepUp` (the step-up-only passkeys of auth/passkey/enroll/invite 0.2). REQUIRED, with no default, so an administrator reads exactly the inventory they asked for and a consumer can refuse one it does not disclose to administrators."
|
|
121
|
+
},
|
|
122
|
+
"ext": {
|
|
123
|
+
"$ref": "#/$defs/Ext",
|
|
124
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"$defs": {
|
|
128
|
+
"ListedCredential": {
|
|
129
|
+
"$anchor": "listedCredential",
|
|
130
|
+
"title": "ListedCredential",
|
|
131
|
+
"description": "The administrator's view of one credential: an identifier, a label, two instants and the signature counter. Never key material, never the credential public key, never attestation.",
|
|
132
|
+
"type": "object",
|
|
133
|
+
"additionalProperties": false,
|
|
134
|
+
"required": [
|
|
135
|
+
"credentialId",
|
|
136
|
+
"registeredAt"
|
|
137
|
+
],
|
|
138
|
+
"properties": {
|
|
139
|
+
"credentialId": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"minLength": 1,
|
|
142
|
+
"description": "Durable identifier of the credential, as auth/passkey/revoke/start takes it. Opaque to the producer: echoed verbatim, never parsed."
|
|
143
|
+
},
|
|
144
|
+
"deviceLabel": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"maxLength": 256,
|
|
147
|
+
"description": "Label captured at enrolment. Untrusted free text; absent when none was given. Consumers MUST NOT synthesize one."
|
|
148
|
+
},
|
|
149
|
+
"registeredAt": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"format": "date-time",
|
|
152
|
+
"description": "When the credential was bound to the subject."
|
|
153
|
+
},
|
|
154
|
+
"lastUsedAt": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"format": "date-time",
|
|
157
|
+
"description": "When the credential last completed an assertion. Absent if it never has, or if the consumer does not track use."
|
|
158
|
+
},
|
|
159
|
+
"signCount": {
|
|
160
|
+
"type": "integer",
|
|
161
|
+
"minimum": 0,
|
|
162
|
+
"description": "The WebAuthn signature counter the consumer last recorded for the credential. Absent when the consumer does not track it. Zero is a real value: many platform authenticators never increment the counter."
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"Response": {
|
|
167
|
+
"$anchor": "response",
|
|
168
|
+
"title": "Auth Passkey Admin List — response payload",
|
|
169
|
+
"description": "Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/passkey/admin-list/0.1#response.",
|
|
170
|
+
"type": "object",
|
|
171
|
+
"additionalProperties": false,
|
|
172
|
+
"required": [
|
|
173
|
+
"subject",
|
|
174
|
+
"purpose",
|
|
175
|
+
"credentials"
|
|
176
|
+
],
|
|
177
|
+
"properties": {
|
|
178
|
+
"subject": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"minLength": 1,
|
|
181
|
+
"description": "Echo of payload.subject."
|
|
182
|
+
},
|
|
183
|
+
"purpose": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"enum": [
|
|
186
|
+
"session",
|
|
187
|
+
"stepUp"
|
|
188
|
+
],
|
|
189
|
+
"description": "Echo of payload.purpose."
|
|
190
|
+
},
|
|
191
|
+
"credentials": {
|
|
192
|
+
"type": "array",
|
|
193
|
+
"items": {
|
|
194
|
+
"$ref": "#/$defs/ListedCredential"
|
|
195
|
+
},
|
|
196
|
+
"description": "Every credential of that purpose currently bound to the subject, newest registeredAt first. MAY be empty: a member holding none is not an error."
|
|
197
|
+
},
|
|
198
|
+
"ext": {
|
|
199
|
+
"$ref": "#/$defs/Ext",
|
|
200
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"Ext": {
|
|
205
|
+
"title": "Ext",
|
|
206
|
+
"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.",
|
|
207
|
+
"type": "object",
|
|
208
|
+
"minProperties": 1,
|
|
209
|
+
"additionalProperties": true,
|
|
210
|
+
"propertyNames": {
|
|
211
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
} as const;
|
|
216
|
+
|
|
217
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
218
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
219
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
220
|
+
"$ref": "#/$defs/Response",
|
|
221
|
+
"$defs": {
|
|
222
|
+
"ListedCredential": {
|
|
223
|
+
"$anchor": "listedCredential",
|
|
224
|
+
"title": "ListedCredential",
|
|
225
|
+
"description": "The administrator's view of one credential: an identifier, a label, two instants and the signature counter. Never key material, never the credential public key, never attestation.",
|
|
226
|
+
"type": "object",
|
|
227
|
+
"additionalProperties": false,
|
|
228
|
+
"required": [
|
|
229
|
+
"credentialId",
|
|
230
|
+
"registeredAt"
|
|
231
|
+
],
|
|
232
|
+
"properties": {
|
|
233
|
+
"credentialId": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"minLength": 1,
|
|
236
|
+
"description": "Durable identifier of the credential, as auth/passkey/revoke/start takes it. Opaque to the producer: echoed verbatim, never parsed."
|
|
237
|
+
},
|
|
238
|
+
"deviceLabel": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"maxLength": 256,
|
|
241
|
+
"description": "Label captured at enrolment. Untrusted free text; absent when none was given. Consumers MUST NOT synthesize one."
|
|
242
|
+
},
|
|
243
|
+
"registeredAt": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"format": "date-time",
|
|
246
|
+
"description": "When the credential was bound to the subject."
|
|
247
|
+
},
|
|
248
|
+
"lastUsedAt": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"format": "date-time",
|
|
251
|
+
"description": "When the credential last completed an assertion. Absent if it never has, or if the consumer does not track use."
|
|
252
|
+
},
|
|
253
|
+
"signCount": {
|
|
254
|
+
"type": "integer",
|
|
255
|
+
"minimum": 0,
|
|
256
|
+
"description": "The WebAuthn signature counter the consumer last recorded for the credential. Absent when the consumer does not track it. Zero is a real value: many platform authenticators never increment the counter."
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"Response": {
|
|
261
|
+
"$anchor": "response",
|
|
262
|
+
"title": "Auth Passkey Admin List — response payload",
|
|
263
|
+
"description": "Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/passkey/admin-list/0.1#response.",
|
|
264
|
+
"type": "object",
|
|
265
|
+
"additionalProperties": false,
|
|
266
|
+
"required": [
|
|
267
|
+
"subject",
|
|
268
|
+
"purpose",
|
|
269
|
+
"credentials"
|
|
270
|
+
],
|
|
271
|
+
"properties": {
|
|
272
|
+
"subject": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"minLength": 1,
|
|
275
|
+
"description": "Echo of payload.subject."
|
|
276
|
+
},
|
|
277
|
+
"purpose": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"enum": [
|
|
280
|
+
"session",
|
|
281
|
+
"stepUp"
|
|
282
|
+
],
|
|
283
|
+
"description": "Echo of payload.purpose."
|
|
284
|
+
},
|
|
285
|
+
"credentials": {
|
|
286
|
+
"type": "array",
|
|
287
|
+
"items": {
|
|
288
|
+
"$ref": "#/$defs/ListedCredential"
|
|
289
|
+
},
|
|
290
|
+
"description": "Every credential of that purpose currently bound to the subject, newest registeredAt first. MAY be empty: a member holding none is not an error."
|
|
291
|
+
},
|
|
292
|
+
"ext": {
|
|
293
|
+
"$ref": "#/$defs/Ext",
|
|
294
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"Ext": {
|
|
299
|
+
"title": "Ext",
|
|
300
|
+
"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.",
|
|
301
|
+
"type": "object",
|
|
302
|
+
"minProperties": 1,
|
|
303
|
+
"additionalProperties": true,
|
|
304
|
+
"propertyNames": {
|
|
305
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
} as const;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
313
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
314
|
+
* per-specification and cannot be derived from the document alone, and
|
|
315
|
+
* item 2 needs the schema this carries.
|
|
316
|
+
*/
|
|
317
|
+
export const SPEC = {
|
|
318
|
+
typeUri: TYPE_URI,
|
|
319
|
+
isBearer: false,
|
|
320
|
+
isProofRequired: true,
|
|
321
|
+
isRecipientRequired: true,
|
|
322
|
+
isIssuedAtRequired: false,
|
|
323
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
324
|
+
} as const;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
328
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
329
|
+
* parties (§7.3 item 5).
|
|
330
|
+
*/
|
|
331
|
+
export const RESPONSE_SPEC = {
|
|
332
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
333
|
+
isBearer: false,
|
|
334
|
+
isProofRequired: true,
|
|
335
|
+
isRecipientRequired: true,
|
|
336
|
+
isIssuedAtRequired: false,
|
|
337
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
338
|
+
} as const;
|