@cotal-ai/cli 0.174.4 → 0.175.0

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.
@@ -0,0 +1,430 @@
1
+ import { drainAndClose, isReachable, dialerFor, createSpaceAuth, serverConfig, openServerConfig, credsProblem, mintCreds, mintConnectionEvictorCreds, mintMembershipObserverCreds, newIdentity, standaloneConnectOpts, requireBrokerFloor, presenceBucket, mkSecretDir, writeSecretFile, } from "@cotal-ai/core";
2
+ import { readFileSync, existsSync, lstatSync } from "node:fs";
3
+ import { dirname, join, resolve } from "node:path";
4
+ import { jetstreamManager, StorageType } from "@nats-io/jetstream";
5
+ import { CommandFailure, authDir, getSpaceAuth, hasUserAuthState, preloadSpaceAccounts, putSpaceAuth, connectionEvictorCredsKey, membershipConfigPath, membershipObserverCredsKey, membershipRwCredsKey, MEMBERSHIP_CONFIG_KIND, MEMBERSHIP_RW_CREDS_KIND, WEB_CREDS_KIND, webCredsKey, meshesForRoot, rotateSystemCreds, staleSystemCreds, SYSTEM_CREDS_FILES, userAuthStateDir, userAuthSpacesOnDisk, workspaceSecretStore, readBrokerPolicy, brokerAccountResolver, retainSystemSigningSeed, NATS_PIDFILE, terminalWidth, } from "@cotal-ai/workspace";
6
+ import { resolveAuthProvider } from "../lib/auth-proc.js";
7
+ import { c, hang } from "../ui.js";
8
+ import { resolveNatsServer, unreadVersion } from "../lib/nats-bin.js";
9
+ import { cotalPath, cotalRoot } from "../lib/paths.js";
10
+ import { shellWord } from "../lib/endpoint-errors.js";
11
+ import { namedOpenConfig } from "../lib/legacy-start.js";
12
+ import { unparsableDaemonCredsNotice } from "./stack-up.js";
13
+ import { configuredStoreDir } from "../lib/store-dir.js";
14
+ import { freePort } from "../lib/up-broker-address.js";
15
+ import { assertManagerPayload } from "./up-transport.js";
16
+ /** The broker's version, and whether `space`'s presence stream exists file-backed. Cotal creates
17
+ * it in memory (#1356), so only a bucket an older cotal created is file-backed; an absent one
18
+ * will be created in memory by `setupSpaceStreams`. */
19
+ export async function brokerVersion(server, space, creds) {
20
+ const nc = await dialerFor(server)({ servers: server, ...standaloneConnectOpts({ creds, tls: false }) });
21
+ try {
22
+ requireBrokerFloor(nc);
23
+ const version = nc.info?.version ?? "";
24
+ let presenceFileBacked = false;
25
+ try {
26
+ const info = await (await jetstreamManager(nc)).streams.info(`KV_${presenceBucket(space)}`);
27
+ presenceFileBacked = info.config.storage === StorageType.File;
28
+ }
29
+ catch (e) {
30
+ const err = e;
31
+ if (err.api_error?.err_code !== 10059 && !/stream not found/i.test(err.message ?? ""))
32
+ throw e;
33
+ }
34
+ return { version, presenceFileBacked };
35
+ }
36
+ finally {
37
+ await drainAndClose(nc);
38
+ }
39
+ }
40
+ /**
41
+ * Render and write the config for an OPEN (no-auth) broker, returning its path. It names `space`,
42
+ * because an open root holds no account that would ({@link namedOpenConfig}).
43
+ *
44
+ * The `authSetup` sibling for the no-auth mode. Open mode previously launched nats-server from
45
+ * bare CLI flags and so never passed through any renderer — meaning the REQUIRED transport union
46
+ * on the config renderers covered the auth path only, and a `--tls-cert`/`--tls-key` pair given to
47
+ * an open-mode `up` would have been accepted while the broker came up in cleartext. Routing open
48
+ * mode through a renderer is what makes the union total: there is now no route to a listener that
49
+ * does not state its transport.
50
+ */
51
+ export function writeOpenBrokerConf(storeDir, space, opts) {
52
+ const confPath = cotalPath("server-open.conf");
53
+ writeBrokerConfig(confPath, namedOpenConfig(openServerConfig({ brokerVersion: opts.brokerVersion, port: opts.port, host: opts.host, storeDir: configuredStoreDir(cotalRoot(), storeDir), maxFileStore: opts.maxFileStore, maxPayload: opts.maxPayload, logFile: opts.logFile, logfileSizeLimit: opts.logfileSizeLimit, logfileMaxNum: opts.logfileMaxNum, transport: opts.transport }), space));
54
+ return confPath;
55
+ }
56
+ /** Write a broker configuration that `up` renders again on every start. Something other than this
57
+ * account's own regular file at its path, such as a symlink or a folder, is refused by name and
58
+ * left as it is. Moving it aside loses nothing, because the next `up` writes the file again.
59
+ * Other write failures name the path and errno, and remain known failures before a launch. */
60
+ function writeBrokerConfig(path, text) {
61
+ try {
62
+ writeSecretFile(path, text);
63
+ }
64
+ catch (error) {
65
+ const code = error.code;
66
+ // A nonblocking write-only open can fail ENXIO for non-regular entries before the secure
67
+ // writer can inspect its descriptor. An absent or regular entry still means a write failure.
68
+ const entry = code === "EPERM" || code === "EISDIR" || code === "EACCES" || code === "ENXIO" ? lstatSync(path, { throwIfNoEntry: false }) : undefined;
69
+ if (code !== "EPERM" && code !== "EISDIR" && code !== "EACCES" && (!entry || entry.isFile()))
70
+ throw new CommandFailure("failed", "OPERATION_FAILED", `up could not write the broker configuration ${path}${code ? ` (${code})` : ""}; nothing was started`, {
71
+ target: { path }, remedy: `correct the write failure at ${path}, then run \`cotal up\` again, which writes the configuration again`,
72
+ });
73
+ const what = entry?.isSymbolicLink() ? "is a symlink" : entry?.isDirectory() ? "is a folder" : code === "EACCES" ? "cannot be written by this account" : "is not a regular file this account owns";
74
+ throw new CommandFailure("refused", "PERMISSION_DENIED", `the broker configuration ${path} ${what}, so up cannot write it; it was left as it is and nothing was started`, {
75
+ target: { path }, remedy: `move it aside, as mv ${shellWord(path)} ${shellWord(`${path}.old`)} does, then run \`cotal up\` again, which writes it from the space's trust`,
76
+ });
77
+ }
78
+ }
79
+ /** The refusal for a trust record of the space that this account cannot read. It holds the space's
80
+ * keys, so the step makes it readable again and never removes it. Any other error as it is. */
81
+ function unreadableTrust(error) {
82
+ const { code, path } = error;
83
+ if (code !== "EACCES" && code !== "EPERM" || typeof path !== "string")
84
+ return error;
85
+ return new CommandFailure("refused", "PERMISSION_DENIED", `the space's trust record ${path} cannot be read by this account (${code}); nothing was started`, {
86
+ target: { path }, remedy: `make it readable by you again, as chmod 600 ${shellWord(path)} does, then run \`cotal up\` again; it holds the space's keys, so keep it`,
87
+ });
88
+ }
89
+ /** Ensure the space's trust material exists and render a server config. The caller can mint
90
+ * the setup credential after connector reconciliation. The account signing key
91
+ * in `.cotal/auth` is what `cotal mint` and the manager later use to issue per-agent creds.
92
+ *
93
+ * USER MODE (`user` set): additionally run the registered auth provider's `prepareServer` over the
94
+ * SPACE-SCOPED state dir (`.cotal/auth/<space>/` — the multi-space-ready layout; nothing user-auth
95
+ * lives flat) and preload its extra account(s) into the broker config. The inverse is fail-closed:
96
+ * a space whose user-auth state exists MUST keep being started with --user-auth — regenerating the
97
+ * config without the callout account would silently break every sentinel connect.
98
+ *
99
+ * `rotateSys` (`cotal up --rotate-sys`) is the class-3 renewal for an EXISTING space: rotate the
100
+ * system account, re-mint `membership-observer.creds` + `connection-evictor.creds` against the
101
+ * successor, and render the config from the ROTATED record so the broker this `up` starts is the one
102
+ * that trusts them. It belongs here because this is the single site that both owns the trust record
103
+ * and renders `server.conf`; anywhere else would publish creds the live broker cannot honor. */
104
+ export async function authSetup(storeDir, server, space, host = "127.0.0.1", user,
105
+ // NON-OPTIONAL, and it used to default to `{ kind: "plaintext" }`. That default was the hole: the
106
+ // manifest path called this with five arguments and silently got a cleartext listener while the
107
+ // operator's `--tls-cert` sat validated and unused. A default here cannot be right, because the
108
+ // safe value and the common value are different values — every caller knows its transport, and
109
+ // the one that does not is the one that must not compile.
110
+ transport, rotateSys = false, maxFileStore, quietBoot = false,
111
+ // `--auth-timeout`, `--max-payload` and `--account-resolver`. Each absent value falls back to the one the root's broker
112
+ // policy records, so a bare `up` renders what an earlier `up` set. They arrive as one object
113
+ // rather than two trailing optional numbers: a transposed pair of those renders a wrong
114
+ // configuration in silence.
115
+ requested = {}) {
116
+ const dir = authDir(cotalRoot()); // the broker config (server.conf) still lands under the FS auth dir
117
+ const store = workspaceSecretStore(cotalRoot());
118
+ let auth = await getSpaceAuth(store, space).catch((error) => { throw unreadableTrust(error); });
119
+ if (!auth) {
120
+ auth = await createSpaceAuth(space);
121
+ // The trust record is written last. Until it exists the next up treats the space as fresh and
122
+ // mints all of this again, so an up stopped partway never leaves a space without its $SYS creds.
123
+ await provisionMembershipCreds(auth, cotalRoot(), space); // the observer is minted while the $SYS seed is in memory (fresh-space only)
124
+ // Smoke only: hold a new space with part of its material written, so a signal can land there.
125
+ if (process.env.COTAL_SMOKE_HOLD_IN_SPACE_AUTH === "1")
126
+ await new Promise((done) => setTimeout(done, 60_000));
127
+ await retainSystemSigningSeed(store, auth); // the host keeps the seed itself, beside the record, for own-broker caller issuance
128
+ await putSpaceAuth(store, auth); // strips the $SYS seed at rest
129
+ // A fresh space's $SYS material was just minted from the seed this branch holds in memory, so
130
+ // the ASK is already satisfied, so say so rather than rotating a one-second-old account, and never
131
+ // report a rotation that did not happen.
132
+ if (rotateSys)
133
+ console.log(c.dim("• --rotate-sys: this space is new, so its $SYS creds were just minted - nothing to rotate"));
134
+ }
135
+ else if (rotateSys) {
136
+ // Third and last of the stopped-broker checks, at the one point every rotation path converges on.
137
+ // The other two live in `up`'s reachable-listener branch: this root's recorded mesh at the
138
+ // requested address, and any UNIDENTIFIED listener there (which refuses rather than free-porting
139
+ // around a broker that may be serving this root's own server.conf and store). This one reads the
140
+ // root's ownership records for a broker at an address nobody probed. It reports what those
141
+ // records say, not what the process table says (see its own comment for the residual), and fails
142
+ // CLOSED, so an ambiguous record refuses exactly like a live one.
143
+ await assertRootBrokerStopped(cotalRoot());
144
+ // Fails loud: a caller that swallowed this would boot the broker on the RETIRED system account
145
+ // while `doctor auth` reported the rotation as done.
146
+ const rot = await rotateSystemCreds(cotalRoot(), space);
147
+ auth = rot.auth; // the config below MUST be rendered from the successor, never the pre-rotation copy
148
+ console.log(c.green(`✓ rotated the system account for "${space}"`) +
149
+ c.dim(` (generation ${rot.gen}) - re-minted ${SYSTEM_CREDS_FILES.join(" + ")}${rot.expiresAt ? `, valid to ${new Date(rot.expiresAt * 1000).toISOString().slice(0, 10)}` : ""}`));
150
+ // Say exactly what is true. The retirement is CONFIG-LOAD-BOUND: an old cred dies against any
151
+ // broker that loads the successor config, which is every broker started from this root from here
152
+ // on, but a stale nats-server still holding the pre-rotation config in memory would keep
153
+ // honoring it, so "now dead" without that qualifier oversells the guarantee.
154
+ console.log(c.dim(" the data account, every agent cred and the JetStream store are untouched. The OLD $SYS creds are refused by any broker that loads this config; a stale broker still running the previous config would still honor them, so stop those first."));
155
+ // A full backup binds to the trust chain it was taken against: `rootChainCommitment` hashes the
156
+ // operator JWT and the system account, both of which just changed, so `cotal up --restore`
157
+ // refuses every full artifact taken before this moment. That is correct (it is a different trust
158
+ // root), but it is only obvious to someone who has read the fingerprint code, and rotation is
159
+ // now a routine 30-day act rather than a once-per-space event. Say it at the moment it becomes
160
+ // true, not in a doc the operator reads after the restore has already failed.
161
+ console.log(c.dim(" NOTE: full backups taken before this rotation can no longer be restored (they are bound to the retired trust chain) - take a fresh `cotal backup` once the mesh is up."));
162
+ }
163
+ // The DATA half of the membership bundle, on EVERY path — see healMembershipDataCreds.
164
+ await healMembershipDataCreds(auth, cotalRoot(), space, quietBoot);
165
+ await provisionWebCreds(auth, cotalRoot(), space, quietBoot);
166
+ // The $SYS creds must be signed by the system account THIS boot is about to put in `server.conf`.
167
+ // A rotation that committed the trust record and then died leaves them stale, unexpired, and
168
+ // broker-dead and, crash-before-either-write, stale in a way that no comparison between the two
169
+ // FILES can see (they agree with each other; they just disagree with the record). This is the one
170
+ // place holding both, on the one path that renders the config, so it is where the split is caught.
171
+ //
172
+ // REFUSE, do not warn. A warning is what the `--detach` path turns into an unread log line under a
173
+ // green "✓ running in the background", which is the false success this whole change exists to
174
+ // remove. And what stays broken is not only the display feed: live connection EVICTION rides the
175
+ // same pair, so booting here would silently downgrade revocation to deny-new for the life of the
176
+ // mesh. The repo's posture is to throw rather than degrade, and the recovery is one command that
177
+ // this message names.
178
+ const stale = staleSystemCreds(cotalRoot(), auth.sys.pub, space);
179
+ if (stale.length)
180
+ throw new Error(`${stale.map((x) => `${x.file} (signed by ${x.iss ? `${x.iss.slice(0, 12)}…` : "an unreadable issuer"})`).join(", ")} ` +
181
+ `${stale.length === 1 ? "is" : "are"} not signed by this space's system account (${auth.sys.pub.slice(0, 12)}…) - ` +
182
+ "an interrupted rotation left the $SYS creds behind the trust record, so the broker would deny them and live eviction + the membership feed would stay down. " +
183
+ "Re-run the rotation to land a complete generation: `cotal up --rotate-sys`");
184
+ const stateDir = userAuthStateDir(cotalRoot(), space); // the provider's space-scoped state dir
185
+ if (!user && hasUserAuthState(cotalRoot(), space)) {
186
+ throw new Error(`space "${space}" has user auth enabled (state under ${stateDir}) - start it with \`cotal up --user-auth\`, or remove that directory deliberately to disable user auth (existing logins/grants die with it)`);
187
+ }
188
+ let prepared;
189
+ if (user) {
190
+ // Registry composition: the provider came from the composition root (bin/cotal.ts imports
191
+ // @cotal-ai/auth); this package never imports it. No provider ⇒ resolveAuthProvider throws the
192
+ // exact fix. The narrow input is a capability boundary: operator seed (signs the provider's
193
+ // account once) + the data account's pub/signingSeed (projected for the service's minting duty).
194
+ try {
195
+ prepared = await resolveAuthProvider().prepareServer({
196
+ space,
197
+ operatorSeed: auth.operator.seed,
198
+ account: { pub: auth.account.pub, signingSeed: auth.account.signingSeed },
199
+ store: workspaceSecretStore(cotalRoot()),
200
+ dir: stateDir,
201
+ idpUrl: user.idpUrl,
202
+ });
203
+ }
204
+ catch (e) {
205
+ throw e instanceof Error ? e : new Error(String(e));
206
+ }
207
+ }
208
+ const port = Number(new URL(server).port) || 4222;
209
+ // A reused controller manager advertises its launch-time WebSocket port.
210
+ const wsPort = requested.wsPort ?? await freePort(host);
211
+ const confPath = resolve(dir, "server.conf");
212
+ // EVERY tenant of this root, not just the one being booted: `resolver_preload` is a whole-broker
213
+ // map, so a config rendered from one space evicts the rest silently. `auth` leads the list because
214
+ // this function's copy can be fresher than the disk (a space created above, or one whose trust
215
+ // record `--rotate-sys` just replaced). Refuses on an unreadable record rather than dropping it.
216
+ const spaces = preloadSpaceAccounts(dir, auth);
217
+ const enabled = userAuthSpacesOnDisk(dir);
218
+ for (const enabledSpace of enabled) {
219
+ if (!spaces.some((s) => s.space === enabledSpace))
220
+ throw new Error(`space "${enabledSpace}" has user auth enabled but no data account record - refusing to render an incomplete broker resolver`);
221
+ }
222
+ const extraAccounts = [];
223
+ for (const enabledSpace of enabled) {
224
+ const accounts = enabledSpace === space && prepared
225
+ ? prepared.extraAccounts
226
+ : await resolveAuthProvider().preloadAccounts({ store, space: enabledSpace });
227
+ extraAccounts.push(...accounts);
228
+ }
229
+ // Owner-private regardless of umask, as `writeOpenBrokerConf` writes the open configuration: the
230
+ // broker preset refuses a configuration that other local users can write.
231
+ const recorded = readBrokerPolicy(cotalRoot());
232
+ const authTimeout = requested.authTimeout ?? recorded?.authTimeout;
233
+ const maxPayload = requested.maxPayload ?? recorded?.maxPayload;
234
+ if (requested.manager === true)
235
+ assertManagerPayload(maxPayload);
236
+ const resolverChoice = requested.accountResolver ?? recorded?.accountResolver ?? "memory";
237
+ const accountResolver = brokerAccountResolver(cotalRoot(), resolverChoice === "full" ? "full" : undefined);
238
+ // Owner-private like the auth dir: nats-server writes each pushed claim here.
239
+ if (accountResolver.kind === "full")
240
+ mkSecretDir(accountResolver.directory);
241
+ const brokerBinary = await resolveNatsServer();
242
+ if (!brokerBinary.version)
243
+ throw unreadVersion(brokerBinary);
244
+ const render = (ws) => writeBrokerConfig(confPath, serverConfig(auth, spaces, { brokerVersion: brokerBinary.version, transport, port, storeDir: configuredStoreDir(cotalRoot(), storeDir), maxFileStore, authTimeout, maxPayload, accountResolver, logFile: requested.logFile, logfileSizeLimit: requested.logfileSizeLimit, logfileMaxNum: requested.logfileMaxNum, host, wsPort: ws, wsHost: host, extraAccounts }));
245
+ render(wsPort);
246
+ // The chosen port is free now, but nothing holds it until the broker binds it. When another process
247
+ // takes it first, the broker exits before readiness, and a controller stack start renders this
248
+ // configuration again on a newly chosen port.
249
+ const moveWebsocketPort = async () => { const moved = await freePort(host); render(moved); return moved; };
250
+ // Connector reconciliation can outlast the provisioner's lifetime. Mint only when boot needs it
251
+ // to probe the listener, create streams and buckets, or seed the channel registry.
252
+ const mintProvisioner = () => mintCreds(auth, newIdentity(), "provisioner");
253
+ return { brokerBinary, confPath, mintProvisioner, wsPort, moveWebsocketPort, ...(prepared ? { prepared, stateDir } : {}), ...(authTimeout !== undefined ? { authTimeout } : {}), ...(maxPayload !== undefined ? { maxPayload } : {}), accountResolver: resolverChoice };
254
+ }
255
+ /**
256
+ * Refuse the rotation if this root's own bookkeeping still shows a broker running. This is a
257
+ * BEST-EFFORT check over Cotal-managed ownership records, NOT a proof that no process is serving this
258
+ * root, and the difference matters: a survivor keeps honoring the retired account from memory, and a
259
+ * second broker on the successor opens that survivor's JetStream store underneath it.
260
+ *
261
+ * Two records, because either alone has a blind spot. The PID FILE catches a broker this root started
262
+ * whose registry row was lost. The REGISTRY sweep catches one recorded for this root at some OTHER
263
+ * address, which no probe of the requested URL would reach. Both fail CLOSED: an unreadable or
264
+ * malformed pid file refuses exactly like a live one, since "cannot tell" and "still running" have
265
+ * the same consequence.
266
+ *
267
+ * WHAT IT CANNOT SEE: both records are mutable, and neither is written by a broker started outside
268
+ * `cotal up`. Delete both while the process lives, or run
269
+ * `nats-server -c <root>/.cotal/auth/server.conf` by hand, and this returns success having probed
270
+ * nothing. The requested address is covered separately (an unidentified listener there refuses the
271
+ * rotation rather than moving to a free port), which leaves a hand-started broker on a DIFFERENT port
272
+ * as the honest residual. Closing that needs something a survivor holds and cannot delete, an
273
+ * exclusive store lock, which does not exist today; until it does, do not run `nats-server` against
274
+ * this root's config outside `cotal up`.
275
+ *
276
+ * Not a general `up` guard: an ordinary boot adopting or replacing a listener is a supported flow with
277
+ * its own claim machinery. This is specifically the precondition for retiring an authority.
278
+ */
279
+ async function assertRootBrokerStopped(root) {
280
+ const pidPath = join(root, ".cotal", NATS_PIDFILE);
281
+ if (existsSync(pidPath)) {
282
+ let raw;
283
+ try {
284
+ raw = readFileSync(pidPath, "utf8").trim();
285
+ }
286
+ catch (e) {
287
+ throw new Error(`--rotate-sys: ${pidPath} exists but cannot be read (${e.message}) - refusing to rotate while a broker for this root may still be running; \`cotal down\` first`);
288
+ }
289
+ const pid = Number(raw);
290
+ if (!Number.isInteger(pid) || pid <= 0)
291
+ throw new Error(`--rotate-sys: ${pidPath} does not hold a pid (${JSON.stringify(raw)}) - refusing to rotate while a broker for this root may still be running; \`cotal down\` first`);
292
+ let live;
293
+ try {
294
+ process.kill(pid, 0); // signal 0 is a liveness probe, it signals nothing
295
+ live = true;
296
+ }
297
+ catch (e) {
298
+ // EPERM means the process EXISTS and is not ours to signal, i.e. alive for this purpose.
299
+ live = e.code === "EPERM";
300
+ }
301
+ if (live)
302
+ throw new Error(`--rotate-sys: this root's broker is still running (pid ${pid}) - it would keep serving the retired system account, and a second broker would share its JetStream store. Stop it first: \`cotal down\``);
303
+ }
304
+ // A broker recorded for this root at ANY address, still answering. The rotate refusal earlier in
305
+ // `up` only sees the URL this invocation asked for; this sees the ones it did not.
306
+ for (const m of meshesForRoot(root)) {
307
+ if (await isReachable(m.server))
308
+ throw new Error(`--rotate-sys: mesh "${m.space}" for this root is still reachable at ${m.server} - stop it first (\`cotal down\`), then rotate`);
309
+ }
310
+ }
311
+ /** Provision the DATA-account half of the membership bundle, on EVERY `up` rather than only a fresh
312
+ * space. Idempotent: it writes only what is absent and is silent when both are present.
313
+ *
314
+ * WHY THIS IS SEPARATE FROM {@link provisionMembershipCreds}. That function mints the whole bundle
315
+ * in the fresh-space branch because the `$SYS` signing seed exists only there and is never
316
+ * persisted — true of `membership-observer.creds` and `connection-evictor.creds`. The delivery daemon
317
+ * mints a missing evictor itself on a single-space root that retained its system-account signing
318
+ * seed, so that one no longer needs a rotation; a root without the seed still needs one. It is NOT
319
+ * true of the other two.
320
+ * `membership-rw.creds` is signed by the DATA account, whose signing seed IS persisted, and
321
+ * `membership.json` is just that account's public id. Neither needs the `$SYS` window, so binding
322
+ * them to it left every space provisioned before the feature permanently without the feed.
323
+ *
324
+ * That gap was not theoretical. A space with a complete `$SYS` pair, missing only the rw cred,
325
+ * reported `the membership bundle is incomplete here (missing membership-rw.creds)` on every
326
+ * delivery-daemon start and served a traffic-only graph, and the documented remedy did not work:
327
+ * `--rotate-sys` re-mints the `$SYS` pair and never calls the provisioner, so it wrote neither the
328
+ * rw cred nor the account id. `mintMembershipObserverCreds` even names that rotation as the fix in
329
+ * its own error text — advice that could not succeed. Healing here fixes both spellings at once:
330
+ * the ordinary `up` repairs the data half with no rotation at all, and a rotation now repairs it
331
+ * too, because this runs after both branches converge. */
332
+ async function healMembershipDataCreds(auth, root, space, quietBoot = false) {
333
+ try {
334
+ const store = workspaceSecretStore(root);
335
+ // THE RESOLVERS, not the bare kinds (P7 §2 rule 1). Both reads below are absent-means-MINT, which
336
+ // is precisely why the location must be resolved through the choke point: a canonical read on a
337
+ // root whose material is still flat answers "absent" and mints a SECOND live cred beside the one
338
+ // the running daemons hold. `up` is a workstation composition by construction, so the resolver
339
+ // gets the FS arm and moves the material on this first touch.
340
+ const composition = { injected: false, root };
341
+ const rwKey = membershipRwCredsKey(space, composition);
342
+ const wrote = [];
343
+ const rw = await store.get(rwKey);
344
+ if (rw === undefined) {
345
+ await store.put(rwKey, await mintCreds(auth, newIdentity(), "membership-rw"));
346
+ wrote.push(MEMBERSHIP_RW_CREDS_KIND); // the KIND is what an operator reads, never the segmented key
347
+ }
348
+ else if (credsProblem(rw) !== undefined && !quietBoot)
349
+ console.error(c.yellow(`! ${unparsableDaemonCredsNotice([MEMBERSHIP_RW_CREDS_KIND])}`));
350
+ const configPath = membershipConfigPath(root, space);
351
+ if (!existsSync(configPath)) {
352
+ mkSecretDir(dirname(configPath)); // harden the per-space dir before the file lands, as the fresh path does
353
+ writeSecretFile(configPath, JSON.stringify({ accountId: auth.account.pub }));
354
+ wrote.push(MEMBERSHIP_CONFIG_KIND);
355
+ }
356
+ if (wrote.length && !quietBoot)
357
+ console.log(c.dim(`• membership: provisioned ${wrote.join(" + ")} - the data-account half needs no system-account rotation`));
358
+ }
359
+ catch (e) {
360
+ // Best-effort, exactly like the fresh-space provisioner: a failure here leaves the graph on
361
+ // traffic-only and leaves delivery untouched. It must never keep the mesh from starting.
362
+ console.error(c.dim(`• broker-sourced membership not repaired: ${e.message}`));
363
+ }
364
+ }
365
+ /** The web dashboard's read-only cred, on EVERY `up` of a static space: `cotal service start web`
366
+ * defaults its `--creds` to this file. Idempotent and absent-means-mint, through the resolver as
367
+ * {@link healMembershipDataCreds} is. It is the `observer` profile, minted without an expiry, as the
368
+ * `cotal auth mint --profile observer` recipe this replaces was: the dashboard reads the file once at
369
+ * start and holds its connection, and no renewal owner reloads it. Best-effort for the same reason as
370
+ * the membership heal: a failure here must never keep the mesh from starting. */
371
+ export async function provisionWebCreds(auth, root, space, quietBoot = false) {
372
+ try {
373
+ const store = workspaceSecretStore(root);
374
+ const key = webCredsKey(space, { injected: false, root });
375
+ if ((await store.get(key)) !== undefined)
376
+ return;
377
+ await store.put(key, await mintCreds(auth, newIdentity(), "observer"));
378
+ if (!quietBoot)
379
+ for (const line of hang("• ", `web: provisioned ${WEB_CREDS_KIND} - the dashboard's read-only credential, the \`service start web\` default`, terminalWidth(process.stdout)))
380
+ console.log(c.dim(line));
381
+ }
382
+ catch (e) {
383
+ console.error(c.dim(`• web dashboard credential not provisioned: ${e.message}`));
384
+ }
385
+ }
386
+ /** Mint the two scoped creds the delivery daemon's membership feed loads (broker-sourced graph
387
+ * membership), at the FRESH `cotal up` while the in-memory `$SYS` signing seed still exists:
388
+ * - `membership-observer.creds` — SYSTEM-account CONNZ reader (the only window it is minted here:
389
+ * the trust record carries no `$SYS` seed, and the retained custody record serves caller issuance only).
390
+ * - `membership-rw.creds` — DATA-account members-read + feed-write.
391
+ * - `membership.json` — the DATA account id (the CONNZ/event subjects pin it; non-secret, but kept
392
+ * 0600 alongside the creds).
393
+ * All 0600. Best-effort: a failure logs and leaves the feed disabled (the graph degrades to traffic-
394
+ * only, delivery is untouched). Runs only on a FRESH space (the `if (!auth)` branch); a normal down/up
395
+ * keeps `.cotal/auth` + these creds and reuses them. A space provisioned before this feature has no
396
+ * in-memory `$SYS` seed, so it gains membership only when its auth is regenerated (a fresh `.cotal/auth`)
397
+ * — a documented migration property, not a silent no-op.
398
+ * Coupling: `cotal clean all` deletes this identity-derived set (removeLocalState in clean.ts) —
399
+ * a cred added here must be added to that removal list too. `membership-rw.creds` is a MIGRATED kind:
400
+ * its write/read/delete all go through the {@link SecretStore} seam (here, the feed reader, and clean),
401
+ * so the renewal owner can re-sign it into a hosted store. The observer / evictor / config stay on the
402
+ * raw FS (static $SYS creds + non-secret config, not renewable kinds). */
403
+ async function provisionMembershipCreds(auth, root, space) {
404
+ try {
405
+ const observer = await mintMembershipObserverCreds(auth, newIdentity());
406
+ const rw = await mintCreds(auth, newIdentity(), "membership-rw");
407
+ // D5 slice 4: the KICK-only connection-evictor cred — same mint-only-at-fresh-`up` window as
408
+ // the observer ($SYS seed in memory here). The delivery daemon pairs it with the observer to
409
+ // close a revoked/removed principal's live connections. A space without it degrades to
410
+ // deny-new-only (durable reauth) — surfaced loudly by the removal path, never silent.
411
+ const evictor = await mintConnectionEvictorCreds(auth, newIdentity());
412
+ // All four land through the per-kind resolvers (P7 §2 rule 1), and all four through the store's
413
+ // `put`, which is the same `mkSecretDir` + atomic write the raw `writeSecretFile` did — the
414
+ // difference being that it hardens the PER-SPACE dir the material now lives in rather than
415
+ // `.cotal/` itself. This is the fresh-space branch, so nothing is there to migrate; it calls the
416
+ // resolvers anyway because a kind with two write paths is a kind that grows two layouts.
417
+ const composition = { injected: false, root };
418
+ const store = workspaceSecretStore(root);
419
+ await store.put(membershipObserverCredsKey(space, composition), observer);
420
+ await store.put(membershipRwCredsKey(space, composition), rw);
421
+ await store.put(connectionEvictorCredsKey(space, composition), evictor);
422
+ const configPath = membershipConfigPath(root, space);
423
+ mkSecretDir(dirname(configPath));
424
+ writeSecretFile(configPath, JSON.stringify({ accountId: auth.account.pub }));
425
+ }
426
+ catch (e) {
427
+ console.error(c.dim(`• broker-sourced membership not provisioned: ${e.message}`));
428
+ }
429
+ }
430
+ //# sourceMappingURL=up-broker-auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"up-broker-auth.js","sourceRoot":"","sources":["../../src/commands/up-broker-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,WAAW,EACX,SAAS,EACT,eAAe,EACf,YAAY,EACZ,gBAAgB,EAEhB,YAAY,EACZ,SAAS,EACT,0BAA0B,EAC1B,2BAA2B,EAC3B,WAAW,EACX,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,eAAe,GAGhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACL,cAAc,EACd,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,YAAY,EACZ,yBAAyB,EACzB,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,cAAc,EACd,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAmB,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO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