@cotal-ai/cli 0.27.0 → 0.28.0-hack-20260823204333

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.
@@ -1,6 +1,6 @@
1
1
  import { type SpaceAuth } from "@cotal-ai/core";
2
- import { type JoinTarget } from "../lib/join-target.js";
3
- import { type MeshEntry, type MeshTarget, type PreflightFailure } from "@cotal-ai/workspace";
2
+ import { type DialPolicy, type JoinTarget } from "../lib/join-target.js";
3
+ import { type MeshEntry, type MeshTarget, type PreflightFailure, type UserAuthInfo } from "@cotal-ai/workspace";
4
4
  /**
5
5
  * The rules behind `cotal meshes add`, as decisions rather than side effects.
6
6
  *
@@ -38,24 +38,38 @@ export declare function checkServer(raw: string): Check<string>;
38
38
  * Registering a mesh is how a machine joins a broker it does not run, and every later command then
39
39
  * dials that address with an agent credential in the CONNECT line. NATS sends the initial INFO in
40
40
  * plaintext and unauthenticated, so an on-path attacker forges one that does not set
41
- * `tls_required` and reads the credential; the client side is the only fence, and this build has
42
- * no client-TLS surface yet. So the address itself is the gate. See {@link classifyJoinTarget} for
43
- * the ranges and for why hostnames are refused even when they resolve somewhere permitted.
41
+ * `tls_required` and reads the credential; the client side is the only fence. The address class
42
+ * and the RECORDED TLS INTENT together are the gate: see {@link classifyJoinTarget} for the
43
+ * ranges, why hostnames need required TLS, and why RFC1918 is refused in both modes.
44
+ *
45
+ * `policy.tlsRequired` is the strictness this registration will record — sourced from `--tls` or
46
+ * a `tls://` scheme ({@link tlsIntent}) — and it is what the dial will ENFORCE, because the
47
+ * candidate target and the written record carry the same value and preflight requires the
48
+ * handshake off it.
44
49
  *
45
50
  * This is a SAFETY rule, not a liveness check, which is why it sits with {@link checkServer} above
46
51
  * the `--force` branch rather than inside it. `--force` exists to register a mesh that is *down*
47
52
  * right now; it must not double as permission to ship credentials across an untrusted network,
48
53
  * where there is nothing to verify later and no error to come back and fix.
49
54
  */
50
- export declare function checkDialPolicy(server: string, allowUnencryptedOverlay?: boolean): Check<JoinTarget>;
55
+ export declare function checkDialPolicy(server: string, policy: DialPolicy): Check<JoinTarget>;
56
+ /** The TLS intent this registration records, from its two sources: the explicit `--tls` flag, or
57
+ * a `tls://` scheme. The scheme is typed intent — and today nats.js connects PLAINTEXT to
58
+ * `tls://host` with empty options, so honoring it here is what converts typed-but-unenforced
59
+ * intent into enforcement: the record carries `tlsRequired: true`, and every dial resolved
60
+ * through it requires the handshake rather than tolerating plaintext. */
61
+ export declare function tlsIntent(server: string, tlsFlag: boolean): boolean;
51
62
  /** Where this mesh's local trust + personas live. An explicit path must be an existing directory
52
63
  * (the record's whole job is to point at `.cotal/auth` and `.cotal/agents` under it). With no
53
64
  * flag, the nearest genuine project up-tree — and `findCotalRoot` returns its STARTING directory
54
65
  * when it finds none, so the inferred case must prove the `.cotal` is really there. */
55
66
  export declare function checkRoot(flag: string | undefined, cwd: string): Check<string>;
