@substrat-run/vertical-auth 0.34.1 → 0.35.1

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,99 @@
1
+ /**
2
+ * People owned by ANOTHER app of the same tenant: the dependent's half of the person contract
3
+ * (`identity.person@1`, `@substrat-run/contracts`).
4
+ *
5
+ * A vertical normally owns who is in its scope: an owner claims the seat, members are invited,
6
+ * and the identity directory maps each login to a principal. A DEPENDENT vertical, a plugin of
7
+ * another app, owns none of that. The other app, the MASTER, decides who exists and what they
8
+ * hold, and this door asks it.
9
+ *
10
+ * The copy is LAZY. Nothing is synchronised ahead of time: the first request from a login this
11
+ * scope has not seen asks the master who it is, by a peer call, and the answer is kept for
12
+ * `ttlSeconds`. Within that time a request costs one read here and no call. After it the
13
+ * master is asked again, so a person blocked there, or one whose roles changed, is refused or
14
+ * re-seated here within `ttlSeconds` of the change. That number is the revocation bound.
15
+ *
16
+ * Three rules hold it together:
17
+ *
18
+ * - **The master's id is the principal.** A person is one principal in the master's scope and
19
+ * the same one here, so what they did in either reads as the same person.
20
+ * - **It fails closed.** A copy past its time with a master that cannot be reached admits
21
+ * nobody: the answer is `unavailable`, never the stale copy.
22
+ * - **Roles are seated per person, copies are kept per login.** Two logins of one person share
23
+ * one set of roles, so one of them moving away takes nothing from the other.
24
+ *
25
+ * What is kept is a login's `sub`, principal and status, and a person's seated roles. No name and
26
+ * no address: the contract carries neither. A `sub` is still the issuer's identifier for a person,
27
+ * and a row outlives its expiry, so erasing a person has to remove their rows here too; nothing
28
+ * does yet (docs/rfc/dependent-people.md §5.2).
29
+ */
30
+ import { type PersonResolveInput, type PersonStatus, type PrincipalId } from '@substrat-run/contracts';
31
+ import type { RegistrySql } from './site-registry.js';
32
+ /** How long an answer from the master is kept: the bound on how late a block or a role change lands. */
33
+ export declare const PEOPLE_TTL_SECONDS = 300;
34
+ /** Why a signed-in login is not let in. */
35
+ export type PersonRefusal =
36
+ /** The master has nobody for this login. */
37
+ 'unknown'
38
+ /** The master knows them and they have not arrived there yet. */
39
+ | 'invited'
40
+ /** The master refuses them. */
41
+ | 'blocked'
42
+ /** The copy is past its time and the master did not answer. */
43
+ | 'unavailable';
44
+ export type PersonAnswer = {
45
+ admitted: true;
46
+ principal: PrincipalId;
47
+ } | {
48
+ admitted: false;
49
+ reason: PersonRefusal;
50
+ };
51
+ /** What is kept per login: who the master said it is, until when. */
52
+ export interface LoginCopy {
53
+ /** The person's principal, or null for a login the master has nobody for. */
54
+ principal: string | null;
55
+ status: PersonStatus | 'unknown';
56
+ /** ISO 8601. The copy answers until this instant and not after. */
57
+ expiresAt: string;
58
+ }
59
+ /** Where the copies live: the identity directory hosted, a SQLite file on a dev server. */
60
+ export interface PeopleStore {
61
+ login(scopeId: string, sub: string): Promise<LoginCopy | null>;
62
+ saveLogin(scopeId: string, sub: string, copy: LoginCopy): Promise<void>;
63
+ /** The roles this door seated for a person, in this vertical's own keys. */
64
+ seated(scopeId: string, principal: string): Promise<string[]>;
65
+ saveSeated(scopeId: string, principal: string, roles: string[]): Promise<void>;
66
+ }
67
+ export interface PeopleDeps {
68
+ /** The master's resolve operation, by peer call. A throw is the master not answering. */
69
+ resolve(login: PersonResolveInput): Promise<unknown>;
70
+ store: PeopleStore;
71
+ /** Map the master's role keys onto this vertical's own. A key it does not name maps to nothing. */
72
+ roles(masterRoles: readonly string[]): readonly string[];
73
+ /** Bind the login to the principal in this scope's identity directory. Safe to repeat. */
74
+ bind(sub: string, principal: PrincipalId): Promise<void>;
75
+ /** Assign and unassign this vertical's roles for the principal in this scope. Safe to repeat. */
76
+ seat(principal: PrincipalId, change: {
77
+ add: string[];
78
+ remove: string[];
79
+ }): Promise<void>;
80
+ /** The door's clock, injected so a test moves time instead of waiting for it. */
81
+ now(): Date;
82
+ /** Defaults to {@link PEOPLE_TTL_SECONDS}. */
83
+ ttlSeconds?: number;
84
+ /** Told when the master did not answer, or answered something that is not the contract. */
85
+ onUnavailable?(error: unknown): void;
86
+ }
87
+ /**
88
+ * Who this login is here, from the copy while it is fresh and from the master otherwise.
89
+ *
90
+ * On a fresh answer the person's roles are brought to what the master now says, the login is
91
+ * bound, and both are recorded, in that order: a failure part-way leaves the old record, so the
92
+ * next request asks again and repeats steps that are safe to repeat.
93
+ */
94
+ export declare function admitPerson(deps: PeopleDeps, scopeId: string, login: PersonResolveInput): Promise<PersonAnswer>;
95
+ /** The two tables behind {@link sqlPeopleStore}. */
96
+ export declare const PEOPLE_DDL: readonly string[];
97
+ /** A {@link PeopleStore} over the directory's own SQL seam. The caller runs {@link PEOPLE_DDL} first. */
98
+ export declare function sqlPeopleStore(sql: RegistrySql): PeopleStore;
99
+ //# sourceMappingURL=people.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../src/people.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAGL,KAAK,kBAAkB,EAEvB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,wGAAwG;AACxG,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,2CAA2C;AAC3C,MAAM,MAAM,aAAa;AACvB,4CAA4C;AAC1C,SAAS;AACX,iEAAiE;GAC/D,SAAS;AACX,+BAA+B;GAC7B,SAAS;AACX,+DAA+D;GAC7D,aAAa,CAAC;AAElB,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,WAAW,CAAA;CAAE,GAC1C;IAAE,QAAQ,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC;AAE/C,qEAAqE;AACrE,MAAM,WAAW,SAAS;IACxB,6EAA6E;IAC7E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EA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FAA2F;IAC3F,aAAa,CAAC,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CACtC;AASD;;;;;;GAMG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC,CAoCrH;AAED,oDAAoD;AACpD,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAKvC,CAAC;AAEF,yGAAyG;AACzG,wBAAgB,cAAc,CAAC,GAAG,EAAE,WAAW,GAAG,WAAW,CAoC5D"}
package/dist/people.js ADDED
@@ -0,0 +1,117 @@
1
+ /**
2
+ * People owned by ANOTHER app of the same tenant: the dependent's half of the person contract
3
+ * (`identity.person@1`, `@substrat-run/contracts`).
4
+ *
5
+ * A vertical normally owns who is in its scope: an owner claims the seat, members are invited,
6
+ * and the identity directory maps each login to a principal. A DEPENDENT vertical, a plugin of
7
+ * another app, owns none of that. The other app, the MASTER, decides who exists and what they
8
+ * hold, and this door asks it.
9
+ *
10
+ * The copy is LAZY. Nothing is synchronised ahead of time: the first request from a login this
11
+ * scope has not seen asks the master who it is, by a peer call, and the answer is kept for
12
+ * `ttlSeconds`. Within that time a request costs one read here and no call. After it the
13
+ * master is asked again, so a person blocked there, or one whose roles changed, is refused or
14
+ * re-seated here within `ttlSeconds` of the change. That number is the revocation bound.
15
+ *
16
+ * Three rules hold it together:
17
+ *
18
+ * - **The master's id is the principal.** A person is one principal in the master's scope and
19
+ * the same one here, so what they did in either reads as the same person.
20
+ * - **It fails closed.** A copy past its time with a master that cannot be reached admits
21
+ * nobody: the answer is `unavailable`, never the stale copy.
22
+ * - **Roles are seated per person, copies are kept per login.** Two logins of one person share
23
+ * one set of roles, so one of them moving away takes nothing from the other.
24
+ *
25
+ * What is kept is a login's `sub`, principal and status, and a person's seated roles. No name and
26
+ * no address: the contract carries neither. A `sub` is still the issuer's identifier for a person,
27
+ * and a row outlives its expiry, so erasing a person has to remove their rows here too; nothing
28
+ * does yet (docs/rfc/dependent-people.md §5.2).
29
+ */
30
+ import { personResolveOutput, principalId, } from '@substrat-run/contracts';
31
+ /** How long an answer from the master is kept: the bound on how late a block or a role change lands. */
32
+ export const PEOPLE_TTL_SECONDS = 300;
33
+ const answerOf = (copy) => {
34
+ if (copy.status === 'active' && copy.principal !== null) {
35
+ return { admitted: true, principal: copy.principal };
36
+ }
37
+ return { admitted: false, reason: copy.status === 'active' ? 'unknown' : copy.status };
38
+ };
39
+ /**
40
+ * Who this login is here, from the copy while it is fresh and from the master otherwise.
41
+ *
42
+ * On a fresh answer the person's roles are brought to what the master now says, the login is
43
+ * bound, and both are recorded, in that order: a failure part-way leaves the old record, so the
44
+ * next request asks again and repeats steps that are safe to repeat.
45
+ */
46
+ export async function admitPerson(deps, scopeId, login) {
47
+ const now = deps.now().getTime();
48
+ const held = await deps.store.login(scopeId, login.sub);
49
+ if (held && Date.parse(held.expiresAt) > now)
50
+ return answerOf(held);
51
+ let answer;
52
+ let principal;
53
+ try {
54
+ answer = personResolveOutput.parse(await deps.resolve(login));
55
+ principal = answer.person ? principalId.parse(answer.person.id) : null;
56
+ }
57
+ catch (error) {
58
+ deps.onUnavailable?.(error);
59
+ return { admitted: false, reason: 'unavailable' };
60
+ }
61
+ const status = answer.person?.status ?? 'unknown';
62
+ if (principal !== null && answer.person) {
63
+ // Only someone let in holds anything: a blocked or invited person is brought to no roles.
64
+ const wanted = status === 'active' ? [...new Set(deps.roles(answer.person.roles))].sort() : [];
65
+ const seated = await deps.store.seated(scopeId, principal);
66
+ const add = wanted.filter((role) => !seated.includes(role));
67
+ const remove = seated.filter((role) => !wanted.includes(role));
68
+ if (status === 'active')
69
+ await deps.bind(login.sub, principal);
70
+ if (add.length > 0 || remove.length > 0) {
71
+ await deps.seat(principal, { add, remove });
72
+ await deps.store.saveSeated(scopeId, principal, wanted);
73
+ }
74
+ }
75
+ const copy = {
76
+ principal,
77
+ status,
78
+ expiresAt: new Date(now + (deps.ttlSeconds ?? PEOPLE_TTL_SECONDS) * 1000).toISOString(),
79
+ };
80
+ await deps.store.saveLogin(scopeId, login.sub, copy);
81
+ return answerOf(copy);
82
+ }
83
+ /** The two tables behind {@link sqlPeopleStore}. */
84
+ export const PEOPLE_DDL = [
85
+ `CREATE TABLE IF NOT EXISTS person_login (scope_id TEXT NOT NULL, sub TEXT NOT NULL, principal TEXT,
86
+ status TEXT NOT NULL, expires_at TEXT NOT NULL, PRIMARY KEY (scope_id, sub))`,
87
+ `CREATE TABLE IF NOT EXISTS person_seat (scope_id TEXT NOT NULL, principal TEXT NOT NULL, roles TEXT NOT NULL,
88
+ PRIMARY KEY (scope_id, principal))`,
89
+ ];
90
+ /** A {@link PeopleStore} over the directory's own SQL seam. The caller runs {@link PEOPLE_DDL} first. */
91
+ export function sqlPeopleStore(sql) {
92
+ return {
93
+ async login(scopeId, sub) {
94
+ const row = [...sql.exec('SELECT principal, status, expires_at FROM person_login WHERE scope_id = ? AND sub = ?', scopeId, sub)][0];
95
+ if (!row)
96
+ return null;
97
+ return {
98
+ principal: row.principal ?? null,
99
+ status: row.status,
100
+ expiresAt: row.expires_at,
101
+ };
102
+ },
103
+ async saveLogin(scopeId, sub, copy) {
104
+ sql.exec(`INSERT INTO person_login (scope_id, sub, principal, status, expires_at) VALUES (?, ?, ?, ?, ?)
105
+ ON CONFLICT(scope_id, sub) DO UPDATE SET principal = excluded.principal, status = excluded.status, expires_at = excluded.expires_at`, scopeId, sub, copy.principal, copy.status, copy.expiresAt);
106
+ },
107
+ async seated(scopeId, principal) {
108
+ const row = [...sql.exec('SELECT roles FROM person_seat WHERE scope_id = ? AND principal = ?', scopeId, principal)][0];
109
+ return row ? JSON.parse(row.roles) : [];
110
+ },
111
+ async saveSeated(scopeId, principal, roles) {
112
+ sql.exec(`INSERT INTO person_seat (scope_id, principal, roles) VALUES (?, ?, ?)
113
+ ON CONFLICT(scope_id, principal) DO UPDATE SET roles = excluded.roles`, scopeId, principal, JSON.stringify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AE,IAAI;YAChC,GAAG,CAAC,IAAI,CACN;6IACqI,EACrI,OAAO,EACP,GAAG,EACH,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,SAAS,CACf,CAAC;QACJ,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS;YAC7B,MAAM,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,oEAAoE,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACvH,OAAO,GAAG,CAAC,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAe,CAAc,CAAC,CAAC,CAAC,EAAE,CAAC;QAClE,CAAC;QACD,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK;YACxC,GAAG,CAAC,IAAI,CACN;+EACuE,EACvE,OAAO,EACP,SAAS,EACT,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CACtB,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@substrat-run/vertical-auth",
3
- "version": "0.34.1",
3
+ "version": "0.35.1",
4
4
  "description": "OIDC authentication for Substrat verticals — token verification, a full relying-party login flow, and a per-tenant identity directory Durable Object. Workers-targeted; the vertical worker bundles it.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -47,6 +47,10 @@
47
47
  "./session-route": {
48
48
  "types": "./dist/session-route.d.ts",
49
49
  "default": "./dist/session-route.js"
50
+ },
51
+ "./people": {
52
+ "types": "./dist/people.d.ts",
53
+ "default": "./dist/people.js"
50
54
  }
51
55
  },
52
56
  "files": [
@@ -54,9 +58,9 @@
54
58
  ],
55
59
  "dependencies": {
56
60
  "jose": "^6.2.3",
57
- "@substrat-run/kernel": "^0.195.0",
61
+ "@substrat-run/contracts": "^0.197.0",
62
+ "@substrat-run/kernel": "^0.197.0",
58
63
  "@substrat-run/oidc-rp": "^0.13.0",
59
- "@substrat-run/contracts": "^0.195.0",
60
64
  "@substrat-run/psl": "^0.2.5"
61
65
  },
62
66
  "peerDependencies": {