@serve.zone/interfaces 19.7.0 → 20.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/data/immutableimage.d.ts +2 -0
- package/dist_ts/data/immutableimage.js +1 -1
- package/dist_ts/data/index.d.ts +1 -0
- package/dist_ts/data/index.js +2 -1
- package/dist_ts/data/secret.d.ts +205 -0
- package/dist_ts/data/secret.js +469 -0
- package/dist_ts/data/secretbundle.d.ts +4 -0
- package/dist_ts/data/secretgroup.d.ts +4 -0
- package/dist_ts/data/service.d.ts +18 -6
- package/dist_ts/data/service.js +1 -1
- package/dist_ts/requests/gateway.d.ts +11 -0
- package/dist_ts/requests/index.d.ts +2 -1
- package/dist_ts/requests/index.js +3 -2
- package/dist_ts/requests/secret.d.ts +198 -0
- package/dist_ts/requests/secret.js +2 -0
- package/dist_ts/runtime.d.ts +41 -0
- package/dist_ts/runtime.js +33 -0
- package/package.json +9 -2
- package/readme.md +37 -3
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/immutableimage.ts +2 -0
- package/ts/data/index.ts +1 -0
- package/ts/data/secret.ts +835 -0
- package/ts/data/secretbundle.ts +4 -0
- package/ts/data/secretgroup.ts +4 -0
- package/ts/data/service.ts +26 -6
- package/ts/requests/gateway.ts +15 -0
- package/ts/requests/index.ts +2 -0
- package/ts/requests/secret.ts +256 -0
- package/ts/runtime.ts +80 -0
|
@@ -23,6 +23,7 @@ import * as networkRequests from './network.js';
|
|
|
23
23
|
import * as nodeRequests from './node.js';
|
|
24
24
|
import * as platformRequests from './platform.js';
|
|
25
25
|
import * as routingRequests from './routing.js';
|
|
26
|
+
import * as secretRequests from './secret.js';
|
|
26
27
|
import * as secretBundleRequests from './secretbundle.js';
|
|
27
28
|
import * as secretGroupRequests from './secretgroup.js';
|
|
28
29
|
import * as serverRequests from './server.js';
|
|
@@ -32,7 +33,7 @@ import * as statusRequests from './status.js';
|
|
|
32
33
|
import * as taskRequests from './task.js';
|
|
33
34
|
import * as versionRequests from './version.js';
|
|
34
35
|
import * as webPushRequests from './webpush.js';
|
|
35
|
-
export { adminRequests as admin, appStoreRequests as appstore, baremetalRequests as baremetal, baseOsRequests as baseos, backupRequests as backup, certificateRequests as certificate, clusterRequests as cluster, configRequests as config, corestoreRequests as corestore, deploymentRequests as deployment, dnsRequests as dns, domainRequests as domain, externalRegistryRequests as externalRegistry, gatewayRequests as gateway, hostedAppRequests as hostedapp, identityRequests as identity, imageRequests as image, informRequests as inform, logRequests as log, mailRequests as mail, migrationRequests as migration, networkRequests as network, nodeRequests as node, platformRequests as platform, routingRequests as routing, secretBundleRequests as secretbundle, secretGroupRequests as secretgroup, serverRequests as server, serviceRequests as service, settingsRequests as settings, statusRequests as status, taskRequests as task, versionRequests as version, webPushRequests as webpush, };
|
|
36
|
+
export { adminRequests as admin, appStoreRequests as appstore, baremetalRequests as baremetal, baseOsRequests as baseos, backupRequests as backup, certificateRequests as certificate, clusterRequests as cluster, configRequests as config, corestoreRequests as corestore, deploymentRequests as deployment, dnsRequests as dns, domainRequests as domain, externalRegistryRequests as externalRegistry, gatewayRequests as gateway, hostedAppRequests as hostedapp, identityRequests as identity, imageRequests as image, informRequests as inform, logRequests as log, mailRequests as mail, migrationRequests as migration, networkRequests as network, nodeRequests as node, platformRequests as platform, routingRequests as routing, secretRequests as secret, secretBundleRequests as secretbundle, secretGroupRequests as secretgroup, serverRequests as server, serviceRequests as service, settingsRequests as settings, statusRequests as status, taskRequests as task, versionRequests as version, webPushRequests as webpush, };
|
|
36
37
|
export * from './inform.js';
|
|
37
38
|
export * from './hostedapp.js';
|
|
38
39
|
export * from './mail.js';
|
|
@@ -24,6 +24,7 @@ import * as networkRequests from './network.js';
|
|
|
24
24
|
import * as nodeRequests from './node.js';
|
|
25
25
|
import * as platformRequests from './platform.js';
|
|
26
26
|
import * as routingRequests from './routing.js';
|
|
27
|
+
import * as secretRequests from './secret.js';
|
|
27
28
|
import * as secretBundleRequests from './secretbundle.js';
|
|
28
29
|
import * as secretGroupRequests from './secretgroup.js';
|
|
29
30
|
import * as serverRequests from './server.js';
|
|
@@ -33,9 +34,9 @@ import * as statusRequests from './status.js';
|
|
|
33
34
|
import * as taskRequests from './task.js';
|
|
34
35
|
import * as versionRequests from './version.js';
|
|
35
36
|
import * as webPushRequests from './webpush.js';
|
|
36
|
-
export { adminRequests as admin, appStoreRequests as appstore, baremetalRequests as baremetal, baseOsRequests as baseos, backupRequests as backup, certificateRequests as certificate, clusterRequests as cluster, configRequests as config, corestoreRequests as corestore, deploymentRequests as deployment, dnsRequests as dns, domainRequests as domain, externalRegistryRequests as externalRegistry, gatewayRequests as gateway, hostedAppRequests as hostedapp, identityRequests as identity, imageRequests as image, informRequests as inform, logRequests as log, mailRequests as mail, migrationRequests as migration, networkRequests as network, nodeRequests as node, platformRequests as platform, routingRequests as routing, secretBundleRequests as secretbundle, secretGroupRequests as secretgroup, serverRequests as server, serviceRequests as service, settingsRequests as settings, statusRequests as status, taskRequests as task, versionRequests as version, webPushRequests as webpush, };
|
|
37
|
+
export { adminRequests as admin, appStoreRequests as appstore, baremetalRequests as baremetal, baseOsRequests as baseos, backupRequests as backup, certificateRequests as certificate, clusterRequests as cluster, configRequests as config, corestoreRequests as corestore, deploymentRequests as deployment, dnsRequests as dns, domainRequests as domain, externalRegistryRequests as externalRegistry, gatewayRequests as gateway, hostedAppRequests as hostedapp, identityRequests as identity, imageRequests as image, informRequests as inform, logRequests as log, mailRequests as mail, migrationRequests as migration, networkRequests as network, nodeRequests as node, platformRequests as platform, routingRequests as routing, secretRequests as secret, secretBundleRequests as secretbundle, secretGroupRequests as secretgroup, serverRequests as server, serviceRequests as service, settingsRequests as settings, statusRequests as status, taskRequests as task, versionRequests as version, webPushRequests as webpush, };
|
|
37
38
|
export * from './inform.js';
|
|
38
39
|
export * from './hostedapp.js';
|
|
39
40
|
export * from './mail.js';
|
|
40
41
|
export * from './webpush.js';
|
|
41
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUV6QyxPQUFPLEtBQUssYUFBYSxNQUFNLFlBQVksQ0FBQztBQUM1QyxPQUFPLEtBQUssZ0JBQWdCLE1BQU0sZUFBZSxDQUFDO0FBQ2xELE9BQU8sS0FBSyxpQkFBaUIsTUFBTSxnQkFBZ0IsQ0FBQztBQUNwRCxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssbUJBQW1CLE1BQU0sa0JBQWtCLENBQUM7QUFDeEQsT0FBTyxLQUFLLGVBQWUsTUFBTSxjQUFjLENBQUM7QUFDaEQsT0FBTyxLQUFLLGNBQWMsTUFBTSxhQUFhLENBQUM7QUFDOUMsT0FBTyxLQUFLLGlCQUFpQixNQUFNLGdCQUFnQixDQUFDO0FBQ3BELE9BQU8sS0FBSyxrQkFBa0IsTUFBTSxpQkFBaUIsQ0FBQztBQUN0RCxPQUFPLEtBQUssV0FBVyxNQUFNLFVBQVUsQ0FBQztBQUN4QyxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssd0JBQXdCLE1BQU0sdUJBQXVCLENBQUM7QUFDbEUsT0FBTyxLQUFLLGVBQWUsTUFBTSxjQUFjLENBQUM7QUFDaEQsT0FBTyxLQUFLLGlCQUFpQixNQUFNLGdCQUFnQixDQUFDO0FBQ3BELE9BQU8sS0FBSyxnQkFB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Y0FBYyxjQUFjLENBQUMifQ==
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import type * as plugins from '../plugins.js';
|
|
2
|
+
import type { IResolvedSecretManifestEntry, ISecretMetadata, ISecretSetAttachment, ISecretSetConsumerRolloutStatus, ISecretSetMetadata, ISecretVersionMetadata, ISecretVersionRetentionReference, TSecretDelivery, TSecretEnvironment } from '../data/secret.js';
|
|
3
|
+
import type { IIdentityCredential } from '../data/user.js';
|
|
4
|
+
export type TSecretMutationTarget = {
|
|
5
|
+
kind: 'service';
|
|
6
|
+
serviceId: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'secret-set';
|
|
9
|
+
secretSetId: string;
|
|
10
|
+
};
|
|
11
|
+
export type TSecretValueInput = {
|
|
12
|
+
mode: 'provided';
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
/** Server-generated runtime-only value; plaintext is never returned. */
|
|
16
|
+
| {
|
|
17
|
+
mode: 'generated';
|
|
18
|
+
bytes: 32 | 48 | 64;
|
|
19
|
+
};
|
|
20
|
+
export interface IReq_ListSecrets extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ListSecrets> {
|
|
21
|
+
method: 'listSecrets';
|
|
22
|
+
request: {
|
|
23
|
+
identity: IIdentityCredential;
|
|
24
|
+
target: TSecretMutationTarget;
|
|
25
|
+
environment?: TSecretEnvironment;
|
|
26
|
+
};
|
|
27
|
+
response: {
|
|
28
|
+
secrets: ISecretMetadata[];
|
|
29
|
+
/** Observable CAS fence for the selected service or SecretSet. */
|
|
30
|
+
targetSecretsRevision: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface IReq_GetSecretMetadata extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetSecretMetadata> {
|
|
34
|
+
method: 'getSecretMetadata';
|
|
35
|
+
request: {
|
|
36
|
+
identity: IIdentityCredential;
|
|
37
|
+
secretId: string;
|
|
38
|
+
};
|
|
39
|
+
response: {
|
|
40
|
+
secret: ISecretMetadata;
|
|
41
|
+
versions: ISecretVersionMetadata[];
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export interface IReq_CreateSecret extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_CreateSecret> {
|
|
45
|
+
method: 'createSecret';
|
|
46
|
+
request: {
|
|
47
|
+
identity: IIdentityCredential;
|
|
48
|
+
target: TSecretMutationTarget;
|
|
49
|
+
key: string;
|
|
50
|
+
environment: TSecretEnvironment;
|
|
51
|
+
name: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
tags?: Array<{
|
|
54
|
+
key: string;
|
|
55
|
+
value: string;
|
|
56
|
+
}>;
|
|
57
|
+
delivery: TSecretDelivery;
|
|
58
|
+
valueInput: TSecretValueInput;
|
|
59
|
+
expectedTargetSecretsRevision: number;
|
|
60
|
+
};
|
|
61
|
+
response: {
|
|
62
|
+
secret: ISecretMetadata;
|
|
63
|
+
version: ISecretVersionMetadata;
|
|
64
|
+
/** Post-create CAS revision for the selected target. */
|
|
65
|
+
targetSecretsRevision: number;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export interface IReq_RotateSecret extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RotateSecret> {
|
|
69
|
+
method: 'rotateSecret';
|
|
70
|
+
request: {
|
|
71
|
+
identity: IIdentityCredential;
|
|
72
|
+
secretId: string;
|
|
73
|
+
valueInput: TSecretValueInput;
|
|
74
|
+
expectedSecretRevision: number;
|
|
75
|
+
expectedActiveVersionId?: string;
|
|
76
|
+
};
|
|
77
|
+
response: {
|
|
78
|
+
secret: ISecretMetadata;
|
|
79
|
+
version: ISecretVersionMetadata;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
export interface IReq_ChangeSecretLifecycle extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ChangeSecretLifecycle> {
|
|
83
|
+
method: 'changeSecretLifecycle';
|
|
84
|
+
request: {
|
|
85
|
+
identity: IIdentityCredential;
|
|
86
|
+
secretId: string;
|
|
87
|
+
action: 'retire' | 'revoke' | 'delete' | 'request-purge';
|
|
88
|
+
expectedSecretRevision: number;
|
|
89
|
+
};
|
|
90
|
+
response: {
|
|
91
|
+
secret: ISecretMetadata;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export interface IReq_GetSecretVersionPurgePreflight extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetSecretVersionPurgePreflight> {
|
|
95
|
+
method: 'getSecretVersionPurgePreflight';
|
|
96
|
+
request: {
|
|
97
|
+
identity: IIdentityCredential;
|
|
98
|
+
secretId: string;
|
|
99
|
+
secretVersionId: string;
|
|
100
|
+
};
|
|
101
|
+
response: {
|
|
102
|
+
purgeAllowed: boolean;
|
|
103
|
+
references: ISecretVersionRetentionReference[];
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export interface IReq_ListSecretSets extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ListSecretSets> {
|
|
107
|
+
method: 'listSecretSets';
|
|
108
|
+
request: {
|
|
109
|
+
identity: IIdentityCredential;
|
|
110
|
+
organizationId: string;
|
|
111
|
+
};
|
|
112
|
+
response: {
|
|
113
|
+
secretSets: ISecretSetMetadata[];
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export interface IReq_CreateSecretSet extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_CreateSecretSet> {
|
|
117
|
+
method: 'createSecretSet';
|
|
118
|
+
request: {
|
|
119
|
+
identity: IIdentityCredential;
|
|
120
|
+
organizationId: string;
|
|
121
|
+
name: string;
|
|
122
|
+
description?: string;
|
|
123
|
+
};
|
|
124
|
+
response: {
|
|
125
|
+
secretSet: ISecretSetMetadata;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
export interface IReq_UpdateSecretSet extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_UpdateSecretSet> {
|
|
129
|
+
method: 'updateSecretSet';
|
|
130
|
+
request: {
|
|
131
|
+
identity: IIdentityCredential;
|
|
132
|
+
secretSetId: string;
|
|
133
|
+
name: string;
|
|
134
|
+
description?: string;
|
|
135
|
+
expectedRevision: number;
|
|
136
|
+
};
|
|
137
|
+
response: {
|
|
138
|
+
secretSet: ISecretSetMetadata;
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
export interface IReq_ChangeSecretSetLifecycle extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ChangeSecretSetLifecycle> {
|
|
142
|
+
method: 'changeSecretSetLifecycle';
|
|
143
|
+
request: {
|
|
144
|
+
identity: IIdentityCredential;
|
|
145
|
+
secretSetId: string;
|
|
146
|
+
action: 'retire' | 'delete';
|
|
147
|
+
expectedRevision: number;
|
|
148
|
+
};
|
|
149
|
+
response: {
|
|
150
|
+
secretSet: ISecretSetMetadata;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
export interface IReq_GetSecretSetConsumerRollout extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetSecretSetConsumerRollout> {
|
|
154
|
+
method: 'getSecretSetConsumerRollout';
|
|
155
|
+
request: {
|
|
156
|
+
identity: IIdentityCredential;
|
|
157
|
+
secretSetId: string;
|
|
158
|
+
rolloutId: string;
|
|
159
|
+
cursor?: string;
|
|
160
|
+
limit?: number;
|
|
161
|
+
};
|
|
162
|
+
response: {
|
|
163
|
+
consumers: ISecretSetConsumerRolloutStatus[];
|
|
164
|
+
nextCursor?: string;
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
export interface IReq_SetServiceSecretSetAttachments extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_SetServiceSecretSetAttachments> {
|
|
168
|
+
method: 'setServiceSecretSetAttachments';
|
|
169
|
+
request: {
|
|
170
|
+
identity: IIdentityCredential;
|
|
171
|
+
serviceId: string;
|
|
172
|
+
attachments: ISecretSetAttachment[];
|
|
173
|
+
expectedSecretConfigurationRevision: number;
|
|
174
|
+
};
|
|
175
|
+
response: {
|
|
176
|
+
attachments: ISecretSetAttachment[];
|
|
177
|
+
/** Post-update attachment CAS revision. */
|
|
178
|
+
secretConfigurationRevision: number;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
export interface ISecretResolutionPreviewCollision {
|
|
182
|
+
environment: TSecretEnvironment;
|
|
183
|
+
key: string;
|
|
184
|
+
sourceSecretIds: string[];
|
|
185
|
+
reason: 'duplicate-secret-set-key' | 'duplicate-service-key' | 'invalid-alias';
|
|
186
|
+
}
|
|
187
|
+
export interface IReq_PreviewServiceSecretResolution extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_PreviewServiceSecretResolution> {
|
|
188
|
+
method: 'previewServiceSecretResolution';
|
|
189
|
+
request: {
|
|
190
|
+
identity: IIdentityCredential;
|
|
191
|
+
serviceId: string;
|
|
192
|
+
attachments?: ISecretSetAttachment[];
|
|
193
|
+
};
|
|
194
|
+
response: {
|
|
195
|
+
entries: IResolvedSecretManifestEntry[];
|
|
196
|
+
collisions: ISecretResolutionPreviewCollision[];
|
|
197
|
+
};
|
|
198
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type * as plugins from './plugins.js';
|
|
2
|
+
import type { IIdentityCredential, IResolvedSecretManifest, TSha256Digest } from './data/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Runtime-only material. This module is exported only under the Node condition
|
|
5
|
+
* and is intentionally unreachable from the universal/browser-facing barrel.
|
|
6
|
+
*/
|
|
7
|
+
export interface IResolvedSecretMaterialValue {
|
|
8
|
+
secretVersionId: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IResolvedSecretMaterial {
|
|
12
|
+
schemaVersion: 1;
|
|
13
|
+
/** Full value-free manifest so the runtime can verify its canonical digest. */
|
|
14
|
+
manifest: IResolvedSecretManifest;
|
|
15
|
+
/** Plaintext values keyed only by the exact version IDs pinned by the manifest. */
|
|
16
|
+
values: IResolvedSecretMaterialValue[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Verifies the immutable manifest and requires exactly one material value for
|
|
20
|
+
* every pinned version. Callers separately compare the verified manifest
|
|
21
|
+
* reference to the request and their authenticated cluster scope.
|
|
22
|
+
*/
|
|
23
|
+
export declare const verifyResolvedSecretMaterial: (materialArg: unknown) => Promise<boolean>;
|
|
24
|
+
/**
|
|
25
|
+
* Cluster and organization are derived from the verified JWT. A caller cannot
|
|
26
|
+
* select either scope through request fields.
|
|
27
|
+
*/
|
|
28
|
+
export interface IReq_GetResolvedSecretMaterial extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetResolvedSecretMaterial> {
|
|
29
|
+
method: 'getResolvedSecretMaterial';
|
|
30
|
+
request: {
|
|
31
|
+
identity: IIdentityCredential;
|
|
32
|
+
serviceId: string;
|
|
33
|
+
secretRolloutId: string;
|
|
34
|
+
secretRolloutGeneration: number;
|
|
35
|
+
manifestId: string;
|
|
36
|
+
manifestDigest: TSha256Digest;
|
|
37
|
+
};
|
|
38
|
+
response: {
|
|
39
|
+
material: IResolvedSecretMaterial;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { validateResolvedSecretManifest, verifyResolvedSecretManifestDigest, } from './data/secret.js';
|
|
2
|
+
/**
|
|
3
|
+
* Verifies the immutable manifest and requires exactly one material value for
|
|
4
|
+
* every pinned version. Callers separately compare the verified manifest
|
|
5
|
+
* reference to the request and their authenticated cluster scope.
|
|
6
|
+
*/
|
|
7
|
+
export const verifyResolvedSecretMaterial = async (materialArg) => {
|
|
8
|
+
if (!materialArg || typeof materialArg !== 'object' || Array.isArray(materialArg))
|
|
9
|
+
return false;
|
|
10
|
+
const material = materialArg;
|
|
11
|
+
if (!material.manifest || !Array.isArray(material.values))
|
|
12
|
+
return false;
|
|
13
|
+
if (material.schemaVersion !== 1)
|
|
14
|
+
return false;
|
|
15
|
+
if (validateResolvedSecretManifest(material.manifest).length > 0)
|
|
16
|
+
return false;
|
|
17
|
+
if (!await verifyResolvedSecretManifestDigest(material.manifest))
|
|
18
|
+
return false;
|
|
19
|
+
if (!material.values.every((valueArg) => (Boolean(valueArg)
|
|
20
|
+
&& typeof valueArg === 'object'
|
|
21
|
+
&& typeof valueArg.secretVersionId === 'string'
|
|
22
|
+
&& typeof valueArg.value === 'string')))
|
|
23
|
+
return false;
|
|
24
|
+
const expectedVersionIds = material.manifest.entries
|
|
25
|
+
.map((entryArg) => entryArg.secretVersionId)
|
|
26
|
+
.sort();
|
|
27
|
+
const actualVersionIds = material.values
|
|
28
|
+
.map((valueArg) => valueArg.secretVersionId)
|
|
29
|
+
.sort();
|
|
30
|
+
return new Set(actualVersionIds).size === actualVersionIds.length
|
|
31
|
+
&& JSON.stringify(actualVersionIds) === JSON.stringify(expectedVersionIds);
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVudGltZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3J1bnRpbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBTUEsT0FBTyxFQUNMLDhCQUE4QixFQUM5QixrQ0FBa0MsR0FDbkMsTUFBTSxrQkFBa0IsQ0FBQztBQW1CMUI7Ozs7R0FJRztBQUNILE1BQU0sQ0FBQyxNQUFNLDRCQUE0QixHQUFHLEtBQUssRUFDL0MsV0FBb0IsRUFDRixFQUFFO0lBQ3BCLElBQUksQ0FBQyxXQUF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1YsTUFBTSxnQkFBZ0IsR0FBRyxRQUFRLENBQUMsTUFBTTtTQUNyQyxHQUFHLENBQUMsQ0FBQyxRQUFRLEVBQUUsRUFBRSxDQUFDLFFBQVEsQ0FBQyxlQUFlLENBQUM7U0FDM0MsSUFBSSxFQUFFLENBQUM7SUFDVixPQUFPLElBQUksR0FBRyxDQUFDLGdCQUFnQixDQUFDLENBQUMsSUFBSSxLQUFLLGdCQUFnQixDQUFDLE1BQU07V0FDNUQsSUFBSSxDQUFDLFNBQVMsQ0FBQyxnQkFBZ0IsQ0FBQyxLQUFLLElBQUksQ0FBQyxTQUFTLENBQUMsa0JBQWtCLENBQUMsQ0FBQztBQUMvRSxDQUFDLENBQUMifQ==
|
package/package.json
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serve.zone/interfaces",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.",
|
|
6
6
|
"exports": {
|
|
7
|
-
".":
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist_ts/index.d.ts",
|
|
9
|
+
"default": "./dist_ts/index.js"
|
|
10
|
+
},
|
|
11
|
+
"./runtime": {
|
|
12
|
+
"types": "./dist_ts/runtime.d.ts",
|
|
13
|
+
"node": "./dist_ts/runtime.js"
|
|
14
|
+
}
|
|
8
15
|
},
|
|
9
16
|
"type": "module",
|
|
10
17
|
"author": "Task Venture Capital GmbH",
|
package/readme.md
CHANGED
|
@@ -137,7 +137,6 @@ const service: data.IService = {
|
|
|
137
137
|
environment: {
|
|
138
138
|
NODE_ENV: 'production',
|
|
139
139
|
},
|
|
140
|
-
secretBundleId: 'secretbundle-api',
|
|
141
140
|
serviceCategory: 'workload',
|
|
142
141
|
deploymentStrategy: 'limited-replicas',
|
|
143
142
|
scaleFactor: 2,
|
|
@@ -186,7 +185,17 @@ Common data contracts include:
|
|
|
186
185
|
- Service port contracts including `IServiceTargetPort`, `IServiceDomainRoute`, and `IServicePublicPortMapping` for canonical backend targets, domain target references, and edge/Coretraffic TCP/UDP public exposure.
|
|
187
186
|
- `IDomain`, `IDnsEntry`, and traffic contracts for routing and DNS management.
|
|
188
187
|
- 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.
|
|
189
|
-
- `
|
|
188
|
+
- Value-free `ISecretMetadata`, `ISecretVersionMetadata`, and `ISecretSetMetadata`
|
|
189
|
+
contracts for operator views, plus exact-version `IResolvedSecretManifest`
|
|
190
|
+
contracts for cluster delivery. Manifest helpers enforce canonical shared
|
|
191
|
+
digests, globally unique environment/file delivery targets, and per-cluster
|
|
192
|
+
desired/applied/previous-accepted rollout state. `ISecretBundle` and
|
|
193
|
+
`ISecretGroup` remain legacy compatibility contracts during the versioned
|
|
194
|
+
migration.
|
|
195
|
+
`listSecrets` exposes the dedicated `targetSecretsRevision` CAS fence;
|
|
196
|
+
`createSecret` consumes and returns that fence, while
|
|
197
|
+
`setServiceSecretSetAttachments` returns the independent
|
|
198
|
+
`secretConfigurationRevision`. Generic service writes own neither revision.
|
|
190
199
|
- Mail gateway contracts for domain authorities, address bindings, WorkApp bindings, managed SMTP/API credentials, spool items, delivery journals, and inbound/outbound message payloads.
|
|
191
200
|
- Service-level mail configuration through `IService.data.mail`, including per-address inbound `smtpForward` settings and outbound credential metadata. Cloudly settings include dcrouter gateway, SMTP submission, and inbound forward-target keys for reconciling those bindings.
|
|
192
201
|
- Web Push contracts for environment-specific service bindings, public credential state, public VAPID key rotation metadata, privacy-minimal notification signals, and redacted delivery state. Subscription endpoints, browser key material, provider ciphertext, VAPID private keys, and credential secrets are intentionally absent from public binding and status DTOs.
|
|
@@ -345,7 +354,7 @@ const provisioning: requests.gateway.IReq_ProvisionGatewayClientCredential['requ
|
|
|
345
354
|
};
|
|
346
355
|
```
|
|
347
356
|
|
|
348
|
-
`getGatewayClientContext` returns effective live policy. A `gatewayClient` role necessarily includes the credential ID, bound client ID/type, and `policyGeneration`; consumers should reject admin/operator or mismatched contexts rather than falling back to a caller-supplied owner ID. `getGatewayClientMailOverview` provides an owner-scoped domain and recent-message summary. Cloudly therefore uses only `dcrouterGatewayApiToken`; the former `dcrouterOpsApiToken` setting is not part of `data.ICloudlySettings`.
|
|
357
|
+
`getGatewayClientContext` returns effective live policy. A `gatewayClient` role necessarily includes the credential ID, bound client ID/type, and `policyGeneration`; consumers should reject admin/operator or mismatched contexts rather than falling back to a caller-supplied owner ID. `getGatewayClientMailOverview` provides an owner-scoped domain and recent-message summary. `getGatewayClientMailDomainCount` derives ownership exclusively from the authenticating gateway credential and returns `{ count: number }` for its distinct configured mail domains. Cloudly therefore uses only `dcrouterGatewayApiToken`; the former `dcrouterOpsApiToken` setting is not part of `data.ICloudlySettings`.
|
|
349
358
|
|
|
350
359
|
Request groups are exported by product area:
|
|
351
360
|
|
|
@@ -374,6 +383,7 @@ Request groups are exported by product area:
|
|
|
374
383
|
- `requests.node`
|
|
375
384
|
- `requests.platform`
|
|
376
385
|
- `requests.routing`
|
|
386
|
+
- `requests.secret`
|
|
377
387
|
- `requests.secretbundle`
|
|
378
388
|
- `requests.secretgroup`
|
|
379
389
|
- `requests.server`
|
|
@@ -384,6 +394,30 @@ Request groups are exported by product area:
|
|
|
384
394
|
- `requests.version`
|
|
385
395
|
- `requests.webpush`
|
|
386
396
|
|
|
397
|
+
Secret material response contracts are not exported from the universal
|
|
398
|
+
browser-facing entrypoint. Node runtimes import the isolated subpath:
|
|
399
|
+
|
|
400
|
+
```typescript
|
|
401
|
+
import {
|
|
402
|
+
verifyResolvedSecretMaterial,
|
|
403
|
+
} from '@serve.zone/interfaces/runtime';
|
|
404
|
+
import type {
|
|
405
|
+
IReq_GetResolvedSecretMaterial,
|
|
406
|
+
IResolvedSecretMaterial,
|
|
407
|
+
} from '@serve.zone/interfaces/runtime';
|
|
408
|
+
|
|
409
|
+
async function acceptMaterial(material: IResolvedSecretMaterial) {
|
|
410
|
+
if (!await verifyResolvedSecretMaterial(material)) {
|
|
411
|
+
throw new Error('secret material does not match its immutable manifest');
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
Runtime material is shaped as `{ manifest, values }`. The helper verifies the
|
|
417
|
+
canonical manifest digest and exact one-to-one version-ID coverage before
|
|
418
|
+
plaintext use. The runtime must separately compare the verified manifest
|
|
419
|
+
reference and cluster to its request and authenticated deployment scope.
|
|
420
|
+
|
|
387
421
|
## Platform Contracts
|
|
388
422
|
|
|
389
423
|
Use `platform` for current platform-service capabilities and application-facing platform RPCs.
|
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -66,6 +66,8 @@ export interface ICoreflowRuntimeCapabilities {
|
|
|
66
66
|
immutableImageDeploymentVersion: 1;
|
|
67
67
|
/** Coreflow can answer the versioned, node-scoped Corestore inventory probe. */
|
|
68
68
|
corestoreInventoryVersion?: 1;
|
|
69
|
+
/** Coreflow can consume exact, cluster-scoped resolved secret manifests. */
|
|
70
|
+
secretManifestVersion?: 1;
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
/**
|
package/ts/data/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './isolatedrestore.js';
|
|
|
19
19
|
export * from './isolatedrestore.golden.js';
|
|
20
20
|
export * from './mail.js';
|
|
21
21
|
export * from './registry.js';
|
|
22
|
+
export * from './secret.js';
|
|
22
23
|
export * from './secretbundle.js';
|
|
23
24
|
export * from './secretgroup.js';
|
|
24
25
|
export * from './baremetal.js';
|