56
67
  /** The recorded auth mode: what the operator said, or what `--root` proves. A root holding this
57
- * space's account record means auth; anything else is an open broker. */
58
- export declare function checkMode(space: string, root: string, accounts: string[], flag: string | undefined): Check<MeshEntry["mode"]>;
68
+ * space's account record means auth; anything else is an open broker. `--mode user` is permitted
69
+ * IFF the pinned trust was SUPPLIED (`userTrustSupplied`) the old blanket refusal reasoned
70
+ * that IdP pins must be established, never guessed, and supplying them (a bundle exported where
71
+ * the mesh runs, or a confirmed HTTPS discovery document) satisfies exactly that reasoning. */
72
+ export declare function checkMode(space: string, root: string, accounts: string[], flag: string | undefined, userTrustSupplied?: boolean): Check<MeshEntry["mode"]>;
59
73
  /** For an AUTH registration the root must yield trust that actually COMPOSES. An account record on
60
74
  * disk only proves the space was known here: `loadSpaceAuth` still returns undefined when the
61
75
  * broker record or the signing material is missing, and recording that as `auth` produces a record
@@ -68,11 +82,63 @@ export declare function checkTrust(mode: MeshEntry["mode"], root: string, space:
68
82
  * promises JWT/ACL protection that is not there. An auth broker refuses a bare connect; an open
69
83
  * one lets us straight in. */
70
84
  export declare function probeEnforcement(server: string): Promise<"auth" | "open" | "unreachable">;
71
- /** The claimed mode must match what the broker actually enforces, in both directions. */
85
+ /** The claimed mode must match what the broker actually enforces, in both directions. The USER
86
+ * arm reads the refusal as the evidence: a user-mode target has no probe credential by design,
87
+ * so a credless probe against a user-auth broker reporting auth-required IS the pass — the one
88
+ * fact a bare connect can prove about a broker whose admission runs through the callout. */
72
89
  export declare function checkEnforcement(mode: MeshEntry["mode"], enforces: "auth" | "open" | "unreachable", server: string, space: string, root: string): Check<void>;
90
+ /** What a remote user-auth registration supplies: the pins nothing on this machine could derive.
91
+ * Exported where the mesh runs; carried by `--user-auth-file`, or served at the space's
92
+ * `/.well-known/cotal-mesh` for `--from`. */
93
+ export interface UserBundle {
94
+ space: string;
95
+ server: string;
96
+ tlsRequired: boolean;
97
+ userAuth: UserAuthInfo;
98
+ /** The sentinel creds blob. IN THE BUNDLE ONLY — registration lands it in a 0600 file under
99
+ * the entry's root and records the PATH; the registry document never carries the blob. */
100
+ sentinelCreds: string;
101
+ }
102
+ /** Validate a user-auth bundle, fail-loud on every missing pin. The `userAuth` arm goes through
103
+ * {@link assertUserAuthInfo} — the same boundary every provider blob crosses — and additionally
104
+ * requires the pinned exchange URL: for a remote entry the endpoints are a trust position, not a
105
+ * convenience, because no local `up` exists to re-derive them. */
106
+ export declare function checkUserBundle(raw: string): Check<UserBundle>;
107
+ /**
108
+ * Fetch that CANNOT be walked off HTTPS.
109
+ *
110
+ * `fetch` follows redirects by default and will happily follow `https://` → `http://`, so a
111
+ * 302 from anyone on the path turns a pinned, encrypted fetch into a plaintext one — and the
112
+ * document being fetched IS the trust being adopted. `redirect: "manual"` stops the hop here;
113
+ * a redirect is then reported as the refusal it is, rather than silently followed.
114
+ *
115
+ * Loopback `http://` stays usable for tests and for an exchange on this machine (nothing leaves
116
+ * the box), which is also what keeps the suites honest without a TLS fixture. Everything else
117
+ * must be `https:`.
118
+ */
119
+ export declare function assertPinnedFetchUrl(u: URL, what: string): string | undefined;
120
+ /** The pinned-fetch policy's verdict for ONE url, as data — so a suite can assert WHY a fetch was
121
+ * refused rather than only that something failed. A cert error, a timeout and a refused redirect
122
+ * are all "it did not work"; only this distinguishes them. Test seam, no production caller. */
123
+ export declare function pinnedFetchProbe(target: string): Promise<{
124
+ refused: boolean;
125
+ message: string;
126
+ }>;
127
+ /** The user arm of trust composition: the pinned exchange must ANSWER, and answer as itself.
128
+ * `/health` must report the pinned issuer (a base that answers with a foreign issuer is a
129
+ * different authority, however reachable) and `/jwks` must serve a non-empty key set (the
130
+ * verification material the pins promise). Nothing here trusts the response beyond consistency
131
+ * with the pins the operator supplied. */
132
+ export declare function verifyUserExchange(base: string, issuer: string): Promise<Check<void>>;
133
+ /** Land the sentinel and write the remote user entry — ONE writer for both front ends, so the
134
+ * wizard cannot drift from the flag form on what a remote record looks like. The sentinel blob
135
+ * goes into a 0600 file under the entry's own root (its space-scoped user-auth state dir) and
136
+ * the record carries the PATH: the registry document is echoed by `cotal meshes` and `status`,
137
+ * and secret material must never ride a file that gets printed. */
138
+ export declare function persistRemoteUserEntry(space: string, server: string, root: string, bundle: UserBundle, tlsRequired: boolean, overlayConsent: boolean): ReturnType<typeof writeRecord>;
73
139
  /** The target this registration would resolve to. `flag-server` is the source that can never
74
140
  * classify as a prune — nothing is recorded yet, so no entry may be blamed for a failure. */
