@serve.zone/interfaces 21.1.0 → 23.0.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/changelog.md +23 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/appstore/types.d.ts +31 -16
- package/dist_ts/appstore/types.js +208 -11
- package/dist_ts/data/coremail.d.ts +83 -9
- package/dist_ts/data/coremail.js +67 -1
- package/dist_ts/data/coremail.runtime.d.ts +27 -1
- package/dist_ts/data/coremail.runtime.js +800 -36
- package/dist_ts/data/deploymentoperation.js +6 -20
- package/dist_ts/data/deploymentpreflight.d.ts +2 -6
- package/dist_ts/data/deploymentpreflight.js +1 -1
- package/dist_ts/data/hostedapp.d.ts +40 -14
- package/dist_ts/data/hostedapp.js +90 -1
- package/dist_ts/data/immutableimage.d.ts +30 -1
- package/dist_ts/data/immutableimage.js +103 -1
- package/dist_ts/data/index.d.ts +0 -2
- package/dist_ts/data/index.js +1 -3
- package/dist_ts/data/secret.d.ts +186 -13
- package/dist_ts/data/secret.js +543 -45
- package/dist_ts/data/service.d.ts +0 -39
- package/dist_ts/data/service.js +1 -77
- package/dist_ts/data/settings.d.ts +62 -43
- package/dist_ts/data/settings.js +34 -2
- package/dist_ts/platform/storage.d.ts +13 -14
- package/dist_ts/platform/storage.js +1 -1
- package/dist_ts/platform/storagemigration.d.ts +8 -8
- package/dist_ts/platform/storagemigration.golden.d.ts +2 -2
- package/dist_ts/platform/storagemigration.golden.js +19 -88
- package/dist_ts/platform/storagemigration.js +46 -58
- package/dist_ts/platform/types.d.ts +5 -19
- package/dist_ts/plugins.d.ts +2 -1
- package/dist_ts/plugins.js +3 -2
- package/dist_ts/requests/coremail.d.ts +12 -5
- package/dist_ts/requests/hostedapp.d.ts +12 -9
- package/dist_ts/requests/hostedapp.js +38 -1
- package/dist_ts/requests/index.d.ts +1 -3
- package/dist_ts/requests/index.js +2 -4
- package/dist_ts/requests/platform.d.ts +0 -1
- package/dist_ts/requests/secret.d.ts +23 -17
- package/dist_ts/requests/secret.js +161 -2
- package/dist_ts/requests/service.d.ts +0 -13
- package/dist_ts/requests/settings.d.ts +3 -3
- package/dist_ts/runtime.d.ts +78 -26
- package/dist_ts/runtime.js +219 -19
- package/package.json +2 -1
- package/readme.md +163 -38
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/appstore/types.ts +251 -25
- package/ts/data/coremail.runtime.ts +1212 -38
- package/ts/data/coremail.ts +120 -8
- package/ts/data/deploymentoperation.ts +7 -31
- package/ts/data/deploymentpreflight.ts +2 -5
- package/ts/data/hostedapp.ts +144 -18
- package/ts/data/immutableimage.ts +150 -1
- package/ts/data/index.ts +0 -2
- package/ts/data/secret.ts +775 -53
- package/ts/data/service.ts +0 -118
- package/ts/data/settings.ts +70 -80
- package/ts/platform/storage.ts +15 -16
- package/ts/platform/storagemigration.golden.ts +18 -95
- package/ts/platform/storagemigration.ts +57 -87
- package/ts/platform/types.ts +6 -19
- package/ts/plugins.ts +2 -0
- package/ts/requests/coremail.ts +13 -4
- package/ts/requests/hostedapp.ts +50 -9
- package/ts/requests/index.ts +0 -4
- package/ts/requests/platform.ts +0 -1
- package/ts/requests/secret.ts +204 -9
- package/ts/requests/service.ts +0 -16
- package/ts/requests/settings.ts +3 -3
- package/ts/runtime.ts +314 -41
- package/dist_ts/data/secretbundle.d.ts +0 -57
- package/dist_ts/data/secretbundle.js +0 -2
- package/dist_ts/data/secretgroup.d.ts +0 -52
- package/dist_ts/data/secretgroup.js +0 -2
- package/dist_ts/requests/secretbundle.d.ts +0 -75
- package/dist_ts/requests/secretbundle.js +0 -4
- package/dist_ts/requests/secretgroup.d.ts +0 -52
- package/dist_ts/requests/secretgroup.js +0 -4
- package/ts/data/secretbundle.ts +0 -65
- package/ts/data/secretgroup.ts +0 -58
- package/ts/requests/secretbundle.ts +0 -103
- package/ts/requests/secretgroup.ts +0 -74
package/readme.md
CHANGED
|
@@ -30,6 +30,43 @@ import { appstore, data, platform, platformservice, requests } from '@serve.zone
|
|
|
30
30
|
|
|
31
31
|
This package intentionally has no service implementation logic. It is a stable vocabulary for services that need to agree on payload shape, method names, and response types.
|
|
32
32
|
|
|
33
|
+
## Secrets v23 Pre-Cutover Contract
|
|
34
|
+
|
|
35
|
+
Version 23 removes the old grouped/bundled secret DTOs and plaintext runtime
|
|
36
|
+
material API. Secret values enter Cloudly only as strict SmartCrypto X25519
|
|
37
|
+
envelopes or an explicit bounded server-generation request. Coreflow receives a
|
|
38
|
+
full digest-verified schema-v2 manifest plus one sealed envelope per pinned
|
|
39
|
+
SecretVersion through the Node-only runtime export.
|
|
40
|
+
|
|
41
|
+
This is a contract release before consumer cutover. It does **not** claim that
|
|
42
|
+
clean-v2 migration, backup verification, historical secret erasure, or storage
|
|
43
|
+
cleanup has completed. Those operations remain separately gated and must be
|
|
44
|
+
proven by their owning services before destructive cleanup.
|
|
45
|
+
|
|
46
|
+
Breaking removals include:
|
|
47
|
+
|
|
48
|
+
- The SecretGroup and SecretBundle data/request modules and request namespaces.
|
|
49
|
+
- `getServiceSecretBundlesAsFlatObject` and every service/preflight field tied
|
|
50
|
+
to bundled flattening or aggregate runtime files.
|
|
51
|
+
- Plaintext resolved runtime values, generic platform config/credential maps,
|
|
52
|
+
credential-bearing Cloudly settings, and serialized object-storage
|
|
53
|
+
credential references.
|
|
54
|
+
- Hosted-app control-token identities and credential-bearing bootstrap actions.
|
|
55
|
+
|
|
56
|
+
Primary v23 additions include:
|
|
57
|
+
|
|
58
|
+
- `TSecretValueInput`, `TSecretIngressRecipient`, the
|
|
59
|
+
`requests.secret.IReq_GetSecretIngressRecipient` contract with method
|
|
60
|
+
`getSecretIngressRecipient`, and fixed-order create/rotate/App Store context
|
|
61
|
+
builders.
|
|
62
|
+
- Schema-v2 `IResolvedSecretManifest` contracts, stable Docker resource naming,
|
|
63
|
+
WorkloadInit map/wrapper helpers, and `ISealedResolvedSecretMaterial` under
|
|
64
|
+
`@serve.zone/interfaces/runtime`.
|
|
65
|
+
- Two-step Coreflow X25519 recipient enrollment and exact recipient lifecycle
|
|
66
|
+
validators.
|
|
67
|
+
- Mandatory `IImmutableContainerInvocationV1` evidence on immutable image
|
|
68
|
+
deployment plans.
|
|
69
|
+
|
|
33
70
|
## Portable Storage Contracts
|
|
34
71
|
|
|
35
72
|
App Store templates can declare logical, template-local `storageClasses` and
|
|
@@ -82,18 +119,21 @@ const storageConfig: appstore.IAppStoreVersionConfig = {
|
|
|
82
119
|
capacity: { request: '100GiB', limit: '1TiB' },
|
|
83
120
|
reclaimPolicy: 'retain',
|
|
84
121
|
delivery: {
|
|
85
|
-
type: '
|
|
122
|
+
type: 'file',
|
|
86
123
|
targetPath: '/run/secrets/backup-archive.json',
|
|
87
124
|
format: 'servezone-object-storage-v1',
|
|
125
|
+
uid: 1000,
|
|
126
|
+
gid: 1000,
|
|
127
|
+
mode: 0o400,
|
|
88
128
|
},
|
|
89
129
|
protection: { versioning: 'required', retentionDays: 30 },
|
|
90
130
|
},
|
|
91
131
|
],
|
|
92
132
|
requiresFeatures: [
|
|
93
|
-
appstore.appStoreStorageFeatureIds.
|
|
133
|
+
appstore.appStoreStorageFeatureIds.bindingsV2,
|
|
94
134
|
appstore.appStoreStorageFeatureIds.filesystemV1,
|
|
95
|
-
appstore.appStoreStorageFeatureIds.
|
|
96
|
-
appstore.appStoreStorageFeatureIds.
|
|
135
|
+
appstore.appStoreStorageFeatureIds.objectStorageV2,
|
|
136
|
+
appstore.appStoreStorageFeatureIds.objectStorageFileV2,
|
|
97
137
|
],
|
|
98
138
|
};
|
|
99
139
|
```
|
|
@@ -104,13 +144,15 @@ express requirements and preferences only; Onebox and Cloudly map them to
|
|
|
104
144
|
operator policy independently.
|
|
105
145
|
|
|
106
146
|
An app may declare multiple `objectStorage` requests. Each request resolves to
|
|
107
|
-
its own endpoint, bucket, and credential
|
|
108
|
-
an explicit key map and
|
|
147
|
+
its own endpoint, bucket, and value-free credential management scope. Launcher
|
|
148
|
+
environment delivery uses an explicit key map and file delivery uses one
|
|
149
|
+
managed JSON Secret at a unique target path, so two
|
|
109
150
|
bindings cannot share credential destinations accidentally.
|
|
110
151
|
|
|
111
152
|
`platform.storage` contains separate capability advertisements and resolved
|
|
112
153
|
binding/status contracts. Resolved object-storage bindings expose connection
|
|
113
|
-
metadata plus credential
|
|
154
|
+
metadata plus a service-owned credential management scope and delivery policy,
|
|
155
|
+
never credential references or values. Filesystem
|
|
114
156
|
bindings expose the container mount and access mode, never a host path.
|
|
115
157
|
|
|
116
158
|
Portable manifests and resolved bindings intentionally have no fields for
|
|
@@ -310,14 +352,15 @@ Common data contracts include:
|
|
|
310
352
|
- `IDomain`, `IDnsEntry`, and traffic contracts for routing and DNS management.
|
|
311
353
|
- Traffic and gateway route contracts including `ICoretrafficPortRouteConfig`, routing `portRoutes`, and `IGatewayClientRoute` client-owned route views. Gateway route intent supports optional match `domains`, `transport`, and `remoteIngress`, plus explicit route `priority` and `managedRouteKind`. Ownership can combine `hostname` with `routeRef` so a normal route and a path-specific managed route for the same hostname reconcile independently.
|
|
312
354
|
- Value-free `ISecretMetadata`, `ISecretVersionMetadata`, and `ISecretSetMetadata`
|
|
313
|
-
contracts for operator views, plus exact-version
|
|
314
|
-
contracts for cluster delivery. Manifest helpers
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
355
|
+
contracts for operator views, plus schema-v2 exact-version
|
|
356
|
+
`IResolvedSecretManifest` contracts for cluster delivery. Manifest helpers
|
|
357
|
+
bind immutable image rollout and invocation evidence, enforce canonical
|
|
358
|
+
digests and globally unique launcher/file targets, and track per-cluster
|
|
359
|
+
desired/applied/previous-accepted rollout state. Platform-provider and system
|
|
360
|
+
owners are valid metadata owners but are rejected from workload manifests.
|
|
319
361
|
`listSecrets` exposes the dedicated `targetSecretsRevision` CAS fence;
|
|
320
|
-
|
|
362
|
+
every create, rotate, and lifecycle mutation consumes and returns that
|
|
363
|
+
aggregate owner fence, while
|
|
321
364
|
`setServiceSecretSetAttachments` returns the independent
|
|
322
365
|
`secretConfigurationRevision`. Generic service writes own neither revision.
|
|
323
366
|
- Mail gateway contracts for domain authorities, address bindings, WorkApp bindings, managed SMTP/API credentials, spool items, delivery journals, and inbound/outbound message payloads.
|
|
@@ -368,7 +411,7 @@ const config: appstore.IAppStoreVersionConfig = {
|
|
|
368
411
|
};
|
|
369
412
|
```
|
|
370
413
|
|
|
371
|
-
`redirectPath` is a canonical callback path on the app's HTTPS origin. Registration validation also requires that canonical app origin explicitly and rejects cross-origin, normalized, query-bearing, fragment-bearing, or duplicate callback URLs. The five environment values are environment-key names, not credentials embedded in the manifest. A host injects the generated client secret through
|
|
414
|
+
`redirectPath` is a canonical callback path on the app's HTTPS origin. Registration validation also requires that canonical app origin explicitly and rejects cross-origin, normalized, query-bearing, fragment-bearing, or duplicate callback URLs. The five environment values are environment-key names, not credentials embedded in the manifest. A host injects the generated client secret through launcher environment delivery and injects the other registration values only while OIDC is enabled.
|
|
372
415
|
|
|
373
416
|
`data.IHostedAppRoleAssignment` binds a stable user subject to an immutable `appInstanceId`. That same app instance is the OIDC `client_id`, the ID-token `aud`, and the `servezone_app_instance_id` claim. Tokens include only the assigned roles for that audience; `preferred_username` is display metadata and must not be treated as identity authority.
|
|
374
417
|
|
|
@@ -380,6 +423,16 @@ Validate untrusted manifests, registrations, and claims with:
|
|
|
380
423
|
- `appstore.validateAppStorePlatformOidcCapability`
|
|
381
424
|
- `appstore.validateAppStoreVersionPlatformOidc`
|
|
382
425
|
|
|
426
|
+
Hosted lifecycle RPCs accept only `IIdentityCredential`. After JWT
|
|
427
|
+
verification, handlers validate `IHostedAppMachineClaims` and derive the exact
|
|
428
|
+
app instance and service from `servezone_app_instance_id` and
|
|
429
|
+
`servezone_service_id`; callers cannot submit those selectors. Bootstrap
|
|
430
|
+
actions are either a canonical same-origin `setupRoute` path or a nonsecret
|
|
431
|
+
`message`. Control tokens, usernames, passwords, and token URLs are not part of
|
|
432
|
+
the lifecycle contract. Each server action carries a CAS revision; completion
|
|
433
|
+
requires its exact ID, current revision, and `ready` status so a delayed request
|
|
434
|
+
cannot complete a replacement action.
|
|
435
|
+
|
|
383
436
|
## TypedRequest Contracts
|
|
384
437
|
|
|
385
438
|
Use `requests` when registering handlers with `@api.global/typedrequest` or when creating typed requests through a TypedSocket client.
|
|
@@ -487,8 +540,12 @@ sessions, Coreflow reconciliation, and the CoreMail-to-dcrouter gateway
|
|
|
487
540
|
session. Only the three authentication handshakes carry reusable peer
|
|
488
541
|
credentials. Subsequent transfer operations may carry a scoped, short-lived,
|
|
489
542
|
one-time bearer capability, while every subsequent workload request derives
|
|
490
|
-
tenant, service, binding, capabilities, allowed senders, and
|
|
491
|
-
from the server-owned TypedSocket peer.
|
|
543
|
+
tenant, service, binding, capabilities, allowed senders, and the composite
|
|
544
|
+
credential ID/version identity from the server-owned TypedSocket peer.
|
|
545
|
+
Successful workload authentication also returns the effective binding state and
|
|
546
|
+
the exact `allowedOperations` derived from
|
|
547
|
+
`data.coreMailWorkloadOperationPolicy`. Disabled bindings never authenticate;
|
|
548
|
+
draining bindings permit outbound status plus inbound list/fetch/ack only.
|
|
492
549
|
|
|
493
550
|
Large content never travels inside TypedRequest JSON. Outbound body parts and
|
|
494
551
|
attachments use prepare/upload/complete operations with short-lived one-time
|
|
@@ -496,8 +553,8 @@ HTTP transfer grants. Inbound delivery uses bounded delivery listing followed
|
|
|
496
553
|
by prepare/fetch/complete and an explicit acknowledgement after the workload
|
|
497
554
|
has processed the exact byte count and SHA-256 digest. `data.coreMailLimits`
|
|
498
555
|
defines the 64 KiB control-frame boundary, bounded structured content, the
|
|
499
|
-
30 MiB serialized MIME ceiling,
|
|
500
|
-
lifetime.
|
|
556
|
+
30 MiB serialized MIME ceiling, a 56 KiB inbound page budget, bounded opaque
|
|
557
|
+
cursors, transfer deadlines, and five-minute grant lifetime.
|
|
501
558
|
|
|
502
559
|
Coreflow applies `data.ICoreMailDesiredState` with a config-epoch
|
|
503
560
|
compare-and-set fence. It stages the digest-fenced JSON snapshot through a
|
|
@@ -526,22 +583,65 @@ canonical environment keys for the verifier-only bootstrap payload and the
|
|
|
526
583
|
separate control and gateway secret values; no consumer may derive or embed
|
|
527
584
|
plaintext material in desired state.
|
|
528
585
|
|
|
586
|
+
CoreMail schema v2 keeps durable authority at the stable tenant, service, and
|
|
587
|
+
binding identity while revisions, config epochs, and composite
|
|
588
|
+
`credentialId`/`version` values fence sessions and new actions. Credential
|
|
589
|
+
versions are authority-wide monotonic and unique even when rotation changes the
|
|
590
|
+
credential ID. `active`
|
|
591
|
+
bindings accept new mail, `draining` bindings permit existing status and
|
|
592
|
+
inbound fetch/ack work without accepting new mail, and `disabled` bindings
|
|
593
|
+
reject authentication. Cloudly retains a draining binding until pending
|
|
594
|
+
inbound delivery reaches zero as reported by
|
|
595
|
+
`ICoreMailBindingReconciliationStatus.pendingInboundCount`.
|
|
596
|
+
|
|
529
597
|
`data.ICoreMailGatewayPeerDesiredState` gives dcrouter the authoritative HTTPS
|
|
530
598
|
CoreMail transfer origin associated with an authenticated CoreMail service.
|
|
531
|
-
The origin is
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
599
|
+
The same origin is carried in CoreMail desired state and returned by workload
|
|
600
|
+
and gateway authentication. It must never be inferred from a socket, Host
|
|
601
|
+
header, TypedSocket tag, or unrestricted peer input. CoreMail compares both
|
|
602
|
+
authoritative views before handing over a path-only transfer grant.
|
|
603
|
+
|
|
604
|
+
Inbound delivery pagination uses an opaque CoreMail-owned `cursor`, is bounded
|
|
605
|
+
by `data.coreMailLimits.inboundPageSize`, and returns `nextCursor` only when
|
|
606
|
+
another page may exist. Consumers must not construct or parse cursor contents.
|
|
607
|
+
Cursor signing keys are value-free runtime references with one current and bounded
|
|
608
|
+
retiring versions; plaintext remains in resolved runtime secrets.
|
|
609
|
+
|
|
610
|
+
Quota windows are fixed UTC minute/day buckets. A new outbound quota unit is
|
|
611
|
+
consumed only by the first durable insertion of an idempotency identity, while
|
|
612
|
+
replays consume none. Pending inbound includes every state except
|
|
613
|
+
`acknowledged`. These semantics are exported as `data.coreMailQuotaPolicy`.
|
|
614
|
+
Every binding carries finite `messagesPerMinute`, `messagesPerDay`, and
|
|
615
|
+
`maxPendingInbound` values; omitted or unlimited quotas are not valid schema-v2
|
|
616
|
+
desired state.
|
|
617
|
+
`data.coreMailRetentionPolicy` retains terminal outbound,
|
|
618
|
+
acknowledged inbound, and idempotency receipts for 30 days and expired
|
|
619
|
+
capabilities for 24 hours. Pending inbound is never age-purged.
|
|
620
|
+
|
|
621
|
+
HTTP transfers use canonical `/transfers/<uuid>` paths and one-time Bearer
|
|
622
|
+
tokens. `data.coreMailTransferTokenPolicy` requires canonical 256-bit
|
|
623
|
+
base64url token material, while `issuedAt` and `expiresAt` prove the exact
|
|
624
|
+
five-minute lifetime. PUT succeeds with 204 and GET with 200. Content length
|
|
625
|
+
and type must match the grant; digest integrity is bound by grant metadata and repeated in
|
|
626
|
+
the completion RPC rather than an optional HTTP digest header. Apply the
|
|
627
|
+
exported strict normalizers for outbound message descriptors, envelopes,
|
|
628
|
+
method-specific upload/download grants, submissions, gateway outbound
|
|
629
|
+
statuses, inbound deliveries,
|
|
630
|
+
desired state, bootstrap state, and gateway-peer state at their corresponding
|
|
631
|
+
untrusted request and response boundaries.
|
|
535
632
|
|
|
536
633
|
Control and gateway credential rotation is ordered: provision the candidate
|
|
537
634
|
plaintext through resolved runtime secrets, publish and activate the matching
|
|
538
635
|
`argon2id-v1` verifier, roll or reconnect every affected replica, observe
|
|
539
636
|
per-task authentication and readiness, then mark the previous verifier
|
|
540
637
|
`retiring` with `acceptUntil`. Remove the previous verifier and secret only
|
|
541
|
-
after its acceptance window has elapsed and no session uses that
|
|
638
|
+
after its acceptance window has elapsed and no session uses that composite
|
|
639
|
+
credential identity.
|
|
542
640
|
Reconciliation status carries the exact CoreMail task, rollout generation, and
|
|
543
641
|
image digest so Coreflow can correlate every response with its authoritative
|
|
544
|
-
current task roster.
|
|
642
|
+
current task roster. Apply `data.normalizeCoreMailReconciliationStatus` before
|
|
643
|
+
using pending-inbound or composite active-session counts for drain and rotation
|
|
644
|
+
decisions.
|
|
545
645
|
|
|
546
646
|
Request groups are exported by product area:
|
|
547
647
|
|
|
@@ -572,8 +672,6 @@ Request groups are exported by product area:
|
|
|
572
672
|
- `requests.platform`
|
|
573
673
|
- `requests.routing`
|
|
574
674
|
- `requests.secret`
|
|
575
|
-
- `requests.secretbundle`
|
|
576
|
-
- `requests.secretgroup`
|
|
577
675
|
- `requests.server`
|
|
578
676
|
- `requests.service`
|
|
579
677
|
- `requests.settings`
|
|
@@ -583,28 +681,53 @@ Request groups are exported by product area:
|
|
|
583
681
|
- `requests.webpush`
|
|
584
682
|
|
|
585
683
|
Secret material response contracts are not exported from the universal
|
|
586
|
-
browser-facing entrypoint.
|
|
684
|
+
browser-facing entrypoint.
|
|
685
|
+
|
|
686
|
+
The root entrypoint does use `@push.rocks/smartcrypto` to parse and validate
|
|
687
|
+
strict ingress envelopes. Browser consumers that import the root contract can
|
|
688
|
+
therefore include SmartCrypto and its browser-compatible crypto dependencies in
|
|
689
|
+
their bundle. This package never opens private keys; sealed runtime material
|
|
690
|
+
contracts remain isolated to the Node-only `/runtime` subpath.
|
|
691
|
+
|
|
692
|
+
Node runtimes import the isolated subpath:
|
|
587
693
|
|
|
588
694
|
```typescript
|
|
589
695
|
import {
|
|
590
|
-
|
|
696
|
+
verifySealedResolvedSecretMaterial,
|
|
591
697
|
} from '@serve.zone/interfaces/runtime';
|
|
592
698
|
import type {
|
|
593
699
|
IReq_GetResolvedSecretMaterial,
|
|
594
|
-
|
|
700
|
+
ISecretMaterialExpectation,
|
|
701
|
+
ISealedResolvedSecretMaterial,
|
|
595
702
|
} from '@serve.zone/interfaces/runtime';
|
|
596
703
|
|
|
597
|
-
async function acceptMaterial(
|
|
598
|
-
|
|
704
|
+
async function acceptMaterial(
|
|
705
|
+
material: ISealedResolvedSecretMaterial,
|
|
706
|
+
expectation: ISecretMaterialExpectation,
|
|
707
|
+
) {
|
|
708
|
+
if (!await verifySealedResolvedSecretMaterial(material, expectation)) {
|
|
599
709
|
throw new Error('secret material does not match its immutable manifest');
|
|
600
710
|
}
|
|
601
711
|
}
|
|
602
712
|
```
|
|
603
713
|
|
|
604
|
-
Runtime material is shaped as `{ manifest,
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
714
|
+
Runtime material is shaped as `{ schemaVersion: 1, manifest, entries }`, where
|
|
715
|
+
each entry contains only `secretVersionId` and a strict X25519 envelope. The
|
|
716
|
+
helper verifies the canonical schema-v2 manifest digest, envelope context
|
|
717
|
+
digests, active recipient key, sorted exact one-to-one version coverage, every
|
|
718
|
+
request fence, and the trusted local organization/cluster expectation. It never
|
|
719
|
+
decrypts. Organization and cluster are derived from the verified cluster JWT
|
|
720
|
+
and cannot be selected by request fields.
|
|
721
|
+
|
|
722
|
+
Launcher environment delivery uses stable `szsv-<base32-sha256>` Docker
|
|
723
|
+
resource names and `/run/serve.zone/secrets/<resource>` source paths. The
|
|
724
|
+
nonsecret map is written to `/run/serve.zone/workloadinit-map-v1.json` with mode
|
|
725
|
+
0444. Runtime assets under `/opt/serve.zone/runtime-assets` are read-only, and
|
|
726
|
+
the wrapper executes
|
|
727
|
+
`workloadinit run --map /run/serve.zone/workloadinit-map-v1.json -- <argv...>`
|
|
728
|
+
without a shell, symlink, or aggregate value file. Resources and maps remain
|
|
729
|
+
retained while any desired, applied, or previous-accepted manifest references
|
|
730
|
+
them and are deleted only after Docker confirms rollout or service removal.
|
|
608
731
|
|
|
609
732
|
## Platform Contracts
|
|
610
733
|
|
|
@@ -628,7 +751,9 @@ Available platform modules:
|
|
|
628
751
|
- `platform.ai`, `platform.database`, `platform.objectstorage`, `platform.logging`, `platform.backup`, and `platform.sip` for infrastructure and application capabilities.
|
|
629
752
|
- `platform.storage` for provider-neutral storage classes, requests, capabilities, and resolved bindings.
|
|
630
753
|
- `platform.storagemigration` for fenced object-storage migration intent, status, consumer acknowledgements, canonical digests, and strict normalizers.
|
|
631
|
-
- `platform.types`
|
|
754
|
+
- `platform.types` provider and binding metadata is value-free. Provider-specific
|
|
755
|
+
operational config stays adapter-internal, while public DTOs expose typed
|
|
756
|
+
endpoints and optional credential management scopes only.
|
|
632
757
|
|
|
633
758
|
## Legacy Platformservice Contracts
|
|
634
759
|
|
|
@@ -667,7 +792,7 @@ pnpm test
|
|
|
667
792
|
pnpm run buildDocs
|
|
668
793
|
```
|
|
669
794
|
|
|
670
|
-
The package is authored as ESM TypeScript and built with `tsbuild tsfolders
|
|
795
|
+
The package is authored as ESM TypeScript and built with `tsbuild tsfolders`.
|
|
671
796
|
|
|
672
797
|
## License and Legal Information
|
|
673
798
|
|