@camstack/server 1.2.871 → 1.2.873
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 +16 -0
- package/dist/api/trpc/generated-cap-routers.js +7 -0
- package/dist/core/agent/expired-leaf-renewer.js +67 -0
- package/dist/core/agent/mesh-handshake-wiring.js +48 -0
- package/dist/manual-boot.js +6 -0
- package/package.json +14 -14
- 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 +4 -4
- package/system/dist/builtins/composer/composer.addon.mjs +4 -4
- 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-manager.addon.js +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- 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/local-network.addon.js +3 -3
- package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
- 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 +155 -21
- package/system/dist/builtins/system-config/system-config.addon.mjs +154 -22
- 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-BYuDoU5P.mjs → capture-engine-WL-mpqRt.mjs} +1 -1
- package/system/dist/{capture-engine-BNeKmvyo.js → capture-engine-p0DLUXcQ.js} +1 -1
- package/system/dist/{composition-sources-52ZtkEBw.js → composition-sources-BuRkhqkL.js} +1 -1
- package/system/dist/{composition-sources-DQwbBMG1.mjs → composition-sources-Dheuv9_O.mjs} +1 -1
- package/system/dist/constants-Ci169fqS.mjs +27 -0
- package/system/dist/{constants-jwecWQuN.js → constants-D8fNaNti.js} +14 -1
- package/system/dist/{device-ca-Bkujp9Cx.js → device-ca-CPeChXfp.js} +1 -1
- package/system/dist/{device-ca-DFi1axk5.mjs → device-ca-Cu6Xu_CS.mjs} +1 -1
- package/system/dist/{dist-B15a2506.mjs → dist-BBWAHu-O.mjs} +29 -2
- package/system/dist/{dist-8pvVkKh4.js → dist-BHAE4TbZ.js} +29 -2
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-3uLEvGsn.mjs → hub-identity-BPdwL_Qn.mjs} +1 -1
- package/system/dist/{hub-identity-C3ijBf-E.js → hub-identity-CfaF_M6Y.js} +1 -1
- package/system/dist/{hub-mdns-ciao-Ch6HwlRl.mjs → hub-mdns-ciao-1NZAZ7Mp.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-BUL3yLqz.js → hub-mdns-ciao-DS7-X9U_.js} +2 -2
- package/system/dist/index.js +10 -8
- package/system/dist/index.mjs +10 -10
- package/system/dist/kernel/index.d.ts +1 -1
- package/system/dist/kernel/moleculer/mesh-mtls/constants.d.ts +7 -2
- package/system/dist/kernel/moleculer/mesh-mtls/index.d.ts +2 -2
- package/system/dist/kernel/moleculer/mesh-mtls/mesh-ca.d.ts +1 -1
- package/system/dist/kernel/moleculer/mesh-mtls/mesh-peer-transport.d.ts +16 -0
- package/system/dist/kernel/moleculer/mesh-mtls/mesh-peer-verification.d.ts +30 -0
- package/system/dist/kernel/moleculer/mesh-mtls/tls-tcp-transporter.d.ts +24 -0
- package/system/dist/{legacy-integration-rows-door-BtRtvXfK.js → legacy-integration-rows-door-Bnz-aNu6.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-ChF97F5x.mjs → legacy-integration-rows-door-CsxfaUSU.mjs} +1 -1
- package/system/dist/{rename-composition-block-CHIIBly8.js → rename-composition-block-CQUr1lYO.js} +1 -1
- package/system/dist/{rename-composition-block-DfsNTQ2H.mjs → rename-composition-block-Dxywwjac.mjs} +1 -1
- package/system/dist/{restore-archive-B3y3I9SV.mjs → restore-archive-CFMsgNKV.mjs} +1 -1
- package/system/dist/{restore-archive-8o1pcPFB.js → restore-archive-CbMms_b0.js} +1 -1
- package/system/dist/{wal-maintenance-DxtgYuYM.mjs → wal-maintenance-6782RP08.mjs} +0 -0
- package/system/dist/{wal-maintenance-Cv6MfFm9.js → wal-maintenance-DJ76u4GY.js} +0 -0
- package/system/package.json +1 -1
- package/system/dist/constants-RWobCEGs.mjs +0 -20
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Bn as buildDeviceSignatureMessage, Bo as userManagementCapability, Bt as PREFERENCES_MAX_VALUE_BYTES, Dr as deviceCredentialsCapability, G as DEVICE_NONCE_TTL_MS, Gt as PreferenceDeviceIdSchema, H as DEVICE_ENROLLMENT_TTL_MS, Is as BaseAddon, Kt as PreferenceNamespaceSchema, Mn as authProviderCapability, O as CREDENTIAL_TOKEN_AUDIENCE, Ol as userError, P as CredentialTokenClaimsSchema, Rc as defineRecordKinds, Si as isCredentialTokenPayload, gn as TokenScopeSchema, ni as formatDeviceRevoker, ol as makeSecretMarker, qt as PreferenceValueSchema, rl as isSecretMarker, sn as ScopedTokenSchema, un as SsoBridgeClaimsSchema, vn as UserRecordSchema, zn as buildDeviceEnrollmentLink } from "../../dist-
|
|
2
|
+
import { Bn as buildDeviceSignatureMessage, Bo as userManagementCapability, Bt as PREFERENCES_MAX_VALUE_BYTES, Dr as deviceCredentialsCapability, G as DEVICE_NONCE_TTL_MS, Gt as PreferenceDeviceIdSchema, H as DEVICE_ENROLLMENT_TTL_MS, Is as BaseAddon, Kt as PreferenceNamespaceSchema, Mn as authProviderCapability, O as CREDENTIAL_TOKEN_AUDIENCE, Ol as userError, P as CredentialTokenClaimsSchema, Rc as defineRecordKinds, Si as isCredentialTokenPayload, gn as TokenScopeSchema, ni as formatDeviceRevoker, ol as makeSecretMarker, qt as PreferenceValueSchema, rl as isSecretMarker, sn as ScopedTokenSchema, un as SsoBridgeClaimsSchema, vn as UserRecordSchema, zn as buildDeviceEnrollmentLink } from "../../dist-BBWAHu-O.mjs";
|
|
3
3
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
4
4
|
import { t as require_ms } from "../../ms-CgH2OFlD.mjs";
|
|
5
|
-
import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-
|
|
5
|
+
import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-Cu6Xu_CS.mjs";
|
|
6
6
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import * as crypto$1 from "node:crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-BHAE4TbZ.js");
|
|
4
4
|
const require_dns_wire = require("../../dns-wire-B1BvF9Ao.js");
|
|
5
|
-
const require_hub_identity = require("../../hub-identity-
|
|
6
|
-
const require_hub_mdns_ciao = require("../../hub-mdns-ciao-
|
|
5
|
+
const require_hub_identity = require("../../hub-identity-CfaF_M6Y.js");
|
|
6
|
+
const require_hub_mdns_ciao = require("../../hub-mdns-ciao-DS7-X9U_.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_net = require("node:net");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Ci as isDefaultAppConnectionEndpoint, Ct as HUB_MDNS_TXT_KEYS, Fc as defineAddonMigrations, Ha as resolveAppConnections, Ho as validateCustomAddress, Il as errMsg, Is as BaseAddon, Li as localNetworkCapability, Rl as EventCategory, Rt as NetworkTunnelStartedDataSchema, St as HUB_MDNS_SERVICE_TYPE, Za as resolveNotificationTapAddress, Zn as checkRoleAddress, go as shortHostname, ha as pickAppLinkHub, qa as resolveHubAddressRoles, vi as isAppLinkBase, x as CAMSTACK_APP_LINK_ORIGIN, xa as preconditionOf } from "../../dist-
|
|
1
|
+
import { Ci as isDefaultAppConnectionEndpoint, Ct as HUB_MDNS_TXT_KEYS, Fc as defineAddonMigrations, Ha as resolveAppConnections, Ho as validateCustomAddress, Il as errMsg, Is as BaseAddon, Li as localNetworkCapability, Rl as EventCategory, Rt as NetworkTunnelStartedDataSchema, St as HUB_MDNS_SERVICE_TYPE, Za as resolveNotificationTapAddress, Zn as checkRoleAddress, go as shortHostname, ha as pickAppLinkHub, qa as resolveHubAddressRoles, vi as isAppLinkBase, x as CAMSTACK_APP_LINK_ORIGIN, xa as preconditionOf } from "../../dist-BBWAHu-O.mjs";
|
|
2
2
|
import { a as emptyMdnsRecords, c as parseMdnsMessage, i as buildRecordQuery, l as parseMdnsRecords, n as MDNS_PORT, o as mergeMdnsRecords, r as buildPtrQuery, s as normalizeServiceType, t as MDNS_GROUP } from "../../dns-wire-Dm3H_7ST.mjs";
|
|
3
|
-
import { i as loadOrCreateHubId, r as isAnnouncedHubId } from "../../hub-identity-
|
|
4
|
-
import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-
|
|
3
|
+
import { i as loadOrCreateHubId, r as isAnnouncedHubId } from "../../hub-identity-BPdwL_Qn.mjs";
|
|
4
|
+
import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-1NZAZ7Mp.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { isIP } from "node:net";
|
|
7
7
|
import { readFileSync } from "node:fs";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-BHAE4TbZ.js");
|
|
7
7
|
const require_log_read_filter = require("../../log-read-filter-Bi066jwU.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fc as defineAddonMigrations, Is as BaseAddon, Lc as defineEntryKind, Oi as isSameAddonId, Pn as bareAddonId, Qc as isInstanceEnabled, Vi as logDestinationCapability, dc as RevConflictError, fi as integrationInstancesCapability, nl as isSecretFieldView, oc as RecordIntegrationInstances, rl as isSecretMarker, xa as preconditionOf } from "../../dist-
|
|
1
|
+
import { Fc as defineAddonMigrations, Is as BaseAddon, Lc as defineEntryKind, Oi as isSameAddonId, Pn as bareAddonId, Qc as isInstanceEnabled, Vi as logDestinationCapability, dc as RevConflictError, fi as integrationInstancesCapability, nl as isSecretFieldView, oc as RecordIntegrationInstances, rl as isSecretMarker, xa as preconditionOf } from "../../dist-BBWAHu-O.mjs";
|
|
2
2
|
import { n as compileLogFilter, o as lineMatches } from "../../log-read-filter-D7Ev3zm-.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
@@ -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-BHAE4TbZ.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
node_fs = require_chunk.__toESM(node_fs);
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Il as errMsg, Is as BaseAddon, Nc as createEvent, Pa as reducePoints, Rl as EventCategory, Ua as resolveBucketMs, Xi as metricsProviderCapability, Zt as ROOT_BUCKET_KEY, _n as UNATTRIBUTED_BUCKET_KEY, ti as foldSnapshotByFunction } from "../../dist-
|
|
1
|
+
import { Il as errMsg, Is as BaseAddon, Nc as createEvent, Pa as reducePoints, Rl as EventCategory, Ua as resolveBucketMs, Xi as metricsProviderCapability, Zt as ROOT_BUCKET_KEY, _n as UNATTRIBUTED_BUCKET_KEY, ti as foldSnapshotByFunction } from "../../dist-BBWAHu-O.mjs";
|
|
2
2
|
import * as fs$1 from "node:fs";
|
|
3
3
|
import { constants, readFileSync } from "node:fs";
|
|
4
4
|
import { access, readFile, readdir } from "node:fs/promises";
|
|
@@ -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-BHAE4TbZ.js");
|
|
7
7
|
const require_coral_accelerators = require("../../coral-accelerators-BSVsBVzt.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Bc as emitReadiness, Il as errMsg, Is as BaseAddon, Lr as enumerateInferenceDevices, Rl as EventCategory, _a as platformProbeCapability, lo as scoreRuntimes, ua as parseAcceleratorFactsJson } from "../../dist-
|
|
2
|
+
import { Bc as emitReadiness, Il as errMsg, Is as BaseAddon, Lr as enumerateInferenceDevices, Rl as EventCategory, _a as platformProbeCapability, lo as scoreRuntimes, ua as parseAcceleratorFactsJson } from "../../dist-BBWAHu-O.mjs";
|
|
3
3
|
import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-DBlgWB8k.mjs";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-BHAE4TbZ.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
//#region src/builtins/record-entries/entries-service.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cl as secretViewsOf, Is as BaseAddon, Ma as recordEntriesCapability, gc as UnknownRecordKindError, qs as InvalidRecordError } from "../../dist-
|
|
1
|
+
import { Cl as secretViewsOf, Is as BaseAddon, Ma as recordEntriesCapability, gc as UnknownRecordKindError, qs as InvalidRecordError } from "../../dist-BBWAHu-O.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/builtins/record-entries/entries-service.ts
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-BHAE4TbZ.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
9
9
|
/**
|
package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Is as BaseAddon, Rl as EventCategory } from "../../dist-
|
|
1
|
+
import { Is as BaseAddon, Rl as EventCategory } from "../../dist-BBWAHu-O.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
4
4
|
/**
|
|
@@ -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-BHAE4TbZ.js");
|
|
7
7
|
const require_snapshot_courtesy = require("../../snapshot-courtesy-D_C5-nC0.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fl as DeviceType, Fn as batteryCapability, Il as errMsg, Is as BaseAddon, Ji as memoizePinnedFfmpeg, Nl as DeviceFeature, Oo as streamQualityLabel, Pn as bareAddonId, Rl as EventCategory, ll as nodePin, wr as deriveBatteryPresence, y as BatteryStatusSchema, yo as snapshotCapability } from "../../dist-
|
|
1
|
+
import { Fl as DeviceType, Fn as batteryCapability, Il as errMsg, Is as BaseAddon, Ji as memoizePinnedFfmpeg, Nl as DeviceFeature, Oo as streamQualityLabel, Pn as bareAddonId, Rl as EventCategory, ll as nodePin, wr as deriveBatteryPresence, y as BatteryStatusSchema, yo as snapshotCapability } from "../../dist-BBWAHu-O.mjs";
|
|
2
2
|
import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg } from "../../snapshot-courtesy-CyFs1M3I.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -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-BHAE4TbZ.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $r as filesystemBrowseCapability, Eo as storageProviderCapability, Is as BaseAddon } from "../../dist-
|
|
1
|
+
import { $r as filesystemBrowseCapability, Eo as storageProviderCapability, Is as BaseAddon } from "../../dist-BBWAHu-O.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import * as fs$1 from "node:fs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
|
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
6
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./filesystem-storage.addon.js");
|
|
7
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
7
|
+
const require_wal_maintenance = require("../../wal-maintenance-DJ76u4GY.js");
|
|
8
8
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./sqlite-settings.addon.js");
|
|
9
9
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
10
10
|
var ConfigStore = class {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./filesystem-storage.addon.mjs";
|
|
2
|
-
import { B as SQLITE_ENGINE_STORM_WALL_SHARE, F as SQLITE_MMAP_FLOOR_BYTES, G as SqliteOpProfiler, H as SQLITE_PROFILE_REPORT_INTERVAL_MS, I as SQLITE_PAGE_CACHE_CEILING_KIB, K as sqliteEngineStorm, L as SQLITE_PAGE_CACHE_FLOOR_KIB, N as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, P as SQLITE_MMAP_CEILING_BYTES, R as sqliteMmapSizeFor, U as SQLITE_PROFILE_TOP_N, V as SQLITE_PROFILE_REPORT_FLOOR_MS, W as SQLITE_SLOW_CALL_MS, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as sqlitePageCacheKibFor } from "../../wal-maintenance-
|
|
2
|
+
import { B as SQLITE_ENGINE_STORM_WALL_SHARE, F as SQLITE_MMAP_FLOOR_BYTES, G as SqliteOpProfiler, H as SQLITE_PROFILE_REPORT_INTERVAL_MS, I as SQLITE_PAGE_CACHE_CEILING_KIB, K as sqliteEngineStorm, L as SQLITE_PAGE_CACHE_FLOOR_KIB, N as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, P as SQLITE_MMAP_CEILING_BYTES, R as sqliteMmapSizeFor, U as SQLITE_PROFILE_TOP_N, V as SQLITE_PROFILE_REPORT_FLOOR_MS, W as SQLITE_SLOW_CALL_MS, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as sqlitePageCacheKibFor } from "../../wal-maintenance-6782RP08.mjs";
|
|
3
3
|
import { SqliteSettingsAddon } from "./sqlite-settings.addon.mjs";
|
|
4
4
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
5
5
|
var ConfigStore = class {
|
|
@@ -3,12 +3,12 @@ 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-BHAE4TbZ.js");
|
|
7
7
|
const require_retired_settings_keys = require("../../retired-settings-keys-C8nOOr5H.js");
|
|
8
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
8
|
+
const require_wal_maintenance = require("../../wal-maintenance-DJ76u4GY.js");
|
|
9
9
|
const require_sqlite_snapshot_protocol = require("../../sqlite-snapshot-protocol-B9OndqZv.js");
|
|
10
10
|
const require_wal_checkpoint_policy = require("../../wal-checkpoint-policy-d2z2qPqx.js");
|
|
11
|
-
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-
|
|
11
|
+
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-Bnz-aNu6.js");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let node_crypto = require("node:crypto");
|
|
14
14
|
let node_fs = require("node:fs");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $a as resolveRunnerId, F as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, Hs as DeclarationRefusedError, I as DATABASE_SNAPSHOT_SUFFIX, Ic as defineCustomActions, Il as errMsg$1, Is as BaseAddon, Js as NoCallerError, L as DATABASE_SNAPSHOT_TIMEOUT_MS, Lt as MigrationMetaSchema, Mt as MIGRATION_API_V1_METHODS, Na as recordsCapability, Pc as customAction, Pn as bareAddonId, R as DATA_STORE_DATABASES, Rl as EventCategory, So as storageAdminCapability, Yn as catalogueIssues, Zi as migrationsCapability, dl as normalizeSecretOwner, ec as RECORD_SWEEP_INTERVAL_MS, gc as UnknownRecordKindError, kc as collectSecretMarkerRefs, la as orderMigrations, mc as TransactRefusedError, qo as vectorStoreCapability, qs as InvalidRecordError, rc as RUNTIME_DEFAULTS, sc as RecordKindDeclarationSchema, vr as dataStoreProviderCapability, yr as databaseSnapshotCapability } from "../../dist-
|
|
1
|
+
import { $a as resolveRunnerId, F as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, Hs as DeclarationRefusedError, I as DATABASE_SNAPSHOT_SUFFIX, Ic as defineCustomActions, Il as errMsg$1, Is as BaseAddon, Js as NoCallerError, L as DATABASE_SNAPSHOT_TIMEOUT_MS, Lt as MigrationMetaSchema, Mt as MIGRATION_API_V1_METHODS, Na as recordsCapability, Pc as customAction, Pn as bareAddonId, R as DATA_STORE_DATABASES, Rl as EventCategory, So as storageAdminCapability, Yn as catalogueIssues, Zi as migrationsCapability, dl as normalizeSecretOwner, ec as RECORD_SWEEP_INTERVAL_MS, gc as UnknownRecordKindError, kc as collectSecretMarkerRefs, la as orderMigrations, mc as TransactRefusedError, qo as vectorStoreCapability, qs as InvalidRecordError, rc as RUNTIME_DEFAULTS, sc as RecordKindDeclarationSchema, vr as dataStoreProviderCapability, yr as databaseSnapshotCapability } from "../../dist-BBWAHu-O.mjs";
|
|
2
2
|
import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-u6xQA6r7.mjs";
|
|
3
|
-
import { A as callRecords, D as RecordsEngine, E as databaseOfStore, M as controlTargetOf, O as callControl, T as trustResult, _ as rehydrateError, a as WalMaintenance, b as collectTransferables, c as vectorProviderOfOwnedFile, d as callMigrate, f as migrateTargetOf, g as DuplicatePlacementError, h as DatabaseBusyError, j as callVector, k as callData, l as SqliteSettingsBackend, m as CrossDatabaseTransactError, o as createVectorIndex, p as CollectionPlacementError, s as vectorProviderOf, u as HUB_MIGRATIONS, x as isFileHostMessage } from "../../wal-maintenance-
|
|
3
|
+
import { A as callRecords, D as RecordsEngine, E as databaseOfStore, M as controlTargetOf, O as callControl, T as trustResult, _ as rehydrateError, a as WalMaintenance, b as collectTransferables, c as vectorProviderOfOwnedFile, d as callMigrate, f as migrateTargetOf, g as DuplicatePlacementError, h as DatabaseBusyError, j as callVector, k as callData, l as SqliteSettingsBackend, m as CrossDatabaseTransactError, o as createVectorIndex, p as CollectionPlacementError, s as vectorProviderOf, u as HUB_MIGRATIONS, x as isFileHostMessage } from "../../wal-maintenance-6782RP08.mjs";
|
|
4
4
|
import { r as isSnapshotWorkerMessage } from "../../sqlite-snapshot-protocol-2QaTouWV.mjs";
|
|
5
5
|
import { a as isWorkerMessage, t as WAL_CHECKPOINT_LARGE_PASS_FRAMES } from "../../wal-checkpoint-policy-BahrTtyD.mjs";
|
|
6
|
-
import { a as patchLegacyIntegrationRows, i as legacyIntegrationAddonId, n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows, r as deleteLegacyIntegrationRowKeys } from "../../legacy-integration-rows-door-
|
|
6
|
+
import { a as patchLegacyIntegrationRows, i as legacyIntegrationAddonId, n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows, r as deleteLegacyIntegrationRowKeys } from "../../legacy-integration-rows-door-CsxfaUSU.mjs";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
@@ -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-BHAE4TbZ.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $i as modeMayWrite, Co as storageCapability, Dc as collectSecretConfigKeys, Ec as buildSecretRef, Ei as isLocationEnabled, El as toSecretFieldView, Fc as defineAddonMigrations, Gi as mayWriteToLocation, Ic as defineCustomActions, Is as BaseAddon, Ja as resolveLocationMode, Pc as customAction, Qi as modeForSwitch, Rc as defineRecordKinds, Rl as EventCategory, Ur as evictionPolicyOfLocation, Wi as mayReadLocation, Xo as withLocationMode, dn as StorageCleanupJobSchema, do as settingsStoreCapability, fi as integrationInstancesCapability, fn as StorageLocationModeSchema, gl as recordSecretRef, ii as gbToBytes, jo as switchStateOfMode, ml as parseSecretRef, mn as StorageMigrationJobSchema, nl as isSecretFieldView, ol as makeSecretMarker, pn as StorageLocationTypeSchema, rl as isSecretMarker, rn as STORAGE_LOCATION_MODES, tc as REDACTED_SECRET, tl as isSecretClear, ul as normalizeNodeId, vl as resolveSecretMarkers, wo as storageMigrationCapability } from "../../dist-
|
|
1
|
+
import { $i as modeMayWrite, Co as storageCapability, Dc as collectSecretConfigKeys, Ec as buildSecretRef, Ei as isLocationEnabled, El as toSecretFieldView, Fc as defineAddonMigrations, Gi as mayWriteToLocation, Ic as defineCustomActions, Is as BaseAddon, Ja as resolveLocationMode, Pc as customAction, Qi as modeForSwitch, Rc as defineRecordKinds, Rl as EventCategory, Ur as evictionPolicyOfLocation, Wi as mayReadLocation, Xo as withLocationMode, dn as StorageCleanupJobSchema, do as settingsStoreCapability, fi as integrationInstancesCapability, fn as StorageLocationModeSchema, gl as recordSecretRef, ii as gbToBytes, jo as switchStateOfMode, ml as parseSecretRef, mn as StorageMigrationJobSchema, nl as isSecretFieldView, ol as makeSecretMarker, pn as StorageLocationTypeSchema, rl as isSecretMarker, rn as STORAGE_LOCATION_MODES, tc as REDACTED_SECRET, tl as isSecretClear, ul as normalizeNodeId, vl as resolveSecretMarkers, wo as storageMigrationCapability } from "../../dist-BBWAHu-O.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -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-BHAE4TbZ.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 require_hub_identity = require("../../hub-identity-
|
|
10
|
-
const require_constants$8 = require("../../constants-
|
|
9
|
+
const require_hub_identity = require("../../hub-identity-CfaF_M6Y.js");
|
|
10
|
+
const require_constants$8 = require("../../constants-D8fNaNti.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");
|
|
@@ -459,7 +459,7 @@ async function loadMeshCa(certPem, keyPem) {
|
|
|
459
459
|
}
|
|
460
460
|
/**
|
|
461
461
|
* Issue a leaf from a CSR. CN must be present; when `expectedNodeId` is set
|
|
462
|
-
* it must match. Validity:
|
|
462
|
+
* it must match. Validity: none (`MESH_LEAF_NOT_AFTER`); `validDays` is a spec seam that forges a short one.
|
|
463
463
|
*/
|
|
464
464
|
async function issueMeshLeafFromCsr(ca, csrPem, opts = {}) {
|
|
465
465
|
const csr = new require_x509_es.Pkcs10CertificateRequest(csrPem);
|
|
@@ -469,9 +469,8 @@ async function issueMeshLeafFromCsr(ca, csrPem, opts = {}) {
|
|
|
469
469
|
if (opts.allowReserved !== true && !isValidAgentNodeId(cn)) throw new Error(`CSR CN '${cn}' is not an id an agent may carry`);
|
|
470
470
|
if (opts.expectedNodeId !== void 0 && opts.expectedNodeId !== cn) throw new Error(`CSR CN '${cn}' does not match the token nodeId '${opts.expectedNodeId}'`);
|
|
471
471
|
const now = opts.now ?? /* @__PURE__ */ new Date();
|
|
472
|
-
const validDays = opts.validDays ?? 30;
|
|
473
472
|
const serialNumber = freshSerial();
|
|
474
|
-
const notAfter = new Date(now.getTime() + validDays * MS_PER_DAY);
|
|
473
|
+
const notAfter = opts.validDays === void 0 ? new Date(require_constants$8.MESH_LEAF_NOT_AFTER) : new Date(now.getTime() + opts.validDays * MS_PER_DAY);
|
|
475
474
|
const extensions = [
|
|
476
475
|
new require_x509_es.BasicConstraintsExtension(false, void 0, true),
|
|
477
476
|
new require_x509_es.KeyUsagesExtension(require_x509_es.KeyUsageFlags.digitalSignature, true),
|
|
@@ -1509,6 +1508,18 @@ function emitProcessNodeRegistered(nodeId, addonIds) {
|
|
|
1509
1508
|
listener(nodeId, addonIds);
|
|
1510
1509
|
} catch {}
|
|
1511
1510
|
}
|
|
1511
|
+
var REPORTER_SLOT = Symbol.for("camstack.cluster.mesh-handshake-reporter");
|
|
1512
|
+
function setProcessMeshHandshakeReporter(reporter) {
|
|
1513
|
+
if (reporter === null) Reflect.deleteProperty(globalThis, REPORTER_SLOT);
|
|
1514
|
+
else Reflect.set(globalThis, REPORTER_SLOT, reporter);
|
|
1515
|
+
}
|
|
1516
|
+
function isHandshakeReporter(value) {
|
|
1517
|
+
return value !== null && typeof value === "object" && typeof Reflect.get(value, "warn") === "function";
|
|
1518
|
+
}
|
|
1519
|
+
function getProcessMeshHandshakeReporter() {
|
|
1520
|
+
const value = Reflect.get(globalThis, REPORTER_SLOT);
|
|
1521
|
+
return isHandshakeReporter(value) ? value : null;
|
|
1522
|
+
}
|
|
1512
1523
|
//#endregion
|
|
1513
1524
|
//#region src/kernel/moleculer/mesh-mtls/mesh-tls-enabler.ts
|
|
1514
1525
|
var SLOT = Symbol.for("camstack.mesh.tls-enabler");
|
|
@@ -86743,6 +86754,63 @@ import_moleculer.default.Utils;
|
|
|
86743
86754
|
import_moleculer.default.Validator;
|
|
86744
86755
|
import_moleculer.default.Validators;
|
|
86745
86756
|
//#endregion
|
|
86757
|
+
//#region src/kernel/moleculer/mesh-mtls/mesh-peer-verification.ts
|
|
86758
|
+
/**
|
|
86759
|
+
* The hub's judgement of a mesh peer's leaf (#558, amends D857).
|
|
86760
|
+
*
|
|
86761
|
+
* Node verifies the chain and the clock in one step and reports a single error, so an expired leaf
|
|
86762
|
+
* and a forged one both fail the handshake. The listener therefore keeps verification ON but lets
|
|
86763
|
+
* the handshake finish (`rejectUnauthorized: false` reports `authorized` / `authorizationError`),
|
|
86764
|
+
* and decides here, explicitly: a peer is admitted when it is authorized, or - on the hub only -
|
|
86765
|
+
* when its sole failure is `CERT_HAS_EXPIRED` AND an independent check proves the leaf is signed by
|
|
86766
|
+
* the mesh CA, is a client-auth end entity, has started, and is not on the CRL. Revocation stays the
|
|
86767
|
+
* kill switch.
|
|
86768
|
+
*/
|
|
86769
|
+
function chainsToCa(leaf, ca, now) {
|
|
86770
|
+
if (now < Date.parse(ca.validFrom) || now > Date.parse(ca.validTo)) return false;
|
|
86771
|
+
if (!leaf.checkIssued(ca)) return false;
|
|
86772
|
+
if (!leaf.verify(ca.publicKey)) return false;
|
|
86773
|
+
if (leaf.ca) return false;
|
|
86774
|
+
return (leaf.keyUsage ?? []).includes(require_constants$8.CLIENT_AUTH_OID);
|
|
86775
|
+
}
|
|
86776
|
+
function refused(reason, nodeId, detail) {
|
|
86777
|
+
return {
|
|
86778
|
+
admit: false,
|
|
86779
|
+
reason,
|
|
86780
|
+
nodeId,
|
|
86781
|
+
detail
|
|
86782
|
+
};
|
|
86783
|
+
}
|
|
86784
|
+
function judgeMeshPeerLeaf(input) {
|
|
86785
|
+
if (input.leafDer === void 0) return refused("no-certificate", null, "no client certificate");
|
|
86786
|
+
let leaf;
|
|
86787
|
+
let ca;
|
|
86788
|
+
try {
|
|
86789
|
+
leaf = new node_crypto.X509Certificate(input.leafDer);
|
|
86790
|
+
ca = new node_crypto.X509Certificate(input.caCertPem);
|
|
86791
|
+
} catch {
|
|
86792
|
+
return refused("not-chained", null, "unparseable certificate");
|
|
86793
|
+
}
|
|
86794
|
+
const nodeId = subjectCn(leaf.subject);
|
|
86795
|
+
if (nodeId === null || nodeId.length === 0) return refused("cn-mismatch", null, "leaf has no CN");
|
|
86796
|
+
const timeOnly = !input.authorized && input.authorizationError === "CERT_HAS_EXPIRED";
|
|
86797
|
+
if (!input.authorized && !timeOnly) return refused(input.authorizationError === "CERT_NOT_YET_VALID" ? "not-yet-valid" : "not-chained", nodeId, input.authorizationError ?? "unverified");
|
|
86798
|
+
if (timeOnly) {
|
|
86799
|
+
if (!chainsToCa(leaf, ca, input.now)) return refused("not-chained", nodeId, "expired and not signed by the mesh CA");
|
|
86800
|
+
if (input.now < Date.parse(leaf.validFrom)) return refused("not-yet-valid", nodeId, "leaf not valid yet");
|
|
86801
|
+
}
|
|
86802
|
+
const serial = leaf.serialNumber;
|
|
86803
|
+
if (input.crl.isRevoked(serial)) return refused("revoked", nodeId, `serial ${serial} is revoked`);
|
|
86804
|
+
if (timeOnly && !input.admitExpired) return refused("expired", nodeId, "leaf expired");
|
|
86805
|
+
return {
|
|
86806
|
+
admit: true,
|
|
86807
|
+
nodeId,
|
|
86808
|
+
serial,
|
|
86809
|
+
expired: timeOnly,
|
|
86810
|
+
notAfter: Date.parse(leaf.validTo)
|
|
86811
|
+
};
|
|
86812
|
+
}
|
|
86813
|
+
//#endregion
|
|
86746
86814
|
//#region src/kernel/moleculer/mesh-mtls/tls-tcp-transporter.ts
|
|
86747
86815
|
/**
|
|
86748
86816
|
* Moleculer TCP transporter with a mutual-TLS listener (D826, D848).
|
|
@@ -86860,6 +86928,8 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
|
|
|
86860
86928
|
tlsServer = null;
|
|
86861
86929
|
meshTls;
|
|
86862
86930
|
crl;
|
|
86931
|
+
handshakeReporter;
|
|
86932
|
+
refusalLoggedAt = /* @__PURE__ */ new Map();
|
|
86863
86933
|
revokedPeerLoggedAt = /* @__PURE__ */ new Map();
|
|
86864
86934
|
tlsSockets = /* @__PURE__ */ new Set();
|
|
86865
86935
|
/** Node id (certificate CN) → serial of every peer that completed a mutual-TLS handshake. */
|
|
@@ -86882,6 +86952,7 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
|
|
|
86882
86952
|
super({ ...opts });
|
|
86883
86953
|
this.meshTls = opts.meshTls ?? null;
|
|
86884
86954
|
this.crl = opts.crl ?? processMeshCrl();
|
|
86955
|
+
this.handshakeReporter = opts.handshakeReporter;
|
|
86885
86956
|
this.hubTlsOnly = opts.hubTlsOnly === true;
|
|
86886
86957
|
this.hubOnlyPeers = opts.hubOnlyPeers === true;
|
|
86887
86958
|
this.hubNodeId = opts.hubNodeId ?? DEFAULT_HUB_NODE_ID;
|
|
@@ -87120,9 +87191,42 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
|
|
|
87120
87191
|
if (last !== void 0 && at - last < REVOKED_PEER_LOG_INTERVAL_MS) return;
|
|
87121
87192
|
if (this.revokedPeerLoggedAt.size >= 256) this.revokedPeerLoggedAt.clear();
|
|
87122
87193
|
this.revokedPeerLoggedAt.set(nodeId, at);
|
|
87123
|
-
this.
|
|
87124
|
-
|
|
87125
|
-
|
|
87194
|
+
this.reportWarn(`Mesh TLS peer presented a revoked certificate - ${action}`, nodeId, "revoked");
|
|
87195
|
+
}
|
|
87196
|
+
reporter() {
|
|
87197
|
+
return this.handshakeReporter ?? getProcessMeshHandshakeReporter();
|
|
87198
|
+
}
|
|
87199
|
+
/** A WARN that survives the transport log pin: the reporter when there is one, else the logger. */
|
|
87200
|
+
reportWarn(message, nodeId, reason, meta = {}) {
|
|
87201
|
+
const extras = {
|
|
87202
|
+
...nodeId !== null ? { tags: { nodeId } } : {},
|
|
87203
|
+
meta: {
|
|
87204
|
+
reason,
|
|
87205
|
+
...meta
|
|
87206
|
+
}
|
|
87207
|
+
};
|
|
87208
|
+
const reporter = this.reporter();
|
|
87209
|
+
if (reporter !== null) reporter.warn(message, extras);
|
|
87210
|
+
else this.logger.warn(message, extras);
|
|
87211
|
+
}
|
|
87212
|
+
/**
|
|
87213
|
+
* A refusal, once per window. Only `expired` carries a node id that was proven (the chain to the
|
|
87214
|
+
* mesh CA was checked); every other refusal is of a peer nobody vouched for, whose CN is whatever
|
|
87215
|
+
* it wrote. Those are keyed by remote address, and the claimed CN goes in `meta`, never in
|
|
87216
|
+
* `tags.nodeId` - a peer must not mint a log tag or a rate-limit key per CN.
|
|
87217
|
+
*/
|
|
87218
|
+
noteRefusedPeer(claimedCn, reason, detail, remoteAddress) {
|
|
87219
|
+
const proven = reason === "expired" && claimedCn !== null;
|
|
87220
|
+
const origin = remoteAddress?.replace(/^::ffff:/, "") ?? "unknown";
|
|
87221
|
+
const key = proven ? `node:${claimedCn}:${reason}` : `addr:${origin}:${reason}`;
|
|
87222
|
+
const at = Date.now();
|
|
87223
|
+
const last = this.refusalLoggedAt.get(key);
|
|
87224
|
+
if (last !== void 0 && at - last < REVOKED_PEER_LOG_INTERVAL_MS) return;
|
|
87225
|
+
if (this.refusalLoggedAt.size >= 256) this.refusalLoggedAt.clear();
|
|
87226
|
+
this.refusalLoggedAt.set(key, at);
|
|
87227
|
+
this.reportWarn(`Mesh TLS handshake refused (${reason}): ${detail}`, proven ? claimedCn : null, reason, proven ? { remoteAddress: origin } : {
|
|
87228
|
+
remoteAddress: origin,
|
|
87229
|
+
...claimedCn !== null ? { claimedNodeId: claimedCn } : {}
|
|
87126
87230
|
});
|
|
87127
87231
|
}
|
|
87128
87232
|
/** Close sockets whose peer serial was just revoked. */
|
|
@@ -87238,11 +87342,11 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
|
|
|
87238
87342
|
cert: material.certPem,
|
|
87239
87343
|
ca: [material.caCertPem],
|
|
87240
87344
|
requestCert: true,
|
|
87241
|
-
rejectUnauthorized:
|
|
87345
|
+
rejectUnauthorized: false,
|
|
87242
87346
|
minVersion: "TLSv1.3"
|
|
87243
87347
|
}, (socket) => this.onTlsClientConnected(socket));
|
|
87244
|
-
server.on("tlsClientError", (err) => {
|
|
87245
|
-
this.
|
|
87348
|
+
server.on("tlsClientError", (err, failed) => {
|
|
87349
|
+
this.noteRefusedPeer(null, "handshake-failed", `TLS handshake failed: ${err.message}`, failed.remoteAddress);
|
|
87246
87350
|
});
|
|
87247
87351
|
server.on("error", (err) => {
|
|
87248
87352
|
this.logger.error("Mesh TLS server error.", err);
|
|
@@ -87262,20 +87366,41 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
|
|
|
87262
87366
|
});
|
|
87263
87367
|
});
|
|
87264
87368
|
}
|
|
87369
|
+
/**
|
|
87370
|
+
* The hub let a peer in on a leaf that only expired: say so, and hand the node to the renewal,
|
|
87371
|
+
* which swaps it for the no-expiry leaf. The WARN is not rate limited - it is a recovery event.
|
|
87372
|
+
*/
|
|
87373
|
+
admitExpiredLeaf(nodeId, serial, notAfter) {
|
|
87374
|
+
this.reportWarn(`Mesh leaf of node '${nodeId}' expired ${new Date(notAfter).toISOString()} - admitted for recovery, renewing it`, nodeId, "expired");
|
|
87375
|
+
this.reporter()?.expiredLeafAdmitted?.({
|
|
87376
|
+
nodeId,
|
|
87377
|
+
serial,
|
|
87378
|
+
notAfter
|
|
87379
|
+
});
|
|
87380
|
+
}
|
|
87265
87381
|
onTlsClientConnected(socket) {
|
|
87266
|
-
const
|
|
87267
|
-
|
|
87268
|
-
|
|
87269
|
-
socket.
|
|
87270
|
-
|
|
87271
|
-
|
|
87272
|
-
|
|
87273
|
-
this.
|
|
87382
|
+
const presented = socket.getPeerCertificate(true);
|
|
87383
|
+
const verdict = judgeMeshPeerLeaf({
|
|
87384
|
+
leafDer: presented != null && typeof presented === "object" && Buffer.isBuffer(presented.raw) ? presented.raw : void 0,
|
|
87385
|
+
authorized: socket.authorized,
|
|
87386
|
+
authorizationError: authorizationCodeOf(socket.authorizationError),
|
|
87387
|
+
caCertPem: (this.meshTls ?? { caCertPem: "" }).caCertPem,
|
|
87388
|
+
crl: this.crl,
|
|
87389
|
+
admitExpired: this.hubTlsOnly,
|
|
87390
|
+
now: Date.now()
|
|
87391
|
+
});
|
|
87392
|
+
if (!verdict.admit) {
|
|
87393
|
+
if (verdict.reason === "revoked") this.noteRevokedPeer(verdict.nodeId ?? "unknown", "rejecting its connection");
|
|
87394
|
+
else this.noteRefusedPeer(verdict.nodeId, verdict.reason, verdict.detail, socket.remoteAddress);
|
|
87274
87395
|
socket.destroy();
|
|
87275
87396
|
return;
|
|
87276
87397
|
}
|
|
87398
|
+
const identity = {
|
|
87399
|
+
cn: verdict.nodeId,
|
|
87400
|
+
serial: verdict.serial
|
|
87401
|
+
};
|
|
87277
87402
|
if (this.hubOnlyPeers && identity.cn !== this.hubNodeId) {
|
|
87278
|
-
this.
|
|
87403
|
+
this.noteRefusedPeer(identity.cn, "cn-mismatch", `an enrolled agent accepts only '${this.hubNodeId}' (D848)`, socket.remoteAddress);
|
|
87279
87404
|
socket.destroy();
|
|
87280
87405
|
return;
|
|
87281
87406
|
}
|
|
@@ -87284,6 +87409,7 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
|
|
|
87284
87409
|
this.tlsSockets.add(socket);
|
|
87285
87410
|
this.tlsPeers.set(identity.cn, identity.serial);
|
|
87286
87411
|
this.rememberPeerLeaf(identity.cn, socket);
|
|
87412
|
+
if (verdict.expired) this.admitExpiredLeaf(identity.cn, identity.serial, verdict.notAfter);
|
|
87287
87413
|
const reader = this.reader;
|
|
87288
87414
|
socket.on("close", () => {
|
|
87289
87415
|
this.tlsSockets.delete(socket);
|
|
@@ -87310,6 +87436,12 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
|
|
|
87310
87436
|
});
|
|
87311
87437
|
}
|
|
87312
87438
|
};
|
|
87439
|
+
/** Node types the server-side `authorizationError` as an Error but sets the OpenSSL code name. */
|
|
87440
|
+
function authorizationCodeOf(error) {
|
|
87441
|
+
if (typeof error === "string") return error;
|
|
87442
|
+
if (error instanceof Error) return error.message;
|
|
87443
|
+
return null;
|
|
87444
|
+
}
|
|
87313
87445
|
function isTlsSocket(socket) {
|
|
87314
87446
|
return typeof socket.getPeerCertificate === "function" && typeof socket.encrypted === "boolean" && socket.encrypted === true;
|
|
87315
87447
|
}
|
|
@@ -89376,6 +89508,7 @@ exports.generateMeshCa = generateMeshCa;
|
|
|
89376
89508
|
exports.generateMeshKeyPair = generateMeshKeyPair;
|
|
89377
89509
|
exports.getProcessMeshCaState = getProcessMeshCaState;
|
|
89378
89510
|
exports.getProcessMeshCertificateRegistry = getProcessMeshCertificateRegistry;
|
|
89511
|
+
exports.getProcessMeshHandshakeReporter = getProcessMeshHandshakeReporter;
|
|
89379
89512
|
exports.getProcessMeshTlsListenerState = getProcessMeshTlsListenerState;
|
|
89380
89513
|
exports.getProcessNodeMeshTransport = getProcessNodeMeshTransport;
|
|
89381
89514
|
exports.getProcessPeerLeaf = getProcessPeerLeaf;
|
|
@@ -89403,6 +89536,7 @@ exports.renewMeshCertificate = renewMeshCertificate;
|
|
|
89403
89536
|
exports.requireProcessMeshCa = requireProcessMeshCa;
|
|
89404
89537
|
exports.revokeMeshCertificate = revokeMeshCertificate;
|
|
89405
89538
|
exports.setProcessMeshCertificateRegistry = setProcessMeshCertificateRegistry;
|
|
89539
|
+
exports.setProcessMeshHandshakeReporter = setProcessMeshHandshakeReporter;
|
|
89406
89540
|
exports.setProcessMeshPeerTransportLookup = setProcessMeshPeerTransportLookup;
|
|
89407
89541
|
exports.setProcessMeshTlsEnabler = setProcessMeshTlsEnabler;
|
|
89408
89542
|
exports.setProcessMeshTlsListenerState = setProcessMeshTlsListenerState;
|