@openvtc/trust-tasks 0.26.5 → 0.26.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,845 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/external/credentials/issue/0.2/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/external/credentials/issue/0.2";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/external/credentials/issue/0.2#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/external/credentials/issue/0.2",
21
+ "title": "External Credentials — Issue — payload",
22
+ "description": "Obtain a short-lived, downscoped provider credential from an external account, sealed to the caller: session or token credentials under `scope`, or a batch of presigned requests on one object under `presign`. The outer document members are owned by the framework — SPEC §6.3.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "context",
27
+ "account",
28
+ "ttlSeconds"
29
+ ],
30
+ "oneOf": [
31
+ {
32
+ "required": [
33
+ "scope"
34
+ ],
35
+ "not": {
36
+ "required": [
37
+ "presign"
38
+ ]
39
+ }
40
+ },
41
+ {
42
+ "required": [
43
+ "presign"
44
+ ],
45
+ "not": {
46
+ "required": [
47
+ "scope"
48
+ ]
49
+ }
50
+ }
51
+ ],
52
+ "properties": {
53
+ "context": {
54
+ "$ref": "#/$defs/AccountContextId"
55
+ },
56
+ "account": {
57
+ "$ref": "#/$defs/AccountId"
58
+ },
59
+ "scope": {
60
+ "$ref": "#/$defs/CredentialScope",
61
+ "description": "For every brokered model but `s3-static-presign`: the prefix and actions, or the OAuth scopes, the session or token is downscoped to. `objectKey` is not used in this version."
62
+ },
63
+ "presign": {
64
+ "$ref": "#/$defs/PresignBatch"
65
+ },
66
+ "ttlSeconds": {
67
+ "type": "integer",
68
+ "minimum": 60,
69
+ "maximum": 3600,
70
+ "description": "Requested lifetime; never more than the binding's `maxTtlSeconds`. For `presign`, the lifetime of every URL in the batch."
71
+ },
72
+ "ext": {
73
+ "$ref": "#/$defs/Ext"
74
+ }
75
+ },
76
+ "$defs": {
77
+ "ChecksumSha256": {
78
+ "title": "ChecksumSha256",
79
+ "type": "string",
80
+ "minLength": 44,
81
+ "maxLength": 44,
82
+ "pattern": "^[A-Za-z0-9+/]{43}=$",
83
+ "description": "A SHA-256 digest in standard base64 (RFC 4648 §4, padded), as S3 carries it in `x-amz-checksum-sha256`."
84
+ },
85
+ "PresignBatch": {
86
+ "title": "PresignBatch",
87
+ "type": "object",
88
+ "additionalProperties": false,
89
+ "required": [
90
+ "prefix",
91
+ "objectKey",
92
+ "requests"
93
+ ],
94
+ "description": "`s3-static-presign` only: up to 128 operations on **one** object, `prefix` + `objectKey`, and at most one multipart upload of it. Each operation becomes one presigned request, sealed together. Consistency rules JSON Schema cannot state, which the custodian enforces: `uploadId` is present exactly when an operation needs it (`upload-part`, `list-parts`, `complete-multipart`, `abort-multipart`) and absent when the batch holds `create-multipart`; no two operations are identical; no two `upload-part` operations name the same `partNumber`.",
95
+ "properties": {
96
+ "prefix": {
97
+ "$ref": "#/$defs/ProviderObjectPrefix"
98
+ },
99
+ "objectKey": {
100
+ "type": "string",
101
+ "minLength": 1,
102
+ "maxLength": 1024,
103
+ "pattern": "^[A-Za-z0-9._-]+$",
104
+ "description": "The object's name within `prefix`. Every request in the batch names `prefix` + `objectKey` and no other object."
105
+ },
106
+ "uploadId": {
107
+ "type": "string",
108
+ "minLength": 1,
109
+ "maxLength": 1024,
110
+ "pattern": "^[A-Za-z0-9._~+/=-]+$",
111
+ "description": "The multipart upload the batch's multipart operations act on, as storage returned it from CreateMultipartUpload. Signed into each such request's query, percent-encoded by the SigV4 encoder, never interpolated."
112
+ },
113
+ "requests": {
114
+ "type": "array",
115
+ "minItems": 1,
116
+ "maxItems": 128,
117
+ "items": {
118
+ "$ref": "#/$defs/PresignRequest"
119
+ }
120
+ }
121
+ }
122
+ },
123
+ "PresignRequest": {
124
+ "title": "PresignRequest",
125
+ "description": "One operation to presign, discriminated by `operation`. The ceiling action each needs is in `PresignOperation`.",
126
+ "oneOf": [
127
+ {
128
+ "title": "PresignPut",
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": [
132
+ "operation",
133
+ "contentLength",
134
+ "checksumSha256"
135
+ ],
136
+ "description": "PutObject of the whole object, bound to its exact length and SHA-256.",
137
+ "properties": {
138
+ "operation": {
139
+ "type": "string",
140
+ "const": "put"
141
+ },
142
+ "contentLength": {
143
+ "type": "integer",
144
+ "minimum": 0,
145
+ "maximum": 5368709120,
146
+ "description": "The object's exact length in bytes, signed into the request as `Content-Length`. At most 5 GiB, S3's single-request ceiling."
147
+ },
148
+ "checksumSha256": {
149
+ "$ref": "#/$defs/ChecksumSha256"
150
+ }
151
+ }
152
+ },
153
+ {
154
+ "title": "PresignGet",
155
+ "type": "object",
156
+ "additionalProperties": false,
157
+ "required": [
158
+ "operation"
159
+ ],
160
+ "description": "GetObject.",
161
+ "properties": {
162
+ "operation": {
163
+ "type": "string",
164
+ "const": "get"
165
+ }
166
+ }
167
+ },
168
+ {
169
+ "title": "PresignHead",
170
+ "type": "object",
171
+ "additionalProperties": false,
172
+ "required": [
173
+ "operation"
174
+ ],
175
+ "description": "HeadObject, with `x-amz-checksum-mode: ENABLED` signed so storage reports the object's checksum.",
176
+ "properties": {
177
+ "operation": {
178
+ "type": "string",
179
+ "const": "head"
180
+ }
181
+ }
182
+ },
183
+ {
184
+ "title": "PresignDelete",
185
+ "type": "object",
186
+ "additionalProperties": false,
187
+ "required": [
188
+ "operation"
189
+ ],
190
+ "description": "DeleteObject.",
191
+ "properties": {
192
+ "operation": {
193
+ "type": "string",
194
+ "const": "delete"
195
+ }
196
+ }
197
+ },
198
+ {
199
+ "title": "PresignCreateMultipart",
200
+ "type": "object",
201
+ "additionalProperties": false,
202
+ "required": [
203
+ "operation"
204
+ ],
205
+ "description": "CreateMultipartUpload, with `x-amz-checksum-algorithm: SHA256` signed so every part of the upload must carry a SHA-256 checksum.",
206
+ "properties": {
207
+ "operation": {
208
+ "type": "string",
209
+ "const": "create-multipart"
210
+ }
211
+ }
212
+ },
213
+ {
214
+ "title": "PresignUploadPart",
215
+ "type": "object",
216
+ "additionalProperties": false,
217
+ "required": [
218
+ "operation",
219
+ "partNumber",
220
+ "contentLength",
221
+ "checksumSha256"
222
+ ],
223
+ "description": "UploadPart of one part of `uploadId`, bound to its number, its exact length and its SHA-256.",
224
+ "properties": {
225
+ "operation": {
226
+ "type": "string",
227
+ "const": "upload-part"
228
+ },
229
+ "partNumber": {
230
+ "type": "integer",
231
+ "minimum": 1,
232
+ "maximum": 10000
233
+ },
234
+ "contentLength": {
235
+ "type": "integer",
236
+ "minimum": 1,
237
+ "maximum": 5368709120,
238
+ "description": "The part's exact length in bytes, signed into the request as `Content-Length`. At most 5 GiB, S3's part ceiling."
239
+ },
240
+ "checksumSha256": {
241
+ "$ref": "#/$defs/ChecksumSha256"
242
+ }
243
+ }
244
+ },
245
+ {
246
+ "title": "PresignListParts",
247
+ "type": "object",
248
+ "additionalProperties": false,
249
+ "required": [
250
+ "operation"
251
+ ],
252
+ "description": "ListParts of `uploadId`: each part's number, length, ETag and checksum, up to 1000 per page.",
253
+ "properties": {
254
+ "operation": {
255
+ "type": "string",
256
+ "const": "list-parts"
257
+ },
258
+ "partNumberMarker": {
259
+ "type": "integer",
260
+ "minimum": 0,
261
+ "maximum": 10000,
262
+ "description": "List parts after this number. Absent, from the first."
263
+ }
264
+ }
265
+ },
266
+ {
267
+ "title": "PresignCompleteMultipart",
268
+ "type": "object",
269
+ "additionalProperties": false,
270
+ "required": [
271
+ "operation",
272
+ "contentLength"
273
+ ],
274
+ "description": "CompleteMultipartUpload of `uploadId`, bound to the assembled object's exact length.",
275
+ "properties": {
276
+ "operation": {
277
+ "type": "string",
278
+ "const": "complete-multipart"
279
+ },
280
+ "contentLength": {
281
+ "type": "integer",
282
+ "minimum": 0,
283
+ "maximum": 5497558138880,
284
+ "description": "The assembled object's exact length in bytes, signed into the request as `x-amz-mp-object-size`, so storage refuses a completion that would assemble any other size. At most 5 TiB, S3's object ceiling."
285
+ }
286
+ }
287
+ },
288
+ {
289
+ "title": "PresignAbortMultipart",
290
+ "type": "object",
291
+ "additionalProperties": false,
292
+ "required": [
293
+ "operation"
294
+ ],
295
+ "description": "AbortMultipartUpload of `uploadId`.",
296
+ "properties": {
297
+ "operation": {
298
+ "type": "string",
299
+ "const": "abort-multipart"
300
+ }
301
+ }
302
+ }
303
+ ]
304
+ },
305
+ "Response": {
306
+ "$anchor": "response",
307
+ "title": "External Credentials — Issue — response payload",
308
+ "type": "object",
309
+ "additionalProperties": false,
310
+ "required": [
311
+ "sealedCredential",
312
+ "expiresAt"
313
+ ],
314
+ "oneOf": [
315
+ {
316
+ "required": [
317
+ "scope"
318
+ ],
319
+ "not": {
320
+ "required": [
321
+ "presign"
322
+ ]
323
+ }
324
+ },
325
+ {
326
+ "required": [
327
+ "presign"
328
+ ],
329
+ "not": {
330
+ "required": [
331
+ "scope"
332
+ ]
333
+ }
334
+ }
335
+ ],
336
+ "properties": {
337
+ "sealedCredential": {
338
+ "type": "string",
339
+ "minLength": 64,
340
+ "maxLength": 262144,
341
+ "pattern": "^-----BEGIN VTA SEALED BUNDLE-----[\\s\\S]+-----END VTA SEALED BUNDLE-----\\s*$",
342
+ "description": "A `SealedTransferBundle` (external/_shared/0.1), sealed to the caller's key-agreement key, whose cleartext is an `ExternalCredentialPayload` for `scope` or a `PresignedRequestSet` for `presign`. Bounded at 256 KiB rather than the shared 64 KiB because a batch of 128 presigned requests does not fit 64 KiB."
343
+ },
344
+ "expiresAt": {
345
+ "type": "string",
346
+ "format": "date-time",
347
+ "description": "The provider's expiry for the credential, in the clear; for `presign`, the earliest expiry in the batch."
348
+ },
349
+ "scope": {
350
+ "$ref": "#/$defs/CredentialScope",
351
+ "description": "The scope actually granted, which equals the requested one."
352
+ },
353
+ "presign": {
354
+ "$ref": "#/$defs/PresignBatch",
355
+ "description": "The batch actually presigned, which equals the requested one."
356
+ },
357
+ "ext": {
358
+ "$ref": "#/$defs/Ext"
359
+ }
360
+ }
361
+ },
362
+ "Ext": {
363
+ "title": "Ext",
364
+ "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.",
365
+ "type": "object",
366
+ "minProperties": 1,
367
+ "additionalProperties": true,
368
+ "propertyNames": {
369
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
370
+ }
371
+ },
372
+ "CredentialScope": {
373
+ "title": "CredentialScope",
374
+ "type": "object",
375
+ "additionalProperties": false,
376
+ "description": "What one issuance may do. For storage models, `prefix` and `actions` (both required, a rule this schema leaves to the custodian because other models use neither); for `s3-static-presign`, also `objectKey`, since a presigned URL is one operation on one object; for `oauth2-private-key-jwt`, `scopes`.",
377
+ "properties": {
378
+ "prefix": {
379
+ "$ref": "#/$defs/ProviderObjectPrefix"
380
+ },
381
+ "actions": {
382
+ "type": "array",
383
+ "minItems": 1,
384
+ "maxItems": 3,
385
+ "uniqueItems": true,
386
+ "items": {
387
+ "$ref": "#/$defs/ProviderObjectAction"
388
+ }
389
+ },
390
+ "objectKey": {
391
+ "type": "string",
392
+ "minLength": 1,
393
+ "maxLength": 1024,
394
+ "pattern": "^[A-Za-z0-9._-]+$",
395
+ "description": "`s3-static-presign` only: the object's name within `prefix`. The presigned URL names `prefix` + `objectKey` and nothing else, and `actions` must hold exactly one action."
396
+ },
397
+ "scopes": {
398
+ "type": "array",
399
+ "maxItems": 64,
400
+ "uniqueItems": true,
401
+ "items": {
402
+ "type": "string",
403
+ "maxLength": 256,
404
+ "pattern": "^[!#-\\[\\]-~]+$"
405
+ },
406
+ "description": "`oauth2-private-key-jwt` only: the OAuth scopes requested."
407
+ }
408
+ }
409
+ },
410
+ "ProviderObjectAction": {
411
+ "title": "ProviderObjectAction",
412
+ "type": "string",
413
+ "enum": [
414
+ "put",
415
+ "get",
416
+ "delete"
417
+ ],
418
+ "description": "`put`: write an object. `get`: read one. `delete`: remove one. No list, ACL, policy or bucket-level action exists here, so none can be granted."
419
+ },
420
+ "ProviderObjectPrefix": {
421
+ "title": "ProviderObjectPrefix",
422
+ "type": "string",
423
+ "minLength": 2,
424
+ "maxLength": 512,
425
+ "pattern": "^([a-z0-9][a-z0-9._-]{0,127}/){1,16}$",
426
+ "description": "An object-key prefix within the account's bucket: one or more segments of lowercase letters, digits, `.`, `_` and `-`, each beginning with a letter or digit and ending with `/`. No quote, backslash, wildcard, whitespace, `..` segment or empty segment can appear. That is deliberate: the custodian places this value inside a provider policy — an IAM session policy (JSON), a GCS Credential Access Boundary condition (CEL) — and a value able to carry a metacharacter can break out of the string it is placed in and widen the policy. That is a known class of defect (CVE-2026-42811, a CEL injection in downscoped GCS credentials). Even with this pattern, a custodian MUST build provider policies with the provider language's own encoder, never by string interpolation."
427
+ },
428
+ "AccountId": {
429
+ "title": "AccountId",
430
+ "type": "string",
431
+ "minLength": 1,
432
+ "maxLength": 64,
433
+ "pattern": "^[a-z0-9][a-z0-9-]*$",
434
+ "description": "The account's identifier within its context, chosen by whoever creates it. Lowercase letters, digits and hyphens, so that it can be embedded in a certificate subject, a token subject or a provider-side condition without escaping. Unique per context; never reused after deletion while anything that names it (a provider-side trust policy, an audit row) may still exist."
435
+ },
436
+ "AccountContextId": {
437
+ "title": "AccountContextId",
438
+ "type": "string",
439
+ "minLength": 1,
440
+ "maxLength": 256,
441
+ "description": "The custodian context that owns the account. Act scope in this context decides who may manage the account and who may consume it; the account's keys are derived in this context's key space."
442
+ }
443
+ }
444
+ };
445
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
446
+ export const RESPONSE_PAYLOAD_SCHEMA = {
447
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
448
+ "$ref": "#/$defs/Response",
449
+ "$defs": {
450
+ "ChecksumSha256": {
451
+ "title": "ChecksumSha256",
452
+ "type": "string",
453
+ "minLength": 44,
454
+ "maxLength": 44,
455
+ "pattern": "^[A-Za-z0-9+/]{43}=$",
456
+ "description": "A SHA-256 digest in standard base64 (RFC 4648 §4, padded), as S3 carries it in `x-amz-checksum-sha256`."
457
+ },
458
+ "PresignBatch": {
459
+ "title": "PresignBatch",
460
+ "type": "object",
461
+ "additionalProperties": false,
462
+ "required": [
463
+ "prefix",
464
+ "objectKey",
465
+ "requests"
466
+ ],
467
+ "description": "`s3-static-presign` only: up to 128 operations on **one** object, `prefix` + `objectKey`, and at most one multipart upload of it. Each operation becomes one presigned request, sealed together. Consistency rules JSON Schema cannot state, which the custodian enforces: `uploadId` is present exactly when an operation needs it (`upload-part`, `list-parts`, `complete-multipart`, `abort-multipart`) and absent when the batch holds `create-multipart`; no two operations are identical; no two `upload-part` operations name the same `partNumber`.",
468
+ "properties": {
469
+ "prefix": {
470
+ "$ref": "#/$defs/ProviderObjectPrefix"
471
+ },
472
+ "objectKey": {
473
+ "type": "string",
474
+ "minLength": 1,
475
+ "maxLength": 1024,
476
+ "pattern": "^[A-Za-z0-9._-]+$",
477
+ "description": "The object's name within `prefix`. Every request in the batch names `prefix` + `objectKey` and no other object."
478
+ },
479
+ "uploadId": {
480
+ "type": "string",
481
+ "minLength": 1,
482
+ "maxLength": 1024,
483
+ "pattern": "^[A-Za-z0-9._~+/=-]+$",
484
+ "description": "The multipart upload the batch's multipart operations act on, as storage returned it from CreateMultipartUpload. Signed into each such request's query, percent-encoded by the SigV4 encoder, never interpolated."
485
+ },
486
+ "requests": {
487
+ "type": "array",
488
+ "minItems": 1,
489
+ "maxItems": 128,
490
+ "items": {
491
+ "$ref": "#/$defs/PresignRequest"
492
+ }
493
+ }
494
+ }
495
+ },
496
+ "PresignRequest": {
497
+ "title": "PresignRequest",
498
+ "description": "One operation to presign, discriminated by `operation`. The ceiling action each needs is in `PresignOperation`.",
499
+ "oneOf": [
500
+ {
501
+ "title": "PresignPut",
502
+ "type": "object",
503
+ "additionalProperties": false,
504
+ "required": [
505
+ "operation",
506
+ "contentLength",
507
+ "checksumSha256"
508
+ ],
509
+ "description": "PutObject of the whole object, bound to its exact length and SHA-256.",
510
+ "properties": {
511
+ "operation": {
512
+ "type": "string",
513
+ "const": "put"
514
+ },
515
+ "contentLength": {
516
+ "type": "integer",
517
+ "minimum": 0,
518
+ "maximum": 5368709120,
519
+ "description": "The object's exact length in bytes, signed into the request as `Content-Length`. At most 5 GiB, S3's single-request ceiling."
520
+ },
521
+ "checksumSha256": {
522
+ "$ref": "#/$defs/ChecksumSha256"
523
+ }
524
+ }
525
+ },
526
+ {
527
+ "title": "PresignGet",
528
+ "type": "object",
529
+ "additionalProperties": false,
530
+ "required": [
531
+ "operation"
532
+ ],
533
+ "description": "GetObject.",
534
+ "properties": {
535
+ "operation": {
536
+ "type": "string",
537
+ "const": "get"
538
+ }
539
+ }
540
+ },
541
+ {
542
+ "title": "PresignHead",
543
+ "type": "object",
544
+ "additionalProperties": false,
545
+ "required": [
546
+ "operation"
547
+ ],
548
+ "description": "HeadObject, with `x-amz-checksum-mode: ENABLED` signed so storage reports the object's checksum.",
549
+ "properties": {
550
+ "operation": {
551
+ "type": "string",
552
+ "const": "head"
553
+ }
554
+ }
555
+ },
556
+ {
557
+ "title": "PresignDelete",
558
+ "type": "object",
559
+ "additionalProperties": false,
560
+ "required": [
561
+ "operation"
562
+ ],
563
+ "description": "DeleteObject.",
564
+ "properties": {
565
+ "operation": {
566
+ "type": "string",
567
+ "const": "delete"
568
+ }
569
+ }
570
+ },
571
+ {
572
+ "title": "PresignCreateMultipart",
573
+ "type": "object",
574
+ "additionalProperties": false,
575
+ "required": [
576
+ "operation"
577
+ ],
578
+ "description": "CreateMultipartUpload, with `x-amz-checksum-algorithm: SHA256` signed so every part of the upload must carry a SHA-256 checksum.",
579
+ "properties": {
580
+ "operation": {
581
+ "type": "string",
582
+ "const": "create-multipart"
583
+ }
584
+ }
585
+ },
586
+ {
587
+ "title": "PresignUploadPart",
588
+ "type": "object",
589
+ "additionalProperties": false,
590
+ "required": [
591
+ "operation",
592
+ "partNumber",
593
+ "contentLength",
594
+ "checksumSha256"
595
+ ],
596
+ "description": "UploadPart of one part of `uploadId`, bound to its number, its exact length and its SHA-256.",
597
+ "properties": {
598
+ "operation": {
599
+ "type": "string",
600
+ "const": "upload-part"
601
+ },
602
+ "partNumber": {
603
+ "type": "integer",
604
+ "minimum": 1,
605
+ "maximum": 10000
606
+ },
607
+ "contentLength": {
608
+ "type": "integer",
609
+ "minimum": 1,
610
+ "maximum": 5368709120,
611
+ "description": "The part's exact length in bytes, signed into the request as `Content-Length`. At most 5 GiB, S3's part ceiling."
612
+ },
613
+ "checksumSha256": {
614
+ "$ref": "#/$defs/ChecksumSha256"
615
+ }
616
+ }
617
+ },
618
+ {
619
+ "title": "PresignListParts",
620
+ "type": "object",
621
+ "additionalProperties": false,
622
+ "required": [
623
+ "operation"
624
+ ],
625
+ "description": "ListParts of `uploadId`: each part's number, length, ETag and checksum, up to 1000 per page.",
626
+ "properties": {
627
+ "operation": {
628
+ "type": "string",
629
+ "const": "list-parts"
630
+ },
631
+ "partNumberMarker": {
632
+ "type": "integer",
633
+ "minimum": 0,
634
+ "maximum": 10000,
635
+ "description": "List parts after this number. Absent, from the first."
636
+ }
637
+ }
638
+ },
639
+ {
640
+ "title": "PresignCompleteMultipart",
641
+ "type": "object",
642
+ "additionalProperties": false,
643
+ "required": [
644
+ "operation",
645
+ "contentLength"
646
+ ],
647
+ "description": "CompleteMultipartUpload of `uploadId`, bound to the assembled object's exact length.",
648
+ "properties": {
649
+ "operation": {
650
+ "type": "string",
651
+ "const": "complete-multipart"
652
+ },
653
+ "contentLength": {
654
+ "type": "integer",
655
+ "minimum": 0,
656
+ "maximum": 5497558138880,
657
+ "description": "The assembled object's exact length in bytes, signed into the request as `x-amz-mp-object-size`, so storage refuses a completion that would assemble any other size. At most 5 TiB, S3's object ceiling."
658
+ }
659
+ }
660
+ },
661
+ {
662
+ "title": "PresignAbortMultipart",
663
+ "type": "object",
664
+ "additionalProperties": false,
665
+ "required": [
666
+ "operation"
667
+ ],
668
+ "description": "AbortMultipartUpload of `uploadId`.",
669
+ "properties": {
670
+ "operation": {
671
+ "type": "string",
672
+ "const": "abort-multipart"
673
+ }
674
+ }
675
+ }
676
+ ]
677
+ },
678
+ "Response": {
679
+ "$anchor": "response",
680
+ "title": "External Credentials — Issue — response payload",
681
+ "type": "object",
682
+ "additionalProperties": false,
683
+ "required": [
684
+ "sealedCredential",
685
+ "expiresAt"
686
+ ],
687
+ "oneOf": [
688
+ {
689
+ "required": [
690
+ "scope"
691
+ ],
692
+ "not": {
693
+ "required": [
694
+ "presign"
695
+ ]
696
+ }
697
+ },
698
+ {
699
+ "required": [
700
+ "presign"
701
+ ],
702
+ "not": {
703
+ "required": [
704
+ "scope"
705
+ ]
706
+ }
707
+ }
708
+ ],
709
+ "properties": {
710
+ "sealedCredential": {
711
+ "type": "string",
712
+ "minLength": 64,
713
+ "maxLength": 262144,
714
+ "pattern": "^-----BEGIN VTA SEALED BUNDLE-----[\\s\\S]+-----END VTA SEALED BUNDLE-----\\s*$",
715
+ "description": "A `SealedTransferBundle` (external/_shared/0.1), sealed to the caller's key-agreement key, whose cleartext is an `ExternalCredentialPayload` for `scope` or a `PresignedRequestSet` for `presign`. Bounded at 256 KiB rather than the shared 64 KiB because a batch of 128 presigned requests does not fit 64 KiB."
716
+ },
717
+ "expiresAt": {
718
+ "type": "string",
719
+ "format": "date-time",
720
+ "description": "The provider's expiry for the credential, in the clear; for `presign`, the earliest expiry in the batch."
721
+ },
722
+ "scope": {
723
+ "$ref": "#/$defs/CredentialScope",
724
+ "description": "The scope actually granted, which equals the requested one."
725
+ },
726
+ "presign": {
727
+ "$ref": "#/$defs/PresignBatch",
728
+ "description": "The batch actually presigned, which equals the requested one."
729
+ },
730
+ "ext": {
731
+ "$ref": "#/$defs/Ext"
732
+ }
733
+ }
734
+ },
735
+ "Ext": {
736
+ "title": "Ext",
737
+ "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.",
738
+ "type": "object",
739
+ "minProperties": 1,
740
+ "additionalProperties": true,
741
+ "propertyNames": {
742
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
743
+ }
744
+ },
745
+ "CredentialScope": {
746
+ "title": "CredentialScope",
747
+ "type": "object",
748
+ "additionalProperties": false,
749
+ "description": "What one issuance may do. For storage models, `prefix` and `actions` (both required, a rule this schema leaves to the custodian because other models use neither); for `s3-static-presign`, also `objectKey`, since a presigned URL is one operation on one object; for `oauth2-private-key-jwt`, `scopes`.",
750
+ "properties": {
751
+ "prefix": {
752
+ "$ref": "#/$defs/ProviderObjectPrefix"
753
+ },
754
+ "actions": {
755
+ "type": "array",
756
+ "minItems": 1,
757
+ "maxItems": 3,
758
+ "uniqueItems": true,
759
+ "items": {
760
+ "$ref": "#/$defs/ProviderObjectAction"
761
+ }
762
+ },
763
+ "objectKey": {
764
+ "type": "string",
765
+ "minLength": 1,
766
+ "maxLength": 1024,
767
+ "pattern": "^[A-Za-z0-9._-]+$",
768
+ "description": "`s3-static-presign` only: the object's name within `prefix`. The presigned URL names `prefix` + `objectKey` and nothing else, and `actions` must hold exactly one action."
769
+ },
770
+ "scopes": {
771
+ "type": "array",
772
+ "maxItems": 64,
773
+ "uniqueItems": true,
774
+ "items": {
775
+ "type": "string",
776
+ "maxLength": 256,
777
+ "pattern": "^[!#-\\[\\]-~]+$"
778
+ },
779
+ "description": "`oauth2-private-key-jwt` only: the OAuth scopes requested."
780
+ }
781
+ }
782
+ },
783
+ "ProviderObjectAction": {
784
+ "title": "ProviderObjectAction",
785
+ "type": "string",
786
+ "enum": [
787
+ "put",
788
+ "get",
789
+ "delete"
790
+ ],
791
+ "description": "`put`: write an object. `get`: read one. `delete`: remove one. No list, ACL, policy or bucket-level action exists here, so none can be granted."
792
+ },
793
+ "ProviderObjectPrefix": {
794
+ "title": "ProviderObjectPrefix",
795
+ "type": "string",
796
+ "minLength": 2,
797
+ "maxLength": 512,
798
+ "pattern": "^([a-z0-9][a-z0-9._-]{0,127}/){1,16}$",
799
+ "description": "An object-key prefix within the account's bucket: one or more segments of lowercase letters, digits, `.`, `_` and `-`, each beginning with a letter or digit and ending with `/`. No quote, backslash, wildcard, whitespace, `..` segment or empty segment can appear. That is deliberate: the custodian places this value inside a provider policy — an IAM session policy (JSON), a GCS Credential Access Boundary condition (CEL) — and a value able to carry a metacharacter can break out of the string it is placed in and widen the policy. That is a known class of defect (CVE-2026-42811, a CEL injection in downscoped GCS credentials). Even with this pattern, a custodian MUST build provider policies with the provider language's own encoder, never by string interpolation."
800
+ },
801
+ "AccountId": {
802
+ "title": "AccountId",
803
+ "type": "string",
804
+ "minLength": 1,
805
+ "maxLength": 64,
806
+ "pattern": "^[a-z0-9][a-z0-9-]*$",
807
+ "description": "The account's identifier within its context, chosen by whoever creates it. Lowercase letters, digits and hyphens, so that it can be embedded in a certificate subject, a token subject or a provider-side condition without escaping. Unique per context; never reused after deletion while anything that names it (a provider-side trust policy, an audit row) may still exist."
808
+ },
809
+ "AccountContextId": {
810
+ "title": "AccountContextId",
811
+ "type": "string",
812
+ "minLength": 1,
813
+ "maxLength": 256,
814
+ "description": "The custodian context that owns the account. Act scope in this context decides who may manage the account and who may consume it; the account's keys are derived in this context's key space."
815
+ }
816
+ }
817
+ };
818
+ /**
819
+ * SPEC.md §7.2 policy for the request variant, from this specification's
820
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
821
+ * per-specification and cannot be derived from the document alone, and
822
+ * item 2 needs the schema this carries.
823
+ */
824
+ export const SPEC = {
825
+ typeUri: TYPE_URI,
826
+ isBearer: false,
827
+ isProofRequired: true,
828
+ isRecipientRequired: true,
829
+ isIssuedAtRequired: true,
830
+ payloadSchema: PAYLOAD_SCHEMA,
831
+ };
832
+ /**
833
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
834
+ * tracks the *issuer* party's requirement because a response swaps the
835
+ * parties (§7.3 item 5).
836
+ */
837
+ export const RESPONSE_SPEC = {
838
+ typeUri: RESPONSE_TYPE_URI,
839
+ isBearer: false,
840
+ isProofRequired: true,
841
+ isRecipientRequired: true,
842
+ isIssuedAtRequired: true,
843
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
844
+ };
845
+ //# sourceMappingURL=payload.js.map