@cotal-ai/cli 0.174.0 → 0.174.2
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/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +13 -8
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/endpoint.d.ts.map +1 -1
- package/dist/commands/endpoint.js +13 -3
- package/dist/commands/endpoint.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +33 -7
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/status-model.d.ts +402 -0
- package/dist/commands/status-model.d.ts.map +1 -0
- package/dist/commands/status-model.js +64 -0
- package/dist/commands/status-model.js.map +1 -0
- package/dist/commands/status.d.ts +4 -368
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +3 -55
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/up-transport.d.ts +121 -0
- package/dist/commands/up-transport.d.ts.map +1 -0
- package/dist/commands/up-transport.js +348 -0
- package/dist/commands/up-transport.js.map +1 -0
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +5 -341
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/update-caches.d.ts.map +1 -1
- package/dist/commands/update-caches.js +10 -3
- package/dist/commands/update-caches.js.map +1 -1
- package/dist/commands/who.js +7 -4
- package/dist/commands/who.js.map +1 -1
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +5 -2
- package/dist/telemetry.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { type BrokerTransport, type ChannelRegistryFile } from "@cotal-ai/core";
|
|
2
|
+
export declare function parseMaxFileStore(raw: string | undefined): number | undefined;
|
|
3
|
+
/** `--auth-timeout`, whole seconds from 1 to 60. nats-server warns above 60 that the value is
|
|
4
|
+
* probably a mistake, and a stalled callout holds every connect that long. */
|
|
5
|
+
export declare function parseAuthTimeout(raw: string | undefined): number | undefined;
|
|
6
|
+
/** `--max-payload`, a positive whole number of bytes. nats-server refuses to start above 64 MiB, so
|
|
7
|
+
* the refusal names that bound rather than letting the broker exit on its own configuration. */
|
|
8
|
+
export declare function parseMaxPayload(raw: string | undefined): number | undefined;
|
|
9
|
+
/** `--account-resolver`, memory or full. */
|
|
10
|
+
export declare function parseAccountResolver(raw: string | undefined): "memory" | "full" | undefined;
|
|
11
|
+
/** The auth-service daemon argv that gives the callout the broker's timeout as its deadline. Built
|
|
12
|
+
* only from the value the broker configuration rendered, so the two never differ. */
|
|
13
|
+
export declare function authTimeoutArgs(seconds: number | undefined): string[];
|
|
14
|
+
/** Load the declarative channels-config file to seed the registry. An explicit `--channels`
|
|
15
|
+
* path that's missing is a hard error; the default `.cotal/channels.json` is optional (absent
|
|
16
|
+
* ⇒ nothing to seed). */
|
|
17
|
+
export declare function loadChannelsFile(explicit?: string): ChannelRegistryFile | undefined;
|
|
18
|
+
/** Refuse `up --space` of a space this machine started from another folder while its broker answers,
|
|
19
|
+
* naming that folder: the stack there is the one to use or stop. */
|
|
20
|
+
export declare function refuseRunningElsewhere(space: string, root: string): Promise<void>;
|
|
21
|
+
/** Refuses a bare `up` in a folder holding the records of a space this machine registers for another
|
|
22
|
+
* folder, as a copy, a moved folder and one whose name a later `up` took over keep them. The retained
|
|
23
|
+
* launcher writes no stack journal, so this is that launcher's form of the journal's refusal: it
|
|
24
|
+
* names that folder and the step reads there name. When that folder is gone and its broker does not
|
|
25
|
+
* answer, it also names the `--space` that takes the name over to run the stack from this folder. */
|
|
26
|
+
export declare function refuseRecordsElsewhere(root: string): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Turn the `--tls-cert`/`--tls-key` pair into a validated {@link BrokerTransport}, or `plaintext`
|
|
29
|
+
* when neither was given.
|
|
30
|
+
*
|
|
31
|
+
* REFUSES BEFORE LAUNCH, never after. Everything it rejects would otherwise become a running broker
|
|
32
|
+
* in some wrong state, and the two failure modes are not symmetrical: a broker that will not start
|
|
33
|
+
* is an operator reading an error, while a broker that starts wrong is an operator believing they
|
|
34
|
+
* have TLS. So the validation is deliberately ours and deliberately early.
|
|
35
|
+
*
|
|
36
|
+
* `validateTlsMaterial` does the substantive checks — readability, private-key mode, PEM pair
|
|
37
|
+
* match, validity window, dial-host SAN — because nats-server's are not sufficient. Missing,
|
|
38
|
+
* unreadable and mismatched pairs do stop it before it opens a listener, but an EXPIRED certificate
|
|
39
|
+
* does not: it reports the config valid, starts, logs "Server is ready" and "TLS required", and
|
|
40
|
+
* only the client then fails. An expired cert must never yield "mesh up".
|
|
41
|
+
*
|
|
42
|
+
* @param dialHost the hostname clients will verify against, which is NOT the bind host — a broker
|
|
43
|
+
* may bind `0.0.0.0` while clients dial `broker.example`.
|
|
44
|
+
*/
|
|
45
|
+
export declare function resolveTransport(values: {
|
|
46
|
+
"tls-cert"?: string;
|
|
47
|
+
"tls-key"?: string;
|
|
48
|
+
}, dialHost: string | undefined, root: string,
|
|
49
|
+
/** `persist` defaults false (commit-after-apply). `quiet` suppresses serving/inheriting lines
|
|
50
|
+
* until the caller announces after a successful apply. */
|
|
51
|
+
opts?: {
|
|
52
|
+
persist?: boolean;
|
|
53
|
+
quiet?: boolean;
|
|
54
|
+
}): BrokerTransport;
|
|
55
|
+
/** A `tls://` broker address is recorded as required TLS, and every later dial through the record
|
|
56
|
+
* trusts it. Refuse it, before anything starts, when this start would serve plaintext. */
|
|
57
|
+
export declare function assertTlsIntentServed(server: string, transport: BrokerTransport, source: string): void;
|
|
58
|
+
/** A broker that serves TLS is dialed `tls://`, so an address naming `nats://` would be recorded,
|
|
59
|
+
* registered and handed to every later client as plaintext. Refuse it before anything starts,
|
|
60
|
+
* naming the recorded policy that serves TLS and the address to pass instead. */
|
|
61
|
+
export declare function assertTlsAddressServed(server: string, transport: BrokerTransport, root: string): void;
|
|
62
|
+
/** Persist a transport, and the auth callout timeout, payload limit and account resolver the broker
|
|
63
|
+
* configuration rendered, after its listener starts; a structured boot leaves stdout to its receipt.
|
|
64
|
+
* An absent `accountResolver` keeps the recorded one, and a memory start replaces a recorded full
|
|
65
|
+
* one even when nothing else is left to record. */
|
|
66
|
+
export declare function commitTransportPolicy(root: string, transport: BrokerTransport, quietBoot?: boolean, server?: string, limits?: {
|
|
67
|
+
authTimeout?: number;
|
|
68
|
+
maxPayload?: number;
|
|
69
|
+
accountResolver?: "memory" | "full";
|
|
70
|
+
}): void;
|
|
71
|
+
/** The `tls://` form of a broker URL, or of each URL in a list. */
|
|
72
|
+
export declare const tlsAddress: (server: string) => string;
|
|
73
|
+
export declare function announceTransport(transport: BrokerTransport, server?: string): void;
|
|
74
|
+
/** Read the live INFO greeting and report whether the listener requires TLS.
|
|
75
|
+
* `undefined` means no usable INFO (timeout / closed) — caller treats as unknown. */
|
|
76
|
+
export declare function liveListenerRequiresTls(server: string, timeoutMs?: number): Promise<boolean | undefined>;
|
|
77
|
+
/**
|
|
78
|
+
* Re-assert that `transport` is valid for the host clients will actually dial, and exit loudly if
|
|
79
|
+
* not. A no-op for plaintext.
|
|
80
|
+
*
|
|
81
|
+
* This exists because the transport is decided ONCE, early, before the route is known, so that no
|
|
82
|
+
* route can be reached without one — but the effective dial host is decided LATE and differs per
|
|
83
|
+
* route: a manifest may set `broker.host`, and a certificate valid for the flag-derived host is not
|
|
84
|
+
* thereby valid for that one. Deciding early and checking late is the only ordering that satisfies
|
|
85
|
+
* both, so the check is deliberately separate from the decision rather than folded into it.
|
|
86
|
+
*
|
|
87
|
+
* Quiet on success: `resolveTransport` already printed what is being served, and a second identical
|
|
88
|
+
* line reads like a second broker.
|
|
89
|
+
*/
|
|
90
|
+
export declare function assertServesDialHost(transport: BrokerTransport, dialHost: string | undefined): BrokerTransport;
|
|
91
|
+
/**
|
|
92
|
+
* The client-side TLS requirement to persist for a listener THIS PROCESS DID NOT START — the
|
|
93
|
+
* restore and ordinary-resume paths, which adopt a broker that is already listening.
|
|
94
|
+
*
|
|
95
|
+
* They have no `transport` in scope because they never decided one, so the honest source is the
|
|
96
|
+
* recorded policy: the listener they are adopting was started from it. Reading it here is what stops
|
|
97
|
+
* a resume from writing a registry entry that says "plaintext" over a broker serving TLS — clients
|
|
98
|
+
* resolved from that entry would then connect without requiring it, which is the downgrade this
|
|
99
|
+
* feature exists to prevent, arriving by way of a recovery path rather than a launch.
|
|
100
|
+
*
|
|
101
|
+
* Fails loud on an unusable policy for the same reason `resolveTransport` does: a resume that cannot
|
|
102
|
+
* tell what it is adopting must not guess.
|
|
103
|
+
*/
|
|
104
|
+
export declare function adoptedTlsRequired(root: string): boolean;
|
|
105
|
+
/** A start that names no store would open an empty second store and leave the data where it was:
|
|
106
|
+
* while the last served store holds data and the default store holds none, refuse and name it. */
|
|
107
|
+
export declare function refuseUnnamedLastStore(storeDir: string): void;
|
|
108
|
+
/** The store a bare start that names none opens: the store this root's last broker served, while
|
|
109
|
+
* it holds data and the default store holds none, since the default would open empty and leave the
|
|
110
|
+
* data where it was. When the broker configs name two such stores, the start refuses as
|
|
111
|
+
* {@link refuseUnnamedLastStore} does, because which one to reopen is the operator's choice. */
|
|
112
|
+
export declare function reopenLastStore(storeDir: string): string | undefined;
|
|
113
|
+
/** A `--store-dir` that does not exist yet, while the last served store holds data, is taken for a
|
|
114
|
+
* mistyped path: the start would open a new empty store there. Creating the directory first names a
|
|
115
|
+
* new store on purpose. */
|
|
116
|
+
export declare function refuseMissingNamedStore(storeDir: string): void;
|
|
117
|
+
/** A start's store against the other spaces that use it. A `--store-dir` this root's last broker did
|
|
118
|
+
* not serve refuses while another space uses it. The default or last served store starts with a
|
|
119
|
+
* warning, and one whose folder that broker served is missing starts empty with a warning. */
|
|
120
|
+
export declare function checkStartStore(storeDir: string | undefined, space: string): void;
|
|
121
|
+
//# sourceMappingURL=up-transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"up-transport.d.ts","sourceRoot":"","sources":["../../src/commands/up-transport.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoD,KAAK,eA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AAG,SAAS,CAMpE;AAED;;4BAE4B;AAC5B,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAK9D;AAED;;+FAE+F;AAC/F,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAMjF"}
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import { createConnection } from "node:net";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { isAbsolute, join, resolve } from "node:path";
|
|
4
|
+
import { isReachable, DEFAULT_SERVER, validateTlsMaterial } from "@cotal-ai/core";
|
|
5
|
+
import { CommandFailure, brokerAddressForDisplay, brokerPolicyPath, canonicalRoot, findMesh, parsePositiveIntegerFlag, retainedLegacyBroker, readBrokerPolicy, writeBrokerPolicy, recordsElsewhereError, terminalWidth, } from "@cotal-ai/workspace";
|
|
6
|
+
import { c, hang, stderrLine } from "../ui.js";
|
|
7
|
+
import { cotalPath, cotalRoot } from "../lib/paths.js";
|
|
8
|
+
import { readChannelsFile, readDefaultChannelsFile } from "../lib/channel-seed.js";
|
|
9
|
+
import { readStackJournal } from "../lib/stack-journal.js";
|
|
10
|
+
import { lastServedStore, lastServedStores, missingStoreWarning, servedStore, sharedStoreAtStart, sharedStoreWarning } from "../lib/store-dir.js";
|
|
11
|
+
export function parseMaxFileStore(raw) {
|
|
12
|
+
return parsePositiveIntegerFlag("--max-file-store", raw);
|
|
13
|
+
}
|
|
14
|
+
/** `--auth-timeout`, whole seconds from 1 to 60. nats-server warns above 60 that the value is
|
|
15
|
+
* probably a mistake, and a stalled callout holds every connect that long. */
|
|
16
|
+
export function parseAuthTimeout(raw) {
|
|
17
|
+
const seconds = parsePositiveIntegerFlag("--auth-timeout", raw);
|
|
18
|
+
if (seconds !== undefined && seconds > MAX_AUTH_TIMEOUT_SECONDS)
|
|
19
|
+
throw new CommandFailure("refused", "USAGE_INVALID", `--auth-timeout ${seconds} is over ${MAX_AUTH_TIMEOUT_SECONDS} seconds; it is how long the broker holds a connect while the auth callout has not answered, and nothing was started`, { remedy: `pass --auth-timeout 1 to ${MAX_AUTH_TIMEOUT_SECONDS}, or omit it for nats-server's 2 seconds` });
|
|
20
|
+
return seconds;
|
|
21
|
+
}
|
|
22
|
+
const MAX_AUTH_TIMEOUT_SECONDS = 60;
|
|
23
|
+
/** `--max-payload`, a positive whole number of bytes. nats-server refuses to start above 64 MiB, so
|
|
24
|
+
* the refusal names that bound rather than letting the broker exit on its own configuration. */
|
|
25
|
+
export function parseMaxPayload(raw) {
|
|
26
|
+
const bytes = parsePositiveIntegerFlag("--max-payload", raw);
|
|
27
|
+
if (bytes !== undefined && bytes > MAX_BROKER_PAYLOAD_BYTES)
|
|
28
|
+
throw new CommandFailure("refused", "USAGE_INVALID", `--max-payload ${bytes} is over ${MAX_BROKER_PAYLOAD_BYTES} bytes (64 MiB), which nats-server refuses to start on; nothing was started`, { remedy: `pass --max-payload ${MAX_BROKER_PAYLOAD_BYTES} or less` });
|
|
29
|
+
return bytes;
|
|
30
|
+
}
|
|
31
|
+
const MAX_BROKER_PAYLOAD_BYTES = 64 * 1024 * 1024;
|
|
32
|
+
/** `--account-resolver`, memory or full. */
|
|
33
|
+
export function parseAccountResolver(raw) {
|
|
34
|
+
if (raw === undefined || raw === "memory" || raw === "full")
|
|
35
|
+
return raw;
|
|
36
|
+
throw new CommandFailure("refused", "USAGE_INVALID", `--account-resolver takes memory or full (got ${JSON.stringify(raw)}); nothing was started`, { remedy: "pass --account-resolver memory or --account-resolver full" });
|
|
37
|
+
}
|
|
38
|
+
/** The auth-service daemon argv that gives the callout the broker's timeout as its deadline. Built
|
|
39
|
+
* only from the value the broker configuration rendered, so the two never differ. */
|
|
40
|
+
export function authTimeoutArgs(seconds) {
|
|
41
|
+
return seconds === undefined ? [] : ["--auth-timeout", String(seconds)];
|
|
42
|
+
}
|
|
43
|
+
/** Load the declarative channels-config file to seed the registry. An explicit `--channels`
|
|
44
|
+
* path that's missing is a hard error; the default `.cotal/channels.json` is optional (absent
|
|
45
|
+
* ⇒ nothing to seed). */
|
|
46
|
+
export function loadChannelsFile(explicit) {
|
|
47
|
+
if (explicit)
|
|
48
|
+
return readChannelsFile(resolve(explicit));
|
|
49
|
+
return readDefaultChannelsFile(cotalRoot());
|
|
50
|
+
}
|
|
51
|
+
/** Refuse `up --space` of a space this machine started from another folder while its broker answers,
|
|
52
|
+
* naming that folder: the stack there is the one to use or stop. */
|
|
53
|
+
export async function refuseRunningElsewhere(space, root) {
|
|
54
|
+
const owner = findMesh(space);
|
|
55
|
+
if (!owner || owner.origin === "manual" || owner.origin === "catalog" || !isAbsolute(owner.root) || canonicalRoot(owner.root) === canonicalRoot(root) || !(await isReachable(owner.server)))
|
|
56
|
+
return;
|
|
57
|
+
let controller = false;
|
|
58
|
+
try {
|
|
59
|
+
controller = readStackJournal(owner.root)?.journal.space === space;
|
|
60
|
+
}
|
|
61
|
+
catch { /* named with the legacy stop */ }
|
|
62
|
+
const rootExists = existsSync(owner.root);
|
|
63
|
+
const moved = !controller && !retainedLegacyBroker(owner.root) && recordsElsewhereError(root)?.details.stackSpace === space;
|
|
64
|
+
const remedy = moved
|
|
65
|
+
? `${rootExists ? `move what is now at ${owner.root} aside, then ` : ""}move this folder back to ${owner.root} and run \`cotal down --yes\` there`
|
|
66
|
+
: !rootExists
|
|
67
|
+
? `restore the original project at ${owner.root}, then run \`cotal down --yes\` there`
|
|
68
|
+
: `use it from here with --space ${space}, or stop it with \`cotal down${controller ? " --yes" : ""}\` in ${owner.root}`;
|
|
69
|
+
throw new CommandFailure("refused", "CONFLICT", `space "${space}" runs at ${owner.server}, started in ${owner.root}, so up did not start it again`, { target: { space, root: owner.root, server: owner.server }, remedy });
|
|
70
|
+
}
|
|
71
|
+
/** Refuses a bare `up` in a folder holding the records of a space this machine registers for another
|
|
72
|
+
* folder, as a copy, a moved folder and one whose name a later `up` took over keep them. The retained
|
|
73
|
+
* launcher writes no stack journal, so this is that launcher's form of the journal's refusal: it
|
|
74
|
+
* names that folder and the step reads there name. When that folder is gone and its broker does not
|
|
75
|
+
* answer, it also names the `--space` that takes the name over to run the stack from this folder. */
|
|
76
|
+
export async function refuseRecordsElsewhere(root) {
|
|
77
|
+
const records = recordsElsewhereError(root)?.details;
|
|
78
|
+
if (!records?.lastRun || records.stackSpace === undefined || records.recordedRoot === undefined || records.stackRemedy === undefined)
|
|
79
|
+
return;
|
|
80
|
+
const space = records.stackSpace;
|
|
81
|
+
const takeover = !existsSync(records.recordedRoot) && !(await isReachable(findMesh(space)?.server ?? records.server ?? DEFAULT_SERVER));
|
|
82
|
+
throw new CommandFailure("refused", "CONFLICT", `this folder holds the records of "${space}", which is registered for ${records.recordedRoot}, not for this folder, so up did not start it here`, {
|
|
83
|
+
target: { root, space, recordedRoot: records.recordedRoot },
|
|
84
|
+
remedy: takeover ? `${records.stackRemedy}; or, to run it from this folder, take the name over with \`cotal up --space ${space}\`` : records.stackRemedy,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Turn the `--tls-cert`/`--tls-key` pair into a validated {@link BrokerTransport}, or `plaintext`
|
|
89
|
+
* when neither was given.
|
|
90
|
+
*
|
|
91
|
+
* REFUSES BEFORE LAUNCH, never after. Everything it rejects would otherwise become a running broker
|
|
92
|
+
* in some wrong state, and the two failure modes are not symmetrical: a broker that will not start
|
|
93
|
+
* is an operator reading an error, while a broker that starts wrong is an operator believing they
|
|
94
|
+
* have TLS. So the validation is deliberately ours and deliberately early.
|
|
95
|
+
*
|
|
96
|
+
* `validateTlsMaterial` does the substantive checks — readability, private-key mode, PEM pair
|
|
97
|
+
* match, validity window, dial-host SAN — because nats-server's are not sufficient. Missing,
|
|
98
|
+
* unreadable and mismatched pairs do stop it before it opens a listener, but an EXPIRED certificate
|
|
99
|
+
* does not: it reports the config valid, starts, logs "Server is ready" and "TLS required", and
|
|
100
|
+
* only the client then fails. An expired cert must never yield "mesh up".
|
|
101
|
+
*
|
|
102
|
+
* @param dialHost the hostname clients will verify against, which is NOT the bind host — a broker
|
|
103
|
+
* may bind `0.0.0.0` while clients dial `broker.example`.
|
|
104
|
+
*/
|
|
105
|
+
export function resolveTransport(values, dialHost, root,
|
|
106
|
+
/** `persist` defaults false (commit-after-apply). `quiet` suppresses serving/inheriting lines
|
|
107
|
+
* until the caller announces after a successful apply. */
|
|
108
|
+
opts = {}) {
|
|
109
|
+
const certFile = values["tls-cert"], keyFile = values["tls-key"];
|
|
110
|
+
const quiet = opts.quiet === true;
|
|
111
|
+
// NO FLAGS: inherit the RECORDED decision rather than defaulting to plaintext. This is the half
|
|
112
|
+
// that makes a bare `cotal up` after a `cotal down` keep serving TLS. Without it the decision
|
|
113
|
+
// lives only in the argv of whichever invocation first made it, and the most ordinary operator
|
|
114
|
+
// gesture there is - stop the mesh, start it again - silently downgrades a broker that was
|
|
115
|
+
// deliberately put on TLS. `readBrokerPolicy` refuses rather than degrading if the recorded
|
|
116
|
+
// material has gone missing, so a moved cert fails loud here instead of coming up in cleartext.
|
|
117
|
+
if (!certFile && !keyFile) {
|
|
118
|
+
let recorded;
|
|
119
|
+
try {
|
|
120
|
+
recorded = readBrokerPolicy(root);
|
|
121
|
+
}
|
|
122
|
+
catch (e) {
|
|
123
|
+
stderrLine("✗ ", `${e instanceof Error ? e.message : String(e)}`, c.red);
|
|
124
|
+
process.exit(1);
|
|
125
|
+
}
|
|
126
|
+
if (recorded?.transport.kind === "tls-required") {
|
|
127
|
+
if (!quiet)
|
|
128
|
+
console.log(c.dim("TLS: inheriting the recorded broker policy (no --tls-cert/--tls-key given)"));
|
|
129
|
+
return validateRecorded(recorded.transport, dialHost, { quiet });
|
|
130
|
+
}
|
|
131
|
+
return { kind: "plaintext" };
|
|
132
|
+
}
|
|
133
|
+
// Half a pair is a mistake, never a configuration. Refusing names the missing half rather than
|
|
134
|
+
// failing later inside nats-server with a message about a file the operator did not mention.
|
|
135
|
+
if (!certFile || !keyFile) {
|
|
136
|
+
stderrLine("✗ ", `--tls-cert and --tls-key must be given together (missing ${certFile ? "--tls-key" : "--tls-cert"})`, c.red);
|
|
137
|
+
process.exit(1);
|
|
138
|
+
}
|
|
139
|
+
const transport = { kind: "tls-required", certFile: resolve(certFile), keyFile: resolve(keyFile) };
|
|
140
|
+
const validated = validateRecorded(transport, dialHost, { quiet });
|
|
141
|
+
// RECORD only when the caller has already applied the transport (started a matching listener).
|
|
142
|
+
// Eager write here is S5: a refuse path cannot unwrite, and the next bare up inherits fiction.
|
|
143
|
+
if (opts.persist === true)
|
|
144
|
+
writeBrokerPolicy(root, { version: 1, transport: validated });
|
|
145
|
+
return validated;
|
|
146
|
+
}
|
|
147
|
+
/** A `tls://` broker address is recorded as required TLS, and every later dial through the record
|
|
148
|
+
* trusts it. Refuse it, before anything starts, when this start would serve plaintext. */
|
|
149
|
+
export function assertTlsIntentServed(server, transport, source) {
|
|
150
|
+
const tls = server.split(",").some((url) => url.trim().toLowerCase().startsWith("tls://"));
|
|
151
|
+
if (tls && transport.kind !== "tls-required")
|
|
152
|
+
throw new CommandFailure("refused", "USAGE_INVALID", `${source} names a tls:// address, but no TLS certificate and key are configured, so the broker would serve plaintext; nothing was started`, { target: { server: brokerAddressForDisplay(server) ?? "not displayable" }, remedy: "serve TLS with --tls-cert <cert.pem> --tls-key <key.pem>, or use a nats:// address", selfContained: true });
|
|
153
|
+
}
|
|
154
|
+
/** A broker that serves TLS is dialed `tls://`, so an address naming `nats://` would be recorded,
|
|
155
|
+
* registered and handed to every later client as plaintext. Refuse it before anything starts,
|
|
156
|
+
* naming the recorded policy that serves TLS and the address to pass instead. */
|
|
157
|
+
export function assertTlsAddressServed(server, transport, root) {
|
|
158
|
+
if (transport.kind !== "tls-required")
|
|
159
|
+
return;
|
|
160
|
+
if (!server.split(",").some((url) => /^nats:\/\//i.test(url.trim())))
|
|
161
|
+
return;
|
|
162
|
+
throw new CommandFailure("refused", "USAGE_INVALID", `this root serves the broker over TLS (${brokerPolicyPath(root)}), so --server must be a tls:// address; nothing was started or written`, {
|
|
163
|
+
target: { root, server: brokerAddressForDisplay(server) ?? "not displayable" },
|
|
164
|
+
remedy: `pass --server ${tlsAddress(server)}`,
|
|
165
|
+
selfContained: true,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/** Persist a transport, and the auth callout timeout, payload limit and account resolver the broker
|
|
169
|
+
* configuration rendered, after its listener starts; a structured boot leaves stdout to its receipt.
|
|
170
|
+
* An absent `accountResolver` keeps the recorded one, and a memory start replaces a recorded full
|
|
171
|
+
* one even when nothing else is left to record. */
|
|
172
|
+
export function commitTransportPolicy(root, transport, quietBoot = false, server, limits) {
|
|
173
|
+
const { authTimeout, maxPayload } = limits ?? {};
|
|
174
|
+
const recordedResolver = readBrokerPolicy(root)?.accountResolver;
|
|
175
|
+
const full = (limits?.accountResolver ?? recordedResolver ?? "memory") === "full";
|
|
176
|
+
if (transport.kind !== "tls-required" && authTimeout === undefined && maxPayload === undefined && !full && recordedResolver === undefined)
|
|
177
|
+
return;
|
|
178
|
+
writeBrokerPolicy(root, { version: 1, transport, ...(authTimeout !== undefined ? { authTimeout } : {}), ...(maxPayload !== undefined ? { maxPayload } : {}),
|
|
179
|
+
...(full ? { accountResolver: "full" } : {}) });
|
|
180
|
+
if (!quietBoot)
|
|
181
|
+
announceTransport(transport, server);
|
|
182
|
+
}
|
|
183
|
+
/** The `tls://` form of a broker URL, or of each URL in a list. */
|
|
184
|
+
export const tlsAddress = (server) => server.split(",").map((url) => url.trim().replace(/^nats:/i, "tls:")).join(",");
|
|
185
|
+
export function announceTransport(transport, server) {
|
|
186
|
+
if (transport.kind !== "tls-required")
|
|
187
|
+
return;
|
|
188
|
+
try {
|
|
189
|
+
const material = validateTlsMaterial(transport, {});
|
|
190
|
+
console.log(c.dim(`TLS: serving ${material.subject}${server ? ` at ${server}` : ""}, valid until ${material.notAfter.toISOString()}`));
|
|
191
|
+
}
|
|
192
|
+
catch {
|
|
193
|
+
// Already validated at decide-time; announce is best-effort display.
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
/** Read the live INFO greeting and report whether the listener requires TLS.
|
|
197
|
+
* `undefined` means no usable INFO (timeout / closed) — caller treats as unknown. */
|
|
198
|
+
export async function liveListenerRequiresTls(server, timeoutMs = 2000) {
|
|
199
|
+
let host;
|
|
200
|
+
let port;
|
|
201
|
+
try {
|
|
202
|
+
const u = new URL(server);
|
|
203
|
+
host = u.hostname || "127.0.0.1";
|
|
204
|
+
port = Number(u.port) || 4222;
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
return undefined;
|
|
208
|
+
}
|
|
209
|
+
return await new Promise((res) => {
|
|
210
|
+
const sock = createConnection({ host, port });
|
|
211
|
+
let buf = "";
|
|
212
|
+
const done = (v) => {
|
|
213
|
+
try {
|
|
214
|
+
sock.destroy();
|
|
215
|
+
}
|
|
216
|
+
catch { /* */ }
|
|
217
|
+
res(v);
|
|
218
|
+
};
|
|
219
|
+
sock.setTimeout(timeoutMs, () => done(undefined));
|
|
220
|
+
sock.on("error", () => done(undefined));
|
|
221
|
+
sock.on("close", () => done(undefined));
|
|
222
|
+
sock.on("data", (d) => {
|
|
223
|
+
buf += d.toString("utf8");
|
|
224
|
+
const nl = buf.indexOf("\r\n");
|
|
225
|
+
if (nl < 0)
|
|
226
|
+
return;
|
|
227
|
+
const line = buf.slice(0, nl);
|
|
228
|
+
try {
|
|
229
|
+
const info = JSON.parse(line.replace(/^INFO\s+/, ""));
|
|
230
|
+
done(info.tls_required === true);
|
|
231
|
+
}
|
|
232
|
+
catch {
|
|
233
|
+
done(undefined);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Re-assert that `transport` is valid for the host clients will actually dial, and exit loudly if
|
|
240
|
+
* not. A no-op for plaintext.
|
|
241
|
+
*
|
|
242
|
+
* This exists because the transport is decided ONCE, early, before the route is known, so that no
|
|
243
|
+
* route can be reached without one — but the effective dial host is decided LATE and differs per
|
|
244
|
+
* route: a manifest may set `broker.host`, and a certificate valid for the flag-derived host is not
|
|
245
|
+
* thereby valid for that one. Deciding early and checking late is the only ordering that satisfies
|
|
246
|
+
* both, so the check is deliberately separate from the decision rather than folded into it.
|
|
247
|
+
*
|
|
248
|
+
* Quiet on success: `resolveTransport` already printed what is being served, and a second identical
|
|
249
|
+
* line reads like a second broker.
|
|
250
|
+
*/
|
|
251
|
+
export function assertServesDialHost(transport, dialHost) {
|
|
252
|
+
if (transport.kind !== "tls-required" || dialHost === undefined)
|
|
253
|
+
return transport;
|
|
254
|
+
try {
|
|
255
|
+
validateTlsMaterial(transport, { dialHost });
|
|
256
|
+
}
|
|
257
|
+
catch (e) {
|
|
258
|
+
stderrLine("✗ ", `${e instanceof Error ? e.message : String(e)}`, c.red);
|
|
259
|
+
process.exit(1);
|
|
260
|
+
}
|
|
261
|
+
return transport;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* The client-side TLS requirement to persist for a listener THIS PROCESS DID NOT START — the
|
|
265
|
+
* restore and ordinary-resume paths, which adopt a broker that is already listening.
|
|
266
|
+
*
|
|
267
|
+
* They have no `transport` in scope because they never decided one, so the honest source is the
|
|
268
|
+
* recorded policy: the listener they are adopting was started from it. Reading it here is what stops
|
|
269
|
+
* a resume from writing a registry entry that says "plaintext" over a broker serving TLS — clients
|
|
270
|
+
* resolved from that entry would then connect without requiring it, which is the downgrade this
|
|
271
|
+
* feature exists to prevent, arriving by way of a recovery path rather than a launch.
|
|
272
|
+
*
|
|
273
|
+
* Fails loud on an unusable policy for the same reason `resolveTransport` does: a resume that cannot
|
|
274
|
+
* tell what it is adopting must not guess.
|
|
275
|
+
*/
|
|
276
|
+
export function adoptedTlsRequired(root) {
|
|
277
|
+
try {
|
|
278
|
+
return readBrokerPolicy(root)?.transport.kind === "tls-required";
|
|
279
|
+
}
|
|
280
|
+
catch (e) {
|
|
281
|
+
stderrLine("✗ ", `${e instanceof Error ? e.message : String(e)}`, c.red);
|
|
282
|
+
process.exit(1);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
/** Validate a TLS pair and exit loudly on anything wrong. Shared by the flag path and the
|
|
286
|
+
* recorded-policy path so a cert that rots on disk is caught on the NEXT `up`, not only on the
|
|
287
|
+
* one that first configured it. */
|
|
288
|
+
function validateRecorded(transport, dialHost, opts = {}) {
|
|
289
|
+
try {
|
|
290
|
+
const material = validateTlsMaterial(transport, dialHost !== undefined ? { dialHost } : {});
|
|
291
|
+
if (!opts.quiet)
|
|
292
|
+
console.log(c.dim(`TLS: serving ${material.subject}, valid until ${material.notAfter.toISOString()}`));
|
|
293
|
+
}
|
|
294
|
+
catch (e) {
|
|
295
|
+
// Surface the CERTIFICATE cause. A TLS failure reported as a generic startup error invites the
|
|
296
|
+
// wrong remedy - operators go looking at ports and firewalls when the answer is the cert.
|
|
297
|
+
stderrLine("✗ ", `${e instanceof Error ? e.message : String(e)}`, c.red);
|
|
298
|
+
process.exit(1);
|
|
299
|
+
}
|
|
300
|
+
return transport;
|
|
301
|
+
}
|
|
302
|
+
/** A start that names no store would open an empty second store and leave the data where it was:
|
|
303
|
+
* while the last served store holds data and the default store holds none, refuse and name it. */
|
|
304
|
+
export function refuseUnnamedLastStore(storeDir) {
|
|
305
|
+
if (existsSync(join(storeDir, "jetstream")))
|
|
306
|
+
return;
|
|
307
|
+
const last = lastServedStore(cotalRoot(), storeDir);
|
|
308
|
+
if (last !== undefined)
|
|
309
|
+
throw new CommandFailure("refused", "CONFLICT", `this root's last broker served the store ${last}, and this start names no store, so it would open a new empty one at ${storeDir}; nothing was started`, { target: { root: cotalRoot(), storeDir: last }, remedy: `reopen it with --store-dir ${last}, or move that store away to start empty` });
|
|
310
|
+
}
|
|
311
|
+
/** The store a bare start that names none opens: the store this root's last broker served, while
|
|
312
|
+
* it holds data and the default store holds none, since the default would open empty and leave the
|
|
313
|
+
* data where it was. When the broker configs name two such stores, the start refuses as
|
|
314
|
+
* {@link refuseUnnamedLastStore} does, because which one to reopen is the operator's choice. */
|
|
315
|
+
export function reopenLastStore(storeDir) {
|
|
316
|
+
if (existsSync(join(storeDir, "jetstream")))
|
|
317
|
+
return undefined;
|
|
318
|
+
const last = lastServedStores(cotalRoot(), storeDir);
|
|
319
|
+
if (last.length > 1)
|
|
320
|
+
refuseUnnamedLastStore(storeDir);
|
|
321
|
+
if (last.length === 1)
|
|
322
|
+
for (const line of hang("", `reopening ${last[0]}, the store this root's last broker served`, terminalWidth(process.stdout), c.dim))
|
|
323
|
+
console.log(line);
|
|
324
|
+
return last[0];
|
|
325
|
+
}
|
|
326
|
+
/** A `--store-dir` that does not exist yet, while the last served store holds data, is taken for a
|
|
327
|
+
* mistyped path: the start would open a new empty store there. Creating the directory first names a
|
|
328
|
+
* new store on purpose. */
|
|
329
|
+
export function refuseMissingNamedStore(storeDir) {
|
|
330
|
+
if (existsSync(storeDir))
|
|
331
|
+
return;
|
|
332
|
+
const last = lastServedStore(cotalRoot(), storeDir);
|
|
333
|
+
if (last !== undefined)
|
|
334
|
+
throw new CommandFailure("refused", "CONFLICT", `this root's last broker served the store ${last}, and --store-dir names ${storeDir}, which does not exist, so this start would open a new empty store there; nothing was started`, { target: { root: cotalRoot(), storeDir: last, requested: storeDir }, remedy: `reopen it with --store-dir ${last}, or create ${storeDir} first to start on a new empty store` });
|
|
335
|
+
}
|
|
336
|
+
/** A start's store against the other spaces that use it. A `--store-dir` this root's last broker did
|
|
337
|
+
* not serve refuses while another space uses it. The default or last served store starts with a
|
|
338
|
+
* warning, and one whose folder that broker served is missing starts empty with a warning. */
|
|
339
|
+
export function checkStartStore(storeDir, space) {
|
|
340
|
+
const path = storeDir === undefined ? cotalPath("nats") : resolve(storeDir);
|
|
341
|
+
const served = servedStore(cotalRoot(), path);
|
|
342
|
+
const tenants = sharedStoreAtStart(path, space, storeDir === undefined || served);
|
|
343
|
+
if (tenants.length)
|
|
344
|
+
console.error(c.yellow(`! ${sharedStoreWarning(path, tenants)}`));
|
|
345
|
+
if (served && !existsSync(path))
|
|
346
|
+
console.error(c.yellow(`! ${missingStoreWarning(path)}`));
|
|
347
|
+
}
|
|
348
|
+
//# sourceMappingURL=up-transport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"up-transport.js","sourceRoot":"","sources":["../../src/commands/up-transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,mBAAmB,EAAkD,MAAM,gBAAgB,CAAC;AAClI,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,wBAAwB,EACxB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAElJ,MAAM,UAAU,iBAAiB,CAAC,GAAuB;IACvD,OAAO,wBAAwB,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;AAC3D,CAAC;AAED;+EAC+E;AAC/E,MAAM,UAAU,gBAAgB,CAAC,GAAuB;IACtD,MAAM,OAAO,G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