@xemahq/xema 0.25.1 → 0.27.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/README.md +70 -37
- package/dist/assets/appliance-base/images.lock.json +126 -126
- package/dist/assets/appliance-lean/images.lock.json +123 -123
- package/dist/assets/cloud/images.lock.json +126 -126
- package/dist/assets/core/images.lock.json +120 -120
- package/dist/assets/distribution-assets.manifest.json +15 -16
- package/dist/assets/minimal/images.lock.json +108 -108
- package/dist/assets/oss/images.lock.json +126 -126
- package/dist/assets/starter/images.lock.json +123 -123
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/dev.js +1 -0
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +7 -1
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/edition.d.ts +3 -0
- package/dist/commands/edition.d.ts.map +1 -0
- package/dist/commands/edition.js +46 -0
- package/dist/commands/edition.js.map +1 -0
- package/dist/commands/init.js +2 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/serve.js +1 -0
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/up.js +1 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/dev/env-defaults.d.ts.map +1 -1
- package/dist/dev/env-defaults.js +6 -1
- package/dist/dev/env-defaults.js.map +1 -1
- package/dist/dev/infra-preflight.d.ts +3 -2
- package/dist/dev/infra-preflight.d.ts.map +1 -1
- package/dist/dev/infra-preflight.js +18 -8
- package/dist/dev/infra-preflight.js.map +1 -1
- package/dist/edition/verify-image-evidence.bundle.mjs +54179 -0
- package/dist/edition/verify-image-evidence.bundle.provenance.json +2871 -0
- package/dist/runtime/backing-registration.d.ts.map +1 -1
- package/dist/runtime/backing-registration.js +7 -2
- package/dist/runtime/backing-registration.js.map +1 -1
- package/dist/runtime/config/schema.d.ts +1 -0
- package/dist/runtime/config/schema.d.ts.map +1 -1
- package/dist/runtime/custody/local-custody.d.ts +12 -0
- package/dist/runtime/custody/local-custody.d.ts.map +1 -0
- package/dist/runtime/custody/local-custody.js +22 -0
- package/dist/runtime/custody/local-custody.js.map +1 -0
- package/dist/runtime/custody/openbao-custody-bootstrap.d.ts +18 -0
- package/dist/runtime/custody/openbao-custody-bootstrap.d.ts.map +1 -0
- package/dist/runtime/custody/openbao-custody-bootstrap.js +50 -0
- package/dist/runtime/custody/openbao-custody-bootstrap.js.map +1 -0
- package/dist/runtime/custody/openbao-custody-store.d.ts +18 -0
- package/dist/runtime/custody/openbao-custody-store.d.ts.map +1 -0
- package/dist/runtime/custody/openbao-custody-store.js +55 -0
- package/dist/runtime/custody/openbao-custody-store.js.map +1 -0
- package/dist/runtime/custody/openbao-http-client.d.ts +34 -0
- package/dist/runtime/custody/openbao-http-client.d.ts.map +1 -0
- package/dist/runtime/custody/openbao-http-client.js +154 -0
- package/dist/runtime/custody/openbao-http-client.js.map +1 -0
- package/dist/runtime/custody/openbao-local-constants.d.ts +22 -0
- package/dist/runtime/custody/openbao-local-constants.d.ts.map +1 -0
- package/dist/runtime/custody/openbao-local-constants.js +48 -0
- package/dist/runtime/custody/openbao-local-constants.js.map +1 -0
- package/dist/runtime/custody/openbao-local-runner.d.ts +16 -0
- package/dist/runtime/custody/openbao-local-runner.d.ts.map +1 -0
- package/dist/runtime/custody/openbao-local-runner.js +86 -0
- package/dist/runtime/custody/openbao-local-runner.js.map +1 -0
- package/dist/runtime/edition/run-entry.d.ts +9 -0
- package/dist/runtime/edition/run-entry.d.ts.map +1 -0
- package/dist/runtime/edition/run-entry.js +36 -0
- package/dist/runtime/edition/run-entry.js.map +1 -0
- package/dist/runtime/edition/verb-map.d.ts +60 -0
- package/dist/runtime/edition/verb-map.d.ts.map +1 -0
- package/dist/runtime/edition/verb-map.js +146 -0
- package/dist/runtime/edition/verb-map.js.map +1 -0
- package/dist/runtime/env-seeder.d.ts +3 -0
- package/dist/runtime/env-seeder.d.ts.map +1 -1
- package/dist/runtime/env-seeder.js +20 -3
- package/dist/runtime/env-seeder.js.map +1 -1
- package/dist/runtime/launch.d.ts +3 -1
- package/dist/runtime/launch.d.ts.map +1 -1
- package/dist/runtime/launch.js +37 -8
- package/dist/runtime/launch.js.map +1 -1
- package/dist/runtime/paths.d.ts +1 -2
- package/dist/runtime/paths.d.ts.map +1 -1
- package/dist/runtime/paths.js +0 -10
- package/dist/runtime/paths.js.map +1 -1
- package/dist/runtime/runner/chart-local-provenance.d.ts +20 -0
- package/dist/runtime/runner/chart-local-provenance.d.ts.map +1 -0
- package/dist/runtime/runner/chart-local-provenance.js +114 -0
- package/dist/runtime/runner/chart-local-provenance.js.map +1 -0
- package/dist/runtime/runner/chart-preflight.d.ts +8 -8
- package/dist/runtime/runner/chart-preflight.d.ts.map +1 -1
- package/dist/runtime/runner/chart-preflight.js +30 -69
- package/dist/runtime/runner/chart-preflight.js.map +1 -1
- package/dist/runtime/runner/chart-pull.d.ts +14 -0
- package/dist/runtime/runner/chart-pull.d.ts.map +1 -0
- package/dist/runtime/runner/chart-pull.js +96 -0
- package/dist/runtime/runner/chart-pull.js.map +1 -0
- package/dist/runtime/runner/chart-resolver.d.ts +4 -12
- package/dist/runtime/runner/chart-resolver.d.ts.map +1 -1
- package/dist/runtime/runner/chart-resolver.js +16 -62
- package/dist/runtime/runner/chart-resolver.js.map +1 -1
- package/dist/runtime/runner/chart-set-lock.d.ts +6 -20
- package/dist/runtime/runner/chart-set-lock.d.ts.map +1 -1
- package/dist/runtime/runner/chart-set-lock.js +55 -99
- package/dist/runtime/runner/chart-set-lock.js.map +1 -1
- package/dist/runtime/runner/helm-cli.d.ts +3 -1
- package/dist/runtime/runner/helm-cli.d.ts.map +1 -1
- package/dist/runtime/runner/helm-cli.js +9 -7
- package/dist/runtime/runner/helm-cli.js.map +1 -1
- package/dist/runtime/runner/helm-runner.d.ts +4 -4
- package/dist/runtime/runner/helm-runner.d.ts.map +1 -1
- package/dist/runtime/runner/helm-runner.js +18 -16
- package/dist/runtime/runner/helm-runner.js.map +1 -1
- package/dist/runtime/sources/kinds/git.d.ts +1 -2
- package/dist/runtime/sources/kinds/git.d.ts.map +1 -1
- package/dist/runtime/sources/kinds/git.js +8 -5
- package/dist/runtime/sources/kinds/git.js.map +1 -1
- package/dist/runtime/sources/manifest-walk.d.ts +3 -1
- package/dist/runtime/sources/manifest-walk.d.ts.map +1 -1
- package/dist/runtime/sources/manifest-walk.js +8 -3
- package/dist/runtime/sources/manifest-walk.js.map +1 -1
- package/dist/runtime/sources/schema.d.ts +3 -0
- package/dist/runtime/sources/schema.d.ts.map +1 -1
- package/dist/runtime/sources/schema.js +6 -1
- package/dist/runtime/sources/schema.js.map +1 -1
- package/dist/runtime/supervisor.d.ts +3 -0
- package/dist/runtime/supervisor.d.ts.map +1 -1
- package/dist/runtime/supervisor.js +2 -0
- package/dist/runtime/supervisor.js.map +1 -1
- package/edition/README.md +315 -0
- package/edition/assemble-producer-input.mjs +1251 -0
- package/edition/authorization-base.mjs +347 -0
- package/edition/biome-content.mjs +268 -0
- package/edition/build-biome-index.mjs +175 -0
- package/edition/build-platform-service-index.mjs +288 -0
- package/edition/build-runtime-image-source-index.mjs +821 -0
- package/edition/built-verifier.mjs +55 -0
- package/edition/catalogue-edition.mjs +49 -0
- package/edition/catalogue-fetch.mjs +64 -0
- package/edition/catalogue.mjs +135 -0
- package/edition/chart-set-source-commit.mjs +92 -0
- package/edition/check-committed-image-evidence.mjs +383 -0
- package/edition/checkout-indexed-source-repositories.mjs +105 -0
- package/edition/comment-blanker.mjs +75 -0
- package/edition/connector-source-authority.mjs +60 -0
- package/edition/customer-definition.mjs +183 -0
- package/edition/customer-flags.mjs +7 -0
- package/edition/develop-customer-edition.mjs +99 -0
- package/edition/develop-edition-resolve.mjs +65 -0
- package/edition/develop-edition.mjs +274 -0
- package/edition/develop-freeze.mjs +173 -0
- package/edition/develop-image-coordinate.mjs +54 -0
- package/edition/develop-seal.mjs +77 -0
- package/edition/develop-snapshot-inputs.mjs +104 -0
- package/edition/dist-check.mjs +986 -0
- package/edition/distribution-evidence-set.mjs +987 -0
- package/edition/distribution-paths.mjs +191 -0
- package/edition/edition-artifact.mjs +270 -0
- package/edition/edition-biome-manifests.mjs +85 -0
- package/edition/edition-channel.mjs +6 -0
- package/edition/edition-chart-set.mjs +93 -0
- package/edition/edition-config.mjs +207 -0
- package/edition/edition-constants.mjs +57 -0
- package/edition/edition-contract.json +23 -0
- package/edition/edition-list.mjs +35 -0
- package/edition/edition-locks.mjs +69 -0
- package/edition/edition-protocol.mjs +228 -0
- package/edition/edition-workspace.mjs +176 -0
- package/edition/evidence-checkout.mjs +418 -0
- package/edition/evidence-grammars.mjs +16 -0
- package/edition/evidence-trust-pin.mjs +304 -0
- package/edition/evidence-trust-policy.mjs +256 -0
- package/edition/external-source-walk.mjs +463 -0
- package/edition/first-party-source-ids.mjs +59 -0
- package/edition/fleet-coordinate-finality.mjs +350 -0
- package/edition/git-source-auth.mjs +52 -0
- package/edition/image-evidence-replay-state.mjs +242 -0
- package/edition/image-evidence.mjs +1225 -0
- package/edition/kernel-contract-authority.mjs +443 -0
- package/edition/lib.mjs +3018 -0
- package/edition/no-follow-file.mjs +94 -0
- package/edition/oci-evidence-verbs.mjs +392 -0
- package/edition/oci-image-source-evidence.mjs +239 -0
- package/edition/oras.mjs +648 -0
- package/edition/pin-source.mjs +227 -0
- package/edition/plan-image-evidence-refresh.mjs +408 -0
- package/edition/platform-lock-readability.mjs +892 -0
- package/edition/platform-service-class.mjs +18 -0
- package/edition/platform-service-source-authority.mjs +105 -0
- package/edition/positive-closure.mjs +162 -0
- package/edition/produce-distribution-completeness-evidence.mjs +311 -0
- package/edition/produce-image-delivery-entitlement-evidence.mjs +294 -0
- package/edition/produce-image-source-evidence.mjs +765 -0
- package/edition/producer-evidence-bundle.mjs +157 -0
- package/edition/registry-credentials.mjs +193 -0
- package/edition/release-catalogue.mjs +39 -0
- package/edition/release-channel-guard.mjs +99 -0
- package/edition/release-edition-artifact.mjs +158 -0
- package/edition/remedy-command.mjs +89 -0
- package/edition/repin-evidence-trust.mjs +101 -0
- package/edition/required-resource-provider.mjs +58 -0
- package/edition/resolve-chart-set.mjs +415 -0
- package/edition/resolve-customer-edition.mjs +288 -0
- package/edition/resolve-distribution.mjs +2318 -0
- package/edition/resolve-edition.mjs +186 -0
- package/edition/resolve-images.mjs +1606 -0
- package/edition/seal-image-digests.mjs +855 -0
- package/edition/sealed-evidence-accept.mjs +82 -0
- package/edition/source-authority.mjs +725 -0
- package/edition/source-closure.mjs +116 -0
- package/edition/strict-json.mjs +121 -0
- package/edition/string-order.mjs +5 -0
- package/edition/trust-policy-arming.mjs +120 -0
- package/edition/trusted-executable.mjs +166 -0
- package/edition/verifier-binding.mjs +45 -0
- package/edition/verifier-files.mjs +8 -0
- package/edition/verifier-kernel-schemas.mjs +22 -0
- package/edition/verifier-provenance.mjs +64 -0
- package/edition/verify-image-evidence.mjs +430 -0
- package/edition/verify-image-platforms.mjs +495 -0
- package/edition/why.mjs +56 -0
- package/edition/workspace-sections.mjs +195 -0
- package/examples/06-biome-sources.yaml +1 -0
- package/package.json +18 -7
- package/dist/commands/dist.d.ts +0 -16
- package/dist/commands/dist.d.ts.map +0 -1
- package/dist/commands/dist.js +0 -182
- package/dist/commands/dist.js.map +0 -1
- package/dist/runtime/distribution/available-biome.d.ts +0 -10
- package/dist/runtime/distribution/available-biome.d.ts.map +0 -1
- package/dist/runtime/distribution/available-biome.js +0 -154
- package/dist/runtime/distribution/available-biome.js.map +0 -1
- package/dist/runtime/distribution/compose.d.ts +0 -23
- package/dist/runtime/distribution/compose.d.ts.map +0 -1
- package/dist/runtime/distribution/compose.js +0 -48
- package/dist/runtime/distribution/compose.js.map +0 -1
- package/dist/runtime/runner/chart-trust.d.ts +0 -57
- package/dist/runtime/runner/chart-trust.d.ts.map +0 -1
- package/dist/runtime/runner/chart-trust.js +0 -270
- package/dist/runtime/runner/chart-trust.js.map +0 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.walkBiomeManifests = walkBiomeManifests;
|
|
4
|
+
exports.localSourceManifestHash = localSourceManifestHash;
|
|
4
5
|
const node_crypto_1 = require("node:crypto");
|
|
5
6
|
const node_fs_1 = require("node:fs");
|
|
6
7
|
const node_path_1 = require("node:path");
|
|
7
8
|
const biome_1 = require("@xemahq/contracts/biome");
|
|
9
|
+
const distribution_1 = require("@xemahq/contracts/distribution");
|
|
8
10
|
const SKIP_DIRS = new Set([
|
|
9
11
|
'node_modules',
|
|
10
12
|
'.git',
|
|
@@ -48,6 +50,11 @@ function visit(dir, root, out) {
|
|
|
48
50
|
visit((0, node_path_1.join)(dir, entry.name), root, out);
|
|
49
51
|
}
|
|
50
52
|
}
|
|
53
|
+
function localSourceManifestHash(raw) {
|
|
54
|
+
return (0, distribution_1.parseBiomeSourceManifestHash)((0, node_crypto_1.createHash)('sha256')
|
|
55
|
+
.update(`${JSON.stringify(raw, null, 2)}\n`)
|
|
56
|
+
.digest('hex'));
|
|
57
|
+
}
|
|
51
58
|
function projectManifest(manifestPath, root) {
|
|
52
59
|
const biomeAbsDir = manifestPath.slice(0, -(biome_1.BIOME_MANIFEST_FILENAME.length + 1));
|
|
53
60
|
let manifest;
|
|
@@ -55,9 +62,7 @@ function projectManifest(manifestPath, root) {
|
|
|
55
62
|
try {
|
|
56
63
|
const raw = JSON.parse((0, node_fs_1.readFileSync)(manifestPath, 'utf8'));
|
|
57
64
|
manifest = (0, biome_1.parseBiomeManifest)(raw);
|
|
58
|
-
sourceManifestHash = (
|
|
59
|
-
.update(`${JSON.stringify(raw, null, 2)}\n`)
|
|
60
|
-
.digest('hex');
|
|
65
|
+
sourceManifestHash = localSourceManifestHash(raw);
|
|
61
66
|
}
|
|
62
67
|
catch (err) {
|
|
63
68
|
const message = err instanceof Error ? err.message : String(err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-walk.js","sourceRoot":"","sources":["../../../src/runtime/sources/manifest-walk.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"manifest-walk.js","sourceRoot":"","sources":["../../../src/runtime/sources/manifest-walk.ts"],"names":[],"mappings":";;AA6GA,gDASC;AA8BD,0DAMC;AA1JD,6CAAyC;AACzC,qCAA6E;AAC7E,yCAA2C;AAE3C,mDAQiC;AACjC,iEAGwC;AA2BxC,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACxB,cAAc;IACd,MAAM;IACN,MAAM;IACN,OAAO;IACP,QAAQ;IACR,UAAU;IACV,OAAO;IACP,QAAQ;IACR,WAAW;IACX,UAAU;IACV,cAAc;IACd,WAAW;CACZ,CAAC,CAAC;AAqDH,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,IAAI,CAAC,IAAA,oBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,4CAA4C,IAAI,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,MAAM,MAAM,GAAsB,EAAE,CAAC;IACrC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAE1B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAChD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1B,CAAC;AAED,SAAS,KAAK,CAAC,GAAW,EAAE,IAAY,EAAE,GAAsB;IAC9D,MAAM,YAAY,GAAG,IAAA,gBAAI,EAAC,GAAG,EAAE,+BAAuB,CAAC,CAAC;IACxD,IAAI,IAAA,oBAAU,EAAC,YAAY,CAAC,EAAE,CAAC;QAC7B,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;QAC9C,OAAO;IACT,CAAC;IACD,IAAI,OA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 @@ export declare const GitSourceSchema: z.ZodObject<{
|
|
|
39
39
|
url: z.ZodString;
|
|
40
40
|
ref: z.ZodOptional<z.ZodString>;
|
|
41
41
|
authTokenEnv: z.ZodOptional<z.ZodString>;
|
|
42
|
+
authUsername: z.ZodOptional<z.ZodString>;
|
|
42
43
|
name: z.ZodString;
|
|
43
44
|
}, z.core.$strict>;
|
|
44
45
|
export type GitSource = z.infer<typeof GitSourceSchema>;
|
|
@@ -67,6 +68,7 @@ export declare const SourceSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
67
68
|
url: z.ZodString;
|
|
68
69
|
ref: z.ZodOptional<z.ZodString>;
|
|
69
70
|
authTokenEnv: z.ZodOptional<z.ZodString>;
|
|
71
|
+
authUsername: z.ZodOptional<z.ZodString>;
|
|
70
72
|
name: z.ZodString;
|
|
71
73
|
}, z.core.$strict>], "kind">;
|
|
72
74
|
export type SourceSpec = z.infer<typeof SourceSpecSchema>;
|
|
@@ -95,6 +97,7 @@ export declare const SourcesConfigSchema: z.ZodDefault<z.ZodArray<z.ZodDiscrimin
|
|
|
95
97
|
url: z.ZodString;
|
|
96
98
|
ref: z.ZodOptional<z.ZodString>;
|
|
97
99
|
authTokenEnv: z.ZodOptional<z.ZodString>;
|
|
100
|
+
authUsername: z.ZodOptional<z.ZodString>;
|
|
98
101
|
name: z.ZodString;
|
|
99
102
|
}, z.core.$strict>], "kind">>>;
|
|
100
103
|
export type SourcesConfig = z.infer<typeof SourcesConfigSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/runtime/sources/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,oBAAY,UAAU;IAEpB,SAAS,cAAc;IAEvB,YAAY,iBAAiB;IAE7B,GAAG,QAAQ;IAEX,GAAG,QAAQ;IAEX,GAAG,QAAQ;CACZ;AA8BD,eAAO,MAAM,q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CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAQxD,eAAO,MAAM,eAAe;;;;;;;kBAcxB,CAAC;AACL,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAM3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAQ1D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAAwC,CAAC;AACzE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -76,8 +76,13 @@ exports.GitSourceSchema = zod_1.z
|
|
|
76
76
|
url: CredentialFreeGitUrlSchema,
|
|
77
77
|
ref: zod_1.z.string().min(1).optional(),
|
|
78
78
|
authTokenEnv: zod_1.z.string().min(1).optional(),
|
|
79
|
+
authUsername: zod_1.z.string().regex(/^[^\s:]+$/, 'authUsername must be non-empty without whitespace or ":"').optional(),
|
|
79
80
|
})
|
|
80
|
-
.strict()
|
|
81
|
+
.strict()
|
|
82
|
+
.refine((source) => (source.authTokenEnv === undefined) === (source.authUsername === undefined), {
|
|
83
|
+
message: 'a git source declares authTokenEnv and authUsername together, or neither',
|
|
84
|
+
path: ['authUsername'],
|
|
85
|
+
});
|
|
81
86
|
exports.SourceSpecSchema = zod_1.z.discriminatedUnion('kind', [
|
|
82
87
|
exports.WorkspaceSourceSchema,
|
|
83
88
|
exports.DistributionSourceSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/runtime/sources/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAyBxB,IAAY,UAWX;AAXD,WAAY,UAAU;IAEpB,qCAAuB,CAAA;IAEvB,2CAA6B,CAAA;IA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AAC,MAAM,CAAC,MAAM,GAAG,CAAC;QACxB,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EACtB,CAAC;QACD,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,OAAO,EACL,wFAAwF;SAC3F,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,SAAS,8BAA8B,CACrC,KAAa,EACb,GAAoB;IAEpB,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACtE,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,OAAO,EACL,0FAA0F;SAC7F,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IACD,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/B,yBAAyB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACxC,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { XemaConfig, Substrate } from './config/schema';
|
|
2
|
+
import type { LocalCustodyBinding } from './custody/local-custody';
|
|
2
3
|
import type { InfraPlan } from './infra/infra-plan';
|
|
3
4
|
import type { RosterEntry } from './roster';
|
|
4
5
|
import type { RunningService, ServiceRunner } from './runner/service-runner';
|
|
@@ -14,6 +15,7 @@ export interface SupervisorOptions {
|
|
|
14
15
|
readonly substrate: Substrate;
|
|
15
16
|
readonly ports: ReadonlyMap<string, number>;
|
|
16
17
|
readonly distributionLockPath: string;
|
|
18
|
+
readonly distributionLockSha256: string;
|
|
17
19
|
readonly installationId: string;
|
|
18
20
|
readonly planHash: string;
|
|
19
21
|
readonly executionId: string;
|
|
@@ -22,6 +24,7 @@ export interface SupervisorOptions {
|
|
|
22
24
|
readonly graceMs?: number;
|
|
23
25
|
readonly secrets?: ResolvedSecrets;
|
|
24
26
|
readonly managedCredentials?: LocalInfrastructureCredentials;
|
|
27
|
+
readonly custody?: LocalCustodyBinding;
|
|
25
28
|
readonly onEvent?: (event: LifecycleEvent) => void;
|
|
26
29
|
}
|
|
27
30
|
export interface LifecycleEvent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../../src/runtime/supervisor.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAUpC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE5C,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../../src/runtime/supervisor.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAA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AO,IAAI,OAAO,CAAC,aAAa,CAAC;YAuHzB,WAAW;IAwCnB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAwC/B,OAAO,CAAC,iBAAiB;YAgBX,oBAAoB;IAUlC,OAAO,CAAC,uBAAuB;IAQ/B,IAAI,OAAO,IAAI,SAAS,cAAc,EAAE,CAEvC;IAED,OAAO,CAAC,IAAI;CAGb;AAED,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,SAAS,cAAc,EAAE,EACnC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,SAAS,sBAAsB,EAAE,CAAC,CAU5C"}
|
|
@@ -23,12 +23,14 @@ class Supervisor {
|
|
|
23
23
|
roster: opts.roster,
|
|
24
24
|
substrate: opts.substrate,
|
|
25
25
|
distributionLockPath: opts.distributionLockPath,
|
|
26
|
+
distributionLockSha256: opts.distributionLockSha256,
|
|
26
27
|
ports: opts.ports,
|
|
27
28
|
installationId: opts.installationId,
|
|
28
29
|
...(opts.secrets !== undefined ? { secrets: opts.secrets } : {}),
|
|
29
30
|
...(opts.managedCredentials !== undefined
|
|
30
31
|
? { managedCredentials: opts.managedCredentials }
|
|
31
32
|
: {}),
|
|
33
|
+
...(opts.custody !== undefined ? { custody: opts.custody } : {}),
|
|
32
34
|
...(opts.containerPort !== undefined
|
|
33
35
|
? { containerPort: opts.containerPort }
|
|
34
36
|
: {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor.js","sourceRoot":"","sources":["../../src/runtime/supervisor.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"supervisor.js","sourceRoot":"","sources":["../../src/runtime/supervisor.ts"],"names":[],"mappings":";;;AAiWA,wDAaC;AA9WD,6CAAuC;AACvC,iDAMwB;AACxB,wDAA4D;AAuE5D,MAAM,oBAAoB,GAAG,MAAM,CAAC;AACpC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,cAAc,GAAG,QAAQ,CAAC;AAEh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,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
# edition library
|
|
2
|
+
|
|
3
|
+
Resolves, checks, seals and develop-snapshots an edition: a named, positive set
|
|
4
|
+
of biomes and platform services, from its definition (`<id>/xema-distribution.json`)
|
|
5
|
+
to its locks (`distribution`, `authorization`, `images`, `chart-set`). Plain ESM
|
|
6
|
+
`.mjs`, run with `node`; tests run with `node --test`.
|
|
7
|
+
|
|
8
|
+
The library derives nothing from where it sits. Every directory is stated by the
|
|
9
|
+
caller, once, and a root that was not stated throws, naming its flag. There are
|
|
10
|
+
no defaults.
|
|
11
|
+
|
|
12
|
+
## Roots
|
|
13
|
+
|
|
14
|
+
| Flag | Meaning |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| `--data-root` | catalogue indices (`biome-index.json`, `platform-service-index.json`, `runtime-image-source-index.json`), `chart-set.lock.json`, and `edition-workspace.json` |
|
|
17
|
+
| `--editions-root` | the `<edition-id>/` definitions and locks |
|
|
18
|
+
| `--sources-root` | source checkouts at `repos/<r>` and `submodules/<r>` |
|
|
19
|
+
| `--kernel` | the BUILT `kernel-contracts` package directory |
|
|
20
|
+
| `--deploy-root` | the `xema-deploy` checkout |
|
|
21
|
+
| `--cache-dir` | a writable directory for fetched artifacts |
|
|
22
|
+
| `--source-hash` | the BUILT `@xemahq/distribution-source-hash` package directory (`packages/sdks/distribution-source-hash` of `xema-runtime-core`, after its build). Required by the entries that resolve, build, index or seal; the evidence verifier never reads it. The CLI ships without the package (a devDependency for its tests only). On first load its algorithm ids are held identical to the kernel's `ImageSourceHashAlgorithm`. |
|
|
23
|
+
|
|
24
|
+
## Entry scripts
|
|
25
|
+
|
|
26
|
+
Each takes the roots below plus its own arguments (`--check`, an edition id, ...).
|
|
27
|
+
|
|
28
|
+
| Script | Roots |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `resolve-distribution.mjs` | data, editions, sources, kernel, source-hash |
|
|
31
|
+
| `resolve-images.mjs` | data, editions, sources, kernel, cache, source-hash |
|
|
32
|
+
| `resolve-chart-set.mjs` | data, editions, deploy, kernel |
|
|
33
|
+
| `edition-biome-manifests.mjs` | data, editions, sources, source-hash, kernel |
|
|
34
|
+
| `seal-image-digests.mjs` | data, editions, kernel, source-hash |
|
|
35
|
+
| `verify-image-platforms.mjs` | data, editions, kernel |
|
|
36
|
+
| `dist-check.mjs` | data, editions, sources, kernel, deploy, cache, source-hash |
|
|
37
|
+
| `develop-edition.mjs` | data, editions, sources, kernel, deploy, cache, source-hash |
|
|
38
|
+
| `release-edition-artifact.mjs` (`xema edition artifact`) | data, editions, kernel |
|
|
39
|
+
| `build-biome-index.mjs`, `build-platform-service-index.mjs`, `build-runtime-image-source-index.mjs` | data, sources, kernel, source-hash |
|
|
40
|
+
| `checkout-indexed-source-repositories.mjs` | data, sources |
|
|
41
|
+
| `why.mjs` | editions, kernel |
|
|
42
|
+
| `repin-evidence-trust.mjs` | data, kernel |
|
|
43
|
+
| `verify-image-evidence.mjs` (run as the BUILT bundle, `xema edition verify-evidence`) | data, editions, kernel |
|
|
44
|
+
|
|
45
|
+
## `<data-root>/edition-workspace.json`
|
|
46
|
+
|
|
47
|
+
The deployment's coordinates, so the library names no organisation or registry.
|
|
48
|
+
Read strictly: every key is required, an unknown key or a duplicate key is refused.
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"schemaVersion": 1,
|
|
53
|
+
"imageRegistry": "registry.example.com/acme",
|
|
54
|
+
"chartRegistry": "oci://registry.example.com/acme/charts",
|
|
55
|
+
"chartPublishers": [{ "index": "<chart-set-index-name>", "repo": "<owner>/<repo>" }],
|
|
56
|
+
"sourceRepositoryUrlPrefix": "https://git.example.com/acme/",
|
|
57
|
+
"sourceAuthUsername": "x-access-token",
|
|
58
|
+
"evidenceTrustPolicy": { "required": true, "policy": "image-evidence-trust-policy.json", "pin": "image-evidence-trust-policy.pin.json" }
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- `imageRegistry`: `<host>/<namespace>`, where first-party images are addressed (`<imageRegistry>/<subject-id>`).
|
|
63
|
+
- `chartRegistry`: `oci://<host>/<path>`, where chart-set indexes and charts are published.
|
|
64
|
+
- `chartPublishers`: the chart-set indexes the pin covers; `repo` is recorded in `chart-set.lock.json`.
|
|
65
|
+
- `sourceRepositoryUrlPrefix`: `https://<host>/<organisation>/`, the prefix every first-party `repositoryUrl` must equal (with `<repo>.git`).
|
|
66
|
+
- `sourceAuthUsername`: the non-empty git username first-party source tokens authenticate as (GitHub: `x-access-token`; other forges differ). Required, no default.
|
|
67
|
+
- `evidenceTrustPolicy` (mandatory): `{required: boolean}`, or `{required, policy, pin}` with `policy` and `pin` two data-root-relative POSIX paths (no `..`, regular no-follow files). `required` has no default. `required: true` with no policy is refused by `xema edition check` (`EvidenceTrustRequiredError`); `required: false` with no policy passes and prints NOT ARMED; a declared policy is enforced whether or not it is required. See below.
|
|
68
|
+
|
|
69
|
+
## Operating notes
|
|
70
|
+
|
|
71
|
+
- **Release order (edition protocol coupling).** The CLI is coupled to the kernel's edition protocol, not to the whole kernel package. `@xemahq/contracts` exports the protocol identity as data (`dist/edition-protocol/edition-protocol.json`: `{contentDigest, version}`, the kernel contract authority digest over every kernel source file the protocol's entry subpaths load at runtime, derived from the import graph; `edition-contract.schema.json` states that identity, the entry subpaths and the source paths). `edition-protocol.mjs` declares the versions this CLI supports, each pinned to one digest and vendored under `vendored/`; the library loads no kernel subpath outside the vendored entry subpaths (`edition-protocol.test.mjs`). Every loader that executes the `--kernel`, `xema edition check` first, and the evidence verifier compare only that identity, and refuse an unsupported one naming the versions this CLI supports and the version the kernel declares. The digest is a CONSERVATIVE, deterministic stand-in for protocol semantics. Any change to accepted or refused edition semantics MUST change it; a behaviour-preserving refactor MAY change it too, and the cost is a repin, which is accepted. Semantic equivalence isn't computable, so it is never detected. A kernel change outside the protocol's source files needs no CLI release. An edition protocol change does: the CLI release that supports it goes FIRST; only then does the data root repin its kernel authority to a kernel that speaks it.
|
|
72
|
+
- **`xema edition resolve <id> --trusted-write-v3`** writes the lock set, and the flag is the operator's explicit acknowledgement that the images lock is rewritten unsealed (`xema edition seal` writes the digests afterwards). **`xema edition resolve <id> --check`** writes nothing committed (it resolves into a scratch copy) and compares like with like: the resolve timestamp is ignored and the committed images lock is read without its sealed `imageDigest`s, so a sealed lock is not drift.
|
|
73
|
+
- **Git credentials.** `git-source-auth.mjs` is the one place a token becomes git authentication (Basic `<username>:<token>`, `GIT_CONFIG_*`, never argv; the username is a required declared argument with no default: `sourceAuthUsername` for first-party sources, and for a customer git source its own `authUsername`, which the kernel's `GitBiomeSourceSchema` requires whenever `authTokenEnv` is set and refuses without it). The header is scoped to the origin of the URL it is for: `sourceRepositoryUrlPrefix` for first-party sources, a customer source's own `url`. A token that cannot be applied (an `authTokenEnv` that is unset, or a URL that is not https with a host) is refused; there is no ambient-credential fallback. The CLI's runtime has its own TypeScript implementation (`src/runtime/sources/kinds/git.ts`) of the same shape, because this library is plain ESM that cannot import compiled TypeScript.
|
|
74
|
+
- **Edition artifacts (one layout for develop and release).** An edition is an OCI artifact at `<registry>/xema-edition-<id>`, addressed by DIGEST, with artifactType `application/vnd.xema.edition.v1+json` and titled layers (`org.opencontainers.image.title` = file name): `xema-edition.json` (the descriptor) plus `distribution.lock.json`, `images.lock.json`, `authorization.lock.json` and the chart-set lock. `--registry` is the caller's namespace only (`registry.example.com/acme`); the CLI appends `xema-edition-<id>` itself and refuses a registry whose last segment already starts with `xema-edition-` or is the retired develop-only segment. Tags are for humans only: develop `<snapshot hash>`, release `<coordinate>`. The CLI writes the files to a scratch directory and prints the target; the workflow does `oras push` and `cosign sign` on the digest. Develop: `xema edition develop resolve <id> --pins <file> --out <dir> --registry <ns> --engine-image <repo>@sha256:<digest> [--local]`. Release: `xema edition artifact <id> --channel release --registry <ns> --coordinate <tag> --engine-image <repo>@sha256:<digest> --out <dir> [--local]`, written from the committed locks and refused when the images lock is not sealed.
|
|
75
|
+
- **The descriptor** (`xema.edition/v1`, strict parse, no other key): `{schema, distributionId, locks[], provenance: {channel: "develop" | "release", pins, workflow: {repository, runId}}, evidenceTrustPolicy: "armed" | "not-armed", engine: {image: "<repository>@sha256:<64 hex>"}}`. `engine.image` is required, digest form only, filled from `--engine-image` (the producer workflow resolves the engine tag with oras; the CLI never resolves tags). `evidenceTrustPolicy` records `armed` when the data root declares a policy and it is armed, `not-armed` otherwise. A release edition's `provenance.pins` is empty (its sources are recorded in its locks). Admission rests on the cosign signature of the manifest digest: readers never branch on `provenance.channel`, and no tool refuses an edition for a channel label, schema name or file name.
|
|
76
|
+
- **Contract.** `edition-contract.json` (`xema.edition-contract/v1`) holds the artifactType, the repository prefix, the descriptor file and schema, the lock list and the develop image namespace segment; it ships in the package and xema-deploy vendors it byte for byte.
|
|
77
|
+
- **Chart set.** ONE `chart-set.lock.json` (rostered, `schemaVersion: 3`: `publishers[]` with each chart's version and registry manifest digest) serves both channels. A develop edition pins the charts xema-deploy publishes as OCI for the frozen deploy SHA, at version `0.0.0-dev.<first 12 hex of the SHA>` (also the OCI tag). Each producer validates the chart coordinates of its own channel: a release chart set accepts only `-h<16 hex>` versions, a develop one only `-dev.<12 hex>`; a develop chart-set lock copied into a release is refused by `assertReleaseContent`, and `0.0.0-dev.*` index tags are never release candidates; the resolver reads each chart's manifest digest from the chart registry, exactly as a release does, and the lock lists only the publisher whose repository is the deploy pin role's. The CLI computes no chart content digest.
|
|
78
|
+
- **Release lock set.** `assertReleaseEditionTree` checks that the companion chart-set lock is PRESENT beside the distribution and authorization locks. It does not bind the set by a digest, and is not described as hash-bound.
|
|
79
|
+
|
|
80
|
+
## Evidence trust
|
|
81
|
+
|
|
82
|
+
The descriptor's `evidenceTrustPolicy` has exactly two states, and sealing fails closed (also documented in `edition-contract.json` under `evidenceTrust`, which xema-deploy vendors):
|
|
83
|
+
|
|
84
|
+
- `armed`: the data root declares a policy, the policy hashes to its data-root pin, this CLI's verifier is the pinned one, and the policy is ARMED on the channel of the edition.
|
|
85
|
+
- `not-armed`: for a release edition, exactly `required: false` and no policy armed on the release channel; for a develop edition, a policy that is not armed on the develop channel, whatever `required` says.
|
|
86
|
+
|
|
87
|
+
Arming is judged for ONE channel, the channel of the edition being checked, sealed or written: a channel is ARMED when the policy authorizes a signer for each of the three predicates on that channel and pins the cosign and the git binary. The signers of the other channel count for nothing, so a policy with release signers only is ARMED for a release edition. The develop channel admits not-armed: a develop edition is written when its channel has no signer, and prints one line on stderr (`develop channel: trust policy not armed, evidence is not signature-verified`). A verification of signed develop evidence is satisfied by develop signers only.
|
|
88
|
+
|
|
89
|
+
`required: true` while the policy is not armed on the release channel (none declared, or declared but UNARMED or PARTIALLY ARMED there) REFUSES `xema edition check`, sealing a release edition and writing a release artifact, with `EvidenceTrustRequiredError`, code `EVIDENCE_TRUST_REQUIRED_UNARMED`; `not-armed` is never recorded for a release edition of a `required: true` data root. A data root with `required: true` and no declared policy, and a channel that is PARTIALLY ARMED, are refused on either channel. Both `artifact` and `develop resolve` (and `develop check-existing`) hold the policy to its pin and the verifier to the pinned one before recording a state: a policy edited after pinning or a drifted verifier is refused.
|
|
90
|
+
|
|
91
|
+
`xema edition check` runs one evidence-trust gate. With `required: true` and no policy it refuses (`EvidenceTrustRequiredError`). With `required: false` and no policy it prints
|
|
92
|
+
`image-evidence trust policy: NOT ARMED` and passes, but refuses a data root that holds an
|
|
93
|
+
undeclared policy (a top-level `*.json` the kernel parses as an offline trust policy, or a
|
|
94
|
+
`trust/` directory). With one declared it parses the policy with the kernel schema, checks the
|
|
95
|
+
Sigstore trusted root the policy itself names (`trustedRootPath`, resolved against the data root,
|
|
96
|
+
and `trustedRootDigest`), checks the pin file, and classifies the authority configuration of each channel: no
|
|
97
|
+
signer on the channel is UNARMED (on the release channel it passes only when `required: false`, and delivery stays
|
|
98
|
+
fail-closed; on the develop channel it passes with the not-armed line), mixed is PARTIAL (refused on either channel, with
|
|
99
|
+
what is unmet), complete is ARMED.
|
|
100
|
+
|
|
101
|
+
The pin file (strict JSON, exact keys) is reviewed data:
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{ "schemaVersion": 2,
|
|
105
|
+
"policyDigest": "sha256:<canonical-json digest of the parsed policy>",
|
|
106
|
+
"verifier": { "bundleDigest": "sha256:<bytes>", "provenanceDigest": "sha256:<bytes>" },
|
|
107
|
+
"kernelContractAuthority": { "sourceCommit": "<40 hex>", "digest": "sha256:<canonical-json digest of the whole authority>" },
|
|
108
|
+
"trustedOrasBinaryDigests": ["sha256:<bytes of an oras binary>"] }
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`xema edition repin-evidence-trust [--trusted-oras-digest sha256:<64 hex>]…` writes it from the
|
|
112
|
+
declared policy, THIS CLI's built verifier and the kernel contract authority the data root's
|
|
113
|
+
`runtime-image-source-index.json` states. A drifted policy or a verifier that is not the pinned
|
|
114
|
+
one is refused by the check, and a missing built bundle is refused, never skipped.
|
|
115
|
+
|
|
116
|
+
- **Kernel contract authority.** Evidence is held to the authority the PIN records. The index
|
|
117
|
+
states it; an index that states another authority is refused
|
|
118
|
+
(`KERNEL_CONTRACT_AUTHORITY_NOT_PINNED_ONE`), and a data root that declares no evidence trust
|
|
119
|
+
has no authority to hold evidence to (`KERNEL_CONTRACT_AUTHORITY_UNPINNED`): no evidence verb
|
|
120
|
+
runs there. The verifier checks the same pin before it reads a statement.
|
|
121
|
+
- **oras is a trusted executable.** On a data root that declares evidence trust, the `oras`
|
|
122
|
+
binary (`XEMA_ORAS_BIN`, else the first on `PATH`, symbolic links resolved) must hash to one of
|
|
123
|
+
`trustedOrasBinaryDigests`; a private copy of exactly those bytes is what runs, re-checked on
|
|
124
|
+
every use. Without the flag a re-pin keeps the reviewed list; a first pin requires it. A data
|
|
125
|
+
root that declares no evidence trust has no pin: there oras is held to its version only, and
|
|
126
|
+
the run says so. oras always runs under a scrubbed environment (`HOME` an empty temporary
|
|
127
|
+
directory, `PATH=/usr/bin:/bin`, `LANG`, `LC_ALL`, `TZ`).
|
|
128
|
+
- **Known limits of the registry reader.** (1) A registry whose Bearer token realm is on another
|
|
129
|
+
host than the registry itself is refused with the coded error
|
|
130
|
+
`REGISTRY_TOKEN_REALM_CROSS_HOST` (`RegistryTokenRealmError`), so the pull credential is never
|
|
131
|
+
sent to a third host. Customer registries that delegate tokens to a separate auth host (for
|
|
132
|
+
example Docker Hub, or a Harbor or GitLab registry with an external token service) cannot be
|
|
133
|
+
read; there is no setting that allows it. (2) Because the environment is scrubbed, a proxy or
|
|
134
|
+
a private CA stated only in environment variables (`HTTPS_PROXY`, `SSL_CERT_FILE`) does not
|
|
135
|
+
reach oras.
|
|
136
|
+
- **Registry status.** A registry status (404, 401, 403, …) is read only from oras's own error
|
|
137
|
+
line; any other failure of the run is undecided and is thrown, never read as "absent".
|
|
138
|
+
|
|
139
|
+
### Why the verifier can be trusted (the binding)
|
|
140
|
+
|
|
141
|
+
The code under review must be the code that runs. The verifier is ONE file, the bundle
|
|
142
|
+
`dist/edition/verify-image-evidence.bundle.mjs`, built at CLI build time (`scripts/build-evidence-verifier.mjs`,
|
|
143
|
+
exact-pinned esbuild) from the CLI's own sources and its locked `@xemahq/contracts` and `zod`.
|
|
144
|
+
It ships in the npm tarball, which is immutable and integrity-addressed, so anyone can recompute
|
|
145
|
+
its digest from `@xemahq/xema@<version>`; `...bundle.provenance.json` lists every bundled input as
|
|
146
|
+
`{package, version, path in that package, sha256}` and is deterministic (building twice gives
|
|
147
|
+
identical bytes). The reviewed data root PINS the bundle's and the provenance's digests, so
|
|
148
|
+
changing the verifier needs a reviewed data-root commit. At run (`xema edition verify-evidence`,
|
|
149
|
+
which launches the built bundle with a reduced environment) the bundle refuses unless:
|
|
150
|
+
|
|
151
|
+
1. its own file (realpath of `argv[1]`) and its provenance hash to the data-root pin;
|
|
152
|
+
2. its install path and every ancestor are not group/world writable nor foreign-owned;
|
|
153
|
+
3. the environment carries no `NODE_OPTIONS`, `NODE_PATH`, `DYLD_*`, `LD_*`, `GIT_*`;
|
|
154
|
+
4. the `--kernel` it is given (the built kernel `xema edition check` proves against the authority
|
|
155
|
+
in `runtime-image-source-index.json`) declares exactly the edition protocol compiled into the
|
|
156
|
+
bundle, and this CLI supports that protocol (`edition-protocol.mjs`); nothing else about the
|
|
157
|
+
kernel is compared;
|
|
158
|
+
5. the data root and the editions root are clean git checkouts at an exact HEAD, every file read
|
|
159
|
+
from them bound to its HEAD blob, graded with a digest-pinned git binary (the completeness
|
|
160
|
+
signature is bound to the editions checkout's HEAD).
|
|
161
|
+
|
|
162
|
+
Not here, vendor-side: `require-verified-image-evidence.mjs`, `deliver-images.mjs`,
|
|
163
|
+
`delta-build-plan.mjs`, the evidence producers, and `edition-pin.mjs` (publish plane).
|
|
164
|
+
|
|
165
|
+
### Product-data sections
|
|
166
|
+
|
|
167
|
+
The library owns the protocol (the edition schema, the resolution algorithm, the closed
|
|
168
|
+
`installationClass` vocabulary, lock and seal rules, the digest format, the trust-policy
|
|
169
|
+
schema) and never product data. Every product fact below is the data root's, in the same
|
|
170
|
+
file, strictly parsed (unknown, missing or mistyped keys are refused, naming the section).
|
|
171
|
+
A section may be absent where a data root legitimately has none; the operation that needs
|
|
172
|
+
it refuses by name when it runs, and never skips.
|
|
173
|
+
|
|
174
|
+
| Section | Holds | Needed by |
|
|
175
|
+
| --- | --- | --- |
|
|
176
|
+
| `firstPartySources` | `{ "<repos/\|submodules/ handle>": "<declared source id>" }` | naming a composed-process subject after its source |
|
|
177
|
+
| `platformServiceSources` | per platform service: `name`, `tier`, `installationClass?`, `repo`, `manifestPath`, `manifestName`, `imageKey`, `runtimeBinding` (`null` or `{subjectKind, subjectId}`) | the platform service index (derived from these rows; no edition is read), image subjects, the runtime image source index |
|
|
178
|
+
| `connectorSources` | `repository`, `bindings[{id, path}]`, `nonProductionIds`, `buildInput{consumerRepo, consumerService, destinationRoot}` | biome discovery and the connector cross-repo inputs; absent means no connector repository |
|
|
179
|
+
| `runtimeImageSources` | `supplementalSources` (the host image, standing services, runtime components), `crossRepoBuildInputs`, `buildStepContextDirectories`; the `host`-kind source's repo is the one repo web biomes are delivered from | the runtime image source index, web-biome deliverability |
|
|
180
|
+
| `pinRoles` | the snapshot pin key of the `data`, `kernel` and `deploy` roles | develop snapshots |
|
|
181
|
+
| `confinedBiomes` | `[{biomeId, holds, consequence, admittedEditions}]` | the confinement check; absent means nothing is confined |
|
|
182
|
+
|
|
183
|
+
`schemaVersion` stays 1: the sections are additive, and a file written for this library is
|
|
184
|
+
refused by a library that predates them (unknown key), never mis-read.
|
|
185
|
+
|
|
186
|
+
The `develop` freeze flags name roles, not repositories: `--data-sha`, `--kernel-sha`,
|
|
187
|
+
`--deploy-sha` (they were `--distributions-sha`, `--kernel-contracts-sha`,
|
|
188
|
+
`--xema-deploy-sha`; no aliases).
|
|
189
|
+
|
|
190
|
+
## Evidence verbs (consumed by vendor-ops)
|
|
191
|
+
|
|
192
|
+
The edition library builds, validates and verifies evidence statements. It NEVER signs: it holds no key, requests no OIDC token, and its cosign runner refuses every subcommand except `verify-blob-attestation`. A caller (vendor-ops) runs `cosign attest-blob`, `oras`, `git` and writes its own step outputs; it reads the JSON these verbs print and never parses a lock, a statement or a policy itself.
|
|
193
|
+
|
|
194
|
+
Common to all verbs: root flags `--data-root`, `--editions-root`, `--sources-root`, `--kernel` (each verb names the ones it needs); JSON results go to stdout, diagnostics to stderr; exit 0 on success, 1 on any refusal (plus 2 for `plan-refresh` when a refresh is due). The kernel contract authority every statement binds is the one the data root's evidence-trust pin records (see Evidence trust); the trust policy is the one `edition-workspace.json` declares, held to its pin.
|
|
195
|
+
|
|
196
|
+
| Verb | Arguments | Result |
|
|
197
|
+
|---|---|---|
|
|
198
|
+
| `xema edition chart-set resolve [--check]` | roots `--data-root --editions-root --deploy-root --kernel` | what `node resolve-chart-set.mjs` did: pins `chart-set.lock.json` and every edition's copy to the charts the registry serves; `--check` writes nothing and fails when the pin is stale |
|
|
199
|
+
| `xema edition chart-set source-commit` | roots `--data-root --kernel`, env the registry credential variables the data root declares | read-only: for each publisher of the committed `chart-set.lock.json` it fetches the index chart at the LOCKED version and prints `{"schema":"xema.edition-chart-set-source/v1","publishers":[{"index","repo","version","sourceCommit"}]}` (the `xema.dev/chart-set-source-sha` annotation). It prints nothing and exits non-zero when the annotation is absent or not 40 lowercase hex, or when the index's roster differs from the charts the lock records for that publisher |
|
|
200
|
+
| `xema edition biome-manifests <id> --json` | `--data-root --editions-root --sources-root --source-hash --kernel` | `{"schema":"xema.edition-biome-manifests/v1","distributionId","biomes":[{"id","repo","sourceCommit","manifest"}]}` sorted by id: each biome's `xema-biome.json` read at the commit its lock pins; an absent lock or an unreadable manifest is refused with nothing on stdout |
|
|
201
|
+
| `xema edition list` | `--editions-root` | `{"schemaVersion":1,"editions":["<id>",…]}`; an empty root is refused |
|
|
202
|
+
| `xema edition locks <id>` | `--data-root --editions-root --kernel` | `{"schemaVersion":1,"distributionId","contractAuthority","distributionLock","imageLock","repositoryPins":[…]}`, validated as the verifier validates them |
|
|
203
|
+
| `xema edition evidence assemble-input` | `--output <file> --image-repository --manifest-digest --subject-kind --subject-id --source-repo --source-path --source-commit --provenance <file> [--source-manifest-hash] [--source-tree-hash] [--ttl-seconds]`, roots `--data-root --sources-root --kernel`, env `GITHUB_*` workflow context and the registry credential variables the data root declares | writes the producer-input JSON (mode 0600, never overwrites); reads the registry with the pinned oras |
|
|
204
|
+
| `xema edition evidence check-committed` | `--input <file> --repository-root <dir> [--github-output <file>] [--now <epoch-ms>]`, roots `--data-root --kernel` | prints `REUSE`/`PRODUCE <directory>: <reason>`; with `--github-output` appends `reusable`, `evidence-directory`, `reason` |
|
|
205
|
+
| `xema edition evidence plan-refresh` | `--distribution <id>… [--horizon-seconds] [--now] [--github-output <file>] [--kernel-checkout exact\|preview]`, roots `--data-root --editions-root --kernel` | prints the plan; exit 2 when a refresh is due; `--github-output` appends `refresh-due`, `due-subjects`, `total-subjects`, `due-repositories`; producer evidence is read only from the OCI referrers of each locked image. `--kernel-checkout exact` (default) loads the kernel from a clean checkout at the pinned authority commit; `preview` uses the kernel built at `--kernel`, held to no commit: it prints `LOCAL PREVIEW` and refuses `--github-output` |
|
|
206
|
+
| `xema edition evidence statement producer stage` | `--input <file> --staging <abs dir> --github-repository --github-ref --github-sha --github-workflow-ref`, roots `--data-root --kernel` | creates the staging directory with `statements/<stem>.json`; prints the signing plan |
|
|
207
|
+
| `xema edition evidence statement producer accept` | the `stage` flags plus `--output <abs dir> --cosign <abs path>` | verifies each bundle, builds the output from the statements the input derives and the canonical verified bundles ONLY (the staging must hold exactly what `stage` recorded), writes `producer-evidence.json`, and removes the staging whether it succeeds or refuses; the cosign version is the trust policy's `cosignVersion`; prints `{"schemaVersion":1,"kind":"producer","outputDirectory","producerEvidence":[…]}` |
|
|
208
|
+
| `xema edition evidence statement completeness stage` | `--distribution --staging <abs dir> --release-sequence --release-source-commit --run-id --run-attempt --issued-at --expires-at --signer-repository --signer-ref --signer-workflow-path --github-repository --github-ref --github-sha --github-workflow-ref `, roots `--data-root --editions-root --kernel` | stages the edition's producer evidence under `producers/` and `completeness/statement.json`; prints the signing plan |
|
|
209
|
+
| `xema edition evidence assemble-set` | the completeness `stage` flags plus `--evidence-root <abs dir> --cosign <abs path>` | re-resolves the producer evidence (it must equal the staged copy), verifies the signed completeness bundle, writes `evidence-set.json`, builds the evidence root from the derived files ONLY (the staging must hold exactly what `stage` recorded) and removes the staging whether it succeeds or refuses; prints `{"schemaVersion":1,"kind":"evidence-set","distributionId","evidenceRoot","evidenceSetPath","producerBundles","completenessStatementDigest"}` |
|
|
210
|
+
| `xema edition evidence statement entitlement stage` | `--distribution --evidence-root <dir> --staging <abs dir> --customer --mode [--target-registry] --idempotency-key --run-id --run-attempt --issued-at --expires-at --signer-repository --signer-ref --signer-workflow-path --github-repository --github-ref --github-sha --github-workflow-ref`, roots `--data-root --kernel` | writes `entitlement/statement.json`; prints the signing plan |
|
|
211
|
+
| `xema edition evidence statement entitlement accept` | the `stage` flags plus `--output <abs dir> --cosign <abs path>` | verifies the bundle, writes `entitlement.json`, builds the output from the derived files ONLY (the staging must hold exactly what `stage` recorded) and removes the staging whether it succeeds or refuses; prints `{"schemaVersion":1,"kind":"entitlement",…,"evidence":{…}}` |
|
|
212
|
+
| `xema edition evidence oci attach-plan` | `--evidence-directory <abs dir> [--input <file>]`, roots `--data-root --kernel` | validates a produced evidence directory (with `--input`, against the statements that input builds) and prints `{"schemaVersion":1,"kind":"oci-attach-plan","evidenceDirectory","imageRepository","subjectDigest","subject","artifactType","distributionSpec","annotations":{…},"files":[{"path","mediaType"}]}`: the operands of `oras attach`, run from the evidence directory |
|
|
213
|
+
| `xema edition evidence oci validate` | `--evidence-directory <abs dir> --manifest <file> --subject-digest <digest> [--input <file> --cosign <abs path> [--now <epoch-ms>]]`, roots `--data-root --kernel` | holds a pulled artifact (`oras pull`) to its manifest (`oras manifest fetch`); prints `{"schemaVersion":1,"kind":"oci-evidence","subjectDigest","created","subjects":[…],"matchesInput","remainingSeconds","reusable"}`. The last three are `null` without `--input`; with it every bundle is verified against the input's signer and a bundle that does not verify is a refusal |
|
|
214
|
+
| `xema edition evidence oci backfill-plan` | `--distribution <id>… --producer-repository-root <abs dir>…`, roots `--data-root --editions-root --kernel`, env the registry credential variables the data root declares | prints `{"schemaVersion":1,"kind":"oci-backfill-plan","items":[{"status":"missing-git\|present\|missing","subjectKind","subjectId","imageRepository","subjectDigest","artifactDigest","attach"?}]}`; a `missing` item carries its attach plan; exit 2 unless every item is `present` |
|
|
215
|
+
| `xema edition index runtime-image-source --repin-contract-authority` | roots `--data-root --sources-root --kernel --source-hash` | replaces ONLY `contractAuthority` of the committed `runtime-image-source-index.json` with the authority trusted from the `--kernel` checkout (clean, at the expected origin, else refused) and validates and rewrites it; every repository pin and subject is identical before and after. It writes the move on stdout and the owed follow-ups on stderr: `xema edition repin-evidence-trust`, re-resolving every edition (each `images.lock.json` carries the authority), and that signed producer statements made under the old authority no longer verify |
|
|
216
|
+
| `xema edition source-closure` | `--repo <repo> --path <dir> --commit <40 hex>`, roots `--sources-root --source-hash --kernel` (the hash implementation is held to the kernel) | `{"schemaVersion":1,"repo","directory","commit","treeAlgorithm","treeHash","buildable","lockfileBlobId","closure":[{"directory","treeHash"}]}`: the facts a content coordinate is framed from |
|
|
217
|
+
| `xema edition verify-evidence <id>` | see Evidence trust; `--descriptor <absolute path of the edition descriptor being verified>` (required: its `distributionId` must be the requested id and its `provenance.channel` is the channel whose signers may vouch for the evidence; it is held outside the graded checkouts like `--state`); plus `[--json]` (stdout is then exactly one `{"schema":"xema.edition-evidence-verification/v1","distributionId","channel","releaseSequence","statements":[{"predicateType","subject","statementDigest"}]}` document, where `statementDigest` is the digest of the verified statement, not of the image; the human text goes to stderr, and a failed verification prints no JSON); verifying a delivery entitlement is not available in this version | the in-repository gate and the release-checkout grading are this verifier; there is no second one. Its result is its exit status, the advanced replay state and, with `--json`, the verification document on stdout: it writes no "already verified" file and has no file-output flag. Verifying a delivery entitlement is not available in this version |
|
|
218
|
+
|
|
219
|
+
The signing plan (stdout of every `stage`):
|
|
220
|
+
|
|
221
|
+
```json
|
|
222
|
+
{"schemaVersion":1,"kind":"producer|completeness|entitlement","root":"<staging dir>","predicateType":"<uri>",
|
|
223
|
+
"signer":{"certificateIdentity":"…","oidcIssuer":"…","githubWorkflow":{"repository":"…","ref":"…","path":"…"}},
|
|
224
|
+
"certificateWorkflowSha":"<40 hex>","statements":[{"statementPath":"<relative>","bundlePath":"<relative>"}]}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
For each entry the caller runs `cosign attest-blob --yes --statement <root>/<statementPath> --bundle <root>/<bundlePath> --new-bundle-format <root>/<statementPath>` and then the matching `accept` (or `assemble-set`) with the SAME flags it staged with. `accept` re-derives every statement from those flags and refuses staged bytes that differ, so nothing but what the library built can be accepted; it rewrites the bundle as canonical JSON, requires its payload to be exactly the statement bytes, and runs `cosign verify-blob-attestation` against the plan's signer at `certificateWorkflowSha`. The staging directory must not exist before `stage`; the output is built in a private sibling `<output>.accepting-<pid>` on the output's filesystem and renamed into place. `accept` removes the staging whether it succeeds or refuses (a refusal of its arguments before the first read leaves it), so a signed-but-unaccepted bundle is never left behind; stage and sign again after a refusal.
|
|
228
|
+
|
|
229
|
+
## Tests
|
|
230
|
+
|
|
231
|
+
`node --test "edition/*.test.mjs" "edition/*-contract-tests.mjs"` (`pnpm run test:edition`).
|
|
232
|
+
Tests build throwaway roots with `test-fixtures/workspace.mjs`. The kernel is the
|
|
233
|
+
CLI's own installed `@xemahq/contracts`; nothing is supplied from outside and no test
|
|
234
|
+
skips. The two sealing cases run the real openfga/cli v0.8.1 and FAIL, naming
|
|
235
|
+
`XEMA_FGA_CLI`, when it is unset (CI installs it by checksum). `no-vendor-literals.test.mjs` fails on any organisation or
|
|
236
|
+
registry literal in a shipped file.
|
|
237
|
+
|
|
238
|
+
## Customer editions
|
|
239
|
+
|
|
240
|
+
A customer edition is resolved against a CATALOGUE: `catalogue.json`, a titled layer of an offering's edition artifact
|
|
241
|
+
(`xema.edition-catalogue/v1`: `offeringId`, `channel` (provenance only), `biomes`, `platformServices`, `images`,
|
|
242
|
+
`chartSet`, `contractAuthority`, `ceiling`). The catalogue is the ceiling: it supplies availability, pins, digests and
|
|
243
|
+
the chart-set, and never adds a component. The resolved set is the customer's `{biome}` selections, every
|
|
244
|
+
`installationClass: core` entry and the transitive declared dependencies.
|
|
245
|
+
|
|
246
|
+
xema edition resolve --definition <file> --catalogue oci://<registry>/<repo>@sha256:<digest> --channel release \
|
|
247
|
+
--data-root <dir> --sources-root <dir> --kernel <dir> --cache-dir <dir> --source-hash <dir> --out <dir> \
|
|
248
|
+
--source-image <source>=<registry>/<prefix> [--catalogue-username <u> --catalogue-token-env <VAR>]
|
|
249
|
+
|
|
250
|
+
`--out` is the customer's editions root (`<out>/<id>/` receives the four locks). `--data-root` holds the customer's
|
|
251
|
+
`edition-workspace.json`. The definition allows `{biome}` selectors (the same per-biome options a vendor offering's selector takes in the kernel
|
|
252
|
+
schema, `installPolicy` and `mandatory`, and nothing else), `sources[]` (no registry), `trustCeiling` and
|
|
253
|
+
`imageRegistryMirror`; `extends`, `exclude`, tier/origin/class selectors, `platformServices`, `visibility` and a source
|
|
254
|
+
registry are refused.
|
|
255
|
+
|
|
256
|
+
Ownership rules of the definition (the kernel's `parseCustomerEditionDefinition` and `customerTrustCeilingIssues`; `customer-definition.mjs` only calls them):
|
|
257
|
+
`sources[].ref` is required and names a branch or a tag; a commit id (any full 40- or 64-hex git object id) is refused,
|
|
258
|
+
because the seal records the resolved commit in the lock (the develop `--pins` file still supplies commits). `trustCeiling`
|
|
259
|
+
is required when the definition declares `sources[]` and refused when it does not. It must assign every customer-source
|
|
260
|
+
biome (a biome drawn from the definition's own `sources[]`) exactly once: a missing biome, a biome assigned twice and an
|
|
261
|
+
extra biome that is not customer-sourced are refused.
|
|
262
|
+
|
|
263
|
+
The vendor's trust domain is closed to a customer edition, by three refusals the CLI makes:
|
|
264
|
+
- a `trustCeiling` assignment whose domain is the kernel's first-party domain is refused when the definition is parsed, naming the biomes and the domain;
|
|
265
|
+
- a biome drawn from a declared `sources[]` entry (of any edition) whose manifest declares an origin other than third-party (`xema.trustTier`) is refused, naming the source and the biome;
|
|
266
|
+
- the catalogue's `ceiling` bounds the resolve. Its `trustPolicy` (origin allow list), when stated, is the one the resolve applies to every biome of the lock.
|
|
267
|
+
Its `trustCeiling`, when stated, is written onto the vendor's rows of the customer lock, and for a customer-source biome it admits one domain: the domain the catalogue
|
|
268
|
+
assigns that biome when it names it, otherwise any domain the catalogue assigns to nothing. A definition that names another domain is refused, naming the biome and both domains.
|
|
269
|
+
A `null` member of `ceiling` bounds nothing.
|
|
270
|
+
|
|
271
|
+
Handoff to the customer's registry: `oras cp` the catalogue artifact and the vendor images by digest, switch
|
|
272
|
+
`EDITION_CATALOGUE_REF`, and declare `imageRegistryMirror: {complete: true, map: [{source, target}]}`. Prefixes match whole
|
|
273
|
+
path segments; the digest never changes and no signature is re-verified at the mirrored ref (the customer's seal is the
|
|
274
|
+
trust anchor and deploy is digest-anchored).
|
|
275
|
+
|
|
276
|
+
The chart-set is copied whole from the catalogue: it states which deploy charts are available, not which components are
|
|
277
|
+
selected, so it adds no component. `trustCeiling` has the kernel shape `{assignments: [{domain, biomes}]}`.
|
|
278
|
+
|
|
279
|
+
### Locks, sealing and the catalogue's tree ids
|
|
280
|
+
|
|
281
|
+
`resolve` writes the UNSEALED lock (`unsealedSchema`); `seal` attaches each biome's `biomeContentHash` and stamps
|
|
282
|
+
`schemaVersion` 5, the only grammar. The hash is recomputed by `seal` AND by the verify step from the biome's
|
|
283
|
+
`sourceManifestHash`, its git tree id at the pinned commit and the sorted image subject digests, through the kernel's
|
|
284
|
+
`computeBiomeContentHash`; a mismatch (a tampered hash, 64 arbitrary hex digits, a changed manifest, tree id or image
|
|
285
|
+
digest) is refused, naming the biome. `resolve --check` compares the unsealed projection byte for byte.
|
|
286
|
+
|
|
287
|
+
A customer holds no checkout of the vendor's sources. `catalogue.json` therefore carries `sourceTreeIds` (each vendor
|
|
288
|
+
biome's tree id at its pinned commit, written from the real tree by `edition catalogue` / `edition artifact`), and the
|
|
289
|
+
customer's seal takes that tree id as an INPUT ON THE CATALOGUE'S AUTHORITY: it is not source verification, and the
|
|
290
|
+
refusal text says so. A vendor biome absent from the catalogue is refused, not skipped.
|
|
291
|
+
|
|
292
|
+
xema edition seal <id> --catalogue oci://<registry>/<repo>@sha256:<digest> [--catalogue-username <u> --catalogue-token-env <VAR>] \
|
|
293
|
+
--data-root <dir> --editions-root <dir> --sources-root <dir> --kernel <dir> --cache-dir <dir> --source-hash <dir>
|
|
294
|
+
|
|
295
|
+
Mirror runbook (`imageRegistryMirror`): 1. `oras cp` the catalogue artifact and every vendor image BY DIGEST into the
|
|
296
|
+
customer's registry. 2. Point the definition at the mirrored catalogue digest. 3. Declare
|
|
297
|
+
`imageRegistryMirror: {complete: true, map: [{source, target}]}` (whole path segments; `complete: true` refuses a vendor row no
|
|
298
|
+
entry covers). 4. Resolve and seal: digests are unchanged, so the seal's hashes are unchanged; no signature is
|
|
299
|
+
re-verified at the mirrored ref.
|
|
300
|
+
|
|
301
|
+
### Develop customer edition
|
|
302
|
+
|
|
303
|
+
xema edition develop resolve --definition <file> --catalogue oci://<registry>/<repo>@sha256:<digest> \
|
|
304
|
+
--pins <file> --out <dir> --registry <namespace> --engine-image <repository>@sha256:<digest> \
|
|
305
|
+
--data-root <dir> --editions-root <dir> --sources-root <dir> --kernel <dir> --cache-dir <dir> --source-hash <dir> \
|
|
306
|
+
[--source-image <source>=<registry>/<prefix>]... [--catalogue-username <u> --catalogue-token-env <VAR>] [--local]
|
|
307
|
+
|
|
308
|
+
The id is the definition's (no positional id). `--pins` holds exactly one `sources/<name>` commit per source the
|
|
309
|
+
definition declares (the customer's own repositories; the vendor's pins are the catalogue's). The digest of the catalogue
|
|
310
|
+
artifact is frozen into the descriptor's `provenance.pins` as `catalogue: "sha256:<64 hex>"` (typed per key: every other
|
|
311
|
+
pin is a 40-hex commit), so the snapshot-hash tag covers it. The artifact is the one edition layout (`xema.edition/v1`,
|
|
312
|
+
the descriptor plus the four locks) at `<namespace>/xema-edition-<id>`. Vendor image rows arrive sealed from the
|
|
313
|
+
catalogue; only the customer's own rows are sealed against the develop image repositories. A customer artifact is not an
|
|
314
|
+
offering and carries no `catalogue.json`. `edition-contract.json` lists `catalogue.json` under `offeringLayers` (a layer
|
|
315
|
+
of an offering artifact, not a lock) and the `catalogue` pin under `provenancePins`.
|