@camstack/server 1.2.827 → 1.2.829
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 +20 -3
- package/dist/agent/agent-boot-mode.js +14 -1
- package/dist/agent/agent-http.js +12 -0
- package/dist/agent/agent-hub-rediscovery.js +205 -0
- package/dist/agent/agent-membership-watch.js +29 -1
- package/dist/agent/agent-pairing-store.js +47 -3
- package/dist/agent/hubs-found.js +1 -0
- package/dist/agent/main.js +64 -6
- package/dist/api/core/agent-pairing.router.js +9 -0
- package/dist/api/core/cluster-update.provider.js +98 -0
- package/dist/api/mesh-membership-routes.js +3 -2
- package/dist/api/trpc/generated-cap-mounts.js +2 -1
- package/dist/api/trpc/generated-cap-routers.js +2339 -2286
- package/dist/api/trpc/server-provided-caps.js +1 -0
- package/dist/api/trpc/trpc.router.js +5 -0
- package/dist/auth/auth-provider-gate.js +6 -2
- package/dist/core/addon/device-meta-mirror.js +1 -0
- package/dist/core/cluster-update/cluster-update-job-store.js +106 -0
- package/dist/core/cluster-update/cluster-update-plan.js +147 -0
- package/dist/core/cluster-update/cluster-update-seams.js +13 -0
- package/dist/core/cluster-update/cluster-update-steps.js +293 -0
- package/dist/core/cluster-update/cluster-update.service.js +319 -0
- package/dist/main.js +3 -0
- package/dist/manual-boot.js +19 -0
- package/package.json +17 -41
- package/system/dist/addon-runner.js +12 -0
- package/system/dist/addon-runner.mjs +12 -0
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +17 -6
- package/system/dist/builtins/composer/composer.addon.mjs +17 -6
- package/system/dist/builtins/composer/graft-host.d.ts +2 -0
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-aggregation.d.ts +25 -1
- package/system/dist/builtins/device-manager/device-manager.addon.d.ts +6 -0
- package/system/dist/builtins/device-manager/device-manager.addon.js +354 -7
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +354 -7
- package/system/dist/builtins/device-manager/device-meta-actions.d.ts +6 -0
- package/system/dist/builtins/device-manager/device-meta-types.d.ts +4 -0
- package/system/dist/builtins/device-manager/device-row-store.d.ts +2 -1
- package/system/dist/builtins/device-manager/device-search.d.ts +42 -0
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/hub-mdns.d.ts +5 -1
- package/system/dist/builtins/local-network/local-network.addon.js +24 -13
- package/system/dist/builtins/local-network/local-network.addon.mjs +24 -13
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +59 -20
- package/system/dist/builtins/system-config/system-config.addon.mjs +48 -10
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{capture-engine-B0yQx6hA.mjs → capture-engine-CsFrmbpC.mjs} +1 -1
- package/system/dist/{capture-engine-1A7HAX3x.js → capture-engine-Cvetsl63.js} +1 -1
- package/system/dist/{composition-sources-CyJ0d6Sc.mjs → composition-sources-Yw0KDrdI.mjs} +1 -1
- package/system/dist/{composition-sources-BzM19ASO.js → composition-sources-wNOckeFb.js} +1 -1
- package/system/dist/{constants-B_FLEjP_.mjs → constants-B7-Ccoim.mjs} +1 -1
- package/system/dist/{constants-DSO4ZEO3.js → constants-BqrgVNCL.js} +1 -1
- package/system/dist/{device-ca-CveuNCHp.mjs → device-ca-BDKMOSKW.mjs} +1 -1
- package/system/dist/{device-ca-DLTDsonl.js → device-ca-C9VMoted.js} +1 -1
- package/system/dist/{dist-CIyyHwVx.mjs → dist-Bv_ADY4Y.mjs} +385 -20
- package/system/dist/{dist-DhbzVygm.js → dist-KJhkakFo.js} +385 -20
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{agent-https-BlLVD9hG.js → hub-identity-BS1rzEes.js} +120 -1
- package/system/dist/{agent-https-BSxTUzKT.mjs → hub-identity-DSLLzLph.mjs} +97 -2
- package/system/dist/{hub-mdns-ciao-C_ITDs0-.js → hub-mdns-ciao-BQh04Eo9.js} +18 -18
- package/system/dist/{hub-mdns-ciao-CQdCUsrI.mjs → hub-mdns-ciao-FVifxI5j.mjs} +2 -2
- package/system/dist/index.js +61 -44
- package/system/dist/index.mjs +22 -10
- package/system/dist/kernel/hub-identity.d.ts +17 -0
- package/system/dist/kernel/index.d.ts +2 -0
- package/system/dist/kernel/moleculer/mesh-mtls/mesh-membership.d.ts +7 -0
- package/system/dist/kernel/moleculer/mesh-mtls/pairing/agent-pairing.d.ts +11 -1
- package/system/dist/kernel/moleculer/mesh-mtls/pairing/hub-pairing.d.ts +5 -0
- package/system/dist/kernel/moleculer/mesh-mtls/pairing/index.d.ts +1 -1
- package/system/dist/kernel/moleculer/mesh-mtls/pairing/pairing-protocol.d.ts +2 -0
- package/system/dist/{legacy-integration-rows-door-D_tfRhsx.js → legacy-integration-rows-door-B3K3A9JU.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-tX6Qktxd.mjs → legacy-integration-rows-door-Cu9uee1R.mjs} +1 -1
- package/system/dist/{rename-composition-block-DNhbAonr.js → rename-composition-block-31JmUak2.js} +1 -1
- package/system/dist/{rename-composition-block-COaMxshT.mjs → rename-composition-block-BglTrMYB.mjs} +1 -1
- package/system/dist/{restore-archive-BMqp_hMT.mjs → restore-archive-5UHNYi4u.mjs} +1 -1
- package/system/dist/{restore-archive-Dbzuv5hK.js → restore-archive-BHOc02Fh.js} +1 -1
- package/system/dist/{wal-maintenance-CWODOTsa.js → wal-maintenance-At5TeYwr.js} +0 -0
- package/system/dist/{wal-maintenance-ITsLGvFA.mjs → wal-maintenance-COJdLp-y.mjs} +0 -0
- package/system/package.json +1 -1
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-KJhkakFo.js");
|
|
7
7
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
8
8
|
const require_x509_es = require("../../x509.es-WtnRNyYS.js");
|
|
9
|
-
const
|
|
10
|
-
const require_constants$8 = require("../../constants-
|
|
9
|
+
const require_hub_identity = require("../../hub-identity-BS1rzEes.js");
|
|
10
|
+
const require_constants$8 = require("../../constants-BqrgVNCL.js");
|
|
11
11
|
const require_src$1 = require("../../src-CnAqG6EF.js");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let node_crypto = require("node:crypto");
|
|
@@ -316,7 +316,7 @@ function isAllowedAgentDashboardReturnTo(returnTo, extraOrigins = []) {
|
|
|
316
316
|
if (url.username !== "" || url.password !== "") return false;
|
|
317
317
|
if (url.pathname !== "/" && url.pathname !== "") return false;
|
|
318
318
|
const host = url.hostname.replace(/^\[|\]$/g, "");
|
|
319
|
-
const local = host === "localhost" ||
|
|
319
|
+
const local = host === "localhost" || require_hub_identity.isPrivateAddress(host) || require_hub_identity.isLocalOnlyHostname(host);
|
|
320
320
|
if (url.port === "4444") return local;
|
|
321
321
|
const origin = url.origin;
|
|
322
322
|
return extraOrigins.some((o) => o === origin);
|
|
@@ -1105,7 +1105,7 @@ var MeshCertificateRegistry = class {
|
|
|
1105
1105
|
this.rows.set(record.fingerprint, record);
|
|
1106
1106
|
const kind = this.deps.meshKind ?? null;
|
|
1107
1107
|
if (kind !== null) {
|
|
1108
|
-
const parsed =
|
|
1108
|
+
const parsed = require_hub_identity.systemConfigRecordKinds["mesh-node-certificates"].schema.safeParse(this.recordToBody(record));
|
|
1109
1109
|
if (!parsed.success) throw new Error(parsed.error.message);
|
|
1110
1110
|
await kind.put({
|
|
1111
1111
|
id: record.fingerprint,
|
|
@@ -1136,7 +1136,7 @@ var MeshCertificateRegistry = class {
|
|
|
1136
1136
|
try {
|
|
1137
1137
|
const kind = this.deps.meshKind ?? null;
|
|
1138
1138
|
if (kind !== null) {
|
|
1139
|
-
const parsed =
|
|
1139
|
+
const parsed = require_hub_identity.systemConfigRecordKinds["mesh-node-certificates"].schema.safeParse(this.recordToBody(record));
|
|
1140
1140
|
if (!parsed.success) throw new Error(parsed.error.message);
|
|
1141
1141
|
await kind.put({
|
|
1142
1142
|
id: record.fingerprint,
|
|
@@ -87366,6 +87366,7 @@ function mintAnswer(caKeyPem, claims) {
|
|
|
87366
87366
|
nonce: claims.nonce,
|
|
87367
87367
|
status: claims.answer.status,
|
|
87368
87368
|
...claims.answer.reason !== void 0 ? { reason: claims.answer.reason } : {},
|
|
87369
|
+
...require_hub_identity.isAnnouncedHubId(claims.hubId) ? { hubId: claims.hubId } : {},
|
|
87369
87370
|
iat: claims.nowMs,
|
|
87370
87371
|
exp: claims.nowMs + MEMBERSHIP_TTL_MS
|
|
87371
87372
|
};
|
|
@@ -87419,10 +87420,16 @@ function verifyMembershipAnswer(caCertPem, token, options) {
|
|
|
87419
87420
|
const exp = Reflect.get(payload, "exp");
|
|
87420
87421
|
if (Reflect.get(payload, "v") !== MEMBERSHIP_VERSION || Reflect.get(payload, "use") !== "mesh-membership" || Reflect.get(payload, "nodeId") !== options.nodeId || Reflect.get(payload, "nonce") !== options.nonce || Reflect.get(payload, "fp") !== normalizeFingerprint(options.leafFingerprint) || !isStatus(status) || typeof iat !== "number" || typeof exp !== "number") return null;
|
|
87421
87422
|
if (exp <= nowMs || iat > nowMs + 6e4 || exp - iat > 6e4) return null;
|
|
87422
|
-
|
|
87423
|
+
const hubId = Reflect.get(payload, "hubId");
|
|
87424
|
+
if (hubId !== void 0 && !require_hub_identity.isAnnouncedHubId(hubId)) return null;
|
|
87425
|
+
const answer = typeof reason === "string" && status === "revoked" ? {
|
|
87423
87426
|
status,
|
|
87424
87427
|
reason
|
|
87425
87428
|
} : { status };
|
|
87429
|
+
return require_hub_identity.isAnnouncedHubId(hubId) ? {
|
|
87430
|
+
...answer,
|
|
87431
|
+
hubId
|
|
87432
|
+
} : answer;
|
|
87426
87433
|
}
|
|
87427
87434
|
/** The hub's side: hands out nonces and answers a node that proves it holds a leaf the hub issued. */
|
|
87428
87435
|
var MembershipResponder = class {
|
|
@@ -87520,7 +87527,8 @@ var MembershipResponder = class {
|
|
|
87520
87527
|
leafFingerprint: cert.fingerprint256,
|
|
87521
87528
|
nonce,
|
|
87522
87529
|
answer,
|
|
87523
|
-
nowMs: this.now()
|
|
87530
|
+
nowMs: this.now(),
|
|
87531
|
+
hubId: this.deps.hubId?.() ?? null
|
|
87524
87532
|
})
|
|
87525
87533
|
};
|
|
87526
87534
|
}
|
|
@@ -87770,6 +87778,7 @@ function verifyPairingOffer(caCertPem, token) {
|
|
|
87770
87778
|
const commitment = str("commitment");
|
|
87771
87779
|
const hubUrl = str("hubUrl");
|
|
87772
87780
|
const hubMeshAddress = str("hubMeshAddress");
|
|
87781
|
+
const hubId = str("hubId");
|
|
87773
87782
|
if (Reflect.get(payload, "use") !== "pairing-offer") return null;
|
|
87774
87783
|
if (typeof iat !== "number" || !Number.isFinite(iat)) return null;
|
|
87775
87784
|
if (agentNodeId === null || hubNodeId === null || caFingerprint === null || commitment === null || hubUrl === null || hubMeshAddress === null) return null;
|
|
@@ -87781,6 +87790,7 @@ function verifyPairingOffer(caCertPem, token) {
|
|
|
87781
87790
|
commitment,
|
|
87782
87791
|
hubUrl,
|
|
87783
87792
|
hubMeshAddress,
|
|
87793
|
+
...hubId !== null ? { hubId } : {},
|
|
87784
87794
|
iat
|
|
87785
87795
|
};
|
|
87786
87796
|
}
|
|
@@ -87862,6 +87872,19 @@ function readCaCertificate(pem, nowMs) {
|
|
|
87862
87872
|
return null;
|
|
87863
87873
|
}
|
|
87864
87874
|
}
|
|
87875
|
+
/**
|
|
87876
|
+
* The host this agent will dial for `address`, or `null` when no other machine could reach it:
|
|
87877
|
+
* empty, unspecified (`0.0.0.0`, `::`) or loopback. A pairing that would leave the agent with
|
|
87878
|
+
* such an address is refused instead of completing silently (#494).
|
|
87879
|
+
*/
|
|
87880
|
+
function dialableHubHost(address) {
|
|
87881
|
+
const host = hubHostFromMeshAddress(address);
|
|
87882
|
+
const bare = host.replace(/^\[|\]$/g, "").toLowerCase();
|
|
87883
|
+
if (bare.length === 0 || /^:\d*$/.test(bare)) return null;
|
|
87884
|
+
if (bare === "localhost" || bare === "0.0.0.0" || bare === "::" || bare === "::1") return null;
|
|
87885
|
+
if (bare.startsWith("127.") || bare.startsWith("::ffff:127.")) return null;
|
|
87886
|
+
return host;
|
|
87887
|
+
}
|
|
87865
87888
|
/** `host:6443` / `[::1]:6443` / `host` → the host, port dropped. */
|
|
87866
87889
|
function hubHostFromMeshAddress(address) {
|
|
87867
87890
|
const trimmed = address.trim();
|
|
@@ -87952,6 +87975,7 @@ var AgentPairing = class {
|
|
|
87952
87975
|
if (readCaCertificate(request.hubCaCertPem, this.now()) === null) return fail(400, "bad-ca", "the offered CA is not a valid self-signed CA certificate");
|
|
87953
87976
|
if (!/^[0-9a-f]{64}$/.test(request.commitment)) return fail(400, "bad-offer", "the commitment is malformed");
|
|
87954
87977
|
if (!isHttpUrl(request.hubUrl)) return fail(400, "bad-offer", "hubUrl is not an http(s) URL");
|
|
87978
|
+
if (dialableHubHost(request.hubMeshAddress) === null) return fail(400, "no-hub-address", `the hub offered no address this agent can dial ("${request.hubMeshAddress}") - set its LAN address on System -> Network`);
|
|
87955
87979
|
const caFingerprint = caFingerprintCompact(request.hubCaCertPem);
|
|
87956
87980
|
const refused = this.checkOfferSignature(request, caFingerprint);
|
|
87957
87981
|
if (refused !== null) return refused;
|
|
@@ -87972,7 +87996,8 @@ var AgentPairing = class {
|
|
|
87972
87996
|
caFingerprint,
|
|
87973
87997
|
commitment: request.commitment,
|
|
87974
87998
|
url: request.hubUrl,
|
|
87975
|
-
meshAddress: request.hubMeshAddress
|
|
87999
|
+
meshAddress: request.hubMeshAddress,
|
|
88000
|
+
hubId: request.hubId ?? null
|
|
87976
88001
|
},
|
|
87977
88002
|
keyPem,
|
|
87978
88003
|
csrPem,
|
|
@@ -88110,6 +88135,11 @@ var AgentPairing = class {
|
|
|
88110
88135
|
this.end(session, "failed");
|
|
88111
88136
|
return refusal;
|
|
88112
88137
|
}
|
|
88138
|
+
const hubAddress = dialableHubHost(session.hub.meshAddress);
|
|
88139
|
+
if (hubAddress === null) {
|
|
88140
|
+
this.end(session, "failed");
|
|
88141
|
+
return fail(400, "no-hub-address", "the hub offered no address this agent can dial");
|
|
88142
|
+
}
|
|
88113
88143
|
try {
|
|
88114
88144
|
await this.deps.install({
|
|
88115
88145
|
meshTls: {
|
|
@@ -88117,8 +88147,9 @@ var AgentPairing = class {
|
|
|
88117
88147
|
keyPem: session.keyPem,
|
|
88118
88148
|
caCertPem: session.hub.caCertPem
|
|
88119
88149
|
},
|
|
88120
|
-
hubAddress
|
|
88121
|
-
hubUrl: session.hub.url
|
|
88150
|
+
hubAddress,
|
|
88151
|
+
hubUrl: session.hub.url,
|
|
88152
|
+
hubId: session.hub.hubId
|
|
88122
88153
|
});
|
|
88123
88154
|
} catch (err) {
|
|
88124
88155
|
this.end(session, "failed");
|
|
@@ -88206,7 +88237,7 @@ var AgentPairing = class {
|
|
|
88206
88237
|
checkOfferSignature(request, caFingerprint) {
|
|
88207
88238
|
const claims = verifyPairingOffer(request.hubCaCertPem, request.signature);
|
|
88208
88239
|
const at = this.now();
|
|
88209
|
-
if (claims === null || claims.use !== "pairing-offer" || claims.agentNodeId !== this.deps.nodeId || claims.hubNodeId !== request.hubNodeId || claims.caFingerprint !== caFingerprint || claims.commitment !== request.commitment || claims.hubUrl !== request.hubUrl || claims.hubMeshAddress !== request.hubMeshAddress || claims.iat > at + 6e4 || at - claims.iat > 12e4) {
|
|
88240
|
+
if (claims === null || claims.use !== "pairing-offer" || claims.agentNodeId !== this.deps.nodeId || claims.hubNodeId !== request.hubNodeId || claims.caFingerprint !== caFingerprint || claims.commitment !== request.commitment || claims.hubUrl !== request.hubUrl || claims.hubMeshAddress !== request.hubMeshAddress || (claims.hubId ?? null) !== (request.hubId ?? null) || claims.iat > at + 6e4 || at - claims.iat > 12e4) {
|
|
88210
88241
|
this.deps.log?.("an offer without a valid CA signature was refused", {});
|
|
88211
88242
|
return fail(403, "bad-offer-signature", "the offer is not signed by the CA it presents");
|
|
88212
88243
|
}
|
|
@@ -88385,7 +88416,9 @@ function parseOffer(body) {
|
|
|
88385
88416
|
const hubUrl = Reflect.get(body, "hubUrl");
|
|
88386
88417
|
const hubMeshAddress = Reflect.get(body, "hubMeshAddress");
|
|
88387
88418
|
const signature = Reflect.get(body, "signature");
|
|
88419
|
+
const hubId = Reflect.get(body, "hubId");
|
|
88388
88420
|
if (typeof protocol !== "number") return null;
|
|
88421
|
+
if (hubId !== void 0 && !require_hub_identity.isAnnouncedHubId(hubId)) return null;
|
|
88389
88422
|
if (!isText(hubNodeId, 128) || !isText(hubCaCertPem, 16384) || !isText(commitment, 128)) return null;
|
|
88390
88423
|
if (!isText(hubUrl) || !isText(hubMeshAddress, 255) || !isText(signature, 4096)) return null;
|
|
88391
88424
|
return {
|
|
@@ -88395,6 +88428,7 @@ function parseOffer(body) {
|
|
|
88395
88428
|
commitment,
|
|
88396
88429
|
hubUrl,
|
|
88397
88430
|
hubMeshAddress,
|
|
88431
|
+
...hubId !== void 0 ? { hubId } : {},
|
|
88398
88432
|
signature
|
|
88399
88433
|
};
|
|
88400
88434
|
}
|
|
@@ -88454,6 +88488,8 @@ var HubPairing = class {
|
|
|
88454
88488
|
const hubNonce = randomHex(32);
|
|
88455
88489
|
const hubUrl = await this.deps.hubUrl();
|
|
88456
88490
|
const hubMeshAddress = await this.deps.hubMeshAddress();
|
|
88491
|
+
const hubId = this.deps.hubId?.() ?? null;
|
|
88492
|
+
const hubIdField = hubId !== null ? { hubId } : {};
|
|
88457
88493
|
const commitment = computePairingCommitment(ca.certPem, hubNonce);
|
|
88458
88494
|
const answer = await this.deps.transport.offer(endpoint, {
|
|
88459
88495
|
protocol: 1,
|
|
@@ -88462,6 +88498,7 @@ var HubPairing = class {
|
|
|
88462
88498
|
commitment,
|
|
88463
88499
|
hubUrl,
|
|
88464
88500
|
hubMeshAddress,
|
|
88501
|
+
...hubIdField,
|
|
88465
88502
|
signature: signPairingOffer(ca.keyPem, {
|
|
88466
88503
|
use: PAIRING_OFFER_USE,
|
|
88467
88504
|
agentNodeId: hello.nodeId,
|
|
@@ -88470,6 +88507,7 @@ var HubPairing = class {
|
|
|
88470
88507
|
commitment,
|
|
88471
88508
|
hubUrl,
|
|
88472
88509
|
hubMeshAddress,
|
|
88510
|
+
...hubIdField,
|
|
88473
88511
|
iat: this.now()
|
|
88474
88512
|
})
|
|
88475
88513
|
});
|
|
@@ -88889,7 +88927,7 @@ var SystemConfigAddon = class extends require_dist.BaseAddon {
|
|
|
88889
88927
|
async onShutdown() {
|
|
88890
88928
|
setProcessMeshCertificateRegistry(null);
|
|
88891
88929
|
setProcessMeshTlsListenerState(null);
|
|
88892
|
-
|
|
88930
|
+
require_hub_identity.setProcessAgentHttpsNames(null);
|
|
88893
88931
|
this.stoppedMesh = true;
|
|
88894
88932
|
if (this.meshReapTimer !== null) clearInterval(this.meshReapTimer);
|
|
88895
88933
|
this.meshReapTimer = null;
|
|
@@ -88914,7 +88952,7 @@ var SystemConfigAddon = class extends require_dist.BaseAddon {
|
|
|
88914
88952
|
return null;
|
|
88915
88953
|
}
|
|
88916
88954
|
const records = this.ctx.records;
|
|
88917
|
-
const meshKind = records === void 0 ? null : (await records.declare(
|
|
88955
|
+
const meshKind = records === void 0 ? null : (await records.declare(require_hub_identity.systemConfigRecordKinds), records.kind(require_hub_identity.systemConfigRecordKinds["mesh-node-certificates"]));
|
|
88918
88956
|
this.loadAgentHttpsNames(store, records);
|
|
88919
88957
|
try {
|
|
88920
88958
|
if (records === void 0) await store.declareCollection.mutate({
|
|
@@ -88945,15 +88983,15 @@ var SystemConfigAddon = class extends require_dist.BaseAddon {
|
|
|
88945
88983
|
async loadAgentHttpsNames(store, records) {
|
|
88946
88984
|
try {
|
|
88947
88985
|
if (records === void 0) await store.declareCollection.mutate({
|
|
88948
|
-
collection:
|
|
88949
|
-
columns:
|
|
88986
|
+
collection: require_hub_identity.AGENT_HTTPS_NAMES_COLLECTION,
|
|
88987
|
+
columns: require_hub_identity.AGENT_HTTPS_NAMES_COLUMNS
|
|
88950
88988
|
});
|
|
88951
|
-
const names = records === void 0 ? new
|
|
88952
|
-
agentHttpsNamesKind: records.kind(
|
|
88989
|
+
const names = records === void 0 ? new require_hub_identity.AgentHttpsNames(store) : new require_hub_identity.AgentHttpsNames({
|
|
88990
|
+
agentHttpsNamesKind: records.kind(require_hub_identity.systemConfigRecordKinds["agent-https-names"]),
|
|
88953
88991
|
legacyStore: store
|
|
88954
88992
|
});
|
|
88955
88993
|
await names.load();
|
|
88956
|
-
|
|
88994
|
+
require_hub_identity.setProcessAgentHttpsNames(names);
|
|
88957
88995
|
} catch (err) {
|
|
88958
88996
|
this.ctx.logger.warn("Agent HTTPS names registry unavailable (agent HTTPS issuance will be refused until it loads)", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
88959
88997
|
}
|
|
@@ -89001,7 +89039,7 @@ var SystemConfigAddon = class extends require_dist.BaseAddon {
|
|
|
89001
89039
|
if (input.dashboardBaseUrl !== void 0) {
|
|
89002
89040
|
const origins = await this.readAgentDashboardOrigins();
|
|
89003
89041
|
if (!isAllowedAgentDashboardReturnTo(input.dashboardBaseUrl, origins)) throw new Error("dashboardBaseUrl is not an allowed agent dashboard origin (:4444 or agentDashboardOrigins)");
|
|
89004
|
-
const known =
|
|
89042
|
+
const known = require_hub_identity.getProcessAgentHttpsNames()?.namesOf(input.nodeId) ?? null;
|
|
89005
89043
|
if (!isKnownAgentAddress(input.dashboardBaseUrl, known, origins)) throw new Error(`dashboardBaseUrl is not an address this hub knows for "${input.nodeId}" - open the agent at its own address`);
|
|
89006
89044
|
}
|
|
89007
89045
|
const ticket = mintAgentUiUnlockTicket({
|
|
@@ -89321,6 +89359,7 @@ exports.createCidrMatcher = createCidrMatcher;
|
|
|
89321
89359
|
exports.createMeshCsrPem = createMeshCsrPem;
|
|
89322
89360
|
exports.describeCsr = describeCsr;
|
|
89323
89361
|
exports.describeMeshLeaf = describeMeshLeaf;
|
|
89362
|
+
exports.dialableHubHost = dialableHubHost;
|
|
89324
89363
|
exports.dropProcessPeer = dropProcessPeer;
|
|
89325
89364
|
exports.emitProcessNodeRegistered = emitProcessNodeRegistered;
|
|
89326
89365
|
exports.exportMeshPrivateKeyPem = exportMeshPrivateKeyPem;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Cc as hydrateSchema, Xa as shortHostname, dl as errMsg, fc as defineCustomActions, in as ServerNameSchema, ps as BaseAddon, uc as customAction } from "../../dist-
|
|
2
|
+
import { Cc as hydrateSchema, Xa as shortHostname, dl as errMsg, fc as defineCustomActions, in as ServerNameSchema, ps as BaseAddon, uc as customAction } from "../../dist-Bv_ADY4Y.mjs";
|
|
3
3
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
4
4
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension } from "../../x509.es-BRiJgOvu.mjs";
|
|
5
|
-
import { B as
|
|
6
|
-
import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-
|
|
5
|
+
import { B as AGENT_HTTPS_NAMES_COLLECTION, G as systemConfigRecordKinds, H as AgentHttpsNames, I as isLocalOnlyHostname, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, m as isPrivateAddress, r as isAnnouncedHubId } from "../../hub-identity-DSLLzLph.mjs";
|
|
6
|
+
import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-B7-Ccoim.mjs";
|
|
7
7
|
import { t as require_src } from "../../src-hG4grMU4.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, randomInt, sign, timingSafeEqual, verify, webcrypto } from "node:crypto";
|
|
@@ -87355,6 +87355,7 @@ function mintAnswer(caKeyPem, claims) {
|
|
|
87355
87355
|
nonce: claims.nonce,
|
|
87356
87356
|
status: claims.answer.status,
|
|
87357
87357
|
...claims.answer.reason !== void 0 ? { reason: claims.answer.reason } : {},
|
|
87358
|
+
...isAnnouncedHubId(claims.hubId) ? { hubId: claims.hubId } : {},
|
|
87358
87359
|
iat: claims.nowMs,
|
|
87359
87360
|
exp: claims.nowMs + MEMBERSHIP_TTL_MS
|
|
87360
87361
|
};
|
|
@@ -87408,10 +87409,16 @@ function verifyMembershipAnswer(caCertPem, token, options) {
|
|
|
87408
87409
|
const exp = Reflect.get(payload, "exp");
|
|
87409
87410
|
if (Reflect.get(payload, "v") !== MEMBERSHIP_VERSION || Reflect.get(payload, "use") !== "mesh-membership" || Reflect.get(payload, "nodeId") !== options.nodeId || Reflect.get(payload, "nonce") !== options.nonce || Reflect.get(payload, "fp") !== normalizeFingerprint(options.leafFingerprint) || !isStatus(status) || typeof iat !== "number" || typeof exp !== "number") return null;
|
|
87410
87411
|
if (exp <= nowMs || iat > nowMs + 6e4 || exp - iat > 6e4) return null;
|
|
87411
|
-
|
|
87412
|
+
const hubId = Reflect.get(payload, "hubId");
|
|
87413
|
+
if (hubId !== void 0 && !isAnnouncedHubId(hubId)) return null;
|
|
87414
|
+
const answer = typeof reason === "string" && status === "revoked" ? {
|
|
87412
87415
|
status,
|
|
87413
87416
|
reason
|
|
87414
87417
|
} : { status };
|
|
87418
|
+
return isAnnouncedHubId(hubId) ? {
|
|
87419
|
+
...answer,
|
|
87420
|
+
hubId
|
|
87421
|
+
} : answer;
|
|
87415
87422
|
}
|
|
87416
87423
|
/** The hub's side: hands out nonces and answers a node that proves it holds a leaf the hub issued. */
|
|
87417
87424
|
var MembershipResponder = class {
|
|
@@ -87509,7 +87516,8 @@ var MembershipResponder = class {
|
|
|
87509
87516
|
leafFingerprint: cert.fingerprint256,
|
|
87510
87517
|
nonce,
|
|
87511
87518
|
answer,
|
|
87512
|
-
nowMs: this.now()
|
|
87519
|
+
nowMs: this.now(),
|
|
87520
|
+
hubId: this.deps.hubId?.() ?? null
|
|
87513
87521
|
})
|
|
87514
87522
|
};
|
|
87515
87523
|
}
|
|
@@ -87759,6 +87767,7 @@ function verifyPairingOffer(caCertPem, token) {
|
|
|
87759
87767
|
const commitment = str("commitment");
|
|
87760
87768
|
const hubUrl = str("hubUrl");
|
|
87761
87769
|
const hubMeshAddress = str("hubMeshAddress");
|
|
87770
|
+
const hubId = str("hubId");
|
|
87762
87771
|
if (Reflect.get(payload, "use") !== "pairing-offer") return null;
|
|
87763
87772
|
if (typeof iat !== "number" || !Number.isFinite(iat)) return null;
|
|
87764
87773
|
if (agentNodeId === null || hubNodeId === null || caFingerprint === null || commitment === null || hubUrl === null || hubMeshAddress === null) return null;
|
|
@@ -87770,6 +87779,7 @@ function verifyPairingOffer(caCertPem, token) {
|
|
|
87770
87779
|
commitment,
|
|
87771
87780
|
hubUrl,
|
|
87772
87781
|
hubMeshAddress,
|
|
87782
|
+
...hubId !== null ? { hubId } : {},
|
|
87773
87783
|
iat
|
|
87774
87784
|
};
|
|
87775
87785
|
}
|
|
@@ -87851,6 +87861,19 @@ function readCaCertificate(pem, nowMs) {
|
|
|
87851
87861
|
return null;
|
|
87852
87862
|
}
|
|
87853
87863
|
}
|
|
87864
|
+
/**
|
|
87865
|
+
* The host this agent will dial for `address`, or `null` when no other machine could reach it:
|
|
87866
|
+
* empty, unspecified (`0.0.0.0`, `::`) or loopback. A pairing that would leave the agent with
|
|
87867
|
+
* such an address is refused instead of completing silently (#494).
|
|
87868
|
+
*/
|
|
87869
|
+
function dialableHubHost(address) {
|
|
87870
|
+
const host = hubHostFromMeshAddress(address);
|
|
87871
|
+
const bare = host.replace(/^\[|\]$/g, "").toLowerCase();
|
|
87872
|
+
if (bare.length === 0 || /^:\d*$/.test(bare)) return null;
|
|
87873
|
+
if (bare === "localhost" || bare === "0.0.0.0" || bare === "::" || bare === "::1") return null;
|
|
87874
|
+
if (bare.startsWith("127.") || bare.startsWith("::ffff:127.")) return null;
|
|
87875
|
+
return host;
|
|
87876
|
+
}
|
|
87854
87877
|
/** `host:6443` / `[::1]:6443` / `host` → the host, port dropped. */
|
|
87855
87878
|
function hubHostFromMeshAddress(address) {
|
|
87856
87879
|
const trimmed = address.trim();
|
|
@@ -87941,6 +87964,7 @@ var AgentPairing = class {
|
|
|
87941
87964
|
if (readCaCertificate(request.hubCaCertPem, this.now()) === null) return fail(400, "bad-ca", "the offered CA is not a valid self-signed CA certificate");
|
|
87942
87965
|
if (!/^[0-9a-f]{64}$/.test(request.commitment)) return fail(400, "bad-offer", "the commitment is malformed");
|
|
87943
87966
|
if (!isHttpUrl(request.hubUrl)) return fail(400, "bad-offer", "hubUrl is not an http(s) URL");
|
|
87967
|
+
if (dialableHubHost(request.hubMeshAddress) === null) return fail(400, "no-hub-address", `the hub offered no address this agent can dial ("${request.hubMeshAddress}") - set its LAN address on System -> Network`);
|
|
87944
87968
|
const caFingerprint = caFingerprintCompact(request.hubCaCertPem);
|
|
87945
87969
|
const refused = this.checkOfferSignature(request, caFingerprint);
|
|
87946
87970
|
if (refused !== null) return refused;
|
|
@@ -87961,7 +87985,8 @@ var AgentPairing = class {
|
|
|
87961
87985
|
caFingerprint,
|
|
87962
87986
|
commitment: request.commitment,
|
|
87963
87987
|
url: request.hubUrl,
|
|
87964
|
-
meshAddress: request.hubMeshAddress
|
|
87988
|
+
meshAddress: request.hubMeshAddress,
|
|
87989
|
+
hubId: request.hubId ?? null
|
|
87965
87990
|
},
|
|
87966
87991
|
keyPem,
|
|
87967
87992
|
csrPem,
|
|
@@ -88099,6 +88124,11 @@ var AgentPairing = class {
|
|
|
88099
88124
|
this.end(session, "failed");
|
|
88100
88125
|
return refusal;
|
|
88101
88126
|
}
|
|
88127
|
+
const hubAddress = dialableHubHost(session.hub.meshAddress);
|
|
88128
|
+
if (hubAddress === null) {
|
|
88129
|
+
this.end(session, "failed");
|
|
88130
|
+
return fail(400, "no-hub-address", "the hub offered no address this agent can dial");
|
|
88131
|
+
}
|
|
88102
88132
|
try {
|
|
88103
88133
|
await this.deps.install({
|
|
88104
88134
|
meshTls: {
|
|
@@ -88106,8 +88136,9 @@ var AgentPairing = class {
|
|
|
88106
88136
|
keyPem: session.keyPem,
|
|
88107
88137
|
caCertPem: session.hub.caCertPem
|
|
88108
88138
|
},
|
|
88109
|
-
hubAddress
|
|
88110
|
-
hubUrl: session.hub.url
|
|
88139
|
+
hubAddress,
|
|
88140
|
+
hubUrl: session.hub.url,
|
|
88141
|
+
hubId: session.hub.hubId
|
|
88111
88142
|
});
|
|
88112
88143
|
} catch (err) {
|
|
88113
88144
|
this.end(session, "failed");
|
|
@@ -88195,7 +88226,7 @@ var AgentPairing = class {
|
|
|
88195
88226
|
checkOfferSignature(request, caFingerprint) {
|
|
88196
88227
|
const claims = verifyPairingOffer(request.hubCaCertPem, request.signature);
|
|
88197
88228
|
const at = this.now();
|
|
88198
|
-
if (claims === null || claims.use !== "pairing-offer" || claims.agentNodeId !== this.deps.nodeId || claims.hubNodeId !== request.hubNodeId || claims.caFingerprint !== caFingerprint || claims.commitment !== request.commitment || claims.hubUrl !== request.hubUrl || claims.hubMeshAddress !== request.hubMeshAddress || claims.iat > at + 6e4 || at - claims.iat > 12e4) {
|
|
88229
|
+
if (claims === null || claims.use !== "pairing-offer" || claims.agentNodeId !== this.deps.nodeId || claims.hubNodeId !== request.hubNodeId || claims.caFingerprint !== caFingerprint || claims.commitment !== request.commitment || claims.hubUrl !== request.hubUrl || claims.hubMeshAddress !== request.hubMeshAddress || (claims.hubId ?? null) !== (request.hubId ?? null) || claims.iat > at + 6e4 || at - claims.iat > 12e4) {
|
|
88199
88230
|
this.deps.log?.("an offer without a valid CA signature was refused", {});
|
|
88200
88231
|
return fail(403, "bad-offer-signature", "the offer is not signed by the CA it presents");
|
|
88201
88232
|
}
|
|
@@ -88374,7 +88405,9 @@ function parseOffer(body) {
|
|
|
88374
88405
|
const hubUrl = Reflect.get(body, "hubUrl");
|
|
88375
88406
|
const hubMeshAddress = Reflect.get(body, "hubMeshAddress");
|
|
88376
88407
|
const signature = Reflect.get(body, "signature");
|
|
88408
|
+
const hubId = Reflect.get(body, "hubId");
|
|
88377
88409
|
if (typeof protocol !== "number") return null;
|
|
88410
|
+
if (hubId !== void 0 && !isAnnouncedHubId(hubId)) return null;
|
|
88378
88411
|
if (!isText(hubNodeId, 128) || !isText(hubCaCertPem, 16384) || !isText(commitment, 128)) return null;
|
|
88379
88412
|
if (!isText(hubUrl) || !isText(hubMeshAddress, 255) || !isText(signature, 4096)) return null;
|
|
88380
88413
|
return {
|
|
@@ -88384,6 +88417,7 @@ function parseOffer(body) {
|
|
|
88384
88417
|
commitment,
|
|
88385
88418
|
hubUrl,
|
|
88386
88419
|
hubMeshAddress,
|
|
88420
|
+
...hubId !== void 0 ? { hubId } : {},
|
|
88387
88421
|
signature
|
|
88388
88422
|
};
|
|
88389
88423
|
}
|
|
@@ -88443,6 +88477,8 @@ var HubPairing = class {
|
|
|
88443
88477
|
const hubNonce = randomHex(32);
|
|
88444
88478
|
const hubUrl = await this.deps.hubUrl();
|
|
88445
88479
|
const hubMeshAddress = await this.deps.hubMeshAddress();
|
|
88480
|
+
const hubId = this.deps.hubId?.() ?? null;
|
|
88481
|
+
const hubIdField = hubId !== null ? { hubId } : {};
|
|
88446
88482
|
const commitment = computePairingCommitment(ca.certPem, hubNonce);
|
|
88447
88483
|
const answer = await this.deps.transport.offer(endpoint, {
|
|
88448
88484
|
protocol: 1,
|
|
@@ -88451,6 +88487,7 @@ var HubPairing = class {
|
|
|
88451
88487
|
commitment,
|
|
88452
88488
|
hubUrl,
|
|
88453
88489
|
hubMeshAddress,
|
|
88490
|
+
...hubIdField,
|
|
88454
88491
|
signature: signPairingOffer(ca.keyPem, {
|
|
88455
88492
|
use: PAIRING_OFFER_USE,
|
|
88456
88493
|
agentNodeId: hello.nodeId,
|
|
@@ -88459,6 +88496,7 @@ var HubPairing = class {
|
|
|
88459
88496
|
commitment,
|
|
88460
88497
|
hubUrl,
|
|
88461
88498
|
hubMeshAddress,
|
|
88499
|
+
...hubIdField,
|
|
88462
88500
|
iat: this.now()
|
|
88463
88501
|
})
|
|
88464
88502
|
});
|
|
@@ -89262,4 +89300,4 @@ function parseMintUnlockInput(input) {
|
|
|
89262
89300
|
};
|
|
89263
89301
|
}
|
|
89264
89302
|
//#endregion
|
|
89265
|
-
export {
|
|
89303
|
+
export { caFingerprint as $, emitProcessNodeRegistered as A, setProcessMeshTlsListenerState as B, verifyMembershipAnswer as C, parseOriginList as Ct, ServiceBroker as D, parseCidrList as Dt, Errors as E, normalizeIp as Et, setProcessMeshPeerTransportLookup as F, describeMeshLeaf as G, MESH_NODE_CERTIFICATES_COLUMNS as H, renewMeshCertificate as I, MeshCrl as J, getProcessMeshCertificateRegistry as K, revokeMeshCertificate as L, getProcessPeerLeaf as M, isProcessVerifiedMeshPeer as N, setProcessMeshTlsEnabler as O, readCidrSetting as Ot, onProcessNodeRegistered as P, requireProcessMeshCa as Q, getProcessMeshTlsListenerState as R, signMembershipProof as S, SYSTEM_CONFIG_CLUSTER_SECTION_ID, normalizeOrigin as St, SystemConfigAddon, SystemConfigAddon as default, TlsTcpTransporter as T, createCidrMatcher as Tt, MeshCertificateRegistry as U, MESH_NODE_CERTIFICATES_COLLECTION as V, RENEWAL_ABANDONED as W, MeshCaKeeper as X, processMeshCrl as Y, getProcessMeshCaState as Z, keyFingerprintShort as _, parseAgentDashboardOrigins as _t, dialableHubHost as a, isValidAgentNodeId as at, MEMBERSHIP_PATHS as b, OPAQUE_ORIGIN as bt, PAIRING_MAX_CODE_ATTEMPTS as c, loadMeshCa as ct, PAIRING_PIN_DIGITS as d, AGENT_UI_UNLOCK_TYP as dt, caFingerprintCompact as et, PAIRING_PROTOCOL as f, AGENT_UI_UNLOCK_USE as ft, describeCsr as g, mintAgentUiUnlockTicket as gt, computePairingSas as h, isAllowedAgentDashboardReturnTo as ht, AgentPairing as i, generateMeshKeyPair as it, getProcessNodeMeshTransport as j, dropProcessPeer as k, PAIRING_MAX_SESSIONS as l, AGENT_DASHBOARD_ORIGINS_FIELD as lt, computePairingCommitment as m, UnlockTicketJtiStore as mt, HubPairing as n, exportMeshPrivateKeyPem as nt, hubHostFromMeshAddress as o, issueMeshLeafForNode as ot, PAIRING_TTL_MS as p, AGENT_UI_UNLOCK_VERSION as pt, setProcessMeshCertificateRegistry as q, PairingHttpError as r, generateMeshCa as rt, PAIRING_CODE_DIGITS as s, issueMeshLeafFromCsr as st, systemConfigMeshActions as t, createMeshCsrPem as tt, PAIRING_PATHS as u, AGENT_UI_UNLOCK_TTL_MS as ut, signPairingProof as v, verifyAgentUiUnlockTicket as vt, MESH_TLS_PORT_HELLO_FIELD as w, readOriginSetting as wt, MembershipResponder as x, isInsecureOrigin as xt, verifyPairingProof as y, InvalidCorsOriginError as yt, openMeshTlsWhenRevocationsLoaded as z };
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-KJhkakFo.js");
|
|
7
7
|
const require_formatter = require("../../formatter-xbxeV4GD.js");
|
|
8
8
|
const require_log_file_read_protocol = require("../../log-file-read-protocol-DSV_vQRb.js");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ti as logDestinationCapability, aa as preconditionOf, dc as defineAddonMigrations, ps as BaseAddon } from "../../dist-
|
|
1
|
+
import { Ti as logDestinationCapability, aa as preconditionOf, dc as defineAddonMigrations, ps as BaseAddon } from "../../dist-Bv_ADY4Y.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
|
|
3
3
|
import { a as LogFileIndexStore, i as serveRead, n as isFromReader, t as CancelBook } from "../../log-file-read-protocol-hTaAsYlX.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cs as HISTORY_DEFAULT_MIN_INTERVAL_MS, ul as DeviceType, xc as historyItemFieldPath } from "./dist-
|
|
1
|
+
import { Cs as HISTORY_DEFAULT_MIN_INTERVAL_MS, ul as DeviceType, xc as historyItemFieldPath } from "./dist-Bv_ADY4Y.mjs";
|
|
2
2
|
//#region src/builtins/device-history/store/series-registry.ts
|
|
3
3
|
function subjectIdOf(subject) {
|
|
4
4
|
return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_dist = require("./dist-
|
|
1
|
+
const require_dist = require("./dist-KJhkakFo.js");
|
|
2
2
|
//#region src/builtins/device-history/store/series-registry.ts
|
|
3
3
|
function subjectIdOf(subject) {
|
|
4
4
|
return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Jo as compositionSourceKey, dl as errMsg } from "./dist-
|
|
1
|
+
import { Jo as compositionSourceKey, dl as errMsg } from "./dist-Bv_ADY4Y.mjs";
|
|
2
2
|
//#region src/builtins/shared/device-state-changed.ts
|
|
3
3
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
4
4
|
function isRecord(value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
|
|
2
|
-
var MESH_CA_KEY_REF = require("./dist-
|
|
2
|
+
var MESH_CA_KEY_REF = require("./dist-KJhkakFo.js").buildSecretRef({
|
|
3
3
|
owner: "system",
|
|
4
4
|
scope: { kind: "global" },
|
|
5
5
|
fieldPath: "meshCaKey"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as DEVICE_SAN_CREDENTIAL_PREFIX, K as DEVICE_SAN_USER_PREFIX, nc as buildSecretRef } from "./dist-
|
|
1
|
+
import { G as DEVICE_SAN_CREDENTIAL_PREFIX, K as DEVICE_SAN_USER_PREFIX, nc as buildSecretRef } from "./dist-Bv_ADY4Y.mjs";
|
|
2
2
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension } from "./x509.es-BRiJgOvu.mjs";
|
|
3
3
|
import { X509Certificate, createPublicKey, randomBytes, verify, webcrypto } from "node:crypto";
|
|
4
4
|
//#region src/auth/jwt-signing-key.ts
|