shadok-ai 0.19.89 → 0.19.91
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/README.md +3 -2
- package/context/scheduler-skill/SKILL.md +33 -9
- package/context/scheduler-skill/scripts/schedule.mjs +82 -21
- package/context/scheduler-skill/test/schedule.test.mjs +67 -9
- package/dist/accounts.d.ts +36 -8
- package/dist/accounts.js +40 -12
- package/dist/accounts.js.map +1 -1
- package/dist/server.js +133 -43
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1036,7 +1036,8 @@ know before opening it up:
|
|
|
1036
1036
|
else you do. Accounts belong to **one instance** (one launch directory), like
|
|
1037
1037
|
its channels and its scheduled prompts. With no password there are no
|
|
1038
1038
|
accounts and no login screen — nothing changes for a machine you use alone.
|
|
1039
|
-
When a signed-in session **expires** (
|
|
1039
|
+
When a signed-in session **expires** (after a week without a visit — using
|
|
1040
|
+
the cockpit renews it — or 30 days after the sign-in at the latest), the open tab
|
|
1040
1041
|
returns you to the login screen on its next request instead of failing in
|
|
1041
1042
|
place — a paste that would not send, an agent list that would not refresh.
|
|
1042
1043
|
- **Two-factor sign-in (passkeys).** From the **Users** panel, anyone signed in
|
|
@@ -1678,7 +1679,7 @@ HTTP endpoints (same auth): `/usage`, `/live`, `/sessions`, `/recover`,
|
|
|
1678
1679
|
`/channels/glance` (GET — each visible row's last-message time and context %,
|
|
1679
1680
|
read from the transcript's tail so the list fills before the agents resume),
|
|
1680
1681
|
`/channel` (DELETE), `/groups`, `/groups/ssh` (GET — the SSH **public** key to
|
|
1681
|
-
register per group, filtered like `/groups`), `/crons` (+ POST `/crons/:id/run` — fire a schedule now, its next slot unchanged), `/webhooks` (GET; POST create, PATCH/DELETE `/webhooks/:id`, POST `/webhooks/:id/rotate` — writes browser person only, the token is returned only by create/rotate; the call itself, `POST /hooks/:id`, sits before the password gate and authenticates with the webhook's own token), `/timezone`, `/title` (GET/PUT — the
|
|
1682
|
+
register per group, filtered like `/groups`), `/crons` (+ POST `/crons/:id/run` — fire a schedule now, its next slot unchanged; GET `/crons/env?session=<id>` — the variable NAMES a guard for that session would receive, values never included, so an agent can check its own guard before trusting it), `/webhooks` (GET; POST create, PATCH/DELETE `/webhooks/:id`, POST `/webhooks/:id/rotate` — writes browser person only, the token is returned only by create/rotate; the call itself, `POST /hooks/:id`, sits before the password gate and authenticates with the webhook's own token), `/timezone`, `/title` (GET/PUT — the
|
|
1682
1683
|
cockpit's name, per launch directory: click the header brand to rename it, so
|
|
1683
1684
|
several cockpits stay apart in the tab bar; an empty PUT reverts to the default),
|
|
1684
1685
|
`/theme` (GET/PUT — the cockpit's colour palette, per launch directory: an accent
|
|
@@ -36,10 +36,15 @@ omit the check — the prompt runs every time.
|
|
|
36
36
|
### What a check can see — secrets and cwd
|
|
37
37
|
|
|
38
38
|
A check does **not** run inside this agent's process. The server runs it with
|
|
39
|
-
`sh -c`, in the CHANNEL's directory, with the secrets
|
|
40
|
-
|
|
39
|
+
`sh -c`, in the CHANNEL's directory, with the vault secrets that resolve for
|
|
40
|
+
this agent injected as environment variables. On a multi-tenant instance it
|
|
41
41
|
runs as this agent's own OS user, exactly like the agent.
|
|
42
42
|
|
|
43
|
+
A secret reaches it two ways, and they are stored in different places: the
|
|
44
|
+
channel's **profile** lists it, OR the secret itself is bound to that profile —
|
|
45
|
+
or to “any profile” — from the web Secrets panel. The second kind reaches a
|
|
46
|
+
guard that has no profile at all, so never conclude "no profile, no secrets".
|
|
47
|
+
|
|
43
48
|
Its environment is otherwise SMALL on purpose: `PATH`, the locale and time
|
|
44
49
|
zone, proxy/CA settings, and `SHADOK_SESSION_ID` / `SHADOK_PORT` /
|
|
45
50
|
`SHADOK_SESSION_KEY` (send the key as `x-shadok-session-key` to call the local
|
|
@@ -55,14 +60,33 @@ server answers 403. A check-less cron on a sibling is fine.
|
|
|
55
60
|
So reference a secret by name (`$MY_API_KEY`) and trust it: never hardcode a
|
|
56
61
|
value into a check script, and never try to source a shell profile to get one.
|
|
57
62
|
|
|
58
|
-
The sharp edge is the other direction. A
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
is skipped just as silently. Your own shell having the key proves nothing
|
|
62
|
-
the guard's.
|
|
63
|
+
The sharp edge is the other direction. A name nothing binds to this agent is
|
|
64
|
+
simply **absent** at run time — no error, and you find out at 6am rather than
|
|
65
|
+
now. A name that isn't in the vault, or that lives in a group this agent cannot
|
|
66
|
+
reach, is skipped just as silently. Your own shell having the key proves nothing
|
|
67
|
+
about the guard's.
|
|
68
|
+
|
|
69
|
+
So ask, before writing a check that needs a secret:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
node ~/.claude/skills/shadok-scheduler/scripts/schedule.mjs env
|
|
73
|
+
```
|
|
63
74
|
|
|
64
|
-
|
|
65
|
-
|
|
75
|
+
It asks the server what it would inject and prints the variable NAMES (never a
|
|
76
|
+
value): the secrets that resolve, the ones the profile asks for that do not, and
|
|
77
|
+
the whole environment. Two things follow from it being the server's answer and
|
|
78
|
+
not a guess:
|
|
79
|
+
|
|
80
|
+
- **Trust it over your own shell, and over this file.** It reads both halves of
|
|
81
|
+
the secret↔profile link, which no client can.
|
|
82
|
+
- **Nothing in it waits for a reload.** The server re-reads the profiles and the
|
|
83
|
+
vault at every tick, so a secret attached a minute ago is already there. A
|
|
84
|
+
*Reload agent* changes only **your** process environment, not the guard's.
|
|
85
|
+
|
|
86
|
+
And if a guard still behaves as though a variable were missing, test the guard
|
|
87
|
+
itself — a one-minute schedule whose check is
|
|
88
|
+
`[ -n "$MY_KEY" ] && echo present` costs one wake-up and settles it. Printing a
|
|
89
|
+
presence test is fine; printing the value is not.
|
|
66
90
|
|
|
67
91
|
## Commands
|
|
68
92
|
|
|
@@ -51,6 +51,35 @@ async function api(ctx, method, path, body) {
|
|
|
51
51
|
return raw ? JSON.parse(raw) : {};
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Like `api`, but a 404 answers `null` instead of dying.
|
|
56
|
+
*
|
|
57
|
+
* Skills are re-seeded from the running build at every boot, so normally this
|
|
58
|
+
* file and the server move together. They do NOT when several cockpits share
|
|
59
|
+
* one machine: the machine-wide skill tier is written by whichever instance
|
|
60
|
+
* booted last, so an agent can be running this script against an older server.
|
|
61
|
+
* A missing route then has to degrade, not abort.
|
|
62
|
+
*/
|
|
63
|
+
async function apiMaybe(ctx, method, path) {
|
|
64
|
+
let res;
|
|
65
|
+
try {
|
|
66
|
+
res = await fetch(ctx.base + path, {
|
|
67
|
+
method,
|
|
68
|
+
headers: {
|
|
69
|
+
"content-type": "application/json",
|
|
70
|
+
...(ctx.key ? { "x-shadok-session-key": ctx.key } : {}),
|
|
71
|
+
},
|
|
72
|
+
signal: AbortSignal.timeout(TIMEOUT_MS),
|
|
73
|
+
});
|
|
74
|
+
} catch (e) {
|
|
75
|
+
die(`cannot reach the cockpit on ${ctx.base}: ${e.message}`);
|
|
76
|
+
}
|
|
77
|
+
if (res.status === 404) return null;
|
|
78
|
+
const raw = await res.text();
|
|
79
|
+
if (!res.ok) die(`API error ${res.status}: ${raw.slice(0, 200)}`);
|
|
80
|
+
return raw ? JSON.parse(raw) : {};
|
|
81
|
+
}
|
|
82
|
+
|
|
54
83
|
/** `every:30m` · `every:2h` · `every:45` · `daily:09:00` · `daily:09:00@mon-fri`
|
|
55
84
|
* · `once:2026-08-25T08:42` → the API's schedule. */
|
|
56
85
|
export function parseSchedule(spec) {
|
|
@@ -191,10 +220,52 @@ async function cmdTz(ctx, zone) {
|
|
|
191
220
|
}
|
|
192
221
|
|
|
193
222
|
async function cmdEnv(ctx) {
|
|
194
|
-
// A guard runs server-side, not in this agent's process
|
|
195
|
-
//
|
|
196
|
-
//
|
|
197
|
-
//
|
|
223
|
+
// A guard runs server-side, not in this agent's process, so this ASKS the
|
|
224
|
+
// server what it would inject instead of deriving it here.
|
|
225
|
+
//
|
|
226
|
+
// Deriving it is what this command used to do, and it was wrong in the
|
|
227
|
+
// expensive direction. The secret↔profile link has TWO writable homes — the
|
|
228
|
+
// profile's `secrets` list and the secret's own `profiles` list (the vault
|
|
229
|
+
// panel's chip row) — and a secret bound from the second one reaches the
|
|
230
|
+
// guard while a reader of the first reports it absent. A `*` ("any profile")
|
|
231
|
+
// binding reaches an agent with no profile at all, which this command used to
|
|
232
|
+
// answer with a flat "NONE". Both are false negatives, and a correct setup
|
|
233
|
+
// reported as broken costs more than no answer: it sends someone hunting a
|
|
234
|
+
// fault that is not there. `/crons/env` is built by the same function the
|
|
235
|
+
// real tick uses, so it cannot drift from it.
|
|
236
|
+
const view = await apiMaybe(ctx, "GET", `/crons/env?session=${encodeURIComponent(ctx.sid)}`);
|
|
237
|
+
if (!view) return cmdEnvHalfBlind(ctx);
|
|
238
|
+
if (!view.known) {
|
|
239
|
+
// Not "no secrets at all": a “any profile” binding still reaches a guard
|
|
240
|
+
// with no profile, and the list below proves it when there is one.
|
|
241
|
+
console.log("this channel is not registered server-side: a guard would run from the");
|
|
242
|
+
console.log("server's own directory, with no profile — so only a secret bound to");
|
|
243
|
+
console.log("“any profile” can reach it.");
|
|
244
|
+
}
|
|
245
|
+
console.log(`guard cwd: ${view.cwd || "(server default)"}`);
|
|
246
|
+
if (view.profileMissing)
|
|
247
|
+
console.log(`note: the channel points at profile '${view.profile}', which no longer exists.`);
|
|
248
|
+
const names = view.secrets ?? [];
|
|
249
|
+
const where = view.profile ? `profile '${view.profile}'` : "no profile";
|
|
250
|
+
console.log(`guard secrets (${where}): ${names.length ? names.join(", ") : "NONE"}`);
|
|
251
|
+
if (!names.length) {
|
|
252
|
+
console.log(" A secret reaches a guard through the channel's profile, or by being bound");
|
|
253
|
+
console.log(" to this profile (or to “any profile”) from the web Secrets panel.");
|
|
254
|
+
}
|
|
255
|
+
// A name the profile asks for that does not resolve for THIS agent: a typo,
|
|
256
|
+
// or a secret owned by a group it neither belongs to nor was lent. The server
|
|
257
|
+
// is the only place that can tell — it resolves by the agent's real group.
|
|
258
|
+
if (view.unresolved?.length)
|
|
259
|
+
console.log(` listed by the profile but NOT resolvable, so absent at run time: ${view.unresolved.join(", ")}`);
|
|
260
|
+
console.log(`guard env (names only): ${(view.env ?? []).join(", ")}`);
|
|
261
|
+
console.log("This is what the NEXT run gets: the server re-reads the profiles and the");
|
|
262
|
+
console.log("vault at every tick, so nothing above is waiting for a reload.");
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/** The pre-`/crons/env` answer, for an older cockpit (see `apiMaybe`). It sees
|
|
266
|
+
* only the PROFILE side of the link, so it can report a bound secret as
|
|
267
|
+
* absent — it says so rather than sounding certain. */
|
|
268
|
+
async function cmdEnvHalfBlind(ctx) {
|
|
198
269
|
const channels = await api(ctx, "GET", "/channels");
|
|
199
270
|
const ch = channels.find((c) => c.sessionId === ctx.sid);
|
|
200
271
|
if (!ch) {
|
|
@@ -204,29 +275,19 @@ async function cmdEnv(ctx) {
|
|
|
204
275
|
}
|
|
205
276
|
console.log(`guard cwd: ${ch.cwd || "(server default)"}`);
|
|
206
277
|
const pname = ch.profile;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
console.log(" (web UI, the agent's profile picker) that lists the names you need.");
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
const profiles = await api(ctx, "GET", "/profiles");
|
|
214
|
-
const prof = profiles.find((p) => p.name === pname);
|
|
215
|
-
if (!prof) {
|
|
216
|
-
// Same end result as "no secrets", but a very different cause: say which
|
|
217
|
-
// one, or the report reads as a working setup.
|
|
218
|
-
console.log(`guard secrets: NONE — the channel points at profile '${pname}', which no longer exists.`);
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
const wanted = prof.secrets ?? [];
|
|
222
|
-
if (!wanted.length) return console.log(`guard secrets: NONE — profile '${pname}' lists no secret.`);
|
|
278
|
+
const profiles = pname ? await api(ctx, "GET", "/profiles") : [];
|
|
279
|
+
const prof = pname ? profiles.find((p) => p.name === pname) : undefined;
|
|
280
|
+
const wanted = prof?.secrets ?? [];
|
|
223
281
|
const vault = new Set((await api(ctx, "GET", "/secrets")).names ?? []);
|
|
224
282
|
const present = wanted.filter((n) => vault.has(n));
|
|
225
283
|
const missing = wanted.filter((n) => !vault.has(n));
|
|
226
|
-
console.log(`guard secrets (profile '${pname}'): ${present.length ? present.join(", ") : "NONE"}`);
|
|
284
|
+
console.log(`guard secrets (profile '${pname ?? "none"}'): ${present.length ? present.join(", ") : "NONE"}`);
|
|
227
285
|
// `secretsFor` skips an unknown name without a word, so a typo here looks
|
|
228
286
|
// exactly like a working guard until the day it runs.
|
|
229
287
|
if (missing.length) console.log(` referenced but NOT in the vault, so absent at run time: ${missing.join(", ")}`);
|
|
288
|
+
console.log("This cockpit is older than this skill, so the list above reads ONLY the");
|
|
289
|
+
console.log("profile's own list: a secret bound to this profile from the Secrets panel");
|
|
290
|
+
console.log("reaches the guard and is missing here. Test the guard itself if it matters.");
|
|
230
291
|
}
|
|
231
292
|
|
|
232
293
|
/** The cron of THIS channel an id (or the 8-character prefix `list` prints)
|
|
@@ -125,24 +125,82 @@ test("del sends the 8-char prefix the listing prints, url-encoded", async () =>
|
|
|
125
125
|
assert.match(res.out, /deleted abcdef01/);
|
|
126
126
|
});
|
|
127
127
|
|
|
128
|
-
test("env
|
|
128
|
+
test("env reports what the SERVER resolves, not what the profile lists", async () => {
|
|
129
|
+
// CHIPPED is bound to the profile from the SECRET's side, so it is absent
|
|
130
|
+
// from `profiles[].secrets` and present in the guard. Deriving the answer
|
|
131
|
+
// here reported it missing; asking the server is the fix.
|
|
129
132
|
const srv = await fakeCockpit({
|
|
130
|
-
"GET /
|
|
131
|
-
|
|
132
|
-
|
|
133
|
+
"GET /crons/env": {
|
|
134
|
+
body: {
|
|
135
|
+
cwd: "/w/t", known: true, profile: "P",
|
|
136
|
+
secrets: ["CHIPPED", "HAVE"], unresolved: ["ELSEWHERE"],
|
|
137
|
+
env: ["PATH", "SHADOK_PORT", "TZ"],
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
"GET /profiles": { body: [{ name: "P", secrets: ["HAVE", "ELSEWHERE"] }] },
|
|
133
141
|
});
|
|
134
142
|
const res = await run(["env"], AGENT(srv.port));
|
|
135
143
|
await srv.close();
|
|
144
|
+
assert.equal(srv.seen[0].query, "session=sess-1");
|
|
136
145
|
assert.match(res.out, /guard cwd: \/w\/t/);
|
|
137
|
-
assert.match(res.out, /guard secrets \(profile 'P'\): HAVE/);
|
|
138
|
-
assert.match(res.out, /NOT
|
|
146
|
+
assert.match(res.out, /guard secrets \(profile 'P'\): CHIPPED, HAVE/);
|
|
147
|
+
assert.match(res.out, /NOT resolvable[^\n]*ELSEWHERE/);
|
|
148
|
+
assert.match(res.out, /guard env \(names only\): PATH, SHADOK_PORT, TZ/);
|
|
149
|
+
// No reload is involved: saying so stops the next agent inventing one.
|
|
150
|
+
assert.match(res.out, /next run/i);
|
|
151
|
+
// The profile list must not be consulted at all any more.
|
|
152
|
+
assert.ok(!srv.seen.some((r) => r.path === "/profiles"), "still reads /profiles");
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
test("env lists an 'any profile' secret even with no profile at all", async () => {
|
|
156
|
+
// The old answer was a flat "NONE — this channel has no profile", which is
|
|
157
|
+
// false: a `*` binding reaches a profile-less agent.
|
|
158
|
+
const srv = await fakeCockpit({
|
|
159
|
+
"GET /crons/env": { body: { cwd: "/w/t", known: true, profile: null, secrets: ["WIDE"], env: ["PATH"] } },
|
|
160
|
+
});
|
|
161
|
+
const res = await run(["env"], AGENT(srv.port));
|
|
162
|
+
await srv.close();
|
|
163
|
+
assert.match(res.out, /guard secrets \(no profile\): WIDE/);
|
|
139
164
|
});
|
|
140
165
|
|
|
141
|
-
test("env
|
|
142
|
-
|
|
166
|
+
test("env on an unregistered channel does not claim 'no secrets at all'", async () => {
|
|
167
|
+
// It used to say exactly that, which a `*` binding contradicts on the very
|
|
168
|
+
// next line.
|
|
169
|
+
const srv = await fakeCockpit({
|
|
170
|
+
"GET /crons/env": { body: { cwd: "/srv", known: false, profile: null, secrets: ["WIDE"], env: ["PATH"] } },
|
|
171
|
+
});
|
|
143
172
|
const res = await run(["env"], AGENT(srv.port));
|
|
144
173
|
await srv.close();
|
|
145
|
-
assert.match(res.out, /
|
|
174
|
+
assert.match(res.out, /not registered server-side/);
|
|
175
|
+
assert.match(res.out, /guard secrets \(no profile\): WIDE/);
|
|
176
|
+
assert.doesNotMatch(res.out, /no profile secrets at all/);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
test("env with nothing bound explains BOTH ways a secret can arrive", async () => {
|
|
180
|
+
const srv = await fakeCockpit({
|
|
181
|
+
"GET /crons/env": { body: { cwd: "/w/t", known: true, profile: "P", secrets: [], env: ["PATH"] } },
|
|
182
|
+
});
|
|
183
|
+
const res = await run(["env"], AGENT(srv.port));
|
|
184
|
+
await srv.close();
|
|
185
|
+
assert.match(res.out, /guard secrets \(profile 'P'\): NONE/);
|
|
186
|
+
assert.match(res.out, /any profile/);
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
test("env on an older cockpit degrades, and says it is half-blind", async () => {
|
|
190
|
+
// Several cockpits on one machine share the skill tier, so this file can run
|
|
191
|
+
// against a server that predates /crons/env. A 404 must not abort the command.
|
|
192
|
+
const srv = await fakeCockpit({
|
|
193
|
+
"GET /crons/env": { status: 404, body: { error: "not found" } },
|
|
194
|
+
"GET /channels": { body: [{ sessionId: "sess-1", cwd: "/w/t", profile: "P" }] },
|
|
195
|
+
"GET /profiles": { body: [{ name: "P", secrets: ["HAVE", "MISSING"] }] },
|
|
196
|
+
"GET /secrets": { body: { names: ["HAVE"] } },
|
|
197
|
+
});
|
|
198
|
+
const res = await run(["env"], AGENT(srv.port));
|
|
199
|
+
await srv.close();
|
|
200
|
+
assert.equal(res.code, 0);
|
|
201
|
+
assert.match(res.out, /guard secrets \(profile 'P'\): HAVE/);
|
|
202
|
+
assert.match(res.out, /NOT in the vault[^\n]*MISSING/);
|
|
203
|
+
assert.match(res.out, /older than this skill/);
|
|
146
204
|
});
|
|
147
205
|
|
|
148
206
|
test("an API error is reported, not swallowed", async () => {
|
package/dist/accounts.d.ts
CHANGED
|
@@ -105,22 +105,50 @@ export declare function sessionSecret(): Buffer;
|
|
|
105
105
|
* Best-effort: a write that fails returns 0, i.e. today's behaviour.
|
|
106
106
|
*/
|
|
107
107
|
export declare function bootstrapSessionsAfter(now: number): number;
|
|
108
|
-
/** `<user base64url>.<issuedAt>.<mfa>.<hmac>` — the name is encoded so a
|
|
109
|
-
* it cannot shift the fields. The ROLE is deliberately absent: it is
|
|
110
|
-
* from the account file at use time, so a demotion takes effect
|
|
111
|
-
* instead of riding in a stale cookie. `mfa` says the second factor
|
|
112
|
-
* presented when the cookie was issued: once two-factor is switched on, a
|
|
113
|
-
* cookie without it is refused, which kills every session issued before.
|
|
114
|
-
|
|
108
|
+
/** `<user base64url>.<issuedAt>.<mfa>.<since>.<hmac>` — the name is encoded so a
|
|
109
|
+
* dot in it cannot shift the fields. The ROLE is deliberately absent: it is
|
|
110
|
+
* re-read from the account file at use time, so a demotion takes effect
|
|
111
|
+
* immediately instead of riding in a stale cookie. `mfa` says the second factor
|
|
112
|
+
* was presented when the cookie was issued: once two-factor is switched on, a
|
|
113
|
+
* cookie without it is refused, which kills every session issued before.
|
|
114
|
+
* `since` is when the person actually SIGNED IN: a renewed cookie moves
|
|
115
|
+
* `issuedAt` forward and carries `since` along unchanged, which is what lets
|
|
116
|
+
* renewal have a ceiling (`sessionRenewal`). Omitted when it equals `issuedAt`
|
|
117
|
+
* — a sign-in — so that shape stays the four-field one it always was. */
|
|
118
|
+
export declare function signSession(user: string, issuedAt: number, secret: Buffer, mfa?: boolean, since?: number): string;
|
|
115
119
|
/**
|
|
116
120
|
* The user and second-factor flag a session cookie carries, or null. Reads the
|
|
117
121
|
* pre-2FA three-field shape too — as `mfa: false`, which is what it was.
|
|
122
|
+
*
|
|
123
|
+
* Two clocks, two limits. `maxAgeMs` bounds the time since the cookie was last
|
|
124
|
+
* ISSUED (idle time, once cookies are renewed on use); `maxLifeMs` bounds the
|
|
125
|
+
* time since the SIGN-IN, which no renewal can push back.
|
|
118
126
|
*/
|
|
119
|
-
export declare function readSessionFull(token: string, secret: Buffer, now: number, maxAgeMs: number): {
|
|
127
|
+
export declare function readSessionFull(token: string, secret: Buffer, now: number, maxAgeMs: number, maxLifeMs?: number): {
|
|
120
128
|
user: string;
|
|
121
129
|
mfa: boolean;
|
|
122
130
|
issuedAt: number;
|
|
131
|
+
since: number;
|
|
123
132
|
} | null;
|
|
133
|
+
/**
|
|
134
|
+
* Should this session's cookie be re-issued now?
|
|
135
|
+
*
|
|
136
|
+
* A session used to last a week from the sign-in whatever happened in between,
|
|
137
|
+
* so someone working in the cockpit every day was still thrown out once a week
|
|
138
|
+
* per device, mid-task. Renewing on use turns that week into a week of
|
|
139
|
+
* ABSENCE. Two bounds keep it honest: not more often than `renewAfterMs` (a
|
|
140
|
+
* cookie per request would be noise, and the page polls every few seconds),
|
|
141
|
+
* and never once `maxLifeMs` has passed since the sign-in — past that the
|
|
142
|
+
* cookie is refused outright (`readSessionFull`), so a stolen one cannot be
|
|
143
|
+
* kept alive for ever just by being used.
|
|
144
|
+
*/
|
|
145
|
+
export declare function sessionRenewal(sess: {
|
|
146
|
+
issuedAt: number;
|
|
147
|
+
since: number;
|
|
148
|
+
}, now: number, o: {
|
|
149
|
+
renewAfterMs: number;
|
|
150
|
+
maxLifeMs: number;
|
|
151
|
+
}): boolean;
|
|
124
152
|
export declare function readSession(token: string, secret: Buffer, now: number, maxAgeMs: number): string | null;
|
|
125
153
|
/** Is a session issued at `issuedAt` still good for this account? */
|
|
126
154
|
export declare function sessionAlive(issuedAt: number, acct: Pick<Account, "sessionsAfter">): boolean;
|
package/dist/accounts.js
CHANGED
|
@@ -165,34 +165,45 @@ export function bootstrapSessionsAfter(now) {
|
|
|
165
165
|
return 0;
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
/** `<user base64url>.<issuedAt>.<mfa>.<hmac>` — the name is encoded so a
|
|
169
|
-
* it cannot shift the fields. The ROLE is deliberately absent: it is
|
|
170
|
-
* from the account file at use time, so a demotion takes effect
|
|
171
|
-
* instead of riding in a stale cookie. `mfa` says the second factor
|
|
172
|
-
* presented when the cookie was issued: once two-factor is switched on, a
|
|
173
|
-
* cookie without it is refused, which kills every session issued before.
|
|
174
|
-
|
|
168
|
+
/** `<user base64url>.<issuedAt>.<mfa>.<since>.<hmac>` — the name is encoded so a
|
|
169
|
+
* dot in it cannot shift the fields. The ROLE is deliberately absent: it is
|
|
170
|
+
* re-read from the account file at use time, so a demotion takes effect
|
|
171
|
+
* immediately instead of riding in a stale cookie. `mfa` says the second factor
|
|
172
|
+
* was presented when the cookie was issued: once two-factor is switched on, a
|
|
173
|
+
* cookie without it is refused, which kills every session issued before.
|
|
174
|
+
* `since` is when the person actually SIGNED IN: a renewed cookie moves
|
|
175
|
+
* `issuedAt` forward and carries `since` along unchanged, which is what lets
|
|
176
|
+
* renewal have a ceiling (`sessionRenewal`). Omitted when it equals `issuedAt`
|
|
177
|
+
* — a sign-in — so that shape stays the four-field one it always was. */
|
|
178
|
+
export function signSession(user, issuedAt, secret, mfa = false, since = issuedAt) {
|
|
175
179
|
const u = Buffer.from(user, "utf8").toString("base64url");
|
|
176
|
-
const body = `${u}.${issuedAt}.${mfa ? 1 : 0}
|
|
180
|
+
const body = `${u}.${issuedAt}.${mfa ? 1 : 0}` + (since === issuedAt ? "" : `.${since}`);
|
|
177
181
|
return `${body}.${createHmac("sha256", secret).update(body).digest("hex")}`;
|
|
178
182
|
}
|
|
179
183
|
/**
|
|
180
184
|
* The user and second-factor flag a session cookie carries, or null. Reads the
|
|
181
185
|
* pre-2FA three-field shape too — as `mfa: false`, which is what it was.
|
|
186
|
+
*
|
|
187
|
+
* Two clocks, two limits. `maxAgeMs` bounds the time since the cookie was last
|
|
188
|
+
* ISSUED (idle time, once cookies are renewed on use); `maxLifeMs` bounds the
|
|
189
|
+
* time since the SIGN-IN, which no renewal can push back.
|
|
182
190
|
*/
|
|
183
|
-
export function readSessionFull(token, secret, now, maxAgeMs) {
|
|
191
|
+
export function readSessionFull(token, secret, now, maxAgeMs, maxLifeMs = Infinity) {
|
|
184
192
|
const parts = String(token ?? "").split(".");
|
|
185
|
-
if (parts.length
|
|
193
|
+
if (parts.length < 3 || parts.length > 5)
|
|
186
194
|
return null;
|
|
187
195
|
const mac = parts[parts.length - 1];
|
|
188
196
|
const body = parts.slice(0, -1).join(".");
|
|
189
197
|
const [u, at] = parts;
|
|
190
|
-
const mfa = parts.length
|
|
198
|
+
const mfa = parts.length >= 4 ? parts[2] : "0";
|
|
191
199
|
if (mfa !== "0" && mfa !== "1")
|
|
192
200
|
return null;
|
|
193
201
|
const issuedAt = Number(at);
|
|
194
202
|
if (!at || !Number.isFinite(issuedAt))
|
|
195
203
|
return null;
|
|
204
|
+
const since = parts.length === 5 ? Number(parts[3]) : issuedAt;
|
|
205
|
+
if (!Number.isFinite(since) || since > issuedAt)
|
|
206
|
+
return null;
|
|
196
207
|
const want = createHmac("sha256", secret).update(body).digest("hex");
|
|
197
208
|
if (mac.length !== want.length)
|
|
198
209
|
return null;
|
|
@@ -200,14 +211,31 @@ export function readSessionFull(token, secret, now, maxAgeMs) {
|
|
|
200
211
|
return null;
|
|
201
212
|
if (now - issuedAt > maxAgeMs)
|
|
202
213
|
return null;
|
|
214
|
+
if (now - since > maxLifeMs)
|
|
215
|
+
return null;
|
|
203
216
|
try {
|
|
204
217
|
const user = Buffer.from(u, "base64url").toString("utf8");
|
|
205
|
-
return user ? { user, mfa: mfa === "1", issuedAt } : null;
|
|
218
|
+
return user ? { user, mfa: mfa === "1", issuedAt, since } : null;
|
|
206
219
|
}
|
|
207
220
|
catch {
|
|
208
221
|
return null;
|
|
209
222
|
}
|
|
210
223
|
}
|
|
224
|
+
/**
|
|
225
|
+
* Should this session's cookie be re-issued now?
|
|
226
|
+
*
|
|
227
|
+
* A session used to last a week from the sign-in whatever happened in between,
|
|
228
|
+
* so someone working in the cockpit every day was still thrown out once a week
|
|
229
|
+
* per device, mid-task. Renewing on use turns that week into a week of
|
|
230
|
+
* ABSENCE. Two bounds keep it honest: not more often than `renewAfterMs` (a
|
|
231
|
+
* cookie per request would be noise, and the page polls every few seconds),
|
|
232
|
+
* and never once `maxLifeMs` has passed since the sign-in — past that the
|
|
233
|
+
* cookie is refused outright (`readSessionFull`), so a stolen one cannot be
|
|
234
|
+
* kept alive for ever just by being used.
|
|
235
|
+
*/
|
|
236
|
+
export function sessionRenewal(sess, now, o) {
|
|
237
|
+
return now - sess.issuedAt >= o.renewAfterMs && now - sess.since < o.maxLifeMs;
|
|
238
|
+
}
|
|
211
239
|
export function readSession(token, secret, now, maxAgeMs) {
|
|
212
240
|
return readSessionFull(token, secret, now, maxAgeMs)?.user ?? null;
|
|
213
241
|
}
|
package/dist/accounts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../src/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA8CzC,wEAAwE;AACxE,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC;AAEvC,SAAS,SAAS;IAChB,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,CAAC;AACjF,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC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