@openvtc/trust-tasks 0.22.5 → 0.22.7
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 +80 -0
- package/dist/_shared/components.d.ts +434 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/acl/_shared/0.1/acl-entry.d.ts +1 -1
- package/dist/acl/_shared/0.1/acl-entry.d.ts.map +1 -1
- package/dist/acl/_shared/0.2/acl-entry.d.ts +22 -0
- package/dist/acl/_shared/0.2/acl-entry.d.ts.map +1 -0
- package/dist/acl/_shared/0.2/acl-entry.js +6 -0
- package/dist/acl/_shared/0.2/acl-entry.js.map +1 -0
- package/dist/acl/change-role/0.1/payload.d.ts +1 -1
- package/dist/acl/change-role/0.1/payload.d.ts.map +1 -1
- package/dist/acl/change-role/0.2/payload.d.ts +1679 -0
- package/dist/acl/change-role/0.2/payload.d.ts.map +1 -0
- package/dist/acl/change-role/0.2/payload.js +955 -0
- package/dist/acl/change-role/0.2/payload.js.map +1 -0
- package/dist/acl/grant/0.1/payload.d.ts +1 -1
- package/dist/acl/grant/0.1/payload.d.ts.map +1 -1
- package/dist/acl/grant/0.2/payload.d.ts +1649 -0
- package/dist/acl/grant/0.2/payload.d.ts.map +1 -0
- package/dist/acl/grant/0.2/payload.js +942 -0
- package/dist/acl/grant/0.2/payload.js.map +1 -0
- package/dist/acl/list/0.1/payload.d.ts +1 -1
- package/dist/acl/list/0.1/payload.d.ts.map +1 -1
- package/dist/acl/list/0.2/payload.d.ts +1853 -0
- package/dist/acl/list/0.2/payload.d.ts.map +1 -0
- package/dist/acl/list/0.2/payload.js +1041 -0
- package/dist/acl/list/0.2/payload.js.map +1 -0
- package/dist/acl/revoke/0.1/payload.d.ts +1 -1
- package/dist/acl/revoke/0.1/payload.d.ts.map +1 -1
- package/dist/acl/revoke/0.2/payload.d.ts +1844 -0
- package/dist/acl/revoke/0.2/payload.d.ts.map +1 -0
- package/dist/acl/revoke/0.2/payload.js +1052 -0
- package/dist/acl/revoke/0.2/payload.js.map +1 -0
- package/dist/acl/show/0.1/payload.d.ts +1 -1
- package/dist/acl/show/0.1/payload.d.ts.map +1 -1
- package/dist/acl/show/0.2/payload.d.ts +1689 -0
- package/dist/acl/show/0.2/payload.d.ts.map +1 -0
- package/dist/acl/show/0.2/payload.js +968 -0
- package/dist/acl/show/0.2/payload.js.map +1 -0
- package/dist/acl/swap-key/0.1/payload.d.ts +1 -1
- package/dist/acl/swap-key/0.1/payload.d.ts.map +1 -1
- package/dist/acl/update/0.1/payload.d.ts +1 -1
- package/dist/acl/update/0.1/payload.d.ts.map +1 -1
- package/dist/acl/update/0.2/payload.d.ts +1784 -0
- package/dist/acl/update/0.2/payload.d.ts.map +1 -0
- package/dist/acl/update/0.2/payload.js +1005 -0
- package/dist/acl/update/0.2/payload.js.map +1 -0
- package/dist/auth/signing-key/authorize/0.1/payload.d.ts +199 -0
- package/dist/auth/signing-key/authorize/0.1/payload.d.ts.map +1 -0
- package/dist/auth/signing-key/authorize/0.1/payload.js +108 -0
- package/dist/auth/signing-key/authorize/0.1/payload.js.map +1 -0
- package/dist/auth/signing-key/enroll/0.2/payload.d.ts +569 -0
- package/dist/auth/signing-key/enroll/0.2/payload.d.ts.map +1 -0
- package/dist/auth/signing-key/enroll/0.2/payload.js +315 -0
- package/dist/auth/signing-key/enroll/0.2/payload.js.map +1 -0
- package/dist/auth/step-up/approve-request/0.4/payload.d.ts +672 -0
- package/dist/auth/step-up/approve-request/0.4/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approve-request/0.4/payload.js +373 -0
- package/dist/auth/step-up/approve-request/0.4/payload.js.map +1 -0
- package/dist/auth/step-up/approve-response/0.6/payload.d.ts +974 -0
- package/dist/auth/step-up/approve-response/0.6/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approve-response/0.6/payload.js +552 -0
- package/dist/auth/step-up/approve-response/0.6/payload.js.map +1 -0
- package/dist/auth/step-up/approver/_shared/0.1/approver.d.ts +16 -0
- package/dist/auth/step-up/approver/_shared/0.1/approver.d.ts.map +1 -0
- package/dist/auth/step-up/approver/_shared/0.1/approver.js +6 -0
- package/dist/auth/step-up/approver/_shared/0.1/approver.js.map +1 -0
- package/dist/auth/step-up/approver/attest/0.1/payload.d.ts +174 -0
- package/dist/auth/step-up/approver/attest/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approver/attest/0.1/payload.js +97 -0
- package/dist/auth/step-up/approver/attest/0.1/payload.js.map +1 -0
- package/dist/auth/step-up/approver/enroll/0.1/payload.d.ts +503 -0
- package/dist/auth/step-up/approver/enroll/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approver/enroll/0.1/payload.js +285 -0
- package/dist/auth/step-up/approver/enroll/0.1/payload.js.map +1 -0
- package/dist/auth/step-up/approver/invite/0.1/payload.d.ts +375 -0
- package/dist/auth/step-up/approver/invite/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approver/invite/0.1/payload.js +200 -0
- package/dist/auth/step-up/approver/invite/0.1/payload.js.map +1 -0
- package/dist/auth/step-up/approver/list/0.1/payload.d.ts +477 -0
- package/dist/auth/step-up/approver/list/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approver/list/0.1/payload.js +272 -0
- package/dist/auth/step-up/approver/list/0.1/payload.js.map +1 -0
- package/dist/auth/step-up/approver/redeem/finish/0.1/payload.d.ts +512 -0
- package/dist/auth/step-up/approver/redeem/finish/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approver/redeem/finish/0.1/payload.js +290 -0
- package/dist/auth/step-up/approver/redeem/finish/0.1/payload.js.map +1 -0
- package/dist/auth/step-up/approver/redeem/start/0.1/payload.d.ts +343 -0
- package/dist/auth/step-up/approver/redeem/start/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approver/redeem/start/0.1/payload.js +187 -0
- package/dist/auth/step-up/approver/redeem/start/0.1/payload.js.map +1 -0
- package/dist/auth/step-up/approver/revoke/0.1/payload.d.ts +534 -0
- package/dist/auth/step-up/approver/revoke/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approver/revoke/0.1/payload.js +301 -0
- package/dist/auth/step-up/approver/revoke/0.1/payload.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -1
- package/dist/task-consent/decision/0.2/payload.d.ts +775 -0
- package/dist/task-consent/decision/0.2/payload.d.ts.map +1 -0
- package/dist/task-consent/decision/0.2/payload.js +450 -0
- package/dist/task-consent/decision/0.2/payload.js.map +1 -0
- package/dist/vtc/admin/actions/_shared/0.1/action.d.ts +24 -0
- package/dist/vtc/admin/actions/_shared/0.1/action.d.ts.map +1 -0
- package/dist/vtc/admin/actions/_shared/0.1/action.js +6 -0
- package/dist/vtc/admin/actions/_shared/0.1/action.js.map +1 -0
- package/dist/vtc/admin/actions/acknowledge/0.1/payload.d.ts +1012 -0
- package/dist/vtc/admin/actions/acknowledge/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/admin/actions/acknowledge/0.1/payload.js +636 -0
- package/dist/vtc/admin/actions/acknowledge/0.1/payload.js.map +1 -0
- package/dist/vtc/admin/actions/cancel/0.1/payload.d.ts +1026 -0
- package/dist/vtc/admin/actions/cancel/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/admin/actions/cancel/0.1/payload.js +641 -0
- package/dist/vtc/admin/actions/cancel/0.1/payload.js.map +1 -0
- package/dist/vtc/admin/actions/list/0.1/payload.d.ts +1200 -0
- package/dist/vtc/admin/actions/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/admin/actions/list/0.1/payload.js +726 -0
- package/dist/vtc/admin/actions/list/0.1/payload.js.map +1 -0
- package/dist/vtc/admin/actions/show/0.1/payload.d.ts +1012 -0
- package/dist/vtc/admin/actions/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/admin/actions/show/0.1/payload.js +636 -0
- package/dist/vtc/admin/actions/show/0.1/payload.js.map +1 -0
- package/dist/vtc/install/claim/finish/0.3/payload.d.ts +379 -0
- package/dist/vtc/install/claim/finish/0.3/payload.d.ts.map +1 -0
- package/dist/vtc/install/claim/finish/0.3/payload.js +205 -0
- package/dist/vtc/install/claim/finish/0.3/payload.js.map +1 -0
- package/dist/vtc/install/claim/start/0.3/payload.d.ts +368 -0
- package/dist/vtc/install/claim/start/0.3/payload.d.ts.map +1 -0
- package/dist/vtc/install/claim/start/0.3/payload.js +201 -0
- package/dist/vtc/install/claim/start/0.3/payload.js.map +1 -0
- package/dist/vtc/members/authority-reduced-notice/0.1/payload.d.ts +208 -0
- package/dist/vtc/members/authority-reduced-notice/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/members/authority-reduced-notice/0.1/payload.js +112 -0
- package/dist/vtc/members/authority-reduced-notice/0.1/payload.js.map +1 -0
- package/dist/vtc/roles/_shared/0.1/role.d.ts +16 -0
- package/dist/vtc/roles/_shared/0.1/role.d.ts.map +1 -0
- package/dist/vtc/roles/_shared/0.1/role.js +6 -0
- package/dist/vtc/roles/_shared/0.1/role.js.map +1 -0
- package/dist/vtc/roles/define/0.1/payload.d.ts +703 -0
- package/dist/vtc/roles/define/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/roles/define/0.1/payload.js +371 -0
- package/dist/vtc/roles/define/0.1/payload.js.map +1 -0
- package/dist/vtc/roles/delete/0.1/payload.d.ts +281 -0
- package/dist/vtc/roles/delete/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/roles/delete/0.1/payload.js +152 -0
- package/dist/vtc/roles/delete/0.1/payload.js.map +1 -0
- package/dist/vtc/roles/list/0.1/payload.d.ts +639 -0
- package/dist/vtc/roles/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/roles/list/0.1/payload.js +345 -0
- package/dist/vtc/roles/list/0.1/payload.js.map +1 -0
- package/dist/vtc/roles/show/0.1/payload.d.ts +651 -0
- package/dist/vtc/roles/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/roles/show/0.1/payload.js +351 -0
- package/dist/vtc/roles/show/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +440 -1
- package/src/acl/_shared/0.1/acl-entry.ts +1 -1
- package/src/acl/_shared/0.2/acl-entry.ts +23 -0
- package/src/acl/change-role/0.1/payload.ts +1 -1
- package/src/acl/change-role/0.2/payload.ts +1011 -0
- package/src/acl/grant/0.1/payload.ts +1 -1
- package/src/acl/grant/0.2/payload.ts +990 -0
- package/src/acl/list/0.1/payload.ts +1 -1
- package/src/acl/list/0.2/payload.ts +1125 -0
- package/src/acl/revoke/0.1/payload.ts +1 -1
- package/src/acl/revoke/0.2/payload.ts +1122 -0
- package/src/acl/show/0.1/payload.ts +1 -1
- package/src/acl/show/0.2/payload.ts +1016 -0
- package/src/acl/swap-key/0.1/payload.ts +1 -1
- package/src/acl/update/0.1/payload.ts +1 -1
- package/src/acl/update/0.2/payload.ts +1094 -0
- package/src/auth/signing-key/authorize/0.1/payload.ts +141 -0
- package/src/auth/signing-key/enroll/0.2/payload.ts +365 -0
- package/src/auth/step-up/approve-request/0.4/payload.ts +461 -0
- package/src/auth/step-up/approve-response/0.6/payload.ts +648 -0
- package/src/auth/step-up/approver/_shared/0.1/approver.ts +17 -0
- package/src/auth/step-up/approver/attest/0.1/payload.ts +135 -0
- package/src/auth/step-up/approver/enroll/0.1/payload.ts +329 -0
- package/src/auth/step-up/approver/invite/0.1/payload.ts +258 -0
- package/src/auth/step-up/approver/list/0.1/payload.ts +318 -0
- package/src/auth/step-up/approver/redeem/finish/0.1/payload.ts +337 -0
- package/src/auth/step-up/approver/redeem/start/0.1/payload.ts +241 -0
- package/src/auth/step-up/approver/revoke/0.1/payload.ts +352 -0
- package/src/index.ts +33 -0
- package/src/task-consent/decision/0.2/payload.ts +537 -0
- package/src/vtc/admin/actions/_shared/0.1/action.ts +25 -0
- package/src/vtc/admin/actions/acknowledge/0.1/payload.ts +671 -0
- package/src/vtc/admin/actions/cancel/0.1/payload.ts +680 -0
- package/src/vtc/admin/actions/list/0.1/payload.ts +795 -0
- package/src/vtc/admin/actions/show/0.1/payload.ts +671 -0
- package/src/vtc/install/claim/finish/0.3/payload.ts +253 -0
- package/src/vtc/install/claim/start/0.3/payload.ts +256 -0
- package/src/vtc/members/authority-reduced-notice/0.1/payload.ts +162 -0
- package/src/vtc/roles/_shared/0.1/role.ts +17 -0
- package/src/vtc/roles/define/0.1/payload.ts +435 -0
- package/src/vtc/roles/delete/0.1/payload.ts +200 -0
- package/src/vtc/roles/list/0.1/payload.ts +389 -0
- package/src/vtc/roles/show/0.1/payload.ts +399 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/auth/step-up/approver/redeem/finish/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/auth/step-up/approver/redeem/finish/0.1";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/step-up/approver/redeem/finish/0.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/auth/step-up/approver/redeem/finish/0.1",
|
|
21
|
+
"title": "Auth — Step-up Approver Redeem (finish) — payload",
|
|
22
|
+
"description": "The invited subject, signing as their own DID, names the step-up approver to bind and carries its signed enrolment statement over the ceremony's challenge; the relying party binds the approver and consumes the invite. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"enrollmentId",
|
|
27
|
+
"approverDid",
|
|
28
|
+
"statement"
|
|
29
|
+
],
|
|
30
|
+
"properties": {
|
|
31
|
+
"enrollmentId": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"minLength": 1,
|
|
34
|
+
"maxLength": 256,
|
|
35
|
+
"description": "The enrollmentId from auth/step-up/approver/redeem/start, echoed verbatim. Also the `boundTo` of the statement."
|
|
36
|
+
},
|
|
37
|
+
"approverDid": {
|
|
38
|
+
"$ref": "#/$defs/ApproverDid",
|
|
39
|
+
"description": "The step-up approver to bind. MUST equal the statement's issuer."
|
|
40
|
+
},
|
|
41
|
+
"label": {
|
|
42
|
+
"$ref": "#/$defs/ApproverLabel",
|
|
43
|
+
"description": "A name for where the approver lives. Overrides the inviter's suggestion."
|
|
44
|
+
},
|
|
45
|
+
"statement": {
|
|
46
|
+
"$ref": "#/$defs/AttestStatement",
|
|
47
|
+
"description": "The approver's complete, signed auth/step-up/approver/attest/0.1 document with `purpose: enrol`, `boundTo` equal to `enrollmentId`, over the start's `challenge` — the proof of possession of the approver key. Verified as received."
|
|
48
|
+
},
|
|
49
|
+
"ext": {
|
|
50
|
+
"$ref": "#/$defs/Ext"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"$defs": {
|
|
54
|
+
"Response": {
|
|
55
|
+
"$anchor": "response",
|
|
56
|
+
"title": "Auth — Step-up Approver Redeem (finish) — response payload",
|
|
57
|
+
"description": "The binding as stored.",
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"required": [
|
|
61
|
+
"approver"
|
|
62
|
+
],
|
|
63
|
+
"properties": {
|
|
64
|
+
"approver": {
|
|
65
|
+
"$ref": "#/$defs/Approver"
|
|
66
|
+
},
|
|
67
|
+
"ext": {
|
|
68
|
+
"$ref": "#/$defs/Ext"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"Ext": {
|
|
73
|
+
"title": "Ext",
|
|
74
|
+
"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.",
|
|
75
|
+
"type": "object",
|
|
76
|
+
"minProperties": 1,
|
|
77
|
+
"additionalProperties": true,
|
|
78
|
+
"propertyNames": {
|
|
79
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"Approver": {
|
|
83
|
+
"title": "Approver",
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"required": [
|
|
87
|
+
"approverDid",
|
|
88
|
+
"subject",
|
|
89
|
+
"enrolledAt",
|
|
90
|
+
"enrolledVia"
|
|
91
|
+
],
|
|
92
|
+
"description": "One step-up approver binding, as its subject or an administrator sees it. The binding confers nothing of its own: it is read only when the relying party checks the evidence of a step-up asked of `subject`.",
|
|
93
|
+
"properties": {
|
|
94
|
+
"approverDid": {
|
|
95
|
+
"$ref": "#/$defs/ApproverDid"
|
|
96
|
+
},
|
|
97
|
+
"subject": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"pattern": "^did:",
|
|
100
|
+
"minLength": 5,
|
|
101
|
+
"maxLength": 2048,
|
|
102
|
+
"description": "The one subject DID this approver is bound to. An approver DID is bound to at most one subject at a relying party."
|
|
103
|
+
},
|
|
104
|
+
"label": {
|
|
105
|
+
"$ref": "#/$defs/ApproverLabel"
|
|
106
|
+
},
|
|
107
|
+
"enrolledAt": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"format": "date-time",
|
|
110
|
+
"description": "When the binding was written."
|
|
111
|
+
},
|
|
112
|
+
"enrolledVia": {
|
|
113
|
+
"$ref": "#/$defs/EnrolledVia"
|
|
114
|
+
},
|
|
115
|
+
"lastUsedAt": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"format": "date-time",
|
|
118
|
+
"description": "When a statement by this approver last satisfied a step-up. Absent when it never has."
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"EnrolledVia": {
|
|
123
|
+
"title": "EnrolledVia",
|
|
124
|
+
"type": "string",
|
|
125
|
+
"enum": [
|
|
126
|
+
"install",
|
|
127
|
+
"invite",
|
|
128
|
+
"selfService",
|
|
129
|
+
"offline"
|
|
130
|
+
],
|
|
131
|
+
"description": "The anchor the binding rested on, recorded so an incident review can see how each factor came to exist. `install`: claimed with the community's install token (vtc/install/claim/finish/0.3). `invite`: redeemed from an administrator's invite (auth/step-up/approver/redeem/finish/0.1). `selfService`: added by the subject behind a factor they already held (auth/step-up/approver/enroll/0.1). `offline`: redeemed from an invite minted by the operator with host access while the service was stopped — an `invite`-shaped redemption whose issuer was the host rather than an administrator."
|
|
132
|
+
},
|
|
133
|
+
"ApproverLabel": {
|
|
134
|
+
"title": "ApproverLabel",
|
|
135
|
+
"type": "string",
|
|
136
|
+
"minLength": 1,
|
|
137
|
+
"maxLength": 64,
|
|
138
|
+
"description": "A human-readable name for where the approver lives — e.g. `Browser plugin — work laptop`. Chosen by the subject (or suggested by an inviter), untrusted, and attributed to its author wherever it is rendered. Absent rather than invented when none was chosen."
|
|
139
|
+
},
|
|
140
|
+
"ApproverDid": {
|
|
141
|
+
"title": "ApproverDid",
|
|
142
|
+
"type": "string",
|
|
143
|
+
"minLength": 16,
|
|
144
|
+
"maxLength": 128,
|
|
145
|
+
"pattern": "^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]+$",
|
|
146
|
+
"description": "A step-up approver, as an Ed25519 `did:key` (`z6Mk…`). `did:key` only, because its document is a function of the key and resolves with no network, so verifying an approver's statement never depends on a fetch, and a key whose DID document could be rewritten after enrolment would not be the key that was enrolled. Distinct from the subject's DID, from every verification method in the subject's DID document, and from every key the subject can sign operations with at the relying party."
|
|
147
|
+
},
|
|
148
|
+
"AttestStatement": {
|
|
149
|
+
"title": "AttestStatement",
|
|
150
|
+
"type": "object",
|
|
151
|
+
"minProperties": 1,
|
|
152
|
+
"description": "A complete, signed auth/step-up/approver/attest/0.1 Trust Task document — envelope, payload and proof — issued by the approver. Deliberately an open object here rather than a typed one: the consumer verifies it as a document in its own right (envelope, proof and payload against that specification's schemas), and verifies its proof over the members exactly as received, which a binding that narrowed it to a typed struct and re-serialised it could silently break."
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
157
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
158
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
159
|
+
"$ref": "#/$defs/Response",
|
|
160
|
+
"$defs": {
|
|
161
|
+
"Response": {
|
|
162
|
+
"$anchor": "response",
|
|
163
|
+
"title": "Auth — Step-up Approver Redeem (finish) — response payload",
|
|
164
|
+
"description": "The binding as stored.",
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": false,
|
|
167
|
+
"required": [
|
|
168
|
+
"approver"
|
|
169
|
+
],
|
|
170
|
+
"properties": {
|
|
171
|
+
"approver": {
|
|
172
|
+
"$ref": "#/$defs/Approver"
|
|
173
|
+
},
|
|
174
|
+
"ext": {
|
|
175
|
+
"$ref": "#/$defs/Ext"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"Ext": {
|
|
180
|
+
"title": "Ext",
|
|
181
|
+
"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.",
|
|
182
|
+
"type": "object",
|
|
183
|
+
"minProperties": 1,
|
|
184
|
+
"additionalProperties": true,
|
|
185
|
+
"propertyNames": {
|
|
186
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"Approver": {
|
|
190
|
+
"title": "Approver",
|
|
191
|
+
"type": "object",
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"required": [
|
|
194
|
+
"approverDid",
|
|
195
|
+
"subject",
|
|
196
|
+
"enrolledAt",
|
|
197
|
+
"enrolledVia"
|
|
198
|
+
],
|
|
199
|
+
"description": "One step-up approver binding, as its subject or an administrator sees it. The binding confers nothing of its own: it is read only when the relying party checks the evidence of a step-up asked of `subject`.",
|
|
200
|
+
"properties": {
|
|
201
|
+
"approverDid": {
|
|
202
|
+
"$ref": "#/$defs/ApproverDid"
|
|
203
|
+
},
|
|
204
|
+
"subject": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"pattern": "^did:",
|
|
207
|
+
"minLength": 5,
|
|
208
|
+
"maxLength": 2048,
|
|
209
|
+
"description": "The one subject DID this approver is bound to. An approver DID is bound to at most one subject at a relying party."
|
|
210
|
+
},
|
|
211
|
+
"label": {
|
|
212
|
+
"$ref": "#/$defs/ApproverLabel"
|
|
213
|
+
},
|
|
214
|
+
"enrolledAt": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"format": "date-time",
|
|
217
|
+
"description": "When the binding was written."
|
|
218
|
+
},
|
|
219
|
+
"enrolledVia": {
|
|
220
|
+
"$ref": "#/$defs/EnrolledVia"
|
|
221
|
+
},
|
|
222
|
+
"lastUsedAt": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"format": "date-time",
|
|
225
|
+
"description": "When a statement by this approver last satisfied a step-up. Absent when it never has."
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"EnrolledVia": {
|
|
230
|
+
"title": "EnrolledVia",
|
|
231
|
+
"type": "string",
|
|
232
|
+
"enum": [
|
|
233
|
+
"install",
|
|
234
|
+
"invite",
|
|
235
|
+
"selfService",
|
|
236
|
+
"offline"
|
|
237
|
+
],
|
|
238
|
+
"description": "The anchor the binding rested on, recorded so an incident review can see how each factor came to exist. `install`: claimed with the community's install token (vtc/install/claim/finish/0.3). `invite`: redeemed from an administrator's invite (auth/step-up/approver/redeem/finish/0.1). `selfService`: added by the subject behind a factor they already held (auth/step-up/approver/enroll/0.1). `offline`: redeemed from an invite minted by the operator with host access while the service was stopped — an `invite`-shaped redemption whose issuer was the host rather than an administrator."
|
|
239
|
+
},
|
|
240
|
+
"ApproverLabel": {
|
|
241
|
+
"title": "ApproverLabel",
|
|
242
|
+
"type": "string",
|
|
243
|
+
"minLength": 1,
|
|
244
|
+
"maxLength": 64,
|
|
245
|
+
"description": "A human-readable name for where the approver lives — e.g. `Browser plugin — work laptop`. Chosen by the subject (or suggested by an inviter), untrusted, and attributed to its author wherever it is rendered. Absent rather than invented when none was chosen."
|
|
246
|
+
},
|
|
247
|
+
"ApproverDid": {
|
|
248
|
+
"title": "ApproverDid",
|
|
249
|
+
"type": "string",
|
|
250
|
+
"minLength": 16,
|
|
251
|
+
"maxLength": 128,
|
|
252
|
+
"pattern": "^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]+$",
|
|
253
|
+
"description": "A step-up approver, as an Ed25519 `did:key` (`z6Mk…`). `did:key` only, because its document is a function of the key and resolves with no network, so verifying an approver's statement never depends on a fetch, and a key whose DID document could be rewritten after enrolment would not be the key that was enrolled. Distinct from the subject's DID, from every verification method in the subject's DID document, and from every key the subject can sign operations with at the relying party."
|
|
254
|
+
},
|
|
255
|
+
"AttestStatement": {
|
|
256
|
+
"title": "AttestStatement",
|
|
257
|
+
"type": "object",
|
|
258
|
+
"minProperties": 1,
|
|
259
|
+
"description": "A complete, signed auth/step-up/approver/attest/0.1 Trust Task document — envelope, payload and proof — issued by the approver. Deliberately an open object here rather than a typed one: the consumer verifies it as a document in its own right (envelope, proof and payload against that specification's schemas), and verifies its proof over the members exactly as received, which a binding that narrowed it to a typed struct and re-serialised it could silently break."
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
265
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
266
|
+
* per-specification and cannot be derived from the document alone, and
|
|
267
|
+
* item 2 needs the schema this carries.
|
|
268
|
+
*/
|
|
269
|
+
export const SPEC = {
|
|
270
|
+
typeUri: TYPE_URI,
|
|
271
|
+
isBearer: false,
|
|
272
|
+
isProofRequired: true,
|
|
273
|
+
isRecipientRequired: true,
|
|
274
|
+
isIssuedAtRequired: true,
|
|
275
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
279
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
280
|
+
* parties (§7.3 item 5).
|
|
281
|
+
*/
|
|
282
|
+
export const RESPONSE_SPEC = {
|
|
283
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
284
|
+
isBearer: false,
|
|
285
|
+
isProofRequired: false,
|
|
286
|
+
isRecipientRequired: true,
|
|
287
|
+
isIssuedAtRequired: true,
|
|
288
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
289
|
+
};
|
|
290
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../../../src/auth/step-up/approver/redeem/finish/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsCH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,qEAA8E,CAAC;AAKvG,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,8EAAuF,CAAC;AAKzH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;I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AI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/auth/step-up/approver/redeem/start/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext } from "../../../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* The invited subject, signing as their own DID, presents an auth/step-up/approver/invite token and its claim code, and the relying party opens an enrolment ceremony with a challenge for the approver to sign. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface AuthStepUpApproverRedeemStartPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The invite token, as carried in the invite URL.
|
|
12
|
+
*/
|
|
13
|
+
token: string;
|
|
14
|
+
/**
|
|
15
|
+
* The claim code the administrator delivered separately. Never logged; compared with its stored hash.
|
|
16
|
+
*/
|
|
17
|
+
claimCode: string;
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The enrolment ceremony the invite authorises: what the approver's enrolment statement is to be made over.
|
|
22
|
+
*/
|
|
23
|
+
export interface AuthStepUpApproverRedeemStartResponsePayload {
|
|
24
|
+
/**
|
|
25
|
+
* Opaque, single-use handle for this ceremony. Echoed in redeem/finish, and the `boundTo` of the approver's enrolment statement.
|
|
26
|
+
*/
|
|
27
|
+
enrollmentId: string;
|
|
28
|
+
/**
|
|
29
|
+
* A fresh challenge (≥128 bits) the approver signs over in its auth/step-up/approver/attest/0.1 statement with `purpose: enrol`.
|
|
30
|
+
*/
|
|
31
|
+
challenge: string;
|
|
32
|
+
/**
|
|
33
|
+
* The relying party's DID, which the statement names as its `audience` and `recipient`.
|
|
34
|
+
*/
|
|
35
|
+
audience: string;
|
|
36
|
+
/**
|
|
37
|
+
* When this ceremony lapses (not the invite). No later than the invite's own expiry.
|
|
38
|
+
*/
|
|
39
|
+
expiresAt: string;
|
|
40
|
+
ext?: Ext;
|
|
41
|
+
}
|
|
42
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
43
|
+
export type { Ext };
|
|
44
|
+
/** Trust Task type URI. */
|
|
45
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/auth/step-up/approver/redeem/start/0.1";
|
|
46
|
+
/** Stable alias for this specification's request payload shape. */
|
|
47
|
+
export type Payload = AuthStepUpApproverRedeemStartPayload;
|
|
48
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
49
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/auth/step-up/approver/redeem/start/0.1#response";
|
|
50
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
51
|
+
export type Response = AuthStepUpApproverRedeemStartResponsePayload;
|
|
52
|
+
/**
|
|
53
|
+
* This specification's payload schema, as a value.
|
|
54
|
+
*
|
|
55
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
56
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
57
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
58
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
59
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
60
|
+
*/
|
|
61
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
62
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
63
|
+
readonly $id: "https://trusttasks.org/spec/auth/step-up/approver/redeem/start/0.1";
|
|
64
|
+
readonly title: "Auth — Step-up Approver Redeem (start) — payload";
|
|
65
|
+
readonly description: "The invited subject, signing as their own DID, presents an auth/step-up/approver/invite token and its claim code, and the relying party opens an enrolment ceremony with a challenge for the approver to sign. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
66
|
+
readonly type: "object";
|
|
67
|
+
readonly additionalProperties: false;
|
|
68
|
+
readonly required: readonly ["token", "claimCode"];
|
|
69
|
+
readonly properties: {
|
|
70
|
+
readonly token: {
|
|
71
|
+
readonly type: "string";
|
|
72
|
+
readonly minLength: 16;
|
|
73
|
+
readonly maxLength: 512;
|
|
74
|
+
readonly description: "The invite token, as carried in the invite URL.";
|
|
75
|
+
};
|
|
76
|
+
readonly claimCode: {
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
readonly minLength: 1;
|
|
79
|
+
readonly maxLength: 64;
|
|
80
|
+
readonly description: "The claim code the administrator delivered separately. Never logged; compared with its stored hash.";
|
|
81
|
+
};
|
|
82
|
+
readonly ext: {
|
|
83
|
+
readonly $ref: "#/$defs/Ext";
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
readonly $defs: {
|
|
87
|
+
readonly Response: {
|
|
88
|
+
readonly $anchor: "response";
|
|
89
|
+
readonly title: "Auth — Step-up Approver Redeem (start) — response payload";
|
|
90
|
+
readonly description: "The enrolment ceremony the invite authorises: what the approver's enrolment statement is to be made over.";
|
|
91
|
+
readonly type: "object";
|
|
92
|
+
readonly additionalProperties: false;
|
|
93
|
+
readonly required: readonly ["enrollmentId", "challenge", "audience", "expiresAt"];
|
|
94
|
+
readonly properties: {
|
|
95
|
+
readonly enrollmentId: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
readonly minLength: 1;
|
|
98
|
+
readonly maxLength: 256;
|
|
99
|
+
readonly description: "Opaque, single-use handle for this ceremony. Echoed in redeem/finish, and the `boundTo` of the approver's enrolment statement.";
|
|
100
|
+
};
|
|
101
|
+
readonly challenge: {
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
readonly minLength: 16;
|
|
104
|
+
readonly maxLength: 512;
|
|
105
|
+
readonly description: "A fresh challenge (≥128 bits) the approver signs over in its auth/step-up/approver/attest/0.1 statement with `purpose: enrol`.";
|
|
106
|
+
};
|
|
107
|
+
readonly audience: {
|
|
108
|
+
readonly type: "string";
|
|
109
|
+
readonly pattern: "^did:";
|
|
110
|
+
readonly minLength: 5;
|
|
111
|
+
readonly maxLength: 2048;
|
|
112
|
+
readonly description: "The relying party's DID, which the statement names as its `audience` and `recipient`.";
|
|
113
|
+
};
|
|
114
|
+
readonly expiresAt: {
|
|
115
|
+
readonly type: "string";
|
|
116
|
+
readonly format: "date-time";
|
|
117
|
+
readonly description: "When this ceremony lapses (not the invite). No later than the invite's own expiry.";
|
|
118
|
+
};
|
|
119
|
+
readonly ext: {
|
|
120
|
+
readonly $ref: "#/$defs/Ext";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
readonly Ext: {
|
|
125
|
+
readonly title: "Ext";
|
|
126
|
+
readonly 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.";
|
|
127
|
+
readonly type: "object";
|
|
128
|
+
readonly minProperties: 1;
|
|
129
|
+
readonly additionalProperties: true;
|
|
130
|
+
readonly propertyNames: {
|
|
131
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
137
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
138
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
139
|
+
readonly $ref: "#/$defs/Response";
|
|
140
|
+
readonly $defs: {
|
|
141
|
+
readonly Response: {
|
|
142
|
+
readonly $anchor: "response";
|
|
143
|
+
readonly title: "Auth — Step-up Approver Redeem (start) — response payload";
|
|
144
|
+
readonly description: "The enrolment ceremony the invite authorises: what the approver's enrolment statement is to be made over.";
|
|
145
|
+
readonly type: "object";
|
|
146
|
+
readonly additionalProperties: false;
|
|
147
|
+
readonly required: readonly ["enrollmentId", "challenge", "audience", "expiresAt"];
|
|
148
|
+
readonly properties: {
|
|
149
|
+
readonly enrollmentId: {
|
|
150
|
+
readonly type: "string";
|
|
151
|
+
readonly minLength: 1;
|
|
152
|
+
readonly maxLength: 256;
|
|
153
|
+
readonly description: "Opaque, single-use handle for this ceremony. Echoed in redeem/finish, and the `boundTo` of the approver's enrolment statement.";
|
|
154
|
+
};
|
|
155
|
+
readonly challenge: {
|
|
156
|
+
readonly type: "string";
|
|
157
|
+
readonly minLength: 16;
|
|
158
|
+
readonly maxLength: 512;
|
|
159
|
+
readonly description: "A fresh challenge (≥128 bits) the approver signs over in its auth/step-up/approver/attest/0.1 statement with `purpose: enrol`.";
|
|
160
|
+
};
|
|
161
|
+
readonly audience: {
|
|
162
|
+
readonly type: "string";
|
|
163
|
+
readonly pattern: "^did:";
|
|
164
|
+
readonly minLength: 5;
|
|
165
|
+
readonly maxLength: 2048;
|
|
166
|
+
readonly description: "The relying party's DID, which the statement names as its `audience` and `recipient`.";
|
|
167
|
+
};
|
|
168
|
+
readonly expiresAt: {
|
|
169
|
+
readonly type: "string";
|
|
170
|
+
readonly format: "date-time";
|
|
171
|
+
readonly description: "When this ceremony lapses (not the invite). No later than the invite's own expiry.";
|
|
172
|
+
};
|
|
173
|
+
readonly ext: {
|
|
174
|
+
readonly $ref: "#/$defs/Ext";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
readonly Ext: {
|
|
179
|
+
readonly title: "Ext";
|
|
180
|
+
readonly 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.";
|
|
181
|
+
readonly type: "object";
|
|
182
|
+
readonly minProperties: 1;
|
|
183
|
+
readonly additionalProperties: true;
|
|
184
|
+
readonly propertyNames: {
|
|
185
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
192
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
193
|
+
* per-specification and cannot be derived from the document alone, and
|
|
194
|
+
* item 2 needs the schema this carries.
|
|
195
|
+
*/
|
|
196
|
+
export declare const SPEC: {
|
|
197
|
+
readonly typeUri: "https://trusttasks.org/spec/auth/step-up/approver/redeem/start/0.1";
|
|
198
|
+
readonly isBearer: false;
|
|
199
|
+
readonly isProofRequired: true;
|
|
200
|
+
readonly isRecipientRequired: true;
|
|
201
|
+
readonly isIssuedAtRequired: true;
|
|
202
|
+
readonly payloadSchema: {
|
|
203
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
204
|
+
readonly $id: "https://trusttasks.org/spec/auth/step-up/approver/redeem/start/0.1";
|
|
205
|
+
readonly title: "Auth — Step-up Approver Redeem (start) — payload";
|
|
206
|
+
readonly description: "The invited subject, signing as their own DID, presents an auth/step-up/approver/invite token and its claim code, and the relying party opens an enrolment ceremony with a challenge for the approver to sign. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
207
|
+
readonly type: "object";
|
|
208
|
+
readonly additionalProperties: false;
|
|
209
|
+
readonly required: readonly ["token", "claimCode"];
|
|
210
|
+
readonly properties: {
|
|
211
|
+
readonly token: {
|
|
212
|
+
readonly type: "string";
|
|
213
|
+
readonly minLength: 16;
|
|
214
|
+
readonly maxLength: 512;
|
|
215
|
+
readonly description: "The invite token, as carried in the invite URL.";
|
|
216
|
+
};
|
|
217
|
+
readonly claimCode: {
|
|
218
|
+
readonly type: "string";
|
|
219
|
+
readonly minLength: 1;
|
|
220
|
+
readonly maxLength: 64;
|
|
221
|
+
readonly description: "The claim code the administrator delivered separately. Never logged; compared with its stored hash.";
|
|
222
|
+
};
|
|
223
|
+
readonly ext: {
|
|
224
|
+
readonly $ref: "#/$defs/Ext";
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
readonly $defs: {
|
|
228
|
+
readonly Response: {
|
|
229
|
+
readonly $anchor: "response";
|
|
230
|
+
readonly title: "Auth — Step-up Approver Redeem (start) — response payload";
|
|
231
|
+
readonly description: "The enrolment ceremony the invite authorises: what the approver's enrolment statement is to be made over.";
|
|
232
|
+
readonly type: "object";
|
|
233
|
+
readonly additionalProperties: false;
|
|
234
|
+
readonly required: readonly ["enrollmentId", "challenge", "audience", "expiresAt"];
|
|
235
|
+
readonly properties: {
|
|
236
|
+
readonly enrollmentId: {
|
|
237
|
+
readonly type: "string";
|
|
238
|
+
readonly minLength: 1;
|
|
239
|
+
readonly maxLength: 256;
|
|
240
|
+
readonly description: "Opaque, single-use handle for this ceremony. Echoed in redeem/finish, and the `boundTo` of the approver's enrolment statement.";
|
|
241
|
+
};
|
|
242
|
+
readonly challenge: {
|
|
243
|
+
readonly type: "string";
|
|
244
|
+
readonly minLength: 16;
|
|
245
|
+
readonly maxLength: 512;
|
|
246
|
+
readonly description: "A fresh challenge (≥128 bits) the approver signs over in its auth/step-up/approver/attest/0.1 statement with `purpose: enrol`.";
|
|
247
|
+
};
|
|
248
|
+
readonly audience: {
|
|
249
|
+
readonly type: "string";
|
|
250
|
+
readonly pattern: "^did:";
|
|
251
|
+
readonly minLength: 5;
|
|
252
|
+
readonly maxLength: 2048;
|
|
253
|
+
readonly description: "The relying party's DID, which the statement names as its `audience` and `recipient`.";
|
|
254
|
+
};
|
|
255
|
+
readonly expiresAt: {
|
|
256
|
+
readonly type: "string";
|
|
257
|
+
readonly format: "date-time";
|
|
258
|
+
readonly description: "When this ceremony lapses (not the invite). No later than the invite's own expiry.";
|
|
259
|
+
};
|
|
260
|
+
readonly ext: {
|
|
261
|
+
readonly $ref: "#/$defs/Ext";
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
readonly Ext: {
|
|
266
|
+
readonly title: "Ext";
|
|
267
|
+
readonly 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.";
|
|
268
|
+
readonly type: "object";
|
|
269
|
+
readonly minProperties: 1;
|
|
270
|
+
readonly additionalProperties: true;
|
|
271
|
+
readonly propertyNames: {
|
|
272
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
280
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
281
|
+
* parties (§7.3 item 5).
|
|
282
|
+
*/
|
|
283
|
+
export declare const RESPONSE_SPEC: {
|
|
284
|
+
readonly typeUri: "https://trusttasks.org/spec/auth/step-up/approver/redeem/start/0.1#response";
|
|
285
|
+
readonly isBearer: false;
|
|
286
|
+
readonly isProofRequired: false;
|
|
287
|
+
readonly isRecipientRequired: true;
|
|
288
|
+
readonly isIssuedAtRequired: true;
|
|
289
|
+
readonly payloadSchema: {
|
|
290
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
291
|
+
readonly $ref: "#/$defs/Response";
|
|
292
|
+
readonly $defs: {
|
|
293
|
+
readonly Response: {
|
|
294
|
+
readonly $anchor: "response";
|
|
295
|
+
readonly title: "Auth — Step-up Approver Redeem (start) — response payload";
|
|
296
|
+
readonly description: "The enrolment ceremony the invite authorises: what the approver's enrolment statement is to be made over.";
|
|
297
|
+
readonly type: "object";
|
|
298
|
+
readonly additionalProperties: false;
|
|
299
|
+
readonly required: readonly ["enrollmentId", "challenge", "audience", "expiresAt"];
|
|
300
|
+
readonly properties: {
|
|
301
|
+
readonly enrollmentId: {
|
|
302
|
+
readonly type: "string";
|
|
303
|
+
readonly minLength: 1;
|
|
304
|
+
readonly maxLength: 256;
|
|
305
|
+
readonly description: "Opaque, single-use handle for this ceremony. Echoed in redeem/finish, and the `boundTo` of the approver's enrolment statement.";
|
|
306
|
+
};
|
|
307
|
+
readonly challenge: {
|
|
308
|
+
readonly type: "string";
|
|
309
|
+
readonly minLength: 16;
|
|
310
|
+
readonly maxLength: 512;
|
|
311
|
+
readonly description: "A fresh challenge (≥128 bits) the approver signs over in its auth/step-up/approver/attest/0.1 statement with `purpose: enrol`.";
|
|
312
|
+
};
|
|
313
|
+
readonly audience: {
|
|
314
|
+
readonly type: "string";
|
|
315
|
+
readonly pattern: "^did:";
|
|
316
|
+
readonly minLength: 5;
|
|
317
|
+
readonly maxLength: 2048;
|
|
318
|
+
readonly description: "The relying party's DID, which the statement names as its `audience` and `recipient`.";
|
|
319
|
+
};
|
|
320
|
+
readonly expiresAt: {
|
|
321
|
+
readonly type: "string";
|
|
322
|
+
readonly format: "date-time";
|
|
323
|
+
readonly description: "When this ceremony lapses (not the invite). No later than the invite's own expiry.";
|
|
324
|
+
};
|
|
325
|
+
readonly ext: {
|
|
326
|
+
readonly $ref: "#/$defs/Ext";
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
readonly Ext: {
|
|
331
|
+
readonly title: "Ext";
|
|
332
|
+
readonly 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.";
|
|
333
|
+
readonly type: "object";
|
|
334
|
+
readonly minProperties: 1;
|
|
335
|
+
readonly additionalProperties: true;
|
|
336
|
+
readonly propertyNames: {
|
|
337
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../../../src/auth/step-up/approver/redeem/start/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,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