75
- export declare function candidateTarget(space: string, server: string, root: string, mode: MeshEntry["mode"], auth: SpaceAuth | undefined): MeshTarget;
141
+ export declare function candidateTarget(space: string, server: string, root: string, mode: MeshEntry["mode"], auth: SpaceAuth | undefined, tlsRequired: boolean): MeshTarget;
76
142
  /** The registration-time wording for a failed probe. Deliberately NOT the shared preflight copy:
77
143
  * that speaks to a mesh already in the registry ("stale entry", "re-run `cotal up`"), and here
78
144
  * nothing is recorded yet — the operator is being told what to fix in the command they just ran. */
@@ -1 +1 @@
1
- {"version":3,"file":"meshes-add.d.ts","sourceRoot":"","sources":["../../src/commands/meshes-add.ts"],"names":[],"mappings":"AAEA,OAA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AK,CAAC,IAAI,CAAC,CAAC,CAkC3F;AAED;;;;oEAIoE;AACpE,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,OAAO,EACpB,cAAc,EAAE,OAAO,GACtB,UAAU,CAAC,OAAO,WAAW,CAAC,CAgBhC;AAED;8FAC8F;AAC9F,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,GAAG,SAAS,EAAE,WAAW,EAAE,OAAO,GAAG,UAAU,CAgBnK;AAED;;qGAEqG;AACrG,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAehH;AAED;kCACkC;AAClC,wBAAsB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAG3E;AAED;8FAC8F;AAC9F,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG;IAAE,cAAc,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAS/F;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAM1D"}
@@ -1,8 +1,8 @@
1
1
  import { statSync } from "node:fs";
2
2
  import { join, resolve } from "node:path";
3
- import { probeConnect } from "@cotal-ai/core";
4
- import { classifyJoinTarget } from "../lib/join-target.js";
5
- import { authDir, findCotalRoot, findMesh, getCurrent, homeCotalDir, listSpaceAccounts, loadSpaceAuth, personaDir, preflightTarget, recordMesh, setCurrent, } from "@cotal-ai/workspace";
3
+ import { mkSecretDir, probeConnect, writeSecretFileAtomic } from "@cotal-ai/core";
4
+ import { classifyJoinTarget, isLoopbackHost } from "../lib/join-target.js";
5
+ import { authDir, findCotalRoot, findMesh, getCurrent, homeCotalDir, listSpaceAccounts, loadSpaceAuth, assertUserAuthInfo, personaDir, preflightTarget, recordMesh, setCurrent, userAuthStateDir, } from "@cotal-ai/workspace";
6
6
  const bad = (message) => ({ ok: false, message });
