@substrat-run/vertical-auth 0.15.9 → 0.16.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.
- package/dist/identity-do.d.ts +15 -1
- package/dist/identity-do.d.ts.map +1 -1
- package/dist/identity-do.js +18 -1
- package/dist/identity-do.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/owner-seat.d.ts +68 -0
- package/dist/owner-seat.d.ts.map +1 -1
- package/dist/owner-seat.js +123 -0
- package/dist/owner-seat.js.map +1 -1
- package/package.json +5 -5
package/dist/identity-do.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DurableObject } from 'cloudflare:workers';
|
|
2
2
|
import type { AuthProvider } from './provider.js';
|
|
3
3
|
import { type SiteRow } from './site-registry.js';
|
|
4
|
-
import { type OwnerSeat } from './owner-seat.js';
|
|
4
|
+
import { type OwnerSeat, type OwnerTransfer, type OwnerTransferAbandon } from './owner-seat.js';
|
|
5
5
|
export type IdentityDoEnv = Record<string, never>;
|
|
6
6
|
export declare class IdentityDO extends DurableObject<IdentityDoEnv> {
|
|
7
7
|
/** This tenant's Better Auth signing secret — generated in this DO, never shared, never a worker binding. */
|
|
@@ -69,6 +69,17 @@ export declare class IdentityDO extends DurableObject<IdentityDoEnv> {
|
|
|
69
69
|
* owner their role after a scope-DO wipe left the scope enforcing against an empty tuple table.
|
|
70
70
|
*/
|
|
71
71
|
getOwnerOfRecord(scopeId: string): Promise<string | null>;
|
|
72
|
+
/**
|
|
73
|
+
* Hand the owner of record from `from` to `to` (#1665): the principal a reconcile's lockout
|
|
74
|
+
* repair re-seats. Moves the record only, and refuses (writing nothing) on an unclaimed seat,
|
|
75
|
+
* a stale `from`, or a `to` no subject is bound to. `owner-seat.ts` has the rules; the
|
|
76
|
+
* seat-then-revoke around it is vertical-host's `/internal/owner-transfer`.
|
|
77
|
+
*/
|
|
78
|
+
transferOwner(scopeId: string, from: string, to: string, toHoldsRole: boolean): Promise<OwnerTransfer>;
|
|
79
|
+
/** Close the hand-over `from → to` once the platform has seated and revoked around it (#1665). */
|
|
80
|
+
completeOwnerTransfer(scopeId: string, from: string, to: string): Promise<boolean>;
|
|
81
|
+
/** Abandon the open hand-over `from → to`, writing no seat or revoke (#1665). */
|
|
82
|
+
abandonOwnerTransfer(scopeId: string, from: string, to: string, toHoldsRole: boolean): Promise<OwnerTransferAbandon>;
|
|
72
83
|
/**
|
|
73
84
|
* Is this scope awaiting first-run setup? True while its owner seat is unclaimed — whether or
|
|
74
85
|
* not a plain first sign-in can still claim it (`ownerSeat` says which). The worker uses this
|
|
@@ -161,6 +172,9 @@ export type IdentityStub = {
|
|
|
161
172
|
resolveSiteScope(slug: string): Promise<string | null>;
|
|
162
173
|
setPendingOwner(scopeId: string, principal: string): Promise<void>;
|
|
163
174
|
getOwnerOfRecord(scopeId: string): Promise<string | null>;
|
|
175
|
+
transferOwner(scopeId: string, from: string, to: string, toHoldsRole: boolean): Promise<OwnerTransfer>;
|
|
176
|
+
completeOwnerTransfer(scopeId: string, from: string, to: string): Promise<boolean>;
|
|
177
|
+
abandonOwnerTransfer(scopeId: string, from: string, to: string, toHoldsRole: boolean): Promise<OwnerTransferAbandon>;
|
|
164
178
|
needsSetup(scopeId: string): Promise<boolean>;
|
|
165
179
|
ownerSeat(scopeId: string): Promise<OwnerSeat>;
|
|
166
180
|
resolvePrincipal(scopeId: string, sub: string): Promise<string | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-do.d.ts","sourceRoot":"","sources":["../src/identity-do.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKnD,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,eAAe,CAAC;AAE/D,OAAO,EAOL,KAAK,OAAO,EACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,
|
|
1
|
+
{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,YAAY,CAcd"}
|
package/dist/identity-do.js
CHANGED
|
@@ -5,7 +5,7 @@ import { drizzle } from 'drizzle-orm/durable-sqlite';
|
|
|
5
5
|
import * as schema from './auth-schema.js';
|
|
6
6
|
import { resolveCookieDomain } from './cookie-domain.js';
|
|
7
7
|
import { SITE_REGISTRY_DDL, recordSite as recordSiteRow, listSites as listSiteRows, resolveSiteScope as resolveSiteScopeRow, forgetSite as forgetSiteRow, } from './site-registry.js';
|
|
8
|
-
import { OWNER_SEAT_DDL, migrateOwnerSeat, recordOwnerSeat, ownerOfRecord as ownerOfRecordRow, needsSetup as needsSetupRow, ownerSeat as ownerSeatRow, resolvePrincipal as resolvePrincipalRow, mintOwnerClaim as mintOwnerClaimRow, claimOwner as claimOwnerRow, unbindSubject as unbindSubjectRow, subjectsOf as subjectsOfRows, } from './owner-seat.js';
|
|
8
|
+
import { OWNER_SEAT_DDL, migrateOwnerSeat, recordOwnerSeat, ownerOfRecord as ownerOfRecordRow, needsSetup as needsSetupRow, ownerSeat as ownerSeatRow, resolvePrincipal as resolvePrincipalRow, mintOwnerClaim as mintOwnerClaimRow, claimOwner as claimOwnerRow, unbindSubject as unbindSubjectRow, subjectsOf as subjectsOfRows, transferOwner as transferOwnerRow, completeOwnerTransfer as completeOwnerTransferRow, abandonOwnerTransfer as abandonOwnerTransferRow, } from './owner-seat.js';
|
|
9
9
|
/**
|
|
10
10
|
* The per-tenant IDENTITY Durable Object — one per tenant, running its OWN Better Auth
|
|
11
11
|
* over its OWN SQLite (Drizzle's Durable-Object driver, not a shared D1), and holding the
|
|
@@ -193,6 +193,23 @@ export class IdentityDO extends DurableObject {
|
|
|
193
193
|
async getOwnerOfRecord(scopeId) {
|
|
194
194
|
return ownerOfRecordRow(this.registrySql, scopeId);
|
|
195
195
|
}
|
|
196
|
+
/**
|
|
197
|
+
* Hand the owner of record from `from` to `to` (#1665): the principal a reconcile's lockout
|
|
198
|
+
* repair re-seats. Moves the record only, and refuses (writing nothing) on an unclaimed seat,
|
|
199
|
+
* a stale `from`, or a `to` no subject is bound to. `owner-seat.ts` has the rules; the
|
|
200
|
+
* seat-then-revoke around it is vertical-host's `/internal/owner-transfer`.
|
|
201
|
+
*/
|
|
202
|
+
async transferOwner(scopeId, from, to, toHoldsRole) {
|
|
203
|
+
return transferOwnerRow(this.registrySql, scopeId, from, to, toHoldsRole);
|
|
204
|
+
}
|
|
205
|
+
/** Close the hand-over `from → to` once the platform has seated and revoked around it (#1665). */
|
|
206
|
+
async completeOwnerTransfer(scopeId, from, to) {
|
|
207
|
+
return completeOwnerTransferRow(this.registrySql, scopeId, from, to);
|
|
208
|
+
}
|
|
209
|
+
/** Abandon the open hand-over `from → to`, writing no seat or revoke (#1665). */
|
|
210
|
+
async abandonOwnerTransfer(scopeId, from, to, toHoldsRole) {
|
|
211
|
+
return abandonOwnerTransferRow(this.registrySql, scopeId, from, to, toHoldsRole);
|
|
212
|
+
}
|
|
196
213
|
/**
|
|
197
214
|
* Is this scope awaiting first-run setup? True while its owner seat is unclaimed — whether or
|
|
198
215
|
* not a plain first sign-in can still claim it (`ownerSeat` says which). The worker uses this
|
package/dist/identity-do.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-do.js","sourceRoot":"","sources":["../src/identity-do.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,iBAAiB,EACjB,UAAU,IAAI,aAAa,EAC3B,SAAS,IAAI,YAAY,EACzB,gBAAgB,IAAI,mBAAmB,EACvC,UAAU,IAA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AAG,CAAC,IAAI,EAAE,CAAuB,CAAC;QAClD,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { oidcAuthProvider, type OidcConfig } from './oidc.js';
|
|
|
3
3
|
export { oidcRpAuthProvider, type OidcRpConfig } from './oidc-rp-provider.js';
|
|
4
4
|
export { IdentityDO, doAuthProvider, type IdentityDoEnv, type IdentityStub } from './identity-do.js';
|
|
5
5
|
export { resolveCookieDomain } from './cookie-domain.js';
|
|
6
|
-
export { FIRST_SIGN_IN_WINDOW_MS, OWNER_CLAIM_TTL_MS, type OwnerSeat } from './owner-seat.js';
|
|
6
|
+
export { FIRST_SIGN_IN_WINDOW_MS, OWNER_CLAIM_TTL_MS, type OwnerSeat, type OwnerTransfer } from './owner-seat.js';
|
|
7
7
|
export { invitePath, mintOwnerClaimLink, ownerClaimPath, sha256Hex } from './owner-claim-link.js';
|
|
8
8
|
export { AUTH_CONFIG_KEY, AuthConfigError, authChoice, authorizationServersOf, instanceAuthFor, parseAuthChoice, selectAuthProvider, type AuthChoice, type InstanceAuth, } from './instance-auth.js';
|
|
9
9
|
export { observePlace, placesReporter, reportScopeMembers, resetPlacesMemo, unbindMember, type PlaceReportResult, type PlacesReporter, } from './places.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClH,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAOlG,OAAO,EACL,eAAe,EACf,eAAe,EACf,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAqB,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,cAAc,EAAyC,MAAM,kBAAkB,CAAC;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAqB,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,cAAc,EAAyC,MAAM,kBAAkB,CAAC;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAsC,MAAM,iBAAiB,CAAC;AAClH,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClG,yFAAyF;AACzF,kFAAkF;AAClF,wFAAwF;AACxF,yFAAyF;AACzF,yFAAyF;AACzF,gCAAgC;AAChC,OAAO,EACL,eAAe,EACf,eAAe,EACf,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,kBAAkB,GAGnB,MAAM,oBAAoB,CAAC;AAC5B,yFAAyF;AACzF,OAAO,EACL,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,YAAY,GAGb,MAAM,aAAa,CAAC"}
|
package/dist/owner-seat.d.ts
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
* so the rules are unit-tested against a real SQLite without standing up a Durable Object.
|
|
32
32
|
* The IdentityDO's owner-seat methods delegate here.
|
|
33
33
|
*/
|
|
34
|
+
import type { z, ownerTransferAbandon, ownerTransferRecord } from '@substrat-run/contracts';
|
|
34
35
|
import type { RegistrySql } from './site-registry.js';
|
|
35
36
|
/** How long after provision a plain first sign-in still claims the seat. */
|
|
36
37
|
export declare const FIRST_SIGN_IN_WINDOW_MS: number;
|
|
@@ -77,6 +78,73 @@ export interface OwnerSeat {
|
|
|
77
78
|
export declare function recordOwnerSeat(sql: RegistrySql, scopeId: string, principal: string, now: number, windowMs?: number): void;
|
|
78
79
|
/** The scope's durable owner of record, or null if never provisioned through this directory. */
|
|
79
80
|
export declare function ownerOfRecord(sql: RegistrySql, scopeId: string): string | null;
|
|
81
|
+
/**
|
|
82
|
+
* What `transferOwner` did — the contracts' `ownerTransferRecord`, which the platform parses it
|
|
83
|
+
* with. `transferred` moved the record and opened the hand-over; `already` found THIS hand-over
|
|
84
|
+
* still open (a retry, which the platform's flow finishes); `done` found it finished (a repeat,
|
|
85
|
+
* which changes nothing). `refused` wrote nothing, and `reason` says why.
|
|
86
|
+
*/
|
|
87
|
+
export type OwnerTransfer = z.input<typeof ownerTransferRecord>;
|
|
88
|
+
/** What `abandonOwnerTransfer` did — the contracts' `ownerTransferAbandon`. */
|
|
89
|
+
export type OwnerTransferAbandon = z.infer<typeof ownerTransferAbandon>;
|
|
90
|
+
/**
|
|
91
|
+
* Hand the owner of record from `from` to `to` (#1665) — the one write that moves
|
|
92
|
+
* `owner_of_record`, which `recordOwnerSeat` never does after the first. The record is what a
|
|
93
|
+
* reconcile's lockout repair re-seats (#1659), so without this a hand-over left it naming the
|
|
94
|
+
* ORIGINAL owner, and revoking the successor later brought that owner back.
|
|
95
|
+
*
|
|
96
|
+
* It moves the record and opens the hand-over (`owner_transfer`, `pending`). Seating `to` in the
|
|
97
|
+
* owner's role and revoking `from` are the scope host's writes, in another Durable Object; the
|
|
98
|
+
* platform's flow runs them after this, then closes the hand-over with `completeOwnerTransfer`.
|
|
99
|
+
* A record already naming `to` is `already` or `done` ONLY for this same `from → to`: the record
|
|
100
|
+
* says who owns the scope now, not who handed it over, and answering a different `from` as a
|
|
101
|
+
* retry would have the flow revoke that principal's owner role on nobody's hand-over.
|
|
102
|
+
*
|
|
103
|
+
* Refuses, writing nothing, when:
|
|
104
|
+
* - the scope has no owner of record here (`unknown`);
|
|
105
|
+
* - `from` and `to` are one principal (`same-principal`);
|
|
106
|
+
* - the seat is still UNCLAIMED (`unclaimed`). `pending_owner` names the principal a claim binds
|
|
107
|
+
* to, so moving the record under it would leave a claim link that seats a stranger as a
|
|
108
|
+
* principal that is no longer the owner. Claim the seat first. A claimed seat stays claimed:
|
|
109
|
+
* this never writes `pending_owner` or `owner_claim`.
|
|
110
|
+
* - `from` is not the current record (`not-owner`) — a caller working from a stale view, or one
|
|
111
|
+
* naming a `from` other than the one this scope's record was handed over from;
|
|
112
|
+
* - ANOTHER hand-over is still open (`in-flight`): its seat and revoke have not both run, and
|
|
113
|
+
* starting a second on top would let the two flows revoke across each other. Re-sending the
|
|
114
|
+
* open one finishes it, or staff abandon it (`abandonOwnerTransfer`); `inFlight` names it.
|
|
115
|
+
* - THIS hand-over is open but can no longer finish (`wedged`): `to` has since lost its login or
|
|
116
|
+
* its role here. The check still refuses it, since finishing would seat as owner someone the
|
|
117
|
+
* scope removed; this only makes the refusal say which hand-over is stuck. Abandon it.
|
|
118
|
+
* - `to` is not a member (`not-member`): no subject in this scope is bound to it, so nobody can
|
|
119
|
+
* sign in as that principal.
|
|
120
|
+
* - `to` holds no role here (`no-role`): `toHoldsRole`, the host's read passed in by the
|
|
121
|
+
* platform's flow, says it holds no role the scope can expand. A member removed by revoking
|
|
122
|
+
* their role keeps the binding; so does one whose access is only entity-narrowed grants,
|
|
123
|
+
* which a role check does not count. Grant a role first.
|
|
124
|
+
*
|
|
125
|
+
* Synchronous over one DO's storage, so the read and the write cannot interleave with another
|
|
126
|
+
* call; the `UPDATE` still carries `principal = from` so it can only ever move the record it read.
|
|
127
|
+
*/
|
|
128
|
+
export declare function transferOwner(sql: RegistrySql, scopeId: string, from: string, to: string, toHoldsRole: boolean): OwnerTransfer;
|
|
129
|
+
/**
|
|
130
|
+
* Close the hand-over `from → to` (#1665) once the platform's flow has seated `to` and revoked
|
|
131
|
+
* `from`: from then on a repeat of it answers `done` and the flow seats and revokes nothing, so
|
|
132
|
+
* a stale retry cannot undo what the scope decided since. True when this call closed it; false
|
|
133
|
+
* when it was already closed or is not the open hand-over.
|
|
134
|
+
*/
|
|
135
|
+
export declare function completeOwnerTransfer(sql: RegistrySql, scopeId: string, from: string, to: string): boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Abandon the open hand-over `from → to` (#1665), staff's way out of one that can no longer
|
|
138
|
+
* finish — `to` lost its login or role after step 1, so its resend is `wedged` and every other
|
|
139
|
+
* hand-over `in-flight`. Closes it as `abandoned` and nothing else: no seat, no revoke, and the
|
|
140
|
+
* record stays on `to`, from where staff hand over again. The original `from` keeps whatever
|
|
141
|
+
* owner seat it still holds; the next owner removes it in the app.
|
|
142
|
+
*
|
|
143
|
+
* Only a WEDGED one: an open hand-over whose `to` still signs in and holds a role
|
|
144
|
+
* (`toHoldsRole`, the host's read) answers `healthy` and changes nothing — resending it
|
|
145
|
+
* finishes it. `not-open` when `from → to` is not the open hand-over.
|
|
146
|
+
*/
|
|
147
|
+
export declare function abandonOwnerTransfer(sql: RegistrySql, scopeId: string, from: string, to: string, toHoldsRole: boolean): OwnerTransferAbandon;
|
|
80
148
|
/** Is the seat unclaimed? True whatever the window says — a closed window is still an empty seat. */
|
|
81
149
|
export declare function needsSetup(sql: RegistrySql, scopeId: string): boolean;
|
|
82
150
|
/** The seat as the platform sees it. */
|
package/dist/owner-seat.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owner-seat.d.ts","sourceRoot":"","sources":["../src/owner-seat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,4EAA4E;AAC5E,eAAO,MAAM,uBAAuB,QAAc,CAAC;AACnD,gDAAgD;AAChD,eAAO,MAAM,kBAAkB,QAAc,CAA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AAG,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAIrF;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAIrF;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,KAAK,GAAE,MAA2B,GACjC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAU9B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMxH"}
|
package/dist/owner-seat.js
CHANGED
|
@@ -54,6 +54,12 @@ export const OWNER_SEAT_DDL = [
|
|
|
54
54
|
// One outstanding claim link per scope — the hash of its token and when it stops working.
|
|
55
55
|
// Minting again replaces it, so a leaked link is retired by minting a fresh one.
|
|
56
56
|
`CREATE TABLE IF NOT EXISTS owner_claim (scope_id TEXT PRIMARY KEY, token_hash TEXT NOT NULL, expires_at INTEGER NOT NULL)`,
|
|
57
|
+
// The last owner hand-over (#1665): who handed to whom, and whether the platform's flow has
|
|
58
|
+
// finished seating and revoking around it (`pending` → `done`), or staff abandoned it
|
|
59
|
+
// (`pending` → `abandoned`). What tells a retry of THAT
|
|
60
|
+
// hand-over, which must finish it, from any other request that merely finds the record naming
|
|
61
|
+
// `to`, which must not revoke anybody.
|
|
62
|
+
`CREATE TABLE IF NOT EXISTS owner_transfer (scope_id TEXT PRIMARY KEY, prev_principal TEXT NOT NULL, principal TEXT NOT NULL, state TEXT NOT NULL)`,
|
|
57
63
|
];
|
|
58
64
|
/**
|
|
59
65
|
* Bring a `pending_owner` table from before `claim_until` up to date. `CREATE TABLE IF NOT
|
|
@@ -87,6 +93,123 @@ export function ownerOfRecord(sql, scopeId) {
|
|
|
87
93
|
const row = [...sql.exec('SELECT principal FROM owner_of_record WHERE scope_id = ?', scopeId)][0];
|
|
88
94
|
return row?.principal ?? null;
|
|
89
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* Hand the owner of record from `from` to `to` (#1665) — the one write that moves
|
|
98
|
+
* `owner_of_record`, which `recordOwnerSeat` never does after the first. The record is what a
|
|
99
|
+
* reconcile's lockout repair re-seats (#1659), so without this a hand-over left it naming the
|
|
100
|
+
* ORIGINAL owner, and revoking the successor later brought that owner back.
|
|
101
|
+
*
|
|
102
|
+
* It moves the record and opens the hand-over (`owner_transfer`, `pending`). Seating `to` in the
|
|
103
|
+
* owner's role and revoking `from` are the scope host's writes, in another Durable Object; the
|
|
104
|
+
* platform's flow runs them after this, then closes the hand-over with `completeOwnerTransfer`.
|
|
105
|
+
* A record already naming `to` is `already` or `done` ONLY for this same `from → to`: the record
|
|
106
|
+
* says who owns the scope now, not who handed it over, and answering a different `from` as a
|
|
107
|
+
* retry would have the flow revoke that principal's owner role on nobody's hand-over.
|
|
108
|
+
*
|
|
109
|
+
* Refuses, writing nothing, when:
|
|
110
|
+
* - the scope has no owner of record here (`unknown`);
|
|
111
|
+
* - `from` and `to` are one principal (`same-principal`);
|
|
112
|
+
* - the seat is still UNCLAIMED (`unclaimed`). `pending_owner` names the principal a claim binds
|
|
113
|
+
* to, so moving the record under it would leave a claim link that seats a stranger as a
|
|
114
|
+
* principal that is no longer the owner. Claim the seat first. A claimed seat stays claimed:
|
|
115
|
+
* this never writes `pending_owner` or `owner_claim`.
|
|
116
|
+
* - `from` is not the current record (`not-owner`) — a caller working from a stale view, or one
|
|
117
|
+
* naming a `from` other than the one this scope's record was handed over from;
|
|
118
|
+
* - ANOTHER hand-over is still open (`in-flight`): its seat and revoke have not both run, and
|
|
119
|
+
* starting a second on top would let the two flows revoke across each other. Re-sending the
|
|
120
|
+
* open one finishes it, or staff abandon it (`abandonOwnerTransfer`); `inFlight` names it.
|
|
121
|
+
* - THIS hand-over is open but can no longer finish (`wedged`): `to` has since lost its login or
|
|
122
|
+
* its role here. The check still refuses it, since finishing would seat as owner someone the
|
|
123
|
+
* scope removed; this only makes the refusal say which hand-over is stuck. Abandon it.
|
|
124
|
+
* - `to` is not a member (`not-member`): no subject in this scope is bound to it, so nobody can
|
|
125
|
+
* sign in as that principal.
|
|
126
|
+
* - `to` holds no role here (`no-role`): `toHoldsRole`, the host's read passed in by the
|
|
127
|
+
* platform's flow, says it holds no role the scope can expand. A member removed by revoking
|
|
128
|
+
* their role keeps the binding; so does one whose access is only entity-narrowed grants,
|
|
129
|
+
* which a role check does not count. Grant a role first.
|
|
130
|
+
*
|
|
131
|
+
* Synchronous over one DO's storage, so the read and the write cannot interleave with another
|
|
132
|
+
* call; the `UPDATE` still carries `principal = from` so it can only ever move the record it read.
|
|
133
|
+
*/
|
|
134
|
+
export function transferOwner(sql, scopeId, from, to, toHoldsRole) {
|
|
135
|
+
const owner = ownerOfRecord(sql, scopeId);
|
|
136
|
+
if (owner === null)
|
|
137
|
+
return { outcome: 'refused', owner, reason: 'unknown' };
|
|
138
|
+
if (from === to)
|
|
139
|
+
return { outcome: 'refused', owner, reason: 'same-principal' };
|
|
140
|
+
if (needsSetup(sql, scopeId))
|
|
141
|
+
return { outcome: 'refused', owner, reason: 'unclaimed' };
|
|
142
|
+
const bound = isBound(sql, scopeId, to);
|
|
143
|
+
const member = bound && toHoldsRole;
|
|
144
|
+
const last = lastTransfer(sql, scopeId);
|
|
145
|
+
// An open hand-over is judged first, so each refusal names the real state; the membership
|
|
146
|
+
// check below still decides whether THIS one may finish.
|
|
147
|
+
if (last?.state === 'pending') {
|
|
148
|
+
const inFlight = { from: last.prev_principal, to: last.principal };
|
|
149
|
+
if (last.prev_principal !== from || last.principal !== to) {
|
|
150
|
+
return { outcome: 'refused', owner, reason: 'in-flight', inFlight };
|
|
151
|
+
}
|
|
152
|
+
if (!member)
|
|
153
|
+
return { outcome: 'refused', owner, reason: 'wedged', inFlight };
|
|
154
|
+
return { outcome: 'already', owner };
|
|
155
|
+
}
|
|
156
|
+
if (!bound)
|
|
157
|
+
return { outcome: 'refused', owner, reason: 'not-member' };
|
|
158
|
+
if (!toHoldsRole)
|
|
159
|
+
return { outcome: 'refused', owner, reason: 'no-role' };
|
|
160
|
+
if (owner === to) {
|
|
161
|
+
// Only a FINISHED hand-over of this same pair is a repeat; an abandoned one is no retry.
|
|
162
|
+
if (last?.prev_principal === from && last.principal === to && last.state === 'done') {
|
|
163
|
+
return { outcome: 'done', owner };
|
|
164
|
+
}
|
|
165
|
+
return { outcome: 'refused', owner, reason: 'not-owner' };
|
|
166
|
+
}
|
|
167
|
+
if (owner !== from)
|
|
168
|
+
return { outcome: 'refused', owner, reason: 'not-owner' };
|
|
169
|
+
sql.exec('UPDATE owner_of_record SET principal = ? WHERE scope_id = ? AND principal = ?', to, scopeId, from);
|
|
170
|
+
sql.exec(`INSERT OR REPLACE INTO owner_transfer (scope_id, prev_principal, principal, state) VALUES (?, ?, ?, 'pending')`, scopeId, from, to);
|
|
171
|
+
return { outcome: 'transferred', owner: to };
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Close the hand-over `from → to` (#1665) once the platform's flow has seated `to` and revoked
|
|
175
|
+
* `from`: from then on a repeat of it answers `done` and the flow seats and revokes nothing, so
|
|
176
|
+
* a stale retry cannot undo what the scope decided since. True when this call closed it; false
|
|
177
|
+
* when it was already closed or is not the open hand-over.
|
|
178
|
+
*/
|
|
179
|
+
export function completeOwnerTransfer(sql, scopeId, from, to) {
|
|
180
|
+
const last = lastTransfer(sql, scopeId);
|
|
181
|
+
if (last?.state !== 'pending' || last.prev_principal !== from || last.principal !== to)
|
|
182
|
+
return false;
|
|
183
|
+
sql.exec(`UPDATE owner_transfer SET state = 'done' WHERE scope_id = ?`, scopeId);
|
|
184
|
+
return true;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Abandon the open hand-over `from → to` (#1665), staff's way out of one that can no longer
|
|
188
|
+
* finish — `to` lost its login or role after step 1, so its resend is `wedged` and every other
|
|
189
|
+
* hand-over `in-flight`. Closes it as `abandoned` and nothing else: no seat, no revoke, and the
|
|
190
|
+
* record stays on `to`, from where staff hand over again. The original `from` keeps whatever
|
|
191
|
+
* owner seat it still holds; the next owner removes it in the app.
|
|
192
|
+
*
|
|
193
|
+
* Only a WEDGED one: an open hand-over whose `to` still signs in and holds a role
|
|
194
|
+
* (`toHoldsRole`, the host's read) answers `healthy` and changes nothing — resending it
|
|
195
|
+
* finishes it. `not-open` when `from → to` is not the open hand-over.
|
|
196
|
+
*/
|
|
197
|
+
export function abandonOwnerTransfer(sql, scopeId, from, to, toHoldsRole) {
|
|
198
|
+
const last = lastTransfer(sql, scopeId);
|
|
199
|
+
if (last?.state !== 'pending' || last.prev_principal !== from || last.principal !== to)
|
|
200
|
+
return 'not-open';
|
|
201
|
+
if (toHoldsRole && isBound(sql, scopeId, to))
|
|
202
|
+
return 'healthy';
|
|
203
|
+
sql.exec(`UPDATE owner_transfer SET state = 'abandoned' WHERE scope_id = ?`, scopeId);
|
|
204
|
+
return 'abandoned';
|
|
205
|
+
}
|
|
206
|
+
function lastTransfer(sql, scopeId) {
|
|
207
|
+
return [...sql.exec('SELECT prev_principal, principal, state FROM owner_transfer WHERE scope_id = ?', scopeId)][0];
|
|
208
|
+
}
|
|
209
|
+
/** Is some subject in this scope bound to `principal` — can anybody sign in as it? */
|
|
210
|
+
function isBound(sql, scopeId, principal) {
|
|
211
|
+
return [...sql.exec('SELECT 1 FROM identity WHERE scope_id = ? AND principal = ? LIMIT 1', scopeId, principal)].length > 0;
|
|
212
|
+
}
|
|
90
213
|
/** Is the seat unclaimed? True whatever the window says — a closed window is still an empty seat. */
|
|
91
214
|
export function needsSetup(sql, scopeId) {
|
|
92
215
|
return [...sql.exec('SELECT 1 FROM pending_owner WHERE scope_id = ?', scopeId)][0] !== undefined;
|
package/dist/owner-seat.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owner-seat.js","sourceRoot":"","sources":["../src/owner-seat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;
|
|
1
|
+
{"version":3,"file":"owner-seat.js","sourceRoot":"","sources":["../src/owner-seat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAKH,4EAA4E;AAC5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,GAAG,MAAM,CAAC;AACnD,gDAAgD;AAChD,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,GAAG,MAAM,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C,uIAAuI;IACvI,+FAA+F;IAC/F,gGAAgG;IAChG,0FAA0F;IAC1F,oHAAoH;IACpH,iGAAiG;IACjG,4FAA4F;IAC5F,4FAA4F;IAC5F,iGAAiG;IACjG,0FAA0F;IAC1F,iFAAiF;IACjF,2HAA2H;IAC3H,4FAA4F;IAC5F,sFAAsF;IACtF,wDAAwD;IACxD,8FAA8F;IAC9F,uCAAuC;IACvC,mJAAmJ;CACpJ,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAgB;IAC/C,MAAM,OAAO,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAc,CAAC,CAAC;IAC/F,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QACrC,GAAG,CAAC,IAAI,CAAC,0DAA0D,CAAC,CAAC;IACvE,CAAC;AACH,CAAC;AAcD,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AAC,CAAC,CAAC,GAAa,CACvB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC5B,GAAgB,EAChB,OAAe,EACf,SAAiB,EACjB,GAAW,EACX,KAAK,GAAW,kBAAkB;IAElC,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3C,MAAM,SAAS,GAAG,GAAG,GAAG,KAAK,CAAC;IAC9B,GAAG,CAAC,IAAI,CACN,wFAAwF,EACxF,OAAO,EACP,SAAS,EACT,SAAS,CACV,CAAC;IACF,OAAO,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;AACvC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,GAAgB,EAAE,OAAe,EAAE,GAAW,EAAE,SAAiB,EAAE,GAAW;IACvG,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;IAC3C,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAC1D,OAAO,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;AACxD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@substrat-run/vertical-auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Pluggable auth for Substrat verticals — the AuthProvider contract, an OIDC provider (Supabase/Auth0/AuthHero/Keycloak), a full relying-party login flow, and a per-tenant identity Durable Object (Better Auth + sub→principal directory). Workers-targeted; the vertical worker bundles it.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"better-auth": "^1.7.1",
|
|
45
45
|
"drizzle-orm": "^0.45.2",
|
|
46
46
|
"jose": "^6.2.3",
|
|
47
|
-
"@substrat-run/kernel": "^0.
|
|
48
|
-
"@substrat-run/contracts": "^0.
|
|
49
|
-
"@substrat-run/
|
|
50
|
-
"@substrat-run/
|
|
47
|
+
"@substrat-run/kernel": "^0.129.0",
|
|
48
|
+
"@substrat-run/contracts": "^0.129.0",
|
|
49
|
+
"@substrat-run/oidc-rp": "^0.9.1",
|
|
50
|
+
"@substrat-run/psl": "^0.2.5"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"hono": "^4.13.9"
|