@openvtc/trust-tasks 0.1.0 → 0.2.0
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/dist/auth/step-up/approve-request/0.1/payload.d.ts +28 -0
- package/dist/auth/step-up/approve-request/0.1/payload.d.ts.map +1 -1
- package/dist/auth/step-up/approve-request/0.1/payload.js.map +1 -1
- package/dist/auth/step-up/approve-response/0.1/payload.d.ts +31 -0
- package/dist/auth/step-up/approve-response/0.1/payload.d.ts.map +1 -1
- package/dist/auth/step-up/approve-response/0.1/payload.js.map +1 -1
- package/package.json +2 -2
- package/src/_framework/0.2/framework.ts +11 -0
- package/src/acl/grant/0.1/payload.ts +13 -0
- package/src/auth/passkey/login/finish/0.2/payload.ts +44 -0
- package/src/auth/passkey/login/start/0.2/payload.ts +31 -0
- package/src/auth/step-up/approve-request/0.1/payload.ts +28 -0
- package/src/auth/step-up/approve-request/0.2/payload.ts +75 -0
- package/src/auth/step-up/approve-response/0.1/payload.ts +32 -0
- package/src/auth/step-up/approve-response/0.2/payload.ts +79 -0
- package/src/auth/step-up/policy/0.1/payload.ts +45 -0
- package/src/auth/step-up/policy/0.2/payload.ts +45 -0
- package/src/device/_shared/0.2/device-binding.ts +11 -0
- package/src/device/heartbeat/0.2/payload.ts +31 -0
- package/src/device/list/0.2/payload.ts +48 -0
- package/src/device/register/0.1/payload.ts +18 -0
- package/src/device/register/0.2/payload.ts +106 -0
- package/src/device/set-wake/0.1/payload.ts +45 -0
- package/src/device/set-wake/0.2/payload.ts +45 -0
- package/src/device/wipe/0.2/payload.ts +39 -0
- package/src/did-management/did/check-name/0.1/payload.ts +5 -2
- package/src/index.ts +41 -0
- package/src/policy/_shared/0.2/policy.ts +11 -0
- package/src/policy/evaluate/0.2/payload.ts +102 -0
- package/src/policy/list/0.2/payload.ts +24 -0
- package/src/policy/upsert/0.2/payload.ts +31 -0
- package/src/provision/integration/0.2/payload.ts +181 -0
- package/src/push/provision/0.1/payload.ts +37 -0
- package/src/push/provision/0.2/payload.ts +37 -0
- package/src/push/register/0.1/payload.ts +75 -0
- package/src/push/register/0.2/payload.ts +75 -0
- package/src/push/wake/0.1/payload.ts +43 -0
- package/src/push/wake/0.2/payload.ts +43 -0
- package/src/sync/_shared/0.2/sync-event.ts +11 -0
- package/src/sync/event/0.2/payload.ts +219 -0
- package/src/trust-task-error/0.2/payload.ts +55 -0
- package/src/vault/_shared/0.2/consumer-context.ts +11 -0
- package/src/vault/_shared/0.2/sealed-envelope.ts +15 -0
- package/src/vault/_shared/0.2/session-blob.ts +13 -0
- package/src/vault/_shared/0.2/vault-entry.ts +13 -0
- package/src/vault/_shared/0.2/vault-secret.ts +15 -0
- package/src/vault/get/0.2/payload.ts +27 -0
- package/src/vault/list/0.2/payload.ts +85 -0
- package/src/vault/proxy-login/0.2/payload.ts +112 -0
- package/src/vault/release/0.2/payload.ts +105 -0
- package/src/vault/sign-trust-task/0.2/payload.ts +101 -0
- package/src/vault/sync/0.2/payload.ts +35 -0
- package/src/vault/upsert/0.2/payload.ts +161 -0
- package/src/vault/usage/0.2/payload.ts +40 -0
|
@@ -26,12 +26,40 @@ export interface AuthStepUpApproveRequest {
|
|
|
26
26
|
* The acr the relying party expects on the elevated session. Approvers MAY refuse if they cannot deliver this level.
|
|
27
27
|
*/
|
|
28
28
|
targetAcr?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Which approve-response evidence kinds the relying party will accept (see auth/step-up/approve-response `evidence`). When omitted, the approver MAY use any kind it supports. An approver that cannot satisfy any listed kind SHOULD refuse with `method_unsupported`.
|
|
31
|
+
*
|
|
32
|
+
* @minItems 1
|
|
33
|
+
*/
|
|
34
|
+
acceptableEvidence?: ["did-signed" | "webauthn", ...("did-signed" | "webauthn")[]];
|
|
35
|
+
webauthn?: PublicKeyCredentialRequestOptions;
|
|
29
36
|
/**
|
|
30
37
|
* Seconds within which the relying party expects the approve-response. Approvers SHOULD treat as advisory — the relying party's own expiry policy is authoritative.
|
|
31
38
|
*/
|
|
32
39
|
ttl?: number;
|
|
33
40
|
ext?: Ext;
|
|
34
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Optional WebAuthn `PublicKeyCredentialRequestOptions` the approver passes to the platform passkey API when producing `webauthn` evidence. When present, its `challenge` MUST equal `payload.challenge` so the resulting assertion binds the same nonce the relying party bound server-side. `rpId`/`allowCredentials` identify which credential the approver should assert with.
|
|
44
|
+
*/
|
|
45
|
+
export interface PublicKeyCredentialRequestOptions {
|
|
46
|
+
/**
|
|
47
|
+
* base64url-encoded one-time nonce.
|
|
48
|
+
*/
|
|
49
|
+
challenge: string;
|
|
50
|
+
timeout?: number;
|
|
51
|
+
rpId?: string;
|
|
52
|
+
allowCredentials?: PublicKeyCredentialDescriptor[];
|
|
53
|
+
userVerification?: "discouraged" | "preferred" | "required";
|
|
54
|
+
}
|
|
55
|
+
export interface PublicKeyCredentialDescriptor {
|
|
56
|
+
type: "public-key";
|
|
57
|
+
/**
|
|
58
|
+
* base64url-encoded credential id.
|
|
59
|
+
*/
|
|
60
|
+
id: string;
|
|
61
|
+
transports?: ("usb" | "nfc" | "ble" | "internal" | "hybrid")[];
|
|
62
|
+
}
|
|
35
63
|
/**
|
|
36
64
|
* 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.
|
|
37
65
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/auth/step-up/approve-request/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,8DAAuE,CAAC;AAEhG,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,uEAAgF,CAAC"}
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/auth/step-up/approve-request/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,YAAY,GAAG,UAAU,EAAE,GAAG,CAAC,YAAY,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC;IACnF,QAAQ,CAAC,EAAE,iCAAiC,CAAC;IAC7C;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,6BAA6B,EAAE,CAAC;IACnD,gBAAgB,CAAC,EAAE,aAAa,GAAG,WAAW,GAAG,UAAU,CAAC;CAC7D;AACD,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,YAAY,CAAC;IACnB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,CAAC,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,QAAQ,CAAC,EAAE,CAAC;CAChE;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,8DAAuE,CAAC;AAEhG,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,uEAAgF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/auth/step-up/approve-request/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/auth/step-up/approve-request/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmEH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,8DAAuE,CAAC;AAEhG,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,uEAAgF,CAAC"}
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
3
|
* Source: specs/auth/step-up/approve-response/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
|
+
/**
|
|
6
|
+
* How the approver demonstrated the factor backing this elevation. A tagged union on `kind`. When `evidence` is absent the elevation is gated solely by the document's framework `proof` (equivalent to `kind: did-signed`). When `kind: webauthn` is supplied, the carried WebAuthn assertion over `challenge` is the gate and the framework `proof` MAY be omitted.
|
|
7
|
+
*/
|
|
8
|
+
export type StepUpEvidence = DidSigned | WebAuthn;
|
|
5
9
|
/**
|
|
6
10
|
* The approver's signed ratification of a step-up: subject + sessionId + challenge are echoed inside a proof-bearing document so the relying party can elevate the session.
|
|
7
11
|
*/
|
|
@@ -30,8 +34,35 @@ export interface AuthStepUpApproveResponse {
|
|
|
30
34
|
* The acr the approver believes it has cryptographically demonstrated. The relying party MAY accept this, MAY upgrade to a lower value, but MUST NOT exceed it.
|
|
31
35
|
*/
|
|
32
36
|
grantedAcr?: string;
|
|
37
|
+
evidence?: StepUpEvidence;
|
|
33
38
|
ext?: Ext;
|
|
34
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* The elevation is gated by the document's framework `proof` — a Data Integrity signature from a key the subject controls (SPEC §4.7). This is the default when `evidence` is omitted. `amr` reflects "vta"/"did".
|
|
42
|
+
*/
|
|
43
|
+
export interface DidSigned {
|
|
44
|
+
kind: "did-signed";
|
|
45
|
+
}
|
|
46
|
+
export interface WebAuthn {
|
|
47
|
+
kind: "webauthn";
|
|
48
|
+
assertion: AuthenticatorAssertionResponseLogin;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The unmodified AuthenticatorAssertionResponse from the platform WebAuthn API (`navigator.credentials.get` / ASAuthorization / Credential Manager). Its `clientDataJSON` challenge MUST equal the step-up `challenge`. The relying party verifies it per WebAuthn Level 2 §7.2 exactly as auth/passkey/login/finish does; the assertion is the gate and `amr` reflects "passkey".
|
|
52
|
+
*/
|
|
53
|
+
export interface AuthenticatorAssertionResponseLogin {
|
|
54
|
+
id: string;
|
|
55
|
+
rawId: string;
|
|
56
|
+
type: "public-key";
|
|
57
|
+
response: {
|
|
58
|
+
clientDataJSON: string;
|
|
59
|
+
authenticatorData: string;
|
|
60
|
+
signature: string;
|
|
61
|
+
userHandle?: string | null;
|
|
62
|
+
};
|
|
63
|
+
authenticatorAttachment?: "platform" | "cross-platform";
|
|
64
|
+
clientExtensionResults?: {};
|
|
65
|
+
}
|
|
35
66
|
/**
|
|
36
67
|
* 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.
|
|
37
68
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/auth/step-up/approve-response/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,UAAU,GAAG,QAAQ,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,+DAAwE,CAAC;AAEjG,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,wEAAiF,CAAC"}
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/auth/step-up/approve-response/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,UAAU,GAAG,QAAQ,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,YAAY,CAAC;CACpB;AACD,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,EAAE,mCAAmC,CAAC;CAChD;AACD;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE;QACR,cAAc,EAAE,MAAM,CAAC;QACvB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B,CAAC;IACF,uBAAuB,CAAC,EAAE,UAAU,GAAG,gBAAgB,CAAC;IACxD,sBAAsB,CAAC,EAAE,EAAE,CAAC;CAC7B;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,+DAAwE,CAAC;AAEjG,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,wEAAiF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/auth/step-up/approve-response/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/auth/step-up/approve-response/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAuEH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,+DAAwE,CAAC;AAEjG,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,wEAAiF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openvtc/trust-tasks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Generated TypeScript bindings for the Trust Tasks framework registry.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"clean": "rm -rf dist"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"typescript": "^
|
|
28
|
+
"typescript": "^6.0.0"
|
|
29
29
|
},
|
|
30
30
|
"license": "Apache-2.0",
|
|
31
31
|
"repository": {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/_framework/0.2/framework.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Reusable $defs cross-referenced by individual Trust Task specifications. Not itself a Trust Task specification — the `_framework` directory is skipped by the registry build (folders starting with `_` are not discovered) and by the codegen (which only triggers on payload.schema.json). See SPEC.md §4.5.1 for the normative description of `ext`.
|
|
8
|
+
*/
|
|
9
|
+
export interface TrustTasksFrameworkReusableJSONSchemaDefinitions {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
@@ -45,6 +45,19 @@ export interface AclEntry {
|
|
|
45
45
|
* Optional time after which the entry is no longer effective.
|
|
46
46
|
*/
|
|
47
47
|
expiresAt?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Per-entry authentication step-up configuration, consumed by the ACL maintainer when it gates an operation behind a step-up (see auth/step-up/policy/0.1). ADDITIVE-ONLY: a per-entry setting MAY raise the assurance required of this subject above the maintainer's system-wide floor, but MUST NOT lower it. The maintainer resolves the effective requirement as the strictest of (system floor, this entry).
|
|
50
|
+
*/
|
|
51
|
+
stepUp?: {
|
|
52
|
+
/**
|
|
53
|
+
* VID authorized to ratify step-up for this subject — the `recipient` the maintainer addresses an auth/step-up/approve-request to (e.g. the holder's mobile authenticator or browser companion). Absent → the subject is its own approver (mode `self`) when it holds a usable authenticator; if neither an `approver` nor a self authenticator exists, no step-up method is available for this subject and the maintainer's fail-closed rule applies.
|
|
54
|
+
*/
|
|
55
|
+
approver?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Minimum step-up mode this subject MUST satisfy for gated operations, raising the system floor. `self` = the subject re-authenticates its own session; `delegated` = a separate `approver` MUST ratify. Omitted → the system floor applies unchanged. A value weaker than the resolved floor is ignored (additive-only).
|
|
58
|
+
*/
|
|
59
|
+
require?: "self" | "delegated";
|
|
60
|
+
};
|
|
48
61
|
ext?: Ext;
|
|
49
62
|
}
|
|
50
63
|
/**
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/auth/passkey/login/finish/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Submit the WebAuthn assertion that completes a passkey login or step-up ceremony. On success the auth service issues a session (login) or elevates an existing session's acr (step-up).
|
|
8
|
+
*/
|
|
9
|
+
export interface AuthPasskeyLoginFinish {
|
|
10
|
+
/**
|
|
11
|
+
* The authId issued by the matching login/start response. Echoed verbatim.
|
|
12
|
+
*/
|
|
13
|
+
authId: string;
|
|
14
|
+
credential: AuthenticatorAssertionResponseLogin;
|
|
15
|
+
ext?: Ext;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* AuthenticatorAssertionResponse as returned by `navigator.credentials.get`. Binary fields base64url-encoded.
|
|
19
|
+
*/
|
|
20
|
+
export interface AuthenticatorAssertionResponseLogin {
|
|
21
|
+
id: string;
|
|
22
|
+
rawId: string;
|
|
23
|
+
type: "public-key";
|
|
24
|
+
response: {
|
|
25
|
+
clientDataJSON: string;
|
|
26
|
+
authenticatorData: string;
|
|
27
|
+
signature: string;
|
|
28
|
+
userHandle?: string | null;
|
|
29
|
+
};
|
|
30
|
+
authenticatorAttachment?: "platform" | "cross-platform";
|
|
31
|
+
clientExtensionResults?: {};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
35
|
+
*/
|
|
36
|
+
export interface Ext {
|
|
37
|
+
[k: string]: unknown | undefined;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Trust Task type URI. */
|
|
41
|
+
export const TYPE_URI = "https://trusttasks.org/spec/auth/passkey/login/finish/0.2" as const;
|
|
42
|
+
|
|
43
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
44
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/passkey/login/finish/0.2#response" as const;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/auth/passkey/login/start/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Ask the auth service to begin a WebAuthn authentication ceremony. The response carries PublicKeyCredentialRequestOptions for `navigator.credentials.get`.
|
|
8
|
+
*/
|
|
9
|
+
export interface AuthPasskeyLoginStart {
|
|
10
|
+
/**
|
|
11
|
+
* The VID the producer intends to authenticate as. Optional — omit for usernameless / discoverable-credential flows where any registered passkey may answer.
|
|
12
|
+
*/
|
|
13
|
+
subject?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Producer-declared intent. `login` issues a new session; `stepUp` elevates an existing session's `acr`. The consumer's behaviour on the matching finish differs accordingly.
|
|
16
|
+
*/
|
|
17
|
+
purpose?: "login" | "stepUp";
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
22
|
+
*/
|
|
23
|
+
export interface Ext {
|
|
24
|
+
[k: string]: unknown | undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Trust Task type URI. */
|
|
28
|
+
export const TYPE_URI = "https://trusttasks.org/spec/auth/passkey/login/start/0.2" as const;
|
|
29
|
+
|
|
30
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
31
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/passkey/login/start/0.2#response" as const;
|
|
@@ -27,12 +27,40 @@ export interface AuthStepUpApproveRequest {
|
|
|
27
27
|
* The acr the relying party expects on the elevated session. Approvers MAY refuse if they cannot deliver this level.
|
|
28
28
|
*/
|
|
29
29
|
targetAcr?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Which approve-response evidence kinds the relying party will accept (see auth/step-up/approve-response `evidence`). When omitted, the approver MAY use any kind it supports. An approver that cannot satisfy any listed kind SHOULD refuse with `method_unsupported`.
|
|
32
|
+
*
|
|
33
|
+
* @minItems 1
|
|
34
|
+
*/
|
|
35
|
+
acceptableEvidence?: ["did-signed" | "webauthn", ...("did-signed" | "webauthn")[]];
|
|
36
|
+
webauthn?: PublicKeyCredentialRequestOptions;
|
|
30
37
|
/**
|
|
31
38
|
* Seconds within which the relying party expects the approve-response. Approvers SHOULD treat as advisory — the relying party's own expiry policy is authoritative.
|
|
32
39
|
*/
|
|
33
40
|
ttl?: number;
|
|
34
41
|
ext?: Ext;
|
|
35
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Optional WebAuthn `PublicKeyCredentialRequestOptions` the approver passes to the platform passkey API when producing `webauthn` evidence. When present, its `challenge` MUST equal `payload.challenge` so the resulting assertion binds the same nonce the relying party bound server-side. `rpId`/`allowCredentials` identify which credential the approver should assert with.
|
|
45
|
+
*/
|
|
46
|
+
export interface PublicKeyCredentialRequestOptions {
|
|
47
|
+
/**
|
|
48
|
+
* base64url-encoded one-time nonce.
|
|
49
|
+
*/
|
|
50
|
+
challenge: string;
|
|
51
|
+
timeout?: number;
|
|
52
|
+
rpId?: string;
|
|
53
|
+
allowCredentials?: PublicKeyCredentialDescriptor[];
|
|
54
|
+
userVerification?: "discouraged" | "preferred" | "required";
|
|
55
|
+
}
|
|
56
|
+
export interface PublicKeyCredentialDescriptor {
|
|
57
|
+
type: "public-key";
|
|
58
|
+
/**
|
|
59
|
+
* base64url-encoded credential id.
|
|
60
|
+
*/
|
|
61
|
+
id: string;
|
|
62
|
+
transports?: ("usb" | "nfc" | "ble" | "internal" | "hybrid")[];
|
|
63
|
+
}
|
|
36
64
|
/**
|
|
37
65
|
* 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.
|
|
38
66
|
*/
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/auth/step-up/approve-request/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A relying party asks an approver (typically a wallet or a VTA) to ratify an AAL elevation for a subject's session.
|
|
8
|
+
*/
|
|
9
|
+
export interface AuthStepUpApproveRequest {
|
|
10
|
+
/**
|
|
11
|
+
* The VID whose session is being elevated. The approver MUST verify this is a VID it can speak for.
|
|
12
|
+
*/
|
|
13
|
+
subject: string;
|
|
14
|
+
/**
|
|
15
|
+
* The session the relying party wants elevated. Opaque to the approver.
|
|
16
|
+
*/
|
|
17
|
+
sessionId: string;
|
|
18
|
+
/**
|
|
19
|
+
* base64url-encoded nonce the approver will include in the approve-response signature. ≥128 bits entropy.
|
|
20
|
+
*/
|
|
21
|
+
challenge: string;
|
|
22
|
+
/**
|
|
23
|
+
* Human-readable explanation of WHY the relying party is asking (e.g. "confirm transfer of 1000 USD to bob.example"). Surfaced to the user by the approver for consent. SHOULD be specific enough that a user can refuse intelligently.
|
|
24
|
+
*/
|
|
25
|
+
reason: string;
|
|
26
|
+
/**
|
|
27
|
+
* The acr the relying party expects on the elevated session. Approvers MAY refuse if they cannot deliver this level.
|
|
28
|
+
*/
|
|
29
|
+
targetAcr?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Which approve-response evidence kinds the relying party will accept (see auth/step-up/approve-response `evidence`). When omitted, the approver MAY use any kind it supports. An approver that cannot satisfy any listed kind SHOULD refuse with `method_unsupported`.
|
|
32
|
+
*
|
|
33
|
+
* @minItems 1
|
|
34
|
+
*/
|
|
35
|
+
acceptableEvidence?: ["didSigned" | "webauthn", ...("didSigned" | "webauthn")[]];
|
|
36
|
+
webauthn?: PublicKeyCredentialRequestOptions;
|
|
37
|
+
/**
|
|
38
|
+
* Seconds within which the relying party expects the approve-response. Approvers SHOULD treat as advisory — the relying party's own expiry policy is authoritative.
|
|
39
|
+
*/
|
|
40
|
+
ttl?: number;
|
|
41
|
+
ext?: Ext;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Optional WebAuthn `PublicKeyCredentialRequestOptions` the approver passes to the platform passkey API when producing `webauthn` evidence. When present, its `challenge` MUST equal `payload.challenge` so the resulting assertion binds the same nonce the relying party bound server-side. `rpId`/`allowCredentials` identify which credential the approver should assert with.
|
|
45
|
+
*/
|
|
46
|
+
export interface PublicKeyCredentialRequestOptions {
|
|
47
|
+
/**
|
|
48
|
+
* base64url-encoded one-time nonce.
|
|
49
|
+
*/
|
|
50
|
+
challenge: string;
|
|
51
|
+
timeout?: number;
|
|
52
|
+
rpId?: string;
|
|
53
|
+
allowCredentials?: PublicKeyCredentialDescriptor[];
|
|
54
|
+
userVerification?: "discouraged" | "preferred" | "required";
|
|
55
|
+
}
|
|
56
|
+
export interface PublicKeyCredentialDescriptor {
|
|
57
|
+
type: "public-key";
|
|
58
|
+
/**
|
|
59
|
+
* base64url-encoded credential id.
|
|
60
|
+
*/
|
|
61
|
+
id: string;
|
|
62
|
+
transports?: ("usb" | "nfc" | "ble" | "internal" | "hybrid")[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 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.
|
|
66
|
+
*/
|
|
67
|
+
export interface Ext {
|
|
68
|
+
[k: string]: unknown | undefined;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Trust Task type URI. */
|
|
72
|
+
export const TYPE_URI = "https://trusttasks.org/spec/auth/step-up/approve-request/0.2" as const;
|
|
73
|
+
|
|
74
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
75
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/step-up/approve-request/0.2#response" as const;
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
* Source: specs/auth/step-up/approve-response/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* How the approver demonstrated the factor backing this elevation. A tagged union on `kind`. When `evidence` is absent the elevation is gated solely by the document's framework `proof` (equivalent to `kind: did-signed`). When `kind: webauthn` is supplied, the carried WebAuthn assertion over `challenge` is the gate and the framework `proof` MAY be omitted.
|
|
8
|
+
*/
|
|
9
|
+
export type StepUpEvidence = DidSigned | WebAuthn;
|
|
10
|
+
|
|
6
11
|
/**
|
|
7
12
|
* The approver's signed ratification of a step-up: subject + sessionId + challenge are echoed inside a proof-bearing document so the relying party can elevate the session.
|
|
8
13
|
*/
|
|
@@ -31,8 +36,35 @@ export interface AuthStepUpApproveResponse {
|
|
|
31
36
|
* The acr the approver believes it has cryptographically demonstrated. The relying party MAY accept this, MAY upgrade to a lower value, but MUST NOT exceed it.
|
|
32
37
|
*/
|
|
33
38
|
grantedAcr?: string;
|
|
39
|
+
evidence?: StepUpEvidence;
|
|
34
40
|
ext?: Ext;
|
|
35
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* The elevation is gated by the document's framework `proof` — a Data Integrity signature from a key the subject controls (SPEC §4.7). This is the default when `evidence` is omitted. `amr` reflects "vta"/"did".
|
|
44
|
+
*/
|
|
45
|
+
export interface DidSigned {
|
|
46
|
+
kind: "did-signed";
|
|
47
|
+
}
|
|
48
|
+
export interface WebAuthn {
|
|
49
|
+
kind: "webauthn";
|
|
50
|
+
assertion: AuthenticatorAssertionResponseLogin;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The unmodified AuthenticatorAssertionResponse from the platform WebAuthn API (`navigator.credentials.get` / ASAuthorization / Credential Manager). Its `clientDataJSON` challenge MUST equal the step-up `challenge`. The relying party verifies it per WebAuthn Level 2 §7.2 exactly as auth/passkey/login/finish does; the assertion is the gate and `amr` reflects "passkey".
|
|
54
|
+
*/
|
|
55
|
+
export interface AuthenticatorAssertionResponseLogin {
|
|
56
|
+
id: string;
|
|
57
|
+
rawId: string;
|
|
58
|
+
type: "public-key";
|
|
59
|
+
response: {
|
|
60
|
+
clientDataJSON: string;
|
|
61
|
+
authenticatorData: string;
|
|
62
|
+
signature: string;
|
|
63
|
+
userHandle?: string | null;
|
|
64
|
+
};
|
|
65
|
+
authenticatorAttachment?: "platform" | "cross-platform";
|
|
66
|
+
clientExtensionResults?: {};
|
|
67
|
+
}
|
|
36
68
|
/**
|
|
37
69
|
* 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.
|
|
38
70
|
*/
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/auth/step-up/approve-response/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* How the approver demonstrated the factor backing this elevation. A tagged union on `kind`. When `evidence` is absent the elevation is gated solely by the document's framework `proof` (equivalent to `kind: did-signed`). When `kind: webauthn` is supplied, the carried WebAuthn assertion over `challenge` is the gate and the framework `proof` MAY be omitted.
|
|
8
|
+
*/
|
|
9
|
+
export type StepUpEvidence = DidSigned | WebAuthn;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The approver's signed ratification of a step-up: subject + sessionId + challenge are echoed inside a proof-bearing document so the relying party can elevate the session.
|
|
13
|
+
*/
|
|
14
|
+
export interface AuthStepUpApproveResponse {
|
|
15
|
+
/**
|
|
16
|
+
* Echoed from the matching approve-request. The relying party verifies it equals the session's subject.
|
|
17
|
+
*/
|
|
18
|
+
subject: string;
|
|
19
|
+
/**
|
|
20
|
+
* Echoed from the matching approve-request. The relying party uses it to locate the session to elevate.
|
|
21
|
+
*/
|
|
22
|
+
sessionId: string;
|
|
23
|
+
/**
|
|
24
|
+
* Echoed from the matching approve-request. The relying party verifies it equals the bound challenge.
|
|
25
|
+
*/
|
|
26
|
+
challenge: string;
|
|
27
|
+
/**
|
|
28
|
+
* `approved` elevates the session per the relying party's policy. `denied` is a signed refusal — useful for audit even though it elevates nothing.
|
|
29
|
+
*/
|
|
30
|
+
decision: "approved" | "denied";
|
|
31
|
+
/**
|
|
32
|
+
* Required when decision is `denied`. Human-readable rationale the user provided (or which the approver inferred).
|
|
33
|
+
*/
|
|
34
|
+
deniedReason?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The acr the approver believes it has cryptographically demonstrated. The relying party MAY accept this, MAY upgrade to a lower value, but MUST NOT exceed it.
|
|
37
|
+
*/
|
|
38
|
+
grantedAcr?: string;
|
|
39
|
+
evidence?: StepUpEvidence;
|
|
40
|
+
ext?: Ext;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The elevation is gated by the document's framework `proof` — a Data Integrity signature from a key the subject controls (SPEC §4.7). This is the default when `evidence` is omitted. `amr` reflects "vta"/"did".
|
|
44
|
+
*/
|
|
45
|
+
export interface DidSigned {
|
|
46
|
+
kind: "didSigned";
|
|
47
|
+
}
|
|
48
|
+
export interface WebAuthn {
|
|
49
|
+
kind: "webauthn";
|
|
50
|
+
assertion: AuthenticatorAssertionResponseLogin;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The unmodified AuthenticatorAssertionResponse from the platform WebAuthn API (`navigator.credentials.get` / ASAuthorization / Credential Manager). Its `clientDataJSON` challenge MUST equal the step-up `challenge`. The relying party verifies it per WebAuthn Level 2 §7.2 exactly as auth/passkey/login/finish does; the assertion is the gate and `amr` reflects "passkey".
|
|
54
|
+
*/
|
|
55
|
+
export interface AuthenticatorAssertionResponseLogin {
|
|
56
|
+
id: string;
|
|
57
|
+
rawId: string;
|
|
58
|
+
type: "public-key";
|
|
59
|
+
response: {
|
|
60
|
+
clientDataJSON: string;
|
|
61
|
+
authenticatorData: string;
|
|
62
|
+
signature: string;
|
|
63
|
+
userHandle?: string | null;
|
|
64
|
+
};
|
|
65
|
+
authenticatorAttachment?: "platform" | "cross-platform";
|
|
66
|
+
clientExtensionResults?: {};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 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.
|
|
70
|
+
*/
|
|
71
|
+
export interface Ext {
|
|
72
|
+
[k: string]: unknown | undefined;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Trust Task type URI. */
|
|
76
|
+
export const TYPE_URI = "https://trusttasks.org/spec/auth/step-up/approve-response/0.2" as const;
|
|
77
|
+
|
|
78
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
79
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/step-up/approve-response/0.2#response" as const;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/auth/step-up/policy/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The relying party's (ACL maintainer's) system-wide step-up policy: the per-operation-class floor that decides whether — and how — a step-up to a higher assurance level is required before a gated operation proceeds. Set by an administrator; resolved per request against per-entry overrides (see acl/_shared AclEntry.stepUp).
|
|
8
|
+
*/
|
|
9
|
+
export interface AuthStepUpPolicyPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Master switch. `false` (the shipping default) ⇒ step-up is NOT enforced anywhere; every operation proceeds at AAL1 regardless of `floors`, because a freshly-provisioned maintainer has no registered approver and could not otherwise be administered (chicken-and-egg). The maintainer SHOULD surface this 'not enforced' state prominently. `true` ⇒ the `floors` are enforced.
|
|
12
|
+
*/
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The system-wide minimum step-up requirement per operation-class — the maintainer-owned floor. Per-entry `stepUp` settings on an AclEntry MAY raise the requirement for a given subject but MUST NOT lower it (additive-only). The effective requirement for a request is the strictest of (matching floor, caller's per-entry setting).
|
|
16
|
+
*/
|
|
17
|
+
floors: StepUpFloor[];
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
}
|
|
20
|
+
export interface StepUpFloor {
|
|
21
|
+
/**
|
|
22
|
+
* The operation-class this floor governs: a Trust Task type URI or slug (e.g. `acl/grant`, `acl/swap-key`, `context/delete`, `key/revoke`, `vault/release`), or `*` for the catch-all default applied when no more-specific floor matches.
|
|
23
|
+
*/
|
|
24
|
+
operation: string;
|
|
25
|
+
/**
|
|
26
|
+
* Minimum mode required to perform the operation. `none` = AAL1 permitted (no step-up). `self` = the caller must elevate its own session (AAL2 via its own authenticator). `delegated` = a separate approver named on the caller's AclEntry (`stepUp.approver`) MUST ratify (AAL2 via auth/step-up/approve-request). `delegated-any` = any VID satisfying the maintainer's approver criterion MAY ratify. Strictness order for floor/override resolution: none < self < delegated-any < delegated.
|
|
27
|
+
*/
|
|
28
|
+
mode: "none" | "self" | "delegated" | "delegated-any";
|
|
29
|
+
/**
|
|
30
|
+
* Carve-out for non-escalating self-service operations (notably acl/swap-key key-rotation and method-enrolment). When `true` and the maintainer verifies the request does not escalate (its resulting AclEntry's role and scopes are a subset of the caller's existing entry, and the caller acts on its own entry), the operation is admitted at AAL1 even though `mode` requires AAL2 — so a holder with no authenticator yet can still bootstrap/rotate. Omitted is equivalent to `false` (the correct default for escalating operations such as acl/grant, change-role, revoke, context/delete, key/revoke): a caller lacking a usable step-up method is denied (fail-closed) rather than silently downgraded to AAL1.
|
|
31
|
+
*/
|
|
32
|
+
allowAal1IfNonEscalating?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
36
|
+
*/
|
|
37
|
+
export interface Ext {
|
|
38
|
+
[k: string]: unknown | undefined;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Trust Task type URI. */
|
|
42
|
+
export const TYPE_URI = "https://trusttasks.org/spec/auth/step-up/policy/0.1" as const;
|
|
43
|
+
|
|
44
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
45
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/step-up/policy/0.1#response" as const;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/auth/step-up/policy/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The relying party's (ACL maintainer's) system-wide step-up policy: the per-operation-class floor that decides whether — and how — a step-up to a higher assurance level is required before a gated operation proceeds. Set by an administrator; resolved per request against per-entry overrides (see acl/_shared AclEntry.stepUp).
|
|
8
|
+
*/
|
|
9
|
+
export interface AuthStepUpPolicyPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Master switch. `false` (the shipping default) ⇒ step-up is NOT enforced anywhere; every operation proceeds at AAL1 regardless of `floors`, because a freshly-provisioned maintainer has no registered approver and could not otherwise be administered (chicken-and-egg). The maintainer SHOULD surface this 'not enforced' state prominently. `true` ⇒ the `floors` are enforced.
|
|
12
|
+
*/
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The system-wide minimum step-up requirement per operation-class — the maintainer-owned floor. Per-entry `stepUp` settings on an AclEntry MAY raise the requirement for a given subject but MUST NOT lower it (additive-only). The effective requirement for a request is the strictest of (matching floor, caller's per-entry setting).
|
|
16
|
+
*/
|
|
17
|
+
floors: StepUpFloor[];
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
}
|
|
20
|
+
export interface StepUpFloor {
|
|
21
|
+
/**
|
|
22
|
+
* The operation-class this floor governs: a Trust Task type URI or slug (e.g. `acl/grant`, `acl/swap-key`, `context/delete`, `key/revoke`, `vault/release`), or `*` for the catch-all default applied when no more-specific floor matches.
|
|
23
|
+
*/
|
|
24
|
+
operation: string;
|
|
25
|
+
/**
|
|
26
|
+
* Minimum mode required to perform the operation. `none` = AAL1 permitted (no step-up). `self` = the caller must elevate its own session (AAL2 via its own authenticator). `delegated` = a separate approver named on the caller's AclEntry (`stepUp.approver`) MUST ratify (AAL2 via auth/step-up/approve-request). `delegatedAny` = any VID satisfying the maintainer's approver criterion MAY ratify. Strictness order for floor/override resolution: none < self < delegated-any < delegated.
|
|
27
|
+
*/
|
|
28
|
+
mode: "none" | "self" | "delegated" | "delegatedAny";
|
|
29
|
+
/**
|
|
30
|
+
* Carve-out for non-escalating self-service operations (notably acl/swap-key key-rotation and method-enrolment). When `true` and the maintainer verifies the request does not escalate (its resulting AclEntry's role and scopes are a subset of the caller's existing entry, and the caller acts on its own entry), the operation is admitted at AAL1 even though `mode` requires AAL2 — so a holder with no authenticator yet can still bootstrap/rotate. Omitted is equivalent to `false` (the correct default for escalating operations such as acl/grant, change-role, revoke, context/delete, key/revoke): a caller lacking a usable step-up method is denied (fail-closed) rather than silently downgraded to AAL1.
|
|
31
|
+
*/
|
|
32
|
+
allowAal1IfNonEscalating?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
36
|
+
*/
|
|
37
|
+
export interface Ext {
|
|
38
|
+
[k: string]: unknown | undefined;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Trust Task type URI. */
|
|
42
|
+
export const TYPE_URI = "https://trusttasks.org/spec/auth/step-up/policy/0.2" as const;
|
|
43
|
+
|
|
44
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
45
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/step-up/policy/0.2#response" as const;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/device/_shared/0.2/device-binding.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Canonical metadata view of a registered consumer device — a Companion (browser plugin, mobile app, desktop app) or a Service (mediator, AI agent, daemon) enrolled to a VTA. Referenced by every device/* specification. Pairs with the ACL: a DeviceBinding is the device-facing half of an AclEntry. Most fields are maintainer-side observations (device id, attestation, timestamps); a few are consumer-supplied at registration time (form factor, display name).
|
|
8
|
+
*/
|
|
9
|
+
export interface DeviceBindingSharedDefinitionForTheDeviceSpecFamily {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/device/heartbeat/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Periodic check-in from a Companion or Service. Refreshes `lastSeenAt`, carries optional state digests, and gives the maintainer a chance to deliver queued operations (notably queued wipes for targets that were offline at issuance).
|
|
8
|
+
*/
|
|
9
|
+
export interface DeviceHeartbeatPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Updated platform descriptor if it changed since registration (e.g. browser updated).
|
|
12
|
+
*/
|
|
13
|
+
platform?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional — consumer's current sync baseline. If the maintainer notices a gap (consumer is behind), the response can hint that a vault/sync is due.
|
|
16
|
+
*/
|
|
17
|
+
vaultSeq?: number;
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 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.
|
|
22
|
+
*/
|
|
23
|
+
export interface Ext {
|
|
24
|
+
[k: string]: unknown | undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Trust Task type URI. */
|
|
28
|
+
export const TYPE_URI = "https://trusttasks.org/spec/device/heartbeat/0.2" as const;
|
|
29
|
+
|
|
30
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
31
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/device/heartbeat/0.2#response" as const;
|