7
7
  /** The cost of the copy every "copy the mesh's auth here" recovery asks the operator to make.
8
8
  *
@@ -60,34 +60,46 @@ export function checkServer(raw) {
60
60
  * Registering a mesh is how a machine joins a broker it does not run, and every later command then
61
61
  * dials that address with an agent credential in the CONNECT line. NATS sends the initial INFO in
62
62
  * plaintext and unauthenticated, so an on-path attacker forges one that does not set
63
- * `tls_required` and reads the credential; the client side is the only fence, and this build has
64
- * no client-TLS surface yet. So the address itself is the gate. See {@link classifyJoinTarget} for
65
- * the ranges and for why hostnames are refused even when they resolve somewhere permitted.
63
+ * `tls_required` and reads the credential; the client side is the only fence. The address class
64
+ * and the RECORDED TLS INTENT together are the gate: see {@link classifyJoinTarget} for the
65
+ * ranges, why hostnames need required TLS, and why RFC1918 is refused in both modes.
66
+ *
67
+ * `policy.tlsRequired` is the strictness this registration will record — sourced from `--tls` or
68
+ * a `tls://` scheme ({@link tlsIntent}) — and it is what the dial will ENFORCE, because the
69
+ * candidate target and the written record carry the same value and preflight requires the
70
+ * handshake off it.
66
71
  *
67
72
  * This is a SAFETY rule, not a liveness check, which is why it sits with {@link checkServer} above
68
73
  * the `--force` branch rather than inside it. `--force` exists to register a mesh that is *down*
69
74
  * right now; it must not double as permission to ship credentials across an untrusted network,
70
75
  * where there is nothing to verify later and no error to come back and fix.
71
76
  */
