@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
|
@@ -22,36 +22,12 @@ export interface IServiceVolume {
|
|
|
22
22
|
/** Driver-specific options forwarded to Docker's VolumeDriver.Create request. */
|
|
23
23
|
options?: Record<string, string>;
|
|
24
24
|
}
|
|
25
|
-
/**
|
|
26
|
-
* A single secret-bundle key delivered as a file instead of an environment
|
|
27
|
-
* variable. Targets are intentionally restricted to Docker's secret tmpfs so
|
|
28
|
-
* a deployment declaration cannot overwrite application or system files.
|
|
29
|
-
*/
|
|
30
|
-
export interface IServiceSecretFile {
|
|
31
|
-
/** Key in the service's merged secret bundles. */
|
|
32
|
-
sourceKey: string;
|
|
33
|
-
/** Absolute file path below /run/secrets/. */
|
|
34
|
-
targetPath: string;
|
|
35
|
-
/** Numeric container user identity. */
|
|
36
|
-
uid: number;
|
|
37
|
-
/** Numeric container group identity. */
|
|
38
|
-
gid: number;
|
|
39
|
-
/** Read-only POSIX mode. Supported values are 0400 and 0440. */
|
|
40
|
-
mode: number;
|
|
41
|
-
}
|
|
42
25
|
export declare const serviceContainerArgLimits: {
|
|
43
26
|
readonly maximumArgs: 64;
|
|
44
27
|
readonly maximumArgBytes: 4096;
|
|
45
28
|
readonly maximumTotalBytes: number;
|
|
46
29
|
};
|
|
47
|
-
export declare const serviceSecretFileLimits: {
|
|
48
|
-
readonly maximumFiles: 32;
|
|
49
|
-
readonly maximumValueBytes: number;
|
|
50
|
-
readonly maximumIdentity: 2147483647;
|
|
51
|
-
};
|
|
52
30
|
export declare const normalizeServiceAbsolutePath: (pathArg: string) => string | undefined;
|
|
53
|
-
/** Pure, secret-value-free validation shared by Cloudly and Coreflow. */
|
|
54
|
-
export declare const validateServiceSecretFiles: (secretFilesArg: unknown, volumeMountPathsArg?: string[]) => string[];
|
|
55
31
|
/** Pure validation for the exact OCI/Docker argument vector after image entrypoint. */
|
|
56
32
|
export declare const validateServiceContainerArgs: (containerArgsArg: unknown) => string[];
|
|
57
33
|
/**
|
|
@@ -118,27 +94,12 @@ export interface IService {
|
|
|
118
94
|
environment: {
|
|
119
95
|
[key: string]: string;
|
|
120
96
|
};
|
|
121
|
-
/**
|
|
122
|
-
* Legacy main SecretBundle ID. New services use secretConfiguration and
|
|
123
|
-
* the server-managed secretDeployment manifest pointer.
|
|
124
|
-
*
|
|
125
|
-
* @deprecated Compatibility-only until the versioned SecretBundle migration completes.
|
|
126
|
-
*/
|
|
127
|
-
secretBundleId?: string;
|
|
128
|
-
/**
|
|
129
|
-
* Legacy additional SecretBundle IDs.
|
|
130
|
-
*
|
|
131
|
-
* @deprecated Use explicit same-organization SecretSet attachments.
|
|
132
|
-
*/
|
|
133
|
-
additionalSecretBundleIds?: string[];
|
|
134
97
|
/** Value-free, caller-managed SecretSet attachment configuration. */
|
|
135
98
|
secretConfiguration?: IServiceSecretConfiguration;
|
|
136
99
|
/** Server-managed immutable manifest authority pointer. */
|
|
137
100
|
secretDeployment?: IServiceSecretDeploymentPlan;
|
|
138
101
|
/** Exact OCI/Docker argument vector appended after the image entrypoint. */
|
|
139
102
|
containerArgs?: string[];
|
|
140
|
-
/** Secret keys mounted as files and excluded from Env and secret.json. */
|
|
141
|
-
secretFiles?: IServiceSecretFile[];
|
|
142
103
|
/**
|
|
143
104
|
* Service category determines deployment behavior
|
|
144
105
|
* - base: Core services that run on every node (coreflow, coretraffic, corelog)
|
package/dist_ts/data/service.js
CHANGED
|
@@ -3,11 +3,6 @@ export const serviceContainerArgLimits = {
|
|
|
3
3
|
maximumArgBytes: 4096,
|
|
4
4
|
maximumTotalBytes: 32 * 1024,
|
|
5
5
|
};
|
|
6
|
-
export const serviceSecretFileLimits = {
|
|
7
|
-
maximumFiles: 32,
|
|
8
|
-
maximumValueBytes: 500 * 1024,
|
|
9
|
-
maximumIdentity: 2_147_483_647,
|
|
10
|
-
};
|
|
11
6
|
export const normalizeServiceAbsolutePath = (pathArg) => {
|
|
12
7
|
if (typeof pathArg !== 'string'
|
|
13
8
|
|| !pathArg.startsWith('/')
|
|
@@ -31,77 +26,6 @@ export const normalizeServiceAbsolutePath = (pathArg) => {
|
|
|
31
26
|
}
|
|
32
27
|
return `/${segments.join('/')}`;
|
|
33
28
|
};
|
|
34
|
-
const isCanonicalSecretTargetPath = (targetPathArg) => (normalizeServiceAbsolutePath(targetPathArg) === targetPathArg
|
|
35
|
-
&& /^\/run\/secrets\/[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(targetPathArg)
|
|
36
|
-
&& targetPathArg !== '/run/secrets/secret.json');
|
|
37
|
-
const pathsOverlap = (leftArg, rightArg) => {
|
|
38
|
-
const left = normalizeServiceAbsolutePath(leftArg);
|
|
39
|
-
const right = normalizeServiceAbsolutePath(rightArg);
|
|
40
|
-
if (!left || !right)
|
|
41
|
-
return false;
|
|
42
|
-
if (left === '/' || right === '/')
|
|
43
|
-
return true;
|
|
44
|
-
return left === right || left.startsWith(`${right}/`) || right.startsWith(`${left}/`);
|
|
45
|
-
};
|
|
46
|
-
/** Pure, secret-value-free validation shared by Cloudly and Coreflow. */
|
|
47
|
-
export const validateServiceSecretFiles = (secretFilesArg, volumeMountPathsArg = []) => {
|
|
48
|
-
if (secretFilesArg === undefined)
|
|
49
|
-
return [];
|
|
50
|
-
if (!Array.isArray(secretFilesArg))
|
|
51
|
-
return ['secretFiles must be an array'];
|
|
52
|
-
if (secretFilesArg.length > serviceSecretFileLimits.maximumFiles) {
|
|
53
|
-
return [`secretFiles must contain at most ${serviceSecretFileLimits.maximumFiles} entries`];
|
|
54
|
-
}
|
|
55
|
-
const errors = [];
|
|
56
|
-
if (volumeMountPathsArg.some((mountPathArg) => (normalizeServiceAbsolutePath(mountPathArg) !== mountPathArg))) {
|
|
57
|
-
errors.push('volume mount paths must be canonical absolute paths');
|
|
58
|
-
}
|
|
59
|
-
const sourceKeys = [];
|
|
60
|
-
const targetPaths = [];
|
|
61
|
-
for (const [index, candidate] of secretFilesArg.entries()) {
|
|
62
|
-
if (!candidate || typeof candidate !== 'object' || Array.isArray(candidate)) {
|
|
63
|
-
errors.push(`secretFiles[${index}] must be an object`);
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
const mapping = candidate;
|
|
67
|
-
if (typeof mapping.sourceKey !== 'string'
|
|
68
|
-
|| mapping.sourceKey.length > 253
|
|
69
|
-
|| !/^[A-Z_][A-Z0-9_]*$/.test(mapping.sourceKey)) {
|
|
70
|
-
errors.push(`secretFiles[${index}].sourceKey must be a canonical environment key`);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
sourceKeys.push(mapping.sourceKey);
|
|
74
|
-
}
|
|
75
|
-
if (typeof mapping.targetPath !== 'string'
|
|
76
|
-
|| !isCanonicalSecretTargetPath(mapping.targetPath)) {
|
|
77
|
-
errors.push(`secretFiles[${index}].targetPath must be a unique canonical file below /run/secrets and may not be secret.json`);
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
targetPaths.push(mapping.targetPath);
|
|
81
|
-
if (volumeMountPathsArg.some((mountPathArg) => (typeof mountPathArg === 'string' && pathsOverlap(mapping.targetPath, mountPathArg)))) {
|
|
82
|
-
errors.push(`secretFiles[${index}].targetPath overlaps a declared volume mount`);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
for (const identityField of ['uid', 'gid']) {
|
|
86
|
-
const identity = mapping[identityField];
|
|
87
|
-
if (!Number.isSafeInteger(identity)
|
|
88
|
-
|| identity < 0
|
|
89
|
-
|| identity > serviceSecretFileLimits.maximumIdentity) {
|
|
90
|
-
errors.push(`secretFiles[${index}].${identityField} must be a bounded numeric identity`);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
if (mapping.mode !== 0o400 && mapping.mode !== 0o440) {
|
|
94
|
-
errors.push(`secretFiles[${index}].mode must be 0400 or 0440`);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
if (new Set(sourceKeys).size !== sourceKeys.length) {
|
|
98
|
-
errors.push('secretFiles sourceKey values must be unique');
|
|
99
|
-
}
|
|
100
|
-
if (new Set(targetPaths).size !== targetPaths.length) {
|
|
101
|
-
errors.push('secretFiles targetPath values must be unique');
|
|
102
|
-
}
|
|
103
|
-
return errors;
|
|
104
|
-
};
|
|
105
29
|
/** Pure validation for the exact OCI/Docker argument vector after image entrypoint. */
|
|
106
30
|
export const validateServiceContainerArgs = (containerArgsArg) => {
|
|
107
31
|
if (containerArgsArg === undefined)
|
|
@@ -133,4 +57,4 @@ export const validateServiceContainerArgs = (containerArgsArg) => {
|
|
|
133
57
|
}
|
|
134
58
|
return [];
|
|
135
59
|
};
|
|
136
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
60
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2RhdGEvc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQ0EsTUFBTSxDQUFDLE1BQU0seUJBQXlCLEdBQUc7SUFDdkMsV0FBVyxFQUFFLEVBQUU7SUFDZixlQUFlLEVBQUUsSUFBSTtJQUNyQixpQkFBaUIsRUFBRSxFQUFFLEdBQUcsSUFBSTtDQUNwQixDQUFDO0FBRVgsTUFBTSxDQUFDLE1BQU0sNEJBQTRCLEdBQUcsQ0FBQyxPQUFlLEVBQXNCLEVBQUU7SUFDbEYsSUFBSSxPQUFPLE9BQU8sS0FBSyxRQUFRO1dBQzFCLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxHQUFHLENBQUM7V0FDeEIsT0FBTyxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUM7V0FDdEIsT0FBTyxDQUFDLE1BQU0sR0FBRyxHQUFHLEVBQUUsQ0FBQztRQUMxQixPQUFPLFNBQVMsQ0FBQztJQUNuQixDQUFDO0lBQ0QsTUFBTSxRQUFRLEdBQWEsRUFBRSxDQUFDO0lBQzlCLEtBQUssTUFBTSxPQUFPLElBQUksT0FBTyxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDO1FBQ3pDLElBQUksQ0FBQyxPQUFP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string;
|
|
4
|
+
bucket: string;
|
|
5
|
+
region?: string;
|
|
6
|
+
port?: number;
|
|
7
|
+
useSsl?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface ICloudlyNfsBackupTargetDescriptor {
|
|
10
|
+
type: 'nfs';
|
|
11
|
+
path: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ICloudlySmbBackupTargetDescriptor {
|
|
14
|
+
type: 'smb';
|
|
15
|
+
host: string;
|
|
16
|
+
share: string;
|
|
17
|
+
domain?: string;
|
|
18
|
+
port?: number;
|
|
19
|
+
}
|
|
20
|
+
export type TCloudlyBackupTargetDescriptor = ICloudlyS3BackupTargetDescriptor | ICloudlyNfsBackupTargetDescriptor | ICloudlySmbBackupTargetDescriptor;
|
|
21
|
+
/** Public runtime-configurable settings. No serialized credential belongs here. */
|
|
5
22
|
export interface ICloudlySettings {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
backupExternalTargetType?: string;
|
|
10
|
-
backupExternalTargetConfig?: string;
|
|
11
|
-
backupNodeCacheKeepDays?: string;
|
|
23
|
+
deploymentArchiveRetentionDays?: number;
|
|
24
|
+
backupExternalTarget?: TCloudlyBackupTargetDescriptor;
|
|
25
|
+
backupNodeCacheKeepDays?: number;
|
|
12
26
|
dcrouterGatewayUrl?: string;
|
|
13
|
-
dcrouterGatewayApiToken?: string;
|
|
14
27
|
dcrouterGatewayClientId?: string;
|
|
15
28
|
dcrouterTargetHost?: string;
|
|
16
|
-
dcrouterTargetPort?:
|
|
17
|
-
dcrouterTargetHostsByNode?: string
|
|
29
|
+
dcrouterTargetPort?: number;
|
|
30
|
+
dcrouterTargetHostsByNode?: Record<string, string>;
|
|
18
31
|
dcrouterMailSubmissionHost?: string;
|
|
19
|
-
dcrouterMailSubmissionPort?:
|
|
32
|
+
dcrouterMailSubmissionPort?: number;
|
|
20
33
|
dcrouterMailSubmissionTlsMode?: 'plain' | 'starttls' | 'implicitTls';
|
|
21
34
|
dcrouterMailForwardTargetHost?: string;
|
|
22
|
-
dcrouterMailForwardTargetHostsByNode?: string
|
|
23
|
-
baseosJoinToken?: string;
|
|
35
|
+
dcrouterMailForwardTargetHostsByNode?: Record<string, string>;
|
|
24
36
|
corebuildWorkerUrl?: string;
|
|
25
|
-
|
|
26
|
-
corebuildWorkersJson?: string;
|
|
27
|
-
awsAccessKey?: string;
|
|
28
|
-
awsSecretKey?: string;
|
|
29
|
-
awsRegion?: string;
|
|
30
|
-
digitalOceanToken?: string;
|
|
31
|
-
azureClientId?: string;
|
|
32
|
-
azureClientSecret?: string;
|
|
33
|
-
azureTenantId?: string;
|
|
34
|
-
azureSubscriptionId?: string;
|
|
35
|
-
googleCloudKeyJson?: string;
|
|
36
|
-
googleCloudProjectId?: string;
|
|
37
|
-
vultrApiKey?: string;
|
|
38
|
-
linodeToken?: string;
|
|
39
|
-
ovhApplicationKey?: string;
|
|
40
|
-
ovhApplicationSecret?: string;
|
|
41
|
-
ovhConsumerKey?: string;
|
|
42
|
-
scalewayAccessKey?: string;
|
|
43
|
-
scalewaySecretKey?: string;
|
|
44
|
-
scalewayOrganizationId?: string;
|
|
37
|
+
corebuildWorkerUrls?: string[];
|
|
45
38
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
export
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
export declare const cloudlySystemSecretOwner: Readonly<{
|
|
40
|
+
readonly kind: "system";
|
|
41
|
+
readonly systemId: "cloudly-settings";
|
|
42
|
+
}>;
|
|
43
|
+
export declare const cloudlySystemSecretManagementScope: "system:cloudly-settings";
|
|
44
|
+
/** Stable keys for values removed from serialized Cloudly settings. */
|
|
45
|
+
export declare const cloudlySystemSecretKeys: Readonly<{
|
|
46
|
+
readonly hetznerToken: "HETZNER_TOKEN";
|
|
47
|
+
readonly cloudflareToken: "CLOUDFLARE_TOKEN";
|
|
48
|
+
readonly backupExternalTargetCredentials: "BACKUP_EXTERNAL_TARGET_CREDENTIALS";
|
|
49
|
+
readonly dcrouterGatewayApiToken: "DCROUTER_GATEWAY_API_TOKEN";
|
|
50
|
+
readonly baseosJoinToken: "BASEOS_JOIN_TOKEN";
|
|
51
|
+
readonly corebuildWorkerToken: "COREBUILD_WORKER_TOKEN";
|
|
52
|
+
readonly corebuildWorkers: "COREBUILD_WORKERS";
|
|
53
|
+
readonly awsAccessKey: "AWS_ACCESS_KEY";
|
|
54
|
+
readonly awsSecretKey: "AWS_SECRET_KEY";
|
|
55
|
+
readonly awsRegion: "AWS_REGION";
|
|
56
|
+
readonly digitalOceanToken: "DIGITALOCEAN_TOKEN";
|
|
57
|
+
readonly azureClientId: "AZURE_CLIENT_ID";
|
|
58
|
+
readonly azureClientSecret: "AZURE_CLIENT_SECRET";
|
|
59
|
+
readonly azureTenantId: "AZURE_TENANT_ID";
|
|
60
|
+
readonly azureSubscriptionId: "AZURE_SUBSCRIPTION_ID";
|
|
61
|
+
readonly googleCloudKey: "GOOGLE_CLOUD_KEY";
|
|
62
|
+
readonly googleCloudProjectId: "GOOGLE_CLOUD_PROJECT_ID";
|
|
63
|
+
readonly vultrApiKey: "VULTR_API_KEY";
|
|
64
|
+
readonly linodeToken: "LINODE_TOKEN";
|
|
65
|
+
readonly ovhApplicationKey: "OVH_APPLICATION_KEY";
|
|
66
|
+
readonly ovhApplicationSecret: "OVH_APPLICATION_SECRET";
|
|
67
|
+
readonly ovhConsumerKey: "OVH_CONSUMER_KEY";
|
|
68
|
+
readonly scalewayAccessKey: "SCALEWAY_ACCESS_KEY";
|
|
69
|
+
readonly scalewaySecretKey: "SCALEWAY_SECRET_KEY";
|
|
70
|
+
readonly scalewayOrganizationId: "SCALEWAY_ORGANIZATION_ID";
|
|
71
|
+
}>;
|
package/dist_ts/data/settings.js
CHANGED
|
@@ -1,2 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export const cloudlySystemSecretOwner = Object.freeze({
|
|
2
|
+
kind: 'system',
|
|
3
|
+
systemId: 'cloudly-settings',
|
|
4
|
+
});
|
|
5
|
+
export const cloudlySystemSecretManagementScope = 'system:cloudly-settings';
|
|
6
|
+
/** Stable keys for values removed from serialized Cloudly settings. */
|
|
7
|
+
export const cloudlySystemSecretKeys = Object.freeze({
|
|
8
|
+
hetznerToken: 'HETZNER_TOKEN',
|
|
9
|
+
cloudflareToken: 'CLOUDFLARE_TOKEN',
|
|
10
|
+
backupExternalTargetCredentials: 'BACKUP_EXTERNAL_TARGET_CREDENTIALS',
|
|
11
|
+
dcrouterGatewayApiToken: 'DCROUTER_GATEWAY_API_TOKEN',
|
|
12
|
+
baseosJoinToken: 'BASEOS_JOIN_TOKEN',
|
|
13
|
+
corebuildWorkerToken: 'COREBUILD_WORKER_TOKEN',
|
|
14
|
+
corebuildWorkers: 'COREBUILD_WORKERS',
|
|
15
|
+
awsAccessKey: 'AWS_ACCESS_KEY',
|
|
16
|
+
awsSecretKey: 'AWS_SECRET_KEY',
|
|
17
|
+
awsRegion: 'AWS_REGION',
|
|
18
|
+
digitalOceanToken: 'DIGITALOCEAN_TOKEN',
|
|
19
|
+
azureClientId: 'AZURE_CLIENT_ID',
|
|
20
|
+
azureClientSecret: 'AZURE_CLIENT_SECRET',
|
|
21
|
+
azureTenantId: 'AZURE_TENANT_ID',
|
|
22
|
+
azureSubscriptionId: 'AZURE_SUBSCRIPTION_ID',
|
|
23
|
+
googleCloudKey: 'GOOGLE_CLOUD_KEY',
|
|
24
|
+
googleCloudProjectId: 'GOOGLE_CLOUD_PROJECT_ID',
|
|
25
|
+
vultrApiKey: 'VULTR_API_KEY',
|
|
26
|
+
linodeToken: 'LINODE_TOKEN',
|
|
27
|
+
ovhApplicationKey: 'OVH_APPLICATION_KEY',
|
|
28
|
+
ovhApplicationSecret: 'OVH_APPLICATION_SECRET',
|
|
29
|
+
ovhConsumerKey: 'OVH_CONSUMER_KEY',
|
|
30
|
+
scalewayAccessKey: 'SCALEWAY_ACCESS_KEY',
|
|
31
|
+
scalewaySecretKey: 'SCALE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RUFBRSxrQkFBa0I7SUFDbEMsb0JBQW9CLEVBQUUseUJBQXlCO0lBQy9DLFdBQVcsRUFBRSxlQUFlO0lBQzVCLFdBQVcsRUFBRSxjQUFjO0lBQzNCLGlCQUFpQixFQUFFLHFCQUFxQjtJQUN4QyxvQkFBb0IsRUFBRSx3QkFBd0I7SUFDOUMsY0FBYyxFQUFFLGtCQUFrQjtJQUNsQyxpQkFBaUIsRUFBRSxxQkFBcUI7SUFDeEMsaUJBQWlCLEVBQUUscUJBQXFCO0lBQ3hDLHNCQUFzQixFQUFFLDBCQUEwQjtDQUMxQyxDQUFDLENBQUMifQ==
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TSecretManagementScope } from '../data/secret.js';
|
|
1
2
|
/**
|
|
2
3
|
* Backend-neutral storage vocabulary shared by App Store manifests, control
|
|
3
4
|
* planes, and fulfillment adapters. Physical providers and runtime attachment
|
|
@@ -84,12 +85,12 @@ export type TStorageClassCapabilities = IFilesystemStorageClassCapabilities | IO
|
|
|
84
85
|
* addresses, mount options, principals, and credential values are private.
|
|
85
86
|
*/
|
|
86
87
|
export interface IStorageCapabilityAdvertisement {
|
|
87
|
-
schemaVersion:
|
|
88
|
+
schemaVersion: 2;
|
|
88
89
|
featureIds: string[];
|
|
89
90
|
classes: TStorageClassCapabilities[];
|
|
90
91
|
}
|
|
91
|
-
export interface
|
|
92
|
-
type: 'environment';
|
|
92
|
+
export interface IObjectStorageLauncherEnvironmentDelivery {
|
|
93
|
+
type: 'launcher-environment';
|
|
93
94
|
/**
|
|
94
95
|
* Explicit target keys prevent two named bindings from silently overwriting
|
|
95
96
|
* each other. Every required field must have a distinct environment key.
|
|
@@ -103,8 +104,8 @@ export interface IObjectStorageEnvironmentDelivery {
|
|
|
103
104
|
sessionToken?: string;
|
|
104
105
|
};
|
|
105
106
|
}
|
|
106
|
-
export interface
|
|
107
|
-
type: '
|
|
107
|
+
export interface IObjectStorageFileDelivery {
|
|
108
|
+
type: 'file';
|
|
108
109
|
/** Canonical absolute path below /run/secrets/. */
|
|
109
110
|
targetPath: string;
|
|
110
111
|
/**
|
|
@@ -112,8 +113,11 @@ export interface IObjectStorageSecretFileDelivery {
|
|
|
112
113
|
* secretAccessKey, and optional sessionToken fields.
|
|
113
114
|
*/
|
|
114
115
|
format: 'servezone-object-storage-v1';
|
|
116
|
+
uid: number;
|
|
117
|
+
gid: number;
|
|
118
|
+
mode: 0o400 | 0o440;
|
|
115
119
|
}
|
|
116
|
-
export type TObjectStorageDelivery =
|
|
120
|
+
export type TObjectStorageDelivery = IObjectStorageLauncherEnvironmentDelivery | IObjectStorageFileDelivery;
|
|
117
121
|
export type TResolvedStorageBindingStatus = 'requested' | 'provisioning' | 'ready' | 'degraded' | 'failed' | 'releasing' | 'retained' | 'released';
|
|
118
122
|
export type TStorageBindingFailureCode = 'unsupportedCapability' | 'policyUnavailable' | 'provisionFailed' | 'attachmentFailed' | 'quotaExceeded' | 'credentialsUnavailable' | 'backendUnavailable' | 'migrationRequired';
|
|
119
123
|
export interface IStorageBindingFailure {
|
|
@@ -133,7 +137,7 @@ export interface IResolvedStorageCapacity {
|
|
|
133
137
|
limit?: TStorageCapacityQuantity;
|
|
134
138
|
}
|
|
135
139
|
export interface IResolvedStorageBindingBase {
|
|
136
|
-
schemaVersion:
|
|
140
|
+
schemaVersion: 2;
|
|
137
141
|
/** Stable binding/allocation identity. */
|
|
138
142
|
id: string;
|
|
139
143
|
serviceId: string;
|
|
@@ -162,12 +166,6 @@ export interface IResolvedFilesystemStorageBinding extends IResolvedStorageBindi
|
|
|
162
166
|
mountPath: string;
|
|
163
167
|
accessMode: TFilesystemStorageAccessMode;
|
|
164
168
|
}
|
|
165
|
-
export interface IStorageObjectCredentialsRef {
|
|
166
|
-
secretBundleId: string;
|
|
167
|
-
accessKeyIdKey: string;
|
|
168
|
-
secretAccessKeyKey: string;
|
|
169
|
-
sessionTokenKey?: string;
|
|
170
|
-
}
|
|
171
169
|
export interface IResolvedObjectStorageConnection {
|
|
172
170
|
endpoint: string;
|
|
173
171
|
bucket: string;
|
|
@@ -177,7 +175,8 @@ export interface IResolvedObjectStorageBinding extends IResolvedStorageBindingBa
|
|
|
177
175
|
kind: 'objectStorage';
|
|
178
176
|
accessMode: TObjectStorageAccessMode;
|
|
179
177
|
connection: IResolvedObjectStorageConnection;
|
|
180
|
-
|
|
178
|
+
/** Value-free service-owned Secret reconciliation scope. */
|
|
179
|
+
credentialManagementScope: Extract<TSecretManagementScope, `platform:${string}`>;
|
|
181
180
|
delivery: TObjectStorageDelivery;
|
|
182
181
|
versioning: boolean;
|
|
183
182
|
retentionDays?: number;
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
export const storageKindPlatformCapabilityIds = {
|
|
6
6
|
objectStorage: 'objectstorage',
|
|
7
7
|
};
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3BsYXRmb3JtL3N0b3JhZ2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUUE7OztHQUdHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sZ0NBQWdDLEdBQUc7SUFDOUMsYUFBYSxFQUFFLGVBQWU7Q0FDdEIsQ0FBQyJ9
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IAppStoreObjectStorageRequest, IAppStoreStorageClass } from '../appstore/types.js';
|
|
2
|
-
import type { IResolvedObjectStorageBinding, IResolvedStoragePolicyRef
|
|
2
|
+
import type { IResolvedObjectStorageBinding, IResolvedStoragePolicyRef } from './storage.js';
|
|
3
3
|
export declare const storageMigrationContractLimits: Readonly<{
|
|
4
|
-
version:
|
|
4
|
+
version: 2;
|
|
5
5
|
maximumControlJsonBytes: number;
|
|
6
6
|
maximumConfiguredStringBytes: 2048;
|
|
7
7
|
maximumIssueMessageBytes: 4096;
|
|
@@ -32,7 +32,7 @@ export interface IStorageBindingMigrationOwner {
|
|
|
32
32
|
migrationDigest: string;
|
|
33
33
|
}
|
|
34
34
|
export interface IUnfencedObjectStorageBindingControlSnapshot {
|
|
35
|
-
schemaVersion:
|
|
35
|
+
schemaVersion: 2;
|
|
36
36
|
binding: TActiveObjectStorageBinding;
|
|
37
37
|
recordRevision: number;
|
|
38
38
|
snapshotDigest: string;
|
|
@@ -40,7 +40,7 @@ export interface IUnfencedObjectStorageBindingControlSnapshot {
|
|
|
40
40
|
activeMigration?: never;
|
|
41
41
|
}
|
|
42
42
|
export interface IFencedObjectStorageBindingControlSnapshot {
|
|
43
|
-
schemaVersion:
|
|
43
|
+
schemaVersion: 2;
|
|
44
44
|
binding: TActiveObjectStorageBinding;
|
|
45
45
|
recordRevision: number;
|
|
46
46
|
snapshotDigest: string;
|
|
@@ -55,10 +55,10 @@ export interface IObjectStorageMigrationTarget {
|
|
|
55
55
|
kind: 'objectStorage';
|
|
56
56
|
};
|
|
57
57
|
request: IAppStoreObjectStorageRequest;
|
|
58
|
-
|
|
58
|
+
credentialManagementScope: IResolvedObjectStorageBinding['credentialManagementScope'];
|
|
59
59
|
}
|
|
60
60
|
export interface IObjectStorageMigrationPrepareRequest {
|
|
61
|
-
schemaVersion:
|
|
61
|
+
schemaVersion: 2;
|
|
62
62
|
migrationId: string;
|
|
63
63
|
sourceControlSnapshot: IUnfencedObjectStorageBindingControlSnapshot;
|
|
64
64
|
workloadGeneration: number;
|
|
@@ -92,7 +92,7 @@ export interface IStorageMigrationPostCutoverIssue extends IStorageMigrationIssu
|
|
|
92
92
|
allowedRecoveryActions: TStorageMigrationPostCutoverRecoveryAction[];
|
|
93
93
|
}
|
|
94
94
|
export interface IStorageMigrationMutationFence {
|
|
95
|
-
schemaVersion:
|
|
95
|
+
schemaVersion: 2;
|
|
96
96
|
migrationId: string;
|
|
97
97
|
migrationDigest: string;
|
|
98
98
|
expectedMigrationRevision: number;
|
|
@@ -136,7 +136,7 @@ export interface IObjectStorageMigrationResumeRequest extends IStorageMigrationM
|
|
|
136
136
|
export interface IObjectStorageMigrationCleanupRequest extends IStorageMigrationMutationFence {
|
|
137
137
|
}
|
|
138
138
|
export interface IStorageMigrationStatusBase {
|
|
139
|
-
schemaVersion:
|
|
139
|
+
schemaVersion: 2;
|
|
140
140
|
migrationId: string;
|
|
141
141
|
migrationDigest: string;
|
|
142
142
|
migrationRevision: number;
|
|
@@ -5,7 +5,7 @@ export interface IStorageMigrationCanonicalDigestGoldenVector<TInput> {
|
|
|
5
5
|
sha256: string;
|
|
6
6
|
}
|
|
7
7
|
export declare const storageMigrationCanonicalDigestGoldenVectors: {
|
|
8
|
-
version:
|
|
8
|
+
version: 2;
|
|
9
9
|
targetRequest: {
|
|
10
10
|
input: {
|
|
11
11
|
readonly id: "object-data";
|
|
@@ -18,7 +18,7 @@ export declare const storageMigrationCanonicalDigestGoldenVectors: {
|
|
|
18
18
|
readonly reclaimPolicy: "retain";
|
|
19
19
|
readonly accessMode: "readWrite";
|
|
20
20
|
readonly delivery: {
|
|
21
|
-
readonly type: "environment";
|
|
21
|
+
readonly type: "launcher-environment";
|
|
22
22
|
readonly keys: {
|
|
23
23
|
readonly endpoint: "APP_S3_ENDPOINT";
|
|
24
24
|
readonly bucket: "APP_S3_BUCKET";
|