@serve.zone/interfaces 32.8.0 → 32.10.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 +12 -0
- package/dist_ts/00_commitinfo_data.js +2 -2
- package/dist_ts/data/index.d.ts +1 -0
- package/dist_ts/data/index.js +2 -1
- package/dist_ts/data/runtimestorageclaim.d.ts +44 -0
- package/dist_ts/data/runtimestorageclaim.js +129 -0
- package/dist_ts/data/secret.d.ts +10 -3
- package/dist_ts/data/secret.js +3 -1
- package/dist_ts/requests/runtimesession.d.ts +23 -0
- package/dist_ts/runtime.assignmentsecret.d.ts +151 -0
- package/dist_ts/runtime.assignmentsecret.js +427 -0
- package/dist_ts/runtime.d.ts +1 -0
- package/dist_ts/runtime.js +2 -1
- package/package.json +1 -1
- package/readme.md +86 -2
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/index.ts +1 -0
- package/ts/data/runtimestorageclaim.ts +162 -0
- package/ts/data/secret.ts +16 -2
- package/ts/requests/runtimesession.ts +35 -0
- package/ts/runtime.assignmentsecret.ts +581 -0
- package/ts/runtime.ts +1 -0
|
@@ -4,6 +4,7 @@ import type * as terminal from '../data/runtimeterminalreceipt.js';
|
|
|
4
4
|
import type * as network from '../data/networkdelivery.js';
|
|
5
5
|
import type * as protection from '../data/networkprotection.js';
|
|
6
6
|
import type * as credential from '../data/networkcredential.js';
|
|
7
|
+
import type * as assignmentSecret from '../runtime.assignmentsecret.js';
|
|
7
8
|
/** Current-peer, exact-projection authorization; response contains secret keys. */
|
|
8
9
|
export interface IReq_Pallet_Controller_GetRuntimeManagedVpnCredential extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Pallet_Controller_GetRuntimeManagedVpnCredential> {
|
|
9
10
|
method: 'getRuntimeManagedVpnCredential';
|
|
@@ -82,6 +83,28 @@ export interface IReq_Pallet_Controller_GetRuntimeRegistryCredential extends plu
|
|
|
82
83
|
request: data.IGetRuntimeRegistryCredentialRequest;
|
|
83
84
|
response: data.IGetRuntimeRegistryCredentialResponse;
|
|
84
85
|
}
|
|
86
|
+
/** Current authenticated Pallet node only; serialized session is not authentication. */
|
|
87
|
+
export interface IReq_Pallet_Controller_GetRuntimeSecretRecipientState extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Pallet_Controller_GetRuntimeSecretRecipientState> {
|
|
88
|
+
method: 'getRuntimeSecretRecipientState';
|
|
89
|
+
request: assignmentSecret.IGetRuntimeSecretRecipientStateRequest;
|
|
90
|
+
response: assignmentSecret.IGetRuntimeSecretRecipientStateResponse;
|
|
91
|
+
}
|
|
92
|
+
export interface IReq_Pallet_Controller_BeginRuntimeSecretRecipientEnrollment extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Pallet_Controller_BeginRuntimeSecretRecipientEnrollment> {
|
|
93
|
+
method: 'beginRuntimeSecretRecipientEnrollment';
|
|
94
|
+
request: assignmentSecret.IBeginRuntimeSecretRecipientEnrollmentRequest;
|
|
95
|
+
response: assignmentSecret.IBeginRuntimeSecretRecipientEnrollmentResponse;
|
|
96
|
+
}
|
|
97
|
+
export interface IReq_Pallet_Controller_CompleteRuntimeSecretRecipientEnrollment extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Pallet_Controller_CompleteRuntimeSecretRecipientEnrollment> {
|
|
98
|
+
method: 'completeRuntimeSecretRecipientEnrollment';
|
|
99
|
+
request: assignmentSecret.ICompleteRuntimeSecretRecipientEnrollmentRequest;
|
|
100
|
+
response: assignmentSecret.ICompleteRuntimeSecretRecipientEnrollmentResponse;
|
|
101
|
+
}
|
|
102
|
+
/** Sealed material for one exact current generation-one run; exclude bodies from logs. */
|
|
103
|
+
export interface IReq_Pallet_Controller_GetRuntimeAssignmentSecretMaterial extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Pallet_Controller_GetRuntimeAssignmentSecretMaterial> {
|
|
104
|
+
method: 'getRuntimeAssignmentSecretMaterial';
|
|
105
|
+
request: assignmentSecret.IGetRuntimeAssignmentSecretMaterialRequest;
|
|
106
|
+
response: assignmentSecret.IGetRuntimeAssignmentSecretMaterialResponse;
|
|
107
|
+
}
|
|
85
108
|
/**
|
|
86
109
|
* WSS-only JWT authentication; server-owned identity tag, never client-authored claims.
|
|
87
110
|
*
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import * as plugins from './plugins.js';
|
|
2
|
+
import type { IActiveSecretRecipientMetadata, IResolvedSecretManifest, IResolvedSecretManifestReference, IRuntimeAssignmentReference, IRuntimeAuthorityReference, IRuntimeSessionBinding, TImmutableContainerPlatform, TSecretRecipientMetadata, TSha256Digest } from './data/index.js';
|
|
3
|
+
import { type IWorkloadInitActiveApprovalAuthority, type IWorkloadInitApprovalAuthorityReference, type IWorkloadInitApprovedArtifact } from './runtime.workloadinit.js';
|
|
4
|
+
/**
|
|
5
|
+
* Content contracts only. Authentication of the physical peer, current session,
|
|
6
|
+
* node credential and slot, recipient-generation CAS, accepted manifest/version
|
|
7
|
+
* retention, challenge consumption and material issuance are Cloudly-owned.
|
|
8
|
+
*/
|
|
9
|
+
export declare const runtimeAssignmentSecretContract: Readonly<{
|
|
10
|
+
readonly descriptorDomain: "serve.zone/runtime-assignment-secret-authority";
|
|
11
|
+
readonly maximumRequestBytes: 327680;
|
|
12
|
+
readonly maximumMaterialBytes: number;
|
|
13
|
+
readonly error: "Runtime assignment secret contract rejected.";
|
|
14
|
+
}>;
|
|
15
|
+
export interface IRuntimeAssignmentSecretLauncher {
|
|
16
|
+
approval: IWorkloadInitApprovalAuthorityReference;
|
|
17
|
+
artifact: IWorkloadInitApprovedArtifact;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Value-free descriptor hashed BEFORE the assignment is sealed. Its manifest is
|
|
21
|
+
* already independently hashed; neither digest contains the assignment digest.
|
|
22
|
+
*/
|
|
23
|
+
export interface IRuntimeAssignmentSecretAuthority extends IRuntimeAuthorityReference {
|
|
24
|
+
organizationId: string;
|
|
25
|
+
serviceId: string;
|
|
26
|
+
platform: TImmutableContainerPlatform;
|
|
27
|
+
manifest: IResolvedSecretManifestReference;
|
|
28
|
+
workloadInit: IRuntimeAssignmentSecretLauncher | null;
|
|
29
|
+
}
|
|
30
|
+
export declare const snapshotRuntimeAssignmentSecretAuthority: (valueArg: unknown) => IRuntimeAssignmentSecretAuthority;
|
|
31
|
+
export declare const computeRuntimeAssignmentSecretAuthorityDigest: (authorityArg: IRuntimeAssignmentSecretAuthority) => Promise<TSha256Digest>;
|
|
32
|
+
export declare const validateRuntimeAssignmentSecretAuthority: (valueArg: unknown) => Promise<string[]>;
|
|
33
|
+
/** Producer creates this before assignment digest computation. */
|
|
34
|
+
export declare const createRuntimeAssignmentSecretAuthority: (manifestArg: unknown, platformArg: TImmutableContainerPlatform, workloadInitArg: IRuntimeAssignmentSecretLauncher | null) => Promise<IRuntimeAssignmentSecretAuthority>;
|
|
35
|
+
/** Trusted manifest/config are required: the reference alone is no authorization. */
|
|
36
|
+
export declare const bindRuntimeAssignmentSecretAuthority: (authorityArg: unknown, manifestArg: unknown, assignmentArg: unknown, configArg: unknown, trustedClusterIdArg: string) => Promise<IRuntimeAssignmentSecretAuthority>;
|
|
37
|
+
export interface IRuntimeSecretRecipientState {
|
|
38
|
+
nodeId: string;
|
|
39
|
+
generation: number;
|
|
40
|
+
recipients: TSecretRecipientMetadata[];
|
|
41
|
+
}
|
|
42
|
+
export interface IGetRuntimeSecretRecipientStateRequest {
|
|
43
|
+
session: IRuntimeSessionBinding;
|
|
44
|
+
}
|
|
45
|
+
export interface IGetRuntimeSecretRecipientStateResponse {
|
|
46
|
+
state: IRuntimeSecretRecipientState;
|
|
47
|
+
}
|
|
48
|
+
export interface IBeginRuntimeSecretRecipientEnrollmentRequest {
|
|
49
|
+
session: IRuntimeSessionBinding;
|
|
50
|
+
proposedRecipientKeyId: string;
|
|
51
|
+
proposedPublicKey: string;
|
|
52
|
+
expectedGeneration: number;
|
|
53
|
+
}
|
|
54
|
+
export interface IRuntimeSecretRecipientEnrollmentChallenge {
|
|
55
|
+
session: IRuntimeSessionBinding;
|
|
56
|
+
enrollmentId: string;
|
|
57
|
+
recipientKeyId: string;
|
|
58
|
+
publicKey: string;
|
|
59
|
+
generation: number;
|
|
60
|
+
expiresAt: number;
|
|
61
|
+
envelope: plugins.smartcrypto.IX25519EnvelopeV1;
|
|
62
|
+
}
|
|
63
|
+
export interface IBeginRuntimeSecretRecipientEnrollmentResponse {
|
|
64
|
+
challenge: IRuntimeSecretRecipientEnrollmentChallenge;
|
|
65
|
+
}
|
|
66
|
+
export interface ICompleteRuntimeSecretRecipientEnrollmentRequest {
|
|
67
|
+
session: IRuntimeSessionBinding;
|
|
68
|
+
enrollmentId: string;
|
|
69
|
+
expectedGeneration: number;
|
|
70
|
+
/** Canonical unpadded base64url encoding of the opened 32-byte challenge. */
|
|
71
|
+
response: string;
|
|
72
|
+
}
|
|
73
|
+
export interface ICompleteRuntimeSecretRecipientEnrollmentResponse {
|
|
74
|
+
recipient: IActiveSecretRecipientMetadata;
|
|
75
|
+
}
|
|
76
|
+
export declare const snapshotRuntimeSecretRecipientState: (valueArg: unknown) => IRuntimeSecretRecipientState;
|
|
77
|
+
export declare const bindGetRuntimeSecretRecipientStateRequest: (valueArg: unknown, trustedSessionArg: unknown) => IGetRuntimeSecretRecipientStateRequest;
|
|
78
|
+
export declare const bindGetRuntimeSecretRecipientStateResponse: (valueArg: unknown, requestArg: unknown) => IGetRuntimeSecretRecipientStateResponse;
|
|
79
|
+
export declare const bindBeginRuntimeSecretRecipientEnrollmentRequest: (valueArg: unknown, trustedSessionArg: unknown, currentStateArg: unknown) => IBeginRuntimeSecretRecipientEnrollmentRequest;
|
|
80
|
+
/** Use the existing SmartCrypto X25519 envelope and one-time challenge proof. */
|
|
81
|
+
export declare const createRuntimeSecretRecipientEnrollmentChallengeContext: (challengeArg: Omit<IRuntimeSecretRecipientEnrollmentChallenge, "envelope">) => Uint8Array;
|
|
82
|
+
export declare const bindBeginRuntimeSecretRecipientEnrollmentResponse: (valueArg: unknown, requestArg: unknown, trustedSessionArg: unknown, nowArg: number) => Promise<IBeginRuntimeSecretRecipientEnrollmentResponse>;
|
|
83
|
+
export declare const bindCompleteRuntimeSecretRecipientEnrollmentRequest: (valueArg: unknown, challengeArg: unknown, trustedSessionArg: unknown, nowArg: number) => Promise<ICompleteRuntimeSecretRecipientEnrollmentRequest>;
|
|
84
|
+
export declare const bindCompleteRuntimeSecretRecipientEnrollmentResponse: (valueArg: unknown, challengeArg: unknown) => ICompleteRuntimeSecretRecipientEnrollmentResponse;
|
|
85
|
+
export interface IGetRuntimeAssignmentSecretMaterialRequest {
|
|
86
|
+
session: IRuntimeSessionBinding;
|
|
87
|
+
/** Exact current generation-one run assignment, never a historical receipt. */
|
|
88
|
+
assignment: IRuntimeAssignmentReference;
|
|
89
|
+
secrets: IRuntimeAuthorityReference;
|
|
90
|
+
expectedRecipientKeyId: string;
|
|
91
|
+
expectedRecipientGeneration: number;
|
|
92
|
+
}
|
|
93
|
+
export interface ISealedRuntimeAssignmentSecretMaterialEntry {
|
|
94
|
+
secretVersionId: string;
|
|
95
|
+
envelope: plugins.smartcrypto.IX25519EnvelopeV1;
|
|
96
|
+
}
|
|
97
|
+
/** Sensitive ephemeral sealed material; exclude the complete body from hooks and logs. */
|
|
98
|
+
export interface ISealedRuntimeAssignmentSecretMaterial {
|
|
99
|
+
assignment: IRuntimeAssignmentReference;
|
|
100
|
+
nodeId: string;
|
|
101
|
+
secrets: IRuntimeAuthorityReference;
|
|
102
|
+
recipientKeyId: string;
|
|
103
|
+
recipientGeneration: number;
|
|
104
|
+
authority: IRuntimeAssignmentSecretAuthority;
|
|
105
|
+
manifest: IResolvedSecretManifest;
|
|
106
|
+
/** Full approved immutable launcher authority, exactly when an entry needs it. */
|
|
107
|
+
workloadInit: IWorkloadInitActiveApprovalAuthority | null;
|
|
108
|
+
/** Sorted exact one-to-one coverage of the pinned manifest's versions. */
|
|
109
|
+
entries: ISealedRuntimeAssignmentSecretMaterialEntry[];
|
|
110
|
+
}
|
|
111
|
+
export interface IGetRuntimeAssignmentSecretMaterialResponse {
|
|
112
|
+
material: ISealedRuntimeAssignmentSecretMaterial;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The descriptor was hashed before assignment seal. This context binds each
|
|
116
|
+
* envelope to the final run digest, node and recipient generation afterwards.
|
|
117
|
+
* Use SmartCrypto sealX25519Envelope with these exact bytes.
|
|
118
|
+
*/
|
|
119
|
+
export declare const createRuntimeAssignmentSecretMaterialEnvelopeContext: (contextArg: {
|
|
120
|
+
recipientKeyId: string;
|
|
121
|
+
recipientGeneration: number;
|
|
122
|
+
organizationId: string;
|
|
123
|
+
clusterId: string;
|
|
124
|
+
serviceId: string;
|
|
125
|
+
nodeId: string;
|
|
126
|
+
assignment: IRuntimeAssignmentReference;
|
|
127
|
+
authorityDigest: TSha256Digest;
|
|
128
|
+
manifestId: string;
|
|
129
|
+
manifestDigest: TSha256Digest;
|
|
130
|
+
imageRolloutId: string;
|
|
131
|
+
imageRolloutGeneration: number;
|
|
132
|
+
requestedImageDigest: TSha256Digest;
|
|
133
|
+
invocationDigest: TSha256Digest;
|
|
134
|
+
secretRolloutId: string;
|
|
135
|
+
secretRolloutGeneration: number;
|
|
136
|
+
secretId: string;
|
|
137
|
+
secretVersionId: string;
|
|
138
|
+
}) => Uint8Array;
|
|
139
|
+
/**
|
|
140
|
+
* trustedSessionArg MUST be the current authenticated connection's server-owned
|
|
141
|
+
* binding; assignmentArg MUST be its current durable run. Content checks here
|
|
142
|
+
* do not prove either source, recipient possession, version issuance policy or
|
|
143
|
+
* the native workload's mount ownership.
|
|
144
|
+
*/
|
|
145
|
+
export declare const bindGetRuntimeAssignmentSecretMaterialRequest: (valueArg: unknown, assignmentArg: unknown, trustedSessionArg: unknown, activeRecipientArg: unknown) => Promise<IGetRuntimeAssignmentSecretMaterialRequest>;
|
|
146
|
+
/**
|
|
147
|
+
* Verify one complete response without opening a private key. The caller must
|
|
148
|
+
* supply its authenticated current session, current assignment, pinned config,
|
|
149
|
+
* enrolled cluster and active recipient from their respective trusted owners.
|
|
150
|
+
*/
|
|
151
|
+
export declare const bindGetRuntimeAssignmentSecretMaterialResponse: (valueArg: unknown, requestArg: unknown, assignmentArg: unknown, configArg: unknown, trustedSessionArg: unknown, trustedClusterIdArg: string, activeRecipientArg: unknown) => Promise<IGetRuntimeAssignmentSecretMaterialResponse>;
|