72
- export function checkDialPolicy(server, allowUnencryptedOverlay = false) {
77
+ export function checkDialPolicy(server, policy) {
73
78
  try {
74
- // WHEN THE RECORD CAN CARRY TLS INTENT, THIS LINE CHANGES AND THIS COMMENT GOES.
75
- // `tlsRequired` is a property of the connection this registration will produce, and no field
76
- // records it yet; it arrives with the work that teaches the broker to serve TLS. Passing a
77
- // hardcoded `false` is honest rather than lazy: today no dial can require TLS.
78
- //
79
- // What that means CONCRETELY: public addresses, ordinary private ranges and hostnames are
80
- // refused outright. An overlay literal is refused TOO unless the operator passed the explicit
81
- // opt-in, because a printed warning is not a fence — stderr is not read by scripts, and the
82
- // warning was never persisted, so nothing repeated it at the dials that followed. With the
83
- // opt-in it is permitted and returns a residual, which the caller both prints AND records as
84
- // consent. When the TLS field exists this passes the record's real intent and the opt-in goes.
85
- return good(classifyJoinTarget(server, { tlsRequired: false, allowUnencryptedOverlay }));
79
+ return good(classifyJoinTarget(server, policy));
86
80
  }
87
81
  catch (e) {
88
82
  return bad(`✗ ${e.message}`);
89
83
  }
90
84
  }
85
+ /** The TLS intent this registration records, from its two sources: the explicit `--tls` flag, or
86
+ * a `tls://` scheme. The scheme is typed intent — and today nats.js connects PLAINTEXT to
87
+ * `tls://host` with empty options, so honoring it here is what converts typed-but-unenforced
88
+ * intent into enforcement: the record carries `tlsRequired: true`, and every dial resolved
89
+ * through it requires the handshake rather than tolerating plaintext. */
90
+ export function tlsIntent(server, tlsFlag) {
91
+ if (tlsFlag)
92
+ return true;
93
+ try {
94
+ const p = new URL(server).protocol;
95
+ // `wss:` is typed intent the same way `tls:` is - the websocket transport performs the TLS
96
+ // handshake itself, so recording it strict is stating what the dial already enforces.
97
+ return p === "tls:" || p === "wss:";
98
+ }
99
+ catch {
100
+ return false; // checkServer refuses the malformed URL; this never decides anything for it
101
+ }
102
+ }
91
103
  /** Where this mesh's local trust + personas live. An explicit path must be an existing directory
92
104
  * (the record's whole job is to point at `.cotal/auth` and `.cotal/agents` under it). With no
93
105
  * flag, the nearest genuine project up-tree — and `findCotalRoot` returns its STARTING directory
@@ -105,15 +117,17 @@ export function checkRoot(flag, cwd) {
105
117
  return good(root);
106
118
  }
107
119
  /** The recorded auth mode: what the operator said, or what `--root` proves. A root holding this
108
- * space's account record means auth; anything else is an open broker. */
109
- export function checkMode(space, root, accounts, flag) {
120
+ * space's account record means auth; anything else is an open broker. `--mode user` is permitted
121
+ * IFF the pinned trust was SUPPLIED (`userTrustSupplied`) — the old blanket refusal reasoned
122
+ * that IdP pins must be established, never guessed, and supplying them (a bundle exported where
123
+ * the mesh runs, or a confirmed HTTPS discovery document) satisfies exactly that reasoning. */
124
+ export function checkMode(space, root, accounts, flag, userTrustSupplied = false) {
110
125
  if (flag !== undefined && flag !== "auth" && flag !== "open" && flag !== "user")
111
- return bad(`✗ --mode must be auth or open (got "${flag}")`);
112
- // A user-auth mesh is registered by the login/exchange trust it was configured with — an issuer,
113
- // an audience and an IdP URL pinned at `cotal up --user-auth`, not derivable from a broker URL.
114
- // Guessing them would be inventing trust.
126
+ return bad(`✗ --mode must be auth, open or user (got "${flag}")`);
127
+ if (flag === "user" && !userTrustSupplied)
128
+ return bad(`✗ --mode user needs its pinned trust SUPPLIED, never guessed - a user-auth space carries IdP pins (issuer, audience, login URL) established where the mesh runs. Pass --user-auth-file <bundle.json> exported there, or --from <https://…/.well-known/cotal-mesh> to fetch, review and confirm them`);
115
129
  if (flag === "user")
116
- return bad(`✗ --mode user cannot be registered by hand - a user-auth space carries pinned IdP trust (issuer, audience, login URL) that only \`cotal up --user-auth\` establishes, in the root where its broker runs`);
130
+ return good("user");
117
131
  const mode = flag ?? (accounts.includes(space) ? "auth" : "open");
118
132
  if (mode === "auth" && !accounts.includes(space))
119
133
  return bad(`✗ --mode auth needs "${space}"'s trust material under ${authDir(root)}${accounts.length ? ` (it holds "${accounts.join('", "')}")` : " (it holds none)"} - copy the mesh's account + creds there, point --root at where they already are, or register it --mode open` + CA_COST);
@@ -147,43 +161,194 @@ export async function probeEnforcement(server) {
147
161
  return "open";
148
162
  return bare.reason === "auth-required" ? "auth" : "unreachable";
149
163
  }
150
- /** The claimed mode must match what the broker actually enforces, in both directions. */
164
+ /** The claimed mode must match what the broker actually enforces, in both directions. The USER
165
+ * arm reads the refusal as the evidence: a user-mode target has no probe credential by design,
166
+ * so a credless probe against a user-auth broker reporting auth-required IS the pass — the one
167
+ * fact a bare connect can prove about a broker whose admission runs through the callout. */
151
168
  export function checkEnforcement(mode, enforces, server, space, root) {
152
169
  if (mode === "auth" && enforces === "open")
153
170
  return bad(`✗ the broker at ${server} accepts unauthenticated connections, so it cannot be registered as an auth mesh - it enforces no credentials; register it \`--mode open\`, or point --server at the authenticated broker for "${space}"`);
154
171
  if (mode === "open" && enforces === "auth")
155
172
  return bad(`✗ the broker at ${server} requires auth, so it cannot be registered as an open mesh - copy that mesh's account + creds under ${authDir(root)} and re-run with --mode auth` + CA_COST);
173
+ if (mode === "user" && enforces === "open")
174
+ return bad(`✗ the broker at ${server} accepts unauthenticated connections, so it cannot be registered as a user-auth mesh - user auth means the broker REFUSES a bare connect and admits only exchanged bearers; check that the bundle's server points at the user-auth broker for "${space}"`);
175
+ if (mode === "user" && enforces === "unreachable")
176
+ return bad(`✗ no broker answered at ${server} - a user-auth registration is verified by the broker's own auth-required refusal, so it cannot be recorded while the broker is unreachable`);
177
+ return good(undefined);
178
+ }
179
+ /** Validate a user-auth bundle, fail-loud on every missing pin. The `userAuth` arm goes through
180
+ * {@link assertUserAuthInfo} — the same boundary every provider blob crosses — and additionally
181
+ * requires the pinned exchange URL: for a remote entry the endpoints are a trust position, not a
182
+ * convenience, because no local `up` exists to re-derive them. */
183
+ export function checkUserBundle(raw) {
184
+ let doc;
185
+ try {
186
+ doc = JSON.parse(raw);
187
+ }
188
+ catch {
189
+ return bad("✗ the user-auth bundle is not JSON - export it where the mesh runs and pass the file unmodified");
190
+ }
191
+ if (doc === null || typeof doc !== "object")
192
+ return bad("✗ the user-auth bundle must be a JSON object");
193
+ if (typeof doc.space !== "string" || !doc.space)
194
+ return bad("✗ the user-auth bundle names no space");
195
+ if (typeof doc.server !== "string" || !doc.server)
196
+ return bad("✗ the user-auth bundle names no broker server");
197
+ if (typeof doc.tlsRequired !== "boolean")
198
+ return bad("✗ the user-auth bundle must state tlsRequired explicitly (true or false) - transport strictness is part of what the export pins");
199
+ let userAuth;
200
+ try {
201
+ userAuth = assertUserAuthInfo(doc.userAuth);
202
+ }
203
+ catch (e) {
204
+ return bad(`✗ user-auth bundle: ${e.message}`);
205
+ }
206
+ if (!userAuth.endpoints?.url)
207
+ return bad("✗ the user-auth bundle pins no exchange endpoint (userAuth.endpoints.url) - for a remote registration that URL is trust, and it must come from the export, never be guessed");
208
+ if (typeof doc.sentinelCreds !== "string" || !doc.sentinelCreds)
209
+ return bad("✗ the user-auth bundle carries no sentinelCreds - the sentinel identity is part of the export");
210
+ return good({ space: doc.space, server: doc.server, tlsRequired: doc.tlsRequired, userAuth, sentinelCreds: doc.sentinelCreds });
211
+ }
212
+ /** Budget for the exchange trust probe — same posture as the mode probe above: run once, at
213
+ * registration, where patience is cheaper than a wrong record. */
214
+ const EXCHANGE_PROBE_TIMEOUT_MS = 5_000;
215
+ /**
216
+ * Fetch that CANNOT be walked off HTTPS.
217
+ *
218
+ * `fetch` follows redirects by default and will happily follow `https://` → `http://`, so a
219
+ * 302 from anyone on the path turns a pinned, encrypted fetch into a plaintext one — and the
220
+ * document being fetched IS the trust being adopted. `redirect: "manual"` stops the hop here;
221
+ * a redirect is then reported as the refusal it is, rather than silently followed.
222
+ *
223
+ * Loopback `http://` stays usable for tests and for an exchange on this machine (nothing leaves
224
+ * the box), which is also what keeps the suites honest without a TLS fixture. Everything else
225
+ * must be `https:`.
226
+ */
227
+ export function assertPinnedFetchUrl(u, what) {
228
+ if (u.protocol === "https:")
229
+ return undefined;
230
+ // The loopback exception is decided by PARSING the host as an address, never by how the text
231
+ // begins: `/^127\./` also matched `127.evil.com`, `127.0.0.1.nip.io` and `127.com`, which anyone
232
+ // can register, and it missed real spellings like `0177.0.0.1`. `isLoopbackHost` is the one
233
+ // authority for the question, canonicalization included. A name that does not parse as an IP is
234
+ // a NAME and gets no exception, however it starts — `localhost` included, since a hosts entry or
235
+ // a poisoned lookup can point it anywhere.
236
+ if (u.protocol === "http:" && isLoopbackHost(u.hostname))
237
+ return undefined;
238
+ // Name the ACTUAL rule. "must be https://" alone misleads the developer whose local flow used
239
+ // http://localhost: it blames the scheme, when the same scheme on 127.0.0.1 would have passed.
240
+ return (`✗ ${what} must be https:// (got ${u.protocol}//) - the pins this registration adopts cannot be fetched over a channel the network can rewrite` +
241
+ (u.protocol === "http:"
242
+ ? `. Plain http is accepted only for a loopback LITERAL (127.0.0.1, ::1), where nothing leaves this machine - "${u.hostname}" is a name, and a hosts entry or a poisoned lookup could point it anywhere, so use the literal`
243
+ : ""));
244
+ }
245
+ /** The pinned-fetch policy's verdict for ONE url, as data — so a suite can assert WHY a fetch was
246
+ * refused rather than only that something failed. A cert error, a timeout and a refused redirect
247
+ * are all "it did not work"; only this distinguishes them. Test seam, no production caller. */
248
+ export async function pinnedFetchProbe(target) {
249
+ try {
250
+ await pinnedFetch(target, "the pinned exchange");
251
+ return { refused: false, message: "" };
252
+ }
253
+ catch (e) {
254
+ return { refused: true, message: e.message };
255
+ }
256
+ }
257
+ /** One hop, no downgrade, no redirect-following. */
258
+ async function pinnedFetch(target, what) {
259
+ const u = new URL(target);
260
+ const bad = assertPinnedFetchUrl(u, what);
261
+ if (bad)
262
+ throw new Error(bad);
263
+ const res = await fetch(u, { redirect: "manual", signal: AbortSignal.timeout(EXCHANGE_PROBE_TIMEOUT_MS) });
264
+ if (res.status >= 300 && res.status < 400)
265
+ throw new Error(`✗ ${what} answered ${res.status} (a redirect to ${JSON.stringify(res.headers.get("location") ?? "")}) - a redirect can move a pinned fetch onto plaintext or onto another host, so it is refused rather than followed; publish the document at the pinned URL itself`);
266
+ return res;
267
+ }
268
+ /** The user arm of trust composition: the pinned exchange must ANSWER, and answer as itself.
269
+ * `/health` must report the pinned issuer (a base that answers with a foreign issuer is a
270
+ * different authority, however reachable) and `/jwks` must serve a non-empty key set (the
271
+ * verification material the pins promise). Nothing here trusts the response beyond consistency
272
+ * with the pins the operator supplied. */
273
+ export async function verifyUserExchange(base, issuer) {
274
+ const url = (p) => new URL(p, base.endsWith("/") ? base : `${base}/`).toString();
275
+ // The exchange base is a PIN. It must be an https URL (or loopback), and neither probe below
276
+ // may be redirected off it — otherwise the "pinned" exchange is whatever a 302 chooses.
277
+ try {
278
+ const badBase = assertPinnedFetchUrl(new URL(base), `the pinned exchange at ${base}`);
279
+ if (badBase)
280
+ return bad(badBase);
281
+ }
282
+ catch {
283
+ return bad(`✗ the bundle's pinned exchange endpoint ${JSON.stringify(base)} is not a URL`);
284
+ }
285
+ let health;
286
+ try {
287
+ const res = await pinnedFetch(url("health"), `the pinned exchange at ${base}`);
288
+ if (!res.ok)
289
+ return bad(`✗ the pinned exchange at ${base} answered /health with ${res.status} - it is not serving as the bundle promises`);
290
+ health = (await res.json());
291
+ }
292
+ catch (e) {
293
+ const m = e.message;
294
+ if (m.startsWith("✗"))
295
+ return bad(m);
296
+ return bad(`✗ the pinned exchange at ${base} did not answer /health (${m}) - the bundle's endpoint must be reachable to register against it`);
297
+ }
298
+ if (health.issuer !== issuer)
299
+ return bad(`✗ the exchange at ${base} answers for issuer ${JSON.stringify(health.issuer)} but the bundle pins ${JSON.stringify(issuer)} - a different issuer is a different authority; nothing was registered`);
300
+ try {
301
+ const res = await pinnedFetch(url("jwks"), `the pinned exchange at ${base}`);
302
+ if (!res.ok)
303
+ return bad(`✗ the pinned exchange at ${base} answered /jwks with ${res.status}`);
304
+ const jwks = (await res.json());
305
+ if (!Array.isArray(jwks.keys) || jwks.keys.length === 0)
306
+ return bad(`✗ the pinned exchange at ${base} serves an empty /jwks - it holds no verification keys for the trust the bundle pins`);
307
+ }
308
+ catch (e) {
309
+ const m = e.message;
310
+ if (m.startsWith("✗"))
311
+ return bad(m);
312
+ return bad(`✗ the pinned exchange at ${base} did not answer /jwks (${m})`);
313
+ }
156
314
  return good(undefined);
157
315
  }
316
+ /** Land the sentinel and write the remote user entry — ONE writer for both front ends, so the
317
+ * wizard cannot drift from the flag form on what a remote record looks like. The sentinel blob
318
+ * goes into a 0600 file under the entry's own root (its space-scoped user-auth state dir) and
319
+ * the record carries the PATH: the registry document is echoed by `cotal meshes` and `status`,
320
+ * and secret material must never ride a file that gets printed. */
321
+ export function persistRemoteUserEntry(space, server, root, bundle, tlsRequired, overlayConsent) {
322
+ const dir = userAuthStateDir(root, space);
323
+ mkSecretDir(dir);
324
+ const sentinelCredsPath = join(dir, "sentinel.creds");
325
+ writeSecretFileAtomic(sentinelCredsPath, bundle.sentinelCreds);
326
+ return writeRecord({
327
+ space,
328
+ server,
329
+ root,
330
+ mode: "user",
331
+ origin: "manual",
332
+ ...(tlsRequired ? { tlsRequired: true } : {}),
333
+ ...(overlayConsent ? { unencryptedOverlay: true } : {}),
334
+ userAuth: { ...bundle.userAuth, remote: true, sentinelCredsPath },
335
+ ts: new Date().toISOString(),
336
+ });
337
+ }
158
338
  /** The target this registration would resolve to. `flag-server` is the source that can never
159
339
  * classify as a prune — nothing is recorded yet, so no entry may be blamed for a failure. */
160
- export function candidateTarget(space, server, root, mode, auth) {
340
+ export function candidateTarget(space, server, root, mode, auth, tlsRequired) {
161
341
  return {
162
342
  root,
163
343
  server,
164
344
  space,
165
345
  mode,
166
- // A probe target for a registration that has not happened yet, so there is no recorded
167
- // transport to honour and this stays non-strict. That reason stands on its own and is the
168
- // whole justification.
169
- //
170
- // WHAT USED TO BE WRITTEN HERE WAS FALSE, and it is worth saying so rather than quietly
171
- // deleting it. This comment claimed the scheme could not enforce because "`MeshEntry` cannot
172
- // persist the intent" — a constraint removed three commits earlier by adding
173
- // `MeshEntry.tlsRequired`. A dead premise was holding a live decision in place, and it is
174
- // exactly why that field had no writers.
175
- //
176
- // The open question is now genuinely open: `tls://` is COSMETIC at the client (nats.js connects
177
- // plaintext to `tls://host` with empty options; only the explicit `tls` option refuses), so an
178
- // operator who types `tls://` today gets a record that resolves to a plaintext-tolerant client.
179
- // Deriving `tlsRequired` from the scheme would make that typed intent real.
180
- //
181
- // It is deliberately NOT done in this change, for a reason that is true: it converts `meshes
182
- // add tls://…` against a plaintext broker from a successful registration into a refusal. That
183
- // is a behaviour change to this command's accept/refuse contract, it belongs with the dial-policy
184
- // work being done in this file by another lane, and it is not one of the downgrades this branch
185
- // exists to close. Tracked, owned, and not smuggled in beside them.
186
- tlsRequired: false,
346
+ // The SAME source the dial policy read ({@link tlsIntent}) the decision the old comment here
347
+ // reserved for the dial-policy work, now taken. A candidate that probed non-strict while the
348
+ // record it vouched for said strict would verify a connection the record's own dials refuse;
349
+ // carrying the real intent means `meshes add tls://…` against a plaintext broker is a REFUSAL
350
+ // at registration, not a surprise at the first spawn.
351
+ tlsRequired,
187
352
  ...(auth ? { auth } : {}),
188
353
  personaRoot: personaDir(root),
189
354
  source: "flag-server",
@@ -1 +1 @@
1
- {"version":3,"file":"meshes-add.js","sourceRoot":"","sources":["../../src/commands/meshes-add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAmB,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EACL,OAAO,EACP,aAAa,EACb,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,eAAe,EACf,UAAU,EACV,UAAU,GAIX,MAAM,qBAAqB,CAAC;AAgB7B,MAAM,GAAG,GAAG,CAAC,OAAe,EAAgB,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAExE;;;;;;uDAMuD;AACvD,MAAM,OAAO,GACX,uGAAuG;IACvG,wGAAwG;IACxG,2DAA2D,CAAC;AAC9D,MAAM,IAAI,GAAG,CAAI,KAAQ,EAAY,EAAE,CAAC,CAAC,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