@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,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 { Ic as defineCustomActions, Il as errMsg, Is as BaseAddon, Pc as customAction, cn as ServerNameSchema, go as shortHostname, qc as hydrateSchema } from "../../dist-
|
|
2
|
+
import { Ic as defineCustomActions, Il as errMsg, Is as BaseAddon, Pc as customAction, cn as ServerNameSchema, go as shortHostname, qc as hydrateSchema } from "../../dist-BBWAHu-O.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 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-
|
|
6
|
-
import { a as MESH_CA_KEY_REF, c as
|
|
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-BPdwL_Qn.mjs";
|
|
6
|
+
import { a as MESH_CA_KEY_REF, c as MESH_LEAF_NOT_AFTER, i as MESH_CA_FIELD, l as SERVER_AUTH_OID, 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-Ci169fqS.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";
|
|
@@ -449,7 +449,7 @@ async function loadMeshCa(certPem, keyPem) {
|
|
|
449
449
|
}
|
|
450
450
|
/**
|
|
451
451
|
* Issue a leaf from a CSR. CN must be present; when `expectedNodeId` is set
|
|
452
|
-
* it must match. Validity:
|
|
452
|
+
* it must match. Validity: none (`MESH_LEAF_NOT_AFTER`); `validDays` is a spec seam that forges a short one.
|
|
453
453
|
*/
|
|
454
454
|
async function issueMeshLeafFromCsr(ca, csrPem, opts = {}) {
|
|
455
455
|
const csr = new Pkcs10CertificateRequest(csrPem);
|
|
@@ -459,9 +459,8 @@ async function issueMeshLeafFromCsr(ca, csrPem, opts = {}) {
|
|
|
459
459
|
if (opts.allowReserved !== true && !isValidAgentNodeId(cn)) throw new Error(`CSR CN '${cn}' is not an id an agent may carry`);
|
|
460
460
|
if (opts.expectedNodeId !== void 0 && opts.expectedNodeId !== cn) throw new Error(`CSR CN '${cn}' does not match the token nodeId '${opts.expectedNodeId}'`);
|
|
461
461
|
const now = opts.now ?? /* @__PURE__ */ new Date();
|
|
462
|
-
const validDays = opts.validDays ?? 30;
|
|
463
462
|
const serialNumber = freshSerial();
|
|
464
|
-
const notAfter = new Date(now.getTime() + validDays * MS_PER_DAY);
|
|
463
|
+
const notAfter = opts.validDays === void 0 ? new Date(MESH_LEAF_NOT_AFTER) : new Date(now.getTime() + opts.validDays * MS_PER_DAY);
|
|
465
464
|
const extensions = [
|
|
466
465
|
new BasicConstraintsExtension(false, void 0, true),
|
|
467
466
|
new KeyUsagesExtension(KeyUsageFlags.digitalSignature, true),
|
|
@@ -1499,6 +1498,18 @@ function emitProcessNodeRegistered(nodeId, addonIds) {
|
|
|
1499
1498
|
listener(nodeId, addonIds);
|
|
1500
1499
|
} catch {}
|
|
1501
1500
|
}
|
|
1501
|
+
var REPORTER_SLOT = Symbol.for("camstack.cluster.mesh-handshake-reporter");
|
|
1502
|
+
function setProcessMeshHandshakeReporter(reporter) {
|
|
1503
|
+
if (reporter === null) Reflect.deleteProperty(globalThis, REPORTER_SLOT);
|
|
1504
|
+
else Reflect.set(globalThis, REPORTER_SLOT, reporter);
|
|
1505
|
+
}
|
|
1506
|
+
function isHandshakeReporter(value) {
|
|
1507
|
+
return value !== null && typeof value === "object" && typeof Reflect.get(value, "warn") === "function";
|
|
1508
|
+
}
|
|
1509
|
+
function getProcessMeshHandshakeReporter() {
|
|
1510
|
+
const value = Reflect.get(globalThis, REPORTER_SLOT);
|
|
1511
|
+
return isHandshakeReporter(value) ? value : null;
|
|
1512
|
+
}
|
|
1502
1513
|
//#endregion
|
|
1503
1514
|
//#region src/kernel/moleculer/mesh-mtls/mesh-tls-enabler.ts
|
|
1504
1515
|
var SLOT = Symbol.for("camstack.mesh.tls-enabler");
|
|
@@ -86733,6 +86744,63 @@ import_moleculer.default.Utils;
|
|
|
86733
86744
|
import_moleculer.default.Validator;
|
|
86734
86745
|
import_moleculer.default.Validators;
|
|
86735
86746
|
//#endregion
|
|
86747
|
+
//#region src/kernel/moleculer/mesh-mtls/mesh-peer-verification.ts
|
|
86748
|
+
/**
|
|
86749
|
+
* The hub's judgement of a mesh peer's leaf (#558, amends D857).
|
|
86750
|
+
*
|
|
86751
|
+
* Node verifies the chain and the clock in one step and reports a single error, so an expired leaf
|
|
86752
|
+
* and a forged one both fail the handshake. The listener therefore keeps verification ON but lets
|
|
86753
|
+
* the handshake finish (`rejectUnauthorized: false` reports `authorized` / `authorizationError`),
|
|
86754
|
+
* and decides here, explicitly: a peer is admitted when it is authorized, or - on the hub only -
|
|
86755
|
+
* when its sole failure is `CERT_HAS_EXPIRED` AND an independent check proves the leaf is signed by
|
|
86756
|
+
* the mesh CA, is a client-auth end entity, has started, and is not on the CRL. Revocation stays the
|
|
86757
|
+
* kill switch.
|
|
86758
|
+
*/
|
|
86759
|
+
function chainsToCa(leaf, ca, now) {
|
|
86760
|
+
if (now < Date.parse(ca.validFrom) || now > Date.parse(ca.validTo)) return false;
|
|
86761
|
+
if (!leaf.checkIssued(ca)) return false;
|
|
86762
|
+
if (!leaf.verify(ca.publicKey)) return false;
|
|
86763
|
+
if (leaf.ca) return false;
|
|
86764
|
+
return (leaf.keyUsage ?? []).includes(CLIENT_AUTH_OID);
|
|
86765
|
+
}
|
|
86766
|
+
function refused(reason, nodeId, detail) {
|
|
86767
|
+
return {
|
|
86768
|
+
admit: false,
|
|
86769
|
+
reason,
|
|
86770
|
+
nodeId,
|
|
86771
|
+
detail
|
|
86772
|
+
};
|
|
86773
|
+
}
|
|
86774
|
+
function judgeMeshPeerLeaf(input) {
|
|
86775
|
+
if (input.leafDer === void 0) return refused("no-certificate", null, "no client certificate");
|
|
86776
|
+
let leaf;
|
|
86777
|
+
let ca;
|
|
86778
|
+
try {
|
|
86779
|
+
leaf = new X509Certificate(input.leafDer);
|
|
86780
|
+
ca = new X509Certificate(input.caCertPem);
|
|
86781
|
+
} catch {
|
|
86782
|
+
return refused("not-chained", null, "unparseable certificate");
|
|
86783
|
+
}
|
|
86784
|
+
const nodeId = subjectCn(leaf.subject);
|
|
86785
|
+
if (nodeId === null || nodeId.length === 0) return refused("cn-mismatch", null, "leaf has no CN");
|
|
86786
|
+
const timeOnly = !input.authorized && input.authorizationError === "CERT_HAS_EXPIRED";
|
|
86787
|
+
if (!input.authorized && !timeOnly) return refused(input.authorizationError === "CERT_NOT_YET_VALID" ? "not-yet-valid" : "not-chained", nodeId, input.authorizationError ?? "unverified");
|
|
86788
|
+
if (timeOnly) {
|
|
86789
|
+
if (!chainsToCa(leaf, ca, input.now)) return refused("not-chained", nodeId, "expired and not signed by the mesh CA");
|
|
86790
|
+
if (input.now < Date.parse(leaf.validFrom)) return refused("not-yet-valid", nodeId, "leaf not valid yet");
|
|
86791
|
+
}
|
|
86792
|
+
const serial = leaf.serialNumber;
|
|
86793
|
+
if (input.crl.isRevoked(serial)) return refused("revoked", nodeId, `serial ${serial} is revoked`);
|
|
86794
|
+
if (timeOnly && !input.admitExpired) return refused("expired", nodeId, "leaf expired");
|
|
86795
|
+
return {
|
|
86796
|
+
admit: true,
|
|
86797
|
+
nodeId,
|
|
86798
|
+
serial,
|
|
86799
|
+
expired: timeOnly,
|
|
86800
|
+
notAfter: Date.parse(leaf.validTo)
|
|
86801
|
+
};
|
|
86802
|
+
}
|
|
86803
|
+
//#endregion
|
|
86736
86804
|
//#region src/kernel/moleculer/mesh-mtls/tls-tcp-transporter.ts
|
|
86737
86805
|
/**
|
|
86738
86806
|
* Moleculer TCP transporter with a mutual-TLS listener (D826, D848).
|
|
@@ -86850,6 +86918,8 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
|
|
|
86850
86918
|
tlsServer = null;
|
|
86851
86919
|
meshTls;
|
|
86852
86920
|
crl;
|
|
86921
|
+
handshakeReporter;
|
|
86922
|
+
refusalLoggedAt = /* @__PURE__ */ new Map();
|
|
86853
86923
|
revokedPeerLoggedAt = /* @__PURE__ */ new Map();
|
|
86854
86924
|
tlsSockets = /* @__PURE__ */ new Set();
|
|
86855
86925
|
/** Node id (certificate CN) → serial of every peer that completed a mutual-TLS handshake. */
|
|
@@ -86872,6 +86942,7 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
|
|
|
86872
86942
|
super({ ...opts });
|
|
86873
86943
|
this.meshTls = opts.meshTls ?? null;
|
|
86874
86944
|
this.crl = opts.crl ?? processMeshCrl();
|
|
86945
|
+
this.handshakeReporter = opts.handshakeReporter;
|
|
86875
86946
|
this.hubTlsOnly = opts.hubTlsOnly === true;
|
|
86876
86947
|
this.hubOnlyPeers = opts.hubOnlyPeers === true;
|
|
86877
86948
|
this.hubNodeId = opts.hubNodeId ?? DEFAULT_HUB_NODE_ID;
|
|
@@ -87110,9 +87181,42 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
|
|
|
87110
87181
|
if (last !== void 0 && at - last < REVOKED_PEER_LOG_INTERVAL_MS) return;
|
|
87111
87182
|
if (this.revokedPeerLoggedAt.size >= 256) this.revokedPeerLoggedAt.clear();
|
|
87112
87183
|
this.revokedPeerLoggedAt.set(nodeId, at);
|
|
87113
|
-
this.
|
|
87114
|
-
|
|
87115
|
-
|
|
87184
|
+
this.reportWarn(`Mesh TLS peer presented a revoked certificate - ${action}`, nodeId, "revoked");
|
|
87185
|
+
}
|
|
87186
|
+
reporter() {
|
|
87187
|
+
return this.handshakeReporter ?? getProcessMeshHandshakeReporter();
|
|
87188
|
+
}
|
|
87189
|
+
/** A WARN that survives the transport log pin: the reporter when there is one, else the logger. */
|
|
87190
|
+
reportWarn(message, nodeId, reason, meta = {}) {
|
|
87191
|
+
const extras = {
|
|
87192
|
+
...nodeId !== null ? { tags: { nodeId } } : {},
|
|
87193
|
+
meta: {
|
|
87194
|
+
reason,
|
|
87195
|
+
...meta
|
|
87196
|
+
}
|
|
87197
|
+
};
|
|
87198
|
+
const reporter = this.reporter();
|
|
87199
|
+
if (reporter !== null) reporter.warn(message, extras);
|
|
87200
|
+
else this.logger.warn(message, extras);
|
|
87201
|
+
}
|
|
87202
|
+
/**
|
|
87203
|
+
* A refusal, once per window. Only `expired` carries a node id that was proven (the chain to the
|
|
87204
|
+
* mesh CA was checked); every other refusal is of a peer nobody vouched for, whose CN is whatever
|
|
87205
|
+
* it wrote. Those are keyed by remote address, and the claimed CN goes in `meta`, never in
|
|
87206
|
+
* `tags.nodeId` - a peer must not mint a log tag or a rate-limit key per CN.
|
|
87207
|
+
*/
|
|
87208
|
+
noteRefusedPeer(claimedCn, reason, detail, remoteAddress) {
|
|
87209
|
+
const proven = reason === "expired" && claimedCn !== null;
|
|
87210
|
+
const origin = remoteAddress?.replace(/^::ffff:/, "") ?? "unknown";
|
|
87211
|
+
const key = proven ? `node:${claimedCn}:${reason}` : `addr:${origin}:${reason}`;
|
|
87212
|
+
const at = Date.now();
|
|
87213
|
+
const last = this.refusalLoggedAt.get(key);
|
|
87214
|
+
if (last !== void 0 && at - last < REVOKED_PEER_LOG_INTERVAL_MS) return;
|
|
87215
|
+
if (this.refusalLoggedAt.size >= 256) this.refusalLoggedAt.clear();
|
|
87216
|
+
this.refusalLoggedAt.set(key, at);
|
|
87217
|
+
this.reportWarn(`Mesh TLS handshake refused (${reason}): ${detail}`, proven ? claimedCn : null, reason, proven ? { remoteAddress: origin } : {
|
|
87218
|
+
remoteAddress: origin,
|
|
87219
|
+
...claimedCn !== null ? { claimedNodeId: claimedCn } : {}
|
|
87116
87220
|
});
|
|
87117
87221
|
}
|
|
87118
87222
|
/** Close sockets whose peer serial was just revoked. */
|
|
@@ -87228,11 +87332,11 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
|
|
|
87228
87332
|
cert: material.certPem,
|
|
87229
87333
|
ca: [material.caCertPem],
|
|
87230
87334
|
requestCert: true,
|
|
87231
|
-
rejectUnauthorized:
|
|
87335
|
+
rejectUnauthorized: false,
|
|
87232
87336
|
minVersion: "TLSv1.3"
|
|
87233
87337
|
}, (socket) => this.onTlsClientConnected(socket));
|
|
87234
|
-
server.on("tlsClientError", (err) => {
|
|
87235
|
-
this.
|
|
87338
|
+
server.on("tlsClientError", (err, failed) => {
|
|
87339
|
+
this.noteRefusedPeer(null, "handshake-failed", `TLS handshake failed: ${err.message}`, failed.remoteAddress);
|
|
87236
87340
|
});
|
|
87237
87341
|
server.on("error", (err) => {
|
|
87238
87342
|
this.logger.error("Mesh TLS server error.", err);
|
|
@@ -87252,20 +87356,41 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
|
|
|
87252
87356
|
});
|
|
87253
87357
|
});
|
|
87254
87358
|
}
|
|
87359
|
+
/**
|
|
87360
|
+
* The hub let a peer in on a leaf that only expired: say so, and hand the node to the renewal,
|
|
87361
|
+
* which swaps it for the no-expiry leaf. The WARN is not rate limited - it is a recovery event.
|
|
87362
|
+
*/
|
|
87363
|
+
admitExpiredLeaf(nodeId, serial, notAfter) {
|
|
87364
|
+
this.reportWarn(`Mesh leaf of node '${nodeId}' expired ${new Date(notAfter).toISOString()} - admitted for recovery, renewing it`, nodeId, "expired");
|
|
87365
|
+
this.reporter()?.expiredLeafAdmitted?.({
|
|
87366
|
+
nodeId,
|
|
87367
|
+
serial,
|
|
87368
|
+
notAfter
|
|
87369
|
+
});
|
|
87370
|
+
}
|
|
87255
87371
|
onTlsClientConnected(socket) {
|
|
87256
|
-
const
|
|
87257
|
-
|
|
87258
|
-
|
|
87259
|
-
socket.
|
|
87260
|
-
|
|
87261
|
-
|
|
87262
|
-
|
|
87263
|
-
this.
|
|
87372
|
+
const presented = socket.getPeerCertificate(true);
|
|
87373
|
+
const verdict = judgeMeshPeerLeaf({
|
|
87374
|
+
leafDer: presented != null && typeof presented === "object" && Buffer.isBuffer(presented.raw) ? presented.raw : void 0,
|
|
87375
|
+
authorized: socket.authorized,
|
|
87376
|
+
authorizationError: authorizationCodeOf(socket.authorizationError),
|
|
87377
|
+
caCertPem: (this.meshTls ?? { caCertPem: "" }).caCertPem,
|
|
87378
|
+
crl: this.crl,
|
|
87379
|
+
admitExpired: this.hubTlsOnly,
|
|
87380
|
+
now: Date.now()
|
|
87381
|
+
});
|
|
87382
|
+
if (!verdict.admit) {
|
|
87383
|
+
if (verdict.reason === "revoked") this.noteRevokedPeer(verdict.nodeId ?? "unknown", "rejecting its connection");
|
|
87384
|
+
else this.noteRefusedPeer(verdict.nodeId, verdict.reason, verdict.detail, socket.remoteAddress);
|
|
87264
87385
|
socket.destroy();
|
|
87265
87386
|
return;
|
|
87266
87387
|
}
|
|
87388
|
+
const identity = {
|
|
87389
|
+
cn: verdict.nodeId,
|
|
87390
|
+
serial: verdict.serial
|
|
87391
|
+
};
|
|
87267
87392
|
if (this.hubOnlyPeers && identity.cn !== this.hubNodeId) {
|
|
87268
|
-
this.
|
|
87393
|
+
this.noteRefusedPeer(identity.cn, "cn-mismatch", `an enrolled agent accepts only '${this.hubNodeId}' (D848)`, socket.remoteAddress);
|
|
87269
87394
|
socket.destroy();
|
|
87270
87395
|
return;
|
|
87271
87396
|
}
|
|
@@ -87274,6 +87399,7 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
|
|
|
87274
87399
|
this.tlsSockets.add(socket);
|
|
87275
87400
|
this.tlsPeers.set(identity.cn, identity.serial);
|
|
87276
87401
|
this.rememberPeerLeaf(identity.cn, socket);
|
|
87402
|
+
if (verdict.expired) this.admitExpiredLeaf(identity.cn, identity.serial, verdict.notAfter);
|
|
87277
87403
|
const reader = this.reader;
|
|
87278
87404
|
socket.on("close", () => {
|
|
87279
87405
|
this.tlsSockets.delete(socket);
|
|
@@ -87299,6 +87425,12 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
|
|
|
87299
87425
|
});
|
|
87300
87426
|
}
|
|
87301
87427
|
};
|
|
87428
|
+
/** Node types the server-side `authorizationError` as an Error but sets the OpenSSL code name. */
|
|
87429
|
+
function authorizationCodeOf(error) {
|
|
87430
|
+
if (typeof error === "string") return error;
|
|
87431
|
+
if (error instanceof Error) return error.message;
|
|
87432
|
+
return null;
|
|
87433
|
+
}
|
|
87302
87434
|
function isTlsSocket(socket) {
|
|
87303
87435
|
return typeof socket.getPeerCertificate === "function" && typeof socket.encrypted === "boolean" && socket.encrypted === true;
|
|
87304
87436
|
}
|
|
@@ -89309,4 +89441,4 @@ function parseMintUnlockInput(input) {
|
|
|
89309
89441
|
};
|
|
89310
89442
|
}
|
|
89311
89443
|
//#endregion
|
|
89312
|
-
export {
|
|
89444
|
+
export { getProcessMeshCaState as $, emitProcessNodeRegistered as A, readCidrSetting as At, getProcessMeshTlsListenerState as B, verifyMembershipAnswer as C, isInsecureOrigin as Ct, ServiceBroker as D, createCidrMatcher as Dt, Errors as E, readOriginSetting as Et, onProcessNodeRegistered as F, MeshCertificateRegistry as G, setProcessMeshTlsListenerState as H, setProcessMeshHandshakeReporter as I, getProcessMeshCertificateRegistry as J, RENEWAL_ABANDONED as K, setProcessMeshPeerTransportLookup as L, getProcessNodeMeshTransport as M, getProcessPeerLeaf as N, setProcessMeshTlsEnabler as O, normalizeIp as Ot, isProcessVerifiedMeshPeer as P, MeshCaKeeper as Q, renewMeshCertificate as R, signMembershipProof as S, SYSTEM_CONFIG_CLUSTER_SECTION_ID, OPAQUE_ORIGIN as St, SystemConfigAddon, SystemConfigAddon as default, TlsTcpTransporter as T, parseOriginList as Tt, MESH_NODE_CERTIFICATES_COLLECTION as U, openMeshTlsWhenRevocationsLoaded as V, MESH_NODE_CERTIFICATES_COLUMNS as W, MeshCrl as X, setProcessMeshCertificateRegistry as Y, processMeshCrl as Z, keyFingerprintShort as _, isAllowedAgentDashboardReturnTo as _t, dialableHubHost as a, generateMeshCa as at, MEMBERSHIP_PATHS as b, verifyAgentUiUnlockTicket as bt, PAIRING_MAX_CODE_ATTEMPTS as c, issueMeshLeafForNode as ct, PAIRING_PIN_DIGITS as d, AGENT_DASHBOARD_ORIGINS_FIELD as dt, requireProcessMeshCa as et, PAIRING_PROTOCOL as f, AGENT_UI_UNLOCK_TTL_MS as ft, describeCsr as g, UnlockTicketJtiStore as gt, computePairingSas as h, AGENT_UI_UNLOCK_VERSION as ht, AgentPairing as i, exportMeshPrivateKeyPem as it, getProcessMeshHandshakeReporter as j, dropProcessPeer as k, parseCidrList as kt, PAIRING_MAX_SESSIONS as l, issueMeshLeafFromCsr as lt, computePairingCommitment as m, AGENT_UI_UNLOCK_USE as mt, HubPairing as n, caFingerprintCompact as nt, hubHostFromMeshAddress as o, generateMeshKeyPair as ot, PAIRING_TTL_MS as p, AGENT_UI_UNLOCK_TYP as pt, describeMeshLeaf as q, PairingHttpError as r, createMeshCsrPem as rt, PAIRING_CODE_DIGITS as s, isValidAgentNodeId as st, systemConfigMeshActions as t, caFingerprint as tt, PAIRING_PATHS as u, loadMeshCa as ut, signPairingProof as v, mintAgentUiUnlockTicket as vt, MESH_TLS_PORT_HELLO_FIELD as w, normalizeOrigin as wt, MembershipResponder as x, InvalidCorsOriginError as xt, verifyPairingProof as y, parseAgentDashboardOrigins as yt, revokeMeshCertificate 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-BHAE4TbZ.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 { Fc as defineAddonMigrations, Is as BaseAddon, Vi as logDestinationCapability, xa as preconditionOf } from "../../dist-
|
|
1
|
+
import { Fc as defineAddonMigrations, Is as BaseAddon, Vi as logDestinationCapability, xa as preconditionOf } from "../../dist-BBWAHu-O.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 { Fl as DeviceType, Gc as historyItemFieldPath, Ks as HISTORY_DEFAULT_MIN_INTERVAL_MS } from "./dist-
|
|
1
|
+
import { Fl as DeviceType, Gc as historyItemFieldPath, Ks as HISTORY_DEFAULT_MIN_INTERVAL_MS } from "./dist-BBWAHu-O.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-BHAE4TbZ.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 { Il as errMsg, _s as compositionSourceKey } from "./dist-
|
|
1
|
+
import { Il as errMsg, _s as compositionSourceKey } from "./dist-BBWAHu-O.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) {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Ec as buildSecretRef } from "./dist-BBWAHu-O.mjs";
|
|
2
|
+
/** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
|
|
3
|
+
var MESH_CA_KEY_REF = buildSecretRef({
|
|
4
|
+
owner: "system",
|
|
5
|
+
scope: { kind: "global" },
|
|
6
|
+
fieldPath: "meshCaKey"
|
|
7
|
+
});
|
|
8
|
+
/** `system-settings` key holding the public CA certificate PEM. */
|
|
9
|
+
var MESH_CA_SETTINGS_KEY = "cluster.meshCa";
|
|
10
|
+
/** Field inside the `cluster` section. */
|
|
11
|
+
var MESH_CA_FIELD = "meshCa";
|
|
12
|
+
/**
|
|
13
|
+
* A mesh leaf does not expire (#558, amends D857): RFC 5280 section 4.1.2.5 "no well-defined
|
|
14
|
+
* expiration date" is 9999-12-31T23:59:59Z. Identity ends by revocation (the CRL) or by an explicit
|
|
15
|
+
* rotation (`certificates.renewMeshOnNode`), never by the clock.
|
|
16
|
+
*/
|
|
17
|
+
var MESH_LEAF_NOT_AFTER = /* @__PURE__ */ new Date("9999-12-31T23:59:59Z");
|
|
18
|
+
/** The mesh CA lifetime. Leaves outlive it on purpose: chain building does not nest validity. */
|
|
19
|
+
var MESH_CA_VALIDITY_DAYS = 3650;
|
|
20
|
+
var DEFAULT_HUB_TLS_TCP_PORT = 6443;
|
|
21
|
+
/** Subject of the mesh root. Distinct from the HTTPS local CA. */
|
|
22
|
+
var MESH_CA_COMMON_NAME = "CamStack Mesh CA";
|
|
23
|
+
/** Client + server auth EKU OIDs (mutual TLS). */
|
|
24
|
+
var SERVER_AUTH_OID = "1.3.6.1.5.5.7.3.1";
|
|
25
|
+
var CLIENT_AUTH_OID = "1.3.6.1.5.5.7.3.2";
|
|
26
|
+
//#endregion
|
|
27
|
+
export { MESH_CA_KEY_REF as a, MESH_LEAF_NOT_AFTER as c, MESH_CA_FIELD as i, SERVER_AUTH_OID as l, DEFAULT_HUB_TLS_TCP_PORT as n, MESH_CA_SETTINGS_KEY as o, MESH_CA_COMMON_NAME as r, MESH_CA_VALIDITY_DAYS as s, CLIENT_AUTH_OID as t };
|
|
@@ -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-BHAE4TbZ.js").buildSecretRef({
|
|
3
3
|
owner: "system",
|
|
4
4
|
scope: { kind: "global" },
|
|
5
5
|
fieldPath: "meshCaKey"
|
|
@@ -8,6 +8,13 @@ var MESH_CA_KEY_REF = require("./dist-8pvVkKh4.js").buildSecretRef({
|
|
|
8
8
|
var MESH_CA_SETTINGS_KEY = "cluster.meshCa";
|
|
9
9
|
/** Field inside the `cluster` section. */
|
|
10
10
|
var MESH_CA_FIELD = "meshCa";
|
|
11
|
+
/**
|
|
12
|
+
* A mesh leaf does not expire (#558, amends D857): RFC 5280 section 4.1.2.5 "no well-defined
|
|
13
|
+
* expiration date" is 9999-12-31T23:59:59Z. Identity ends by revocation (the CRL) or by an explicit
|
|
14
|
+
* rotation (`certificates.renewMeshOnNode`), never by the clock.
|
|
15
|
+
*/
|
|
16
|
+
var MESH_LEAF_NOT_AFTER = /* @__PURE__ */ new Date("9999-12-31T23:59:59Z");
|
|
17
|
+
/** The mesh CA lifetime. Leaves outlive it on purpose: chain building does not nest validity. */
|
|
11
18
|
var MESH_CA_VALIDITY_DAYS = 3650;
|
|
12
19
|
var DEFAULT_HUB_TLS_TCP_PORT = 6443;
|
|
13
20
|
/** Subject of the mesh root. Distinct from the HTTPS local CA. */
|
|
@@ -58,6 +65,12 @@ Object.defineProperty(exports, "MESH_CA_VALIDITY_DAYS", {
|
|
|
58
65
|
return MESH_CA_VALIDITY_DAYS;
|
|
59
66
|
}
|
|
60
67
|
});
|
|
68
|
+
Object.defineProperty(exports, "MESH_LEAF_NOT_AFTER", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function() {
|
|
71
|
+
return MESH_LEAF_NOT_AFTER;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
61
74
|
Object.defineProperty(exports, "SERVER_AUTH_OID", {
|
|
62
75
|
enumerable: true,
|
|
63
76
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ec as buildSecretRef, K as DEVICE_SAN_CREDENTIAL_PREFIX, q as DEVICE_SAN_USER_PREFIX } from "./dist-
|
|
1
|
+
import { Ec as buildSecretRef, K as DEVICE_SAN_CREDENTIAL_PREFIX, q as DEVICE_SAN_USER_PREFIX } from "./dist-BBWAHu-O.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
|
|
@@ -106729,6 +106729,17 @@ var TerminalOutputEventSchema = z.discriminatedUnion("kind", [z.object({
|
|
|
106729
106729
|
exitCode: z.number().int(),
|
|
106730
106730
|
signal: z.number().int().optional()
|
|
106731
106731
|
})]);
|
|
106732
|
+
var ServerShellRefusalSchema = z.object({
|
|
106733
|
+
code: z.literal("server-shell-disabled"),
|
|
106734
|
+
nodeId: z.string(),
|
|
106735
|
+
message: z.string()
|
|
106736
|
+
});
|
|
106737
|
+
var ServerShellStatusSchema = z.object({
|
|
106738
|
+
nodeId: z.string(),
|
|
106739
|
+
enabled: z.boolean(),
|
|
106740
|
+
idleMinutes: z.number().int().positive(),
|
|
106741
|
+
refusal: ServerShellRefusalSchema.nullable()
|
|
106742
|
+
});
|
|
106732
106743
|
var TerminalOutputBatchSchema = z.object({
|
|
106733
106744
|
cursor: z.number().int().nonnegative(),
|
|
106734
106745
|
reset: z.boolean(),
|
|
@@ -106762,6 +106773,11 @@ var terminalSessionCapability = {
|
|
|
106762
106773
|
/** Live sessions currently hosted by the provider. */
|
|
106763
106774
|
listSessions: method(z.void(), z.array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }),
|
|
106764
106775
|
/**
|
|
106776
|
+
* Whether this node has opted in to the server shell. The refusal names
|
|
106777
|
+
* the node when the opt-in is off. The boolean is decided in the provider.
|
|
106778
|
+
*/
|
|
106779
|
+
serverShellStatus: method(z.void(), ServerShellStatusSchema, { auth: "admin" }),
|
|
106780
|
+
/**
|
|
106765
106781
|
* Spawn a pty for an allowlisted profile at the given grid size and return
|
|
106766
106782
|
* its session id. Output/input then flow over the data plane by that id.
|
|
106767
106783
|
*/
|
|
@@ -106775,7 +106791,8 @@ var terminalSessionCapability = {
|
|
|
106775
106791
|
environment: z.array(z.string().max(4096)).max(64).optional()
|
|
106776
106792
|
}), TerminalSessionInfoSchema, {
|
|
106777
106793
|
kind: "mutation",
|
|
106778
|
-
auth: "admin"
|
|
106794
|
+
auth: "admin",
|
|
106795
|
+
caller: "required"
|
|
106779
106796
|
}),
|
|
106780
106797
|
/** Resize a live session's pty (reflows the running program). */
|
|
106781
106798
|
resize: method(z.object({
|
|
@@ -106804,6 +106821,7 @@ var terminalSessionCapability = {
|
|
|
106804
106821
|
}), TerminalOutputBatchSchema, {
|
|
106805
106822
|
kind: "mutation",
|
|
106806
106823
|
auth: "admin",
|
|
106824
|
+
caller: "required",
|
|
106807
106825
|
timeoutMs: 15e3
|
|
106808
106826
|
}),
|
|
106809
106827
|
/** Write terminal input through the node-routable capability plane. */
|
|
@@ -106817,7 +106835,8 @@ var terminalSessionCapability = {
|
|
|
106817
106835
|
/** Terminate a live session and release its pty. */
|
|
106818
106836
|
close: method(z.object({ sessionId: z.string() }), z.void(), {
|
|
106819
106837
|
kind: "mutation",
|
|
106820
|
-
auth: "admin"
|
|
106838
|
+
auth: "admin",
|
|
106839
|
+
caller: "required"
|
|
106821
106840
|
})
|
|
106822
106841
|
},
|
|
106823
106842
|
vocabulary: { notOperatorFacing: NOT_A_DEVICE.CLUSTER }
|
|
@@ -127788,6 +127807,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
127788
127807
|
access: "create",
|
|
127789
127808
|
role: "admin"
|
|
127790
127809
|
},
|
|
127810
|
+
"terminalSession.serverShellStatus": {
|
|
127811
|
+
capName: "terminal-session",
|
|
127812
|
+
capScope: "system",
|
|
127813
|
+
addonId: null,
|
|
127814
|
+
access: "view",
|
|
127815
|
+
role: "admin"
|
|
127816
|
+
},
|
|
127791
127817
|
"terminalSession.writeInput": {
|
|
127792
127818
|
capName: "terminal-session",
|
|
127793
127819
|
capScope: "system",
|
|
@@ -133307,6 +133333,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
133307
133333
|
[...RULE_TEXT],
|
|
133308
133334
|
[...RULE_TEXT],
|
|
133309
133335
|
[...RULE_TEXT],
|
|
133336
|
+
[...RULE_TEXT],
|
|
133310
133337
|
[...RULE_BODY_ONLY],
|
|
133311
133338
|
[...RULE_TEXT],
|
|
133312
133339
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
@@ -106729,6 +106729,17 @@ var TerminalOutputEventSchema = zod.z.discriminatedUnion("kind", [zod.z.object({
|
|
|
106729
106729
|
exitCode: zod.z.number().int(),
|
|
106730
106730
|
signal: zod.z.number().int().optional()
|
|
106731
106731
|
})]);
|
|
106732
|
+
var ServerShellRefusalSchema = zod.z.object({
|
|
106733
|
+
code: zod.z.literal("server-shell-disabled"),
|
|
106734
|
+
nodeId: zod.z.string(),
|
|
106735
|
+
message: zod.z.string()
|
|
106736
|
+
});
|
|
106737
|
+
var ServerShellStatusSchema = zod.z.object({
|
|
106738
|
+
nodeId: zod.z.string(),
|
|
106739
|
+
enabled: zod.z.boolean(),
|
|
106740
|
+
idleMinutes: zod.z.number().int().positive(),
|
|
106741
|
+
refusal: ServerShellRefusalSchema.nullable()
|
|
106742
|
+
});
|
|
106732
106743
|
var TerminalOutputBatchSchema = zod.z.object({
|
|
106733
106744
|
cursor: zod.z.number().int().nonnegative(),
|
|
106734
106745
|
reset: zod.z.boolean(),
|
|
@@ -106762,6 +106773,11 @@ var terminalSessionCapability = {
|
|
|
106762
106773
|
/** Live sessions currently hosted by the provider. */
|
|
106763
106774
|
listSessions: method(zod.z.void(), zod.z.array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }),
|
|
106764
106775
|
/**
|
|
106776
|
+
* Whether this node has opted in to the server shell. The refusal names
|
|
106777
|
+
* the node when the opt-in is off. The boolean is decided in the provider.
|
|
106778
|
+
*/
|
|
106779
|
+
serverShellStatus: method(zod.z.void(), ServerShellStatusSchema, { auth: "admin" }),
|
|
106780
|
+
/**
|
|
106765
106781
|
* Spawn a pty for an allowlisted profile at the given grid size and return
|
|
106766
106782
|
* its session id. Output/input then flow over the data plane by that id.
|
|
106767
106783
|
*/
|
|
@@ -106775,7 +106791,8 @@ var terminalSessionCapability = {
|
|
|
106775
106791
|
environment: zod.z.array(zod.z.string().max(4096)).max(64).optional()
|
|
106776
106792
|
}), TerminalSessionInfoSchema, {
|
|
106777
106793
|
kind: "mutation",
|
|
106778
|
-
auth: "admin"
|
|
106794
|
+
auth: "admin",
|
|
106795
|
+
caller: "required"
|
|
106779
106796
|
}),
|
|
106780
106797
|
/** Resize a live session's pty (reflows the running program). */
|
|
106781
106798
|
resize: method(zod.z.object({
|
|
@@ -106804,6 +106821,7 @@ var terminalSessionCapability = {
|
|
|
106804
106821
|
}), TerminalOutputBatchSchema, {
|
|
106805
106822
|
kind: "mutation",
|
|
106806
106823
|
auth: "admin",
|
|
106824
|
+
caller: "required",
|
|
106807
106825
|
timeoutMs: 15e3
|
|
106808
106826
|
}),
|
|
106809
106827
|
/** Write terminal input through the node-routable capability plane. */
|
|
@@ -106817,7 +106835,8 @@ var terminalSessionCapability = {
|
|
|
106817
106835
|
/** Terminate a live session and release its pty. */
|
|
106818
106836
|
close: method(zod.z.object({ sessionId: zod.z.string() }), zod.z.void(), {
|
|
106819
106837
|
kind: "mutation",
|
|
106820
|
-
auth: "admin"
|
|
106838
|
+
auth: "admin",
|
|
106839
|
+
caller: "required"
|
|
106821
106840
|
})
|
|
106822
106841
|
},
|
|
106823
106842
|
vocabulary: { notOperatorFacing: NOT_A_DEVICE.CLUSTER }
|
|
@@ -127788,6 +127807,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
127788
127807
|
access: "create",
|
|
127789
127808
|
role: "admin"
|
|
127790
127809
|
},
|
|
127810
|
+
"terminalSession.serverShellStatus": {
|
|
127811
|
+
capName: "terminal-session",
|
|
127812
|
+
capScope: "system",
|
|
127813
|
+
addonId: null,
|
|
127814
|
+
access: "view",
|
|
127815
|
+
role: "admin"
|
|
127816
|
+
},
|
|
127791
127817
|
"terminalSession.writeInput": {
|
|
127792
127818
|
capName: "terminal-session",
|
|
127793
127819
|
capScope: "system",
|
|
@@ -133307,6 +133333,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
133307
133333
|
[...RULE_TEXT],
|
|
133308
133334
|
[...RULE_TEXT],
|
|
133309
133335
|
[...RULE_TEXT],
|
|
133336
|
+
[...RULE_TEXT],
|
|
133310
133337
|
[...RULE_BODY_ONLY],
|
|
133311
133338
|
[...RULE_TEXT],
|
|
133312
133339
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
2
|
+
const require_wal_maintenance = require("./wal-maintenance-DJ76u4GY.js");
|
|
3
3
|
let node_worker_threads = require("node:worker_threads");
|
|
4
4
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-
|
|
1
|
+
import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-6782RP08.mjs";
|
|
2
2
|
import { parentPort, threadId, workerData } from "node:worker_threads";
|
|
3
3
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Rc as defineRecordKinds } from "./dist-
|
|
1
|
+
import { Rc as defineRecordKinds } from "./dist-BBWAHu-O.mjs";
|
|
2
2
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-BRiJgOvu.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-BHAE4TbZ.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as __toESM } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Ol as userError } from "./dist-
|
|
2
|
+
import { Ol as userError } from "./dist-BBWAHu-O.mjs";
|
|
3
3
|
import { f as X509Certificate$1 } from "./x509.es-BRiJgOvu.mjs";
|
|
4
|
-
import { A as evaluateExistingCert, C as localCaCommonName, F as isConstrainedCa, L as permitsIdentity, S as loadCa, b as generateCa, j as reasonRequiresNewCa, w as collectCertIdentity, x as issueLeaf, z as readNameConstraints } from "./hub-identity-
|
|
4
|
+
import { A as evaluateExistingCert, C as localCaCommonName, F as isConstrainedCa, L as permitsIdentity, S as loadCa, b as generateCa, j as reasonRequiresNewCa, w as collectCertIdentity, x as issueLeaf, z as readNameConstraints } from "./hub-identity-BPdwL_Qn.mjs";
|
|
5
5
|
import { X509Certificate, createPrivateKey } from "node:crypto";
|
|
6
6
|
import { writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
7
7
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-BHAE4TbZ.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
|
-
const require_hub_identity = require("./hub-identity-
|
|
4
|
+
const require_hub_identity = require("./hub-identity-CfaF_M6Y.js");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
6
6
|
let _camstack_types_node = require("@camstack/types/node");
|
|
7
7
|
let node_fs = require("node:fs");
|