@fuzdev/fuz_app 0.181.0 → 0.182.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.
- package/dist/actions/CLAUDE.md +24 -6
- package/dist/actions/action_rpc.d.ts +11 -1
- package/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +3 -2
- package/dist/actions/action_types.d.ts +16 -1
- package/dist/actions/action_types.d.ts.map +1 -1
- package/dist/actions/action_types.js +1 -1
- package/dist/actions/notification_sender.d.ts +83 -0
- package/dist/actions/notification_sender.d.ts.map +1 -0
- package/dist/actions/notification_sender.js +85 -0
- package/dist/actions/perform_action.d.ts +9 -0
- package/dist/actions/perform_action.d.ts.map +1 -1
- package/dist/actions/perform_action.js +22 -13
- package/dist/actions/register_action_ws.d.ts +14 -0
- package/dist/actions/register_action_ws.d.ts.map +1 -1
- package/dist/actions/register_action_ws.js +3 -2
- package/dist/actions/ws_socket_session.d.ts +3 -0
- package/dist/actions/ws_socket_session.d.ts.map +1 -1
- package/dist/actions/ws_socket_session.js +2 -1
- package/dist/auth/CLAUDE.md +60 -41
- package/dist/auth/account_actions.d.ts.map +1 -1
- package/dist/auth/account_actions.js +13 -3
- package/dist/auth/account_queries.d.ts +158 -16
- package/dist/auth/account_queries.d.ts.map +1 -1
- package/dist/auth/account_queries.js +189 -18
- package/dist/auth/account_routes.d.ts +1 -1
- package/dist/auth/account_routes.d.ts.map +1 -1
- package/dist/auth/account_routes.js +27 -26
- package/dist/auth/admin_actions.d.ts.map +1 -1
- package/dist/auth/admin_actions.js +71 -28
- package/dist/auth/api_token_queries.d.ts +13 -5
- package/dist/auth/api_token_queries.d.ts.map +1 -1
- package/dist/auth/api_token_queries.js +24 -9
- package/dist/auth/bearer_auth.d.ts.map +1 -1
- package/dist/auth/bearer_auth.js +3 -2
- package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
- package/dist/auth/daemon_token_middleware.js +12 -1
- package/dist/auth/deps.d.ts +10 -0
- package/dist/auth/deps.d.ts.map +1 -1
- package/dist/auth/request_context.d.ts +73 -73
- package/dist/auth/request_context.d.ts.map +1 -1
- package/dist/auth/request_context.js +78 -96
- package/dist/auth/resolved_auth.d.ts +10 -5
- package/dist/auth/resolved_auth.d.ts.map +1 -1
- package/dist/auth/resolved_auth.js +2 -2
- package/dist/auth/role_grant_offer_action_specs.d.ts +1 -1
- package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_action_specs.js +2 -1
- package/dist/auth/role_grant_offer_actions.d.ts +7 -11
- package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_actions.js +61 -93
- package/dist/auth/role_grant_offer_notifications.d.ts +87 -38
- package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_notifications.js +75 -22
- package/dist/auth/role_grant_offer_queries.d.ts +96 -15
- package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_queries.js +185 -70
- package/dist/auth/role_grant_offer_schema.js +1 -1
- package/dist/auth/role_grant_queries.d.ts +52 -12
- package/dist/auth/role_grant_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_queries.js +75 -24
- package/dist/auth/role_grant_sql.d.ts +21 -0
- package/dist/auth/role_grant_sql.d.ts.map +1 -1
- package/dist/auth/role_grant_sql.js +21 -0
- package/dist/auth/self_service_role_actions.d.ts.map +1 -1
- package/dist/auth/self_service_role_actions.js +9 -2
- package/dist/auth/session_queries.d.ts +34 -13
- package/dist/auth/session_queries.d.ts.map +1 -1
- package/dist/auth/session_queries.js +48 -18
- package/dist/auth/standard_rpc_actions.d.ts +6 -19
- package/dist/auth/standard_rpc_actions.d.ts.map +1 -1
- package/dist/auth/standard_rpc_actions.js +5 -6
- package/dist/auth/token_scope.d.ts +1 -1
- package/dist/auth/token_scope.js +1 -1
- package/dist/http/CLAUDE.md +7 -6
- package/dist/http/auth_shape.d.ts +1 -1
- package/dist/http/error_schemas.d.ts +9 -21
- package/dist/http/error_schemas.d.ts.map +1 -1
- package/dist/http/error_schemas.js +14 -24
- package/dist/http/route_spec.d.ts +2 -2
- package/dist/server/app_backend.d.ts.map +1 -1
- package/dist/server/app_backend.js +3 -1
- package/dist/server/app_server.d.ts +26 -16
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/server/app_server.js +17 -7
- package/dist/server/serve_fact_route.d.ts +3 -3
- package/dist/server/serve_fact_route.js +12 -12
- package/dist/testing/CLAUDE.md +5 -5
- package/dist/testing/app_server.d.ts.map +1 -1
- package/dist/testing/app_server.js +3 -1
- package/dist/testing/auth_apps.js +1 -1
- package/dist/testing/cross_backend/account_lifecycle.d.ts.map +1 -1
- package/dist/testing/cross_backend/account_lifecycle.js +43 -0
- package/dist/testing/cross_backend/default_spine_surface.d.ts +1 -26
- package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_spine_surface.js +2 -6
- package/dist/testing/cross_backend/full_spine_mount.d.ts +3 -10
- package/dist/testing/cross_backend/full_spine_mount.d.ts.map +1 -1
- package/dist/testing/cross_backend/full_spine_mount.js +4 -4
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts +5 -4
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.js +183 -30
- package/dist/testing/cross_backend/session_cap.d.ts.map +1 -1
- package/dist/testing/cross_backend/session_cap.js +26 -5
- package/dist/testing/middleware.d.ts +1 -1
- package/dist/testing/middleware.js +5 -5
- package/dist/testing/resolved_auth.d.ts +3 -1
- package/dist/testing/resolved_auth.d.ts.map +1 -1
- package/dist/testing/resolved_auth.js +4 -4
- package/dist/testing/stubs.d.ts.map +1 -1
- package/dist/testing/stubs.js +5 -2
- package/dist/testing/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/ws_round_trip.js +8 -4
- package/package.json +1 -1
|
@@ -144,13 +144,21 @@ export const query_api_token_live_account = async (deps, id) => {
|
|
|
144
144
|
/**
|
|
145
145
|
* Revoke all tokens for an account.
|
|
146
146
|
*
|
|
147
|
+
* Locks its rows in id order before it deletes them (`ORDER BY id FOR
|
|
148
|
+
* UPDATE`), as the cap's eviction (`query_api_token_enforce_limit`) does, so
|
|
149
|
+
* the two reaching the same rows wait one on the other instead of
|
|
150
|
+
* deadlocking in the opposite orders their plans would otherwise walk. Twin
|
|
151
|
+
* of the Rust `fuz_auth::query_revoke_all_api_tokens_for_account`.
|
|
152
|
+
*
|
|
147
153
|
* @param deps - query dependencies
|
|
148
154
|
* @param account_id - the account whose tokens to revoke
|
|
149
155
|
* @returns the number of tokens revoked
|
|
150
156
|
* @mutates `api_token` table - deletes every row for `account_id`
|
|
151
157
|
*/
|
|
152
158
|
export const query_revoke_all_api_tokens_for_account = async (deps, account_id) => {
|
|
153
|
-
const rows = await deps.db.query(`DELETE FROM api_token
|
|
159
|
+
const rows = await deps.db.query(`DELETE FROM api_token
|
|
160
|
+
WHERE id IN (SELECT id FROM api_token WHERE account_id = $1 ORDER BY id FOR UPDATE)
|
|
161
|
+
RETURNING id`, [account_id]);
|
|
154
162
|
return rows.length;
|
|
155
163
|
};
|
|
156
164
|
/**
|
|
@@ -185,14 +193,16 @@ export const query_api_token_list_for_account = async (deps, account_id) => {
|
|
|
185
193
|
* spec declares `side_effects: true`, making one creator's INSERT +
|
|
186
194
|
* enforce_limit pair atomic. That does **not** serialize concurrent creators:
|
|
187
195
|
* under Read Committed, two transactions can't see each other's uncommitted
|
|
188
|
-
* token row, so each
|
|
189
|
-
* `max_tokens`.
|
|
190
|
-
* `
|
|
191
|
-
*
|
|
196
|
+
* token row, so each would evict against a stale count and both commit above
|
|
197
|
+
* `max_tokens`. The handler serializes them first, taking the account row
|
|
198
|
+
* `FOR NO KEY UPDATE` (`query_account_lock_live`) — see the matching note on
|
|
199
|
+
* `query_session_enforce_limit`.
|
|
192
200
|
*
|
|
193
201
|
* Ordering carries the same `id DESC` stability tie-breaker, with the same
|
|
194
202
|
* caveat, as `query_session_enforce_limit` — deterministic survivors under a
|
|
195
|
-
* `created_at` tie, not a guarantee that the row just inserted survives.
|
|
203
|
+
* `created_at` tie, not a guarantee that the row just inserted survives. The
|
|
204
|
+
* victims are locked in id order before the delete, as the revoke-all
|
|
205
|
+
* (`query_revoke_all_api_tokens_for_account`) locks its rows.
|
|
196
206
|
*
|
|
197
207
|
* Deleting a token row does not end the connections it opened, so the
|
|
198
208
|
* returned ids are what the caller closes once the transaction commits
|
|
@@ -209,9 +219,14 @@ export const query_api_token_enforce_limit = async (deps, account_id, max_tokens
|
|
|
209
219
|
const rows = await deps.db.query(`DELETE FROM api_token
|
|
210
220
|
WHERE id IN (
|
|
211
221
|
SELECT id FROM api_token
|
|
212
|
-
WHERE
|
|
213
|
-
|
|
214
|
-
|
|
222
|
+
WHERE id IN (
|
|
223
|
+
SELECT id FROM api_token
|
|
224
|
+
WHERE account_id = $1
|
|
225
|
+
ORDER BY created_at DESC, id DESC
|
|
226
|
+
OFFSET $2
|
|
227
|
+
)
|
|
228
|
+
ORDER BY id
|
|
229
|
+
FOR UPDATE
|
|
215
230
|
) RETURNING id`, [account_id, max_tokens]);
|
|
216
231
|
return rows.map((row) => row.id);
|
|
217
232
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bearer_auth.d.ts","sourceRoot":"","sources":["../../src/lib/auth/bearer_auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAQtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAKrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,6BAA6B,GAAI,MAAM,SAAS,EAAE,KAAK,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"bearer_auth.d.ts","sourceRoot":"","sources":["../../src/lib/auth/bearer_auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAQtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAKrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,6BAA6B,GAAI,MAAM,SAAS,EAAE,KAAK,MAAM,KAAG,iBA0E5E,CAAC"}
|
package/dist/auth/bearer_auth.js
CHANGED
|
@@ -108,7 +108,8 @@ export const create_bearer_auth_middleware = (deps, log) => {
|
|
|
108
108
|
}
|
|
109
109
|
// a tombstoned account authenticates nothing — its token resolves as no
|
|
110
110
|
// credential, the anonymous caller, as on the Rust spine
|
|
111
|
-
|
|
111
|
+
const account = await query_account_by_id(deps, api_token.account_id);
|
|
112
|
+
if (!account) {
|
|
112
113
|
log.debug('bearer auth soft-fail: account not found or deleted');
|
|
113
114
|
await next();
|
|
114
115
|
return;
|
|
@@ -122,7 +123,7 @@ export const create_bearer_auth_middleware = (deps, log) => {
|
|
|
122
123
|
c.var.pending_effects?.push(touch);
|
|
123
124
|
c.set(RESOLVED_AUTH_KEY, {
|
|
124
125
|
credential_type: 'api_token',
|
|
125
|
-
|
|
126
|
+
account,
|
|
126
127
|
api_token_id: api_token.id,
|
|
127
128
|
// Parsed by the query, which refuses a token whose stored scope is
|
|
128
129
|
// unreadable — there is no default to fall back to.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daemon_token_middleware.d.ts","sourceRoot":"","sources":["../../src/lib/auth/daemon_token_middleware.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"daemon_token_middleware.d.ts","sourceRoot":"","sources":["../../src/lib/auth/daemon_token_middleware.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAQtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAGN,KAAK,gBAAgB,EACrB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,yBAAyB,GAAU,MAAM,SAAS,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAEtF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,8BAA8B,GAC1C,OAAO,gBAAgB,EACvB,MAAM,SAAS,EACf,KAAK,MAAM,KACT,iBAsFF,CAAC"}
|
|
@@ -19,6 +19,7 @@ import { get_resolved_auth } from './resolved_auth.js';
|
|
|
19
19
|
import { get_header_lines } from '../http/header_lines.js';
|
|
20
20
|
import { is_browser_context } from '../http/request_headers.js';
|
|
21
21
|
import { query_role_grant_find_account_id_for_role } from './role_grant_queries.js';
|
|
22
|
+
import { query_account_by_id } from './account_queries.js';
|
|
22
23
|
import { ROLE_KEEPER } from './role_schema.js';
|
|
23
24
|
import { read_daemon_token } from './credential_headers.js';
|
|
24
25
|
import { DAEMON_TOKEN_HEADER, validate_daemon_token } from './daemon_token.js';
|
|
@@ -145,12 +146,22 @@ export const create_daemon_token_middleware = (state, deps, log) => {
|
|
|
145
146
|
await next();
|
|
146
147
|
return;
|
|
147
148
|
}
|
|
149
|
+
// The keeper's row, read per request as every credential leg reads its
|
|
150
|
+
// account, so the authorization phase builds on it. A keeper account
|
|
151
|
+
// gone or tombstoned (no API path removes it) authenticates nothing —
|
|
152
|
+
// as the Rust spine's daemon leg.
|
|
153
|
+
const account = await query_account_by_id(deps, state.keeper_account_id);
|
|
154
|
+
if (!account) {
|
|
155
|
+
log.warn('daemon token auth soft-fail: keeper account not found');
|
|
156
|
+
await next();
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
148
159
|
// Full authority (`resolved_auth_scope`): singular, filesystem-proved,
|
|
149
160
|
// keeper-bound — no minting step at which a narrowing could have been
|
|
150
161
|
// chosen. No row, no expiry.
|
|
151
162
|
c.set(RESOLVED_AUTH_KEY, {
|
|
152
163
|
credential_type: 'daemon_token',
|
|
153
|
-
|
|
164
|
+
account,
|
|
154
165
|
credential_deadline: null
|
|
155
166
|
});
|
|
156
167
|
await next();
|
package/dist/auth/deps.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import type { PasswordHashDeps } from './password.js';
|
|
|
14
14
|
import type { Db } from '../db/db.js';
|
|
15
15
|
import type { AuditEmitter } from './audit_emitter.js';
|
|
16
16
|
import type { ConnectionCloser, RealtimeCloser } from '../actions/connection_closer.js';
|
|
17
|
+
import type { RealtimeNotificationSender } from '../actions/notification_sender.js';
|
|
17
18
|
/**
|
|
18
19
|
* Stateless capabilities bundle for fuz_app backends.
|
|
19
20
|
*
|
|
@@ -48,6 +49,15 @@ export interface AppDeps {
|
|
|
48
49
|
* option of `register_action_ws` / `create_audit_log_sse`.
|
|
49
50
|
*/
|
|
50
51
|
connection_closer: RealtimeCloser;
|
|
52
|
+
/**
|
|
53
|
+
* Sends server-initiated notifications to an account's live WebSocket
|
|
54
|
+
* connections. The action dispatchers put it on every handler context
|
|
55
|
+
* (`ActionContext.notification_sender`), so it must reach every
|
|
56
|
+
* WebSocket registry of the backend: `create_app_backend` creates it
|
|
57
|
+
* empty, and `create_app_server` adds each registry it mounts. With no
|
|
58
|
+
* WebSocket endpoint mounted it reaches no one.
|
|
59
|
+
*/
|
|
60
|
+
notification_sender: RealtimeNotificationSender;
|
|
51
61
|
/**
|
|
52
62
|
* Optional content-addressed byte store. Present only on backends that
|
|
53
63
|
* serve binary content (facts) — minimal consumers leave it unset. The
|
package/dist/auth/deps.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../src/lib/auth/deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../src/lib/auth/deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAEpF;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACvB,0CAA0C;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,6EAA6E;IAC7E,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,yBAAyB;IACzB,EAAE,EAAE,EAAE,CAAC;IACP,kCAAkC;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;;;OAOG;IACH,KAAK,EAAE,YAAY,CAAC;IACpB;;;;;;;;OAQG;IACH,iBAAiB,EAAE,cAAc,CAAC;IAClC;;;;;;;OAOG;IACH,mBAAmB,EAAE,0BAA0B,CAAC;IAChD;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IACjC,kCAAkC;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,4CAA4C;IAC5C,KAAK,EAAE,YAAY,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;IACnE;;;;;;OAMG;IACH,iBAAiB,EAAE,gBAAgB,CAAC;CACpC"}
|
|
@@ -15,12 +15,13 @@
|
|
|
15
15
|
* schema declared `acting?: ActingActor` (reference equality with the
|
|
16
16
|
* canonical `ActingActor` schema) or the auth requires role_grants
|
|
17
17
|
* (`role` / `keeper`), `apply_authorization_phase` resolves the actor
|
|
18
|
-
* against the resolved account
|
|
18
|
+
* against the resolved account plus the validated `acting` value via
|
|
19
19
|
* `resolve_acting_actor`, builds the `{account, actor, role_grants}`
|
|
20
20
|
* context via `build_request_context`, and sets it on
|
|
21
21
|
* `REQUEST_CONTEXT_KEY` before auth guards fire. Authenticated routes
|
|
22
|
-
* that don't need an actor still get an account-only context
|
|
23
|
-
*
|
|
22
|
+
* that don't need an actor still get an account-only context, so handler
|
|
23
|
+
* signatures stay uniform. The account is the row the credential leg
|
|
24
|
+
* read (`ResolvedAuth.account`) — the phase does not read it again.
|
|
24
25
|
*
|
|
25
26
|
* Account-grain operations (logout, password_change, account_verify,
|
|
26
27
|
* etc.) declare neither `acting` nor role_grant-requiring auth, so no actor
|
|
@@ -29,9 +30,9 @@
|
|
|
29
30
|
* which is what makes multi-actor logout work without first picking a
|
|
30
31
|
* persona.
|
|
31
32
|
*
|
|
32
|
-
* `build_request_context` loads
|
|
33
|
-
* the
|
|
34
|
-
* reloads role_grants on an existing context.
|
|
33
|
+
* `build_request_context` loads the acting actor's role_grants onto the
|
|
34
|
+
* account and the actor `resolve_acting_actor` read off that account.
|
|
35
|
+
* `refresh_role_grants` reloads role_grants on an existing context.
|
|
35
36
|
*
|
|
36
37
|
* @module
|
|
37
38
|
*/
|
|
@@ -42,7 +43,7 @@ import type { QueryDeps } from '../db/query_deps.js';
|
|
|
42
43
|
import { type ResolvedAuth } from './resolved_auth.js';
|
|
43
44
|
import type { RouteSpec } from '../http/route_spec.js';
|
|
44
45
|
import { type RouteAuth } from '../http/auth_shape.js';
|
|
45
|
-
import { ERROR_ACTOR_REQUIRED, ERROR_ACTOR_NOT_ON_ACCOUNT, ERROR_NO_ACTORS_ON_ACCOUNT
|
|
46
|
+
import { ERROR_AUTHENTICATION_REQUIRED, ERROR_ACTOR_REQUIRED, ERROR_ACTOR_NOT_ON_ACCOUNT, ERROR_NO_ACTORS_ON_ACCOUNT } from '../http/error_schemas.js';
|
|
46
47
|
/**
|
|
47
48
|
* The resolved identity context for an authenticated request.
|
|
48
49
|
*
|
|
@@ -54,8 +55,9 @@ import { ERROR_ACTOR_REQUIRED, ERROR_ACTOR_NOT_ON_ACCOUNT, ERROR_NO_ACTORS_ON_AC
|
|
|
54
55
|
* `actor: null` as "no role_grants" so callers don't have to narrow.
|
|
55
56
|
*
|
|
56
57
|
* Multi-actor invariant: when populated, `actor.account_id === account.id`.
|
|
57
|
-
* `
|
|
58
|
-
*
|
|
58
|
+
* `resolve_acting_actor` picks the actor from the account's own active
|
|
59
|
+
* actors, and the dispatcher's authorization phase rejects with
|
|
60
|
+
* `actor_not_on_account` before reaching the handler.
|
|
59
61
|
*/
|
|
60
62
|
export interface RequestContext {
|
|
61
63
|
account: Account;
|
|
@@ -164,15 +166,18 @@ export declare const has_scoped_role: (ctx: RequestContext | null, role: string,
|
|
|
164
166
|
*/
|
|
165
167
|
export declare const has_any_scoped_role: (ctx: RequestContext | null, roles: ReadonlyArray<string>, scope_id: string | null, now?: Date) => boolean;
|
|
166
168
|
/**
|
|
167
|
-
* Result of `resolve_acting_actor` — either
|
|
168
|
-
* error the caller maps to an HTTP response.
|
|
169
|
+
* Result of `resolve_acting_actor` — either the actor, as read, or a
|
|
170
|
+
* structured error the caller maps to an HTTP response.
|
|
169
171
|
*/
|
|
170
172
|
export type ResolveActingActorResult = {
|
|
171
173
|
ok: true;
|
|
172
|
-
|
|
174
|
+
actor: Actor;
|
|
173
175
|
} | {
|
|
174
176
|
ok: false;
|
|
175
177
|
reason: 'no_actors';
|
|
178
|
+
} | {
|
|
179
|
+
ok: false;
|
|
180
|
+
reason: 'account_removed';
|
|
176
181
|
} | {
|
|
177
182
|
ok: false;
|
|
178
183
|
reason: 'actor_required';
|
|
@@ -192,9 +197,10 @@ export type ResolveActingActorResult = {
|
|
|
192
197
|
* (from the request payload). Applies the uniform resolution rules:
|
|
193
198
|
*
|
|
194
199
|
* - `acting_actor_id` omitted + 1 actor → use it.
|
|
195
|
-
* -
|
|
200
|
+
* - 0 actors → `no_actors` when the account is still live (defensive —
|
|
196
201
|
* signup / bootstrap always create an actor in the same tx, so this
|
|
197
|
-
* is a server error)
|
|
202
|
+
* is a server error), `account_removed` when it is tombstoned or gone:
|
|
203
|
+
* removed since its credential was read, its actors with it.
|
|
198
204
|
* - `acting_actor_id` omitted + multiple actors → `actor_required` with
|
|
199
205
|
* the available list so the client can prompt; never pick silently.
|
|
200
206
|
* - `acting_actor_id` present + matches an actor on the account → use it.
|
|
@@ -202,6 +208,10 @@ export type ResolveActingActorResult = {
|
|
|
202
208
|
* The available list is intentionally not echoed in this branch (treat
|
|
203
209
|
* as opaque rejection).
|
|
204
210
|
*
|
|
211
|
+
* The actor comes back as the row the account's actor list read, so the
|
|
212
|
+
* caller builds on it without reading it again — one read, as on the Rust
|
|
213
|
+
* spine, which leaves no window for the actor to vanish between two.
|
|
214
|
+
*
|
|
205
215
|
* `acting_actor_id` is compared lowercased, the form actor ids are stored and
|
|
206
216
|
* read back in, so a caller passing an id that skipped the `Uuid` schema
|
|
207
217
|
* still matches its actor whatever its case.
|
|
@@ -284,10 +294,10 @@ export declare const create_request_context_middleware: (deps: QueryDeps, option
|
|
|
284
294
|
*/
|
|
285
295
|
export declare const token_scope_surface_denial: (c: Context, capability: string) => Response | null;
|
|
286
296
|
/**
|
|
287
|
-
* The account
|
|
288
|
-
* the credential (`reads_credential`) — may act on
|
|
289
|
-
* caller **and for a scope-narrowed API token**.
|
|
290
|
-
* anonymous-admitting disposition — the downgrade the Rust
|
|
297
|
+
* The account a public route — one that answers anonymous callers and reads
|
|
298
|
+
* the credential (`reads_credential`) — may act on, as the credential leg read
|
|
299
|
+
* it: `null` for the anonymous caller **and for a scope-narrowed API token**.
|
|
300
|
+
* Rule 3 in its anonymous-admitting disposition — the downgrade the Rust
|
|
291
301
|
* `AuthGate::public_request_context` applies.
|
|
292
302
|
*
|
|
293
303
|
* A narrowed token reaches no non-RPC surface that reads account data
|
|
@@ -303,11 +313,11 @@ export declare const token_scope_surface_denial: (c: Context, capability: string
|
|
|
303
313
|
* the scope, so it reads the full credential.
|
|
304
314
|
*
|
|
305
315
|
* @param route - the handler's `RouteContext`, or anything carrying its `credential`
|
|
306
|
-
* @returns the account
|
|
316
|
+
* @returns the account the credential resolved, or `null` for an anonymous caller or a narrowed token
|
|
307
317
|
*/
|
|
308
|
-
export declare const
|
|
318
|
+
export declare const get_public_account: (route: {
|
|
309
319
|
readonly credential: ResolvedAuth | null;
|
|
310
|
-
}) =>
|
|
320
|
+
}) => Account | null;
|
|
311
321
|
/**
|
|
312
322
|
* Create middleware refusing a route to a credential whose scope does not admit
|
|
313
323
|
* `capability`.
|
|
@@ -399,44 +409,26 @@ export declare const require_credential_types: (credential_types: ReadonlyArray<
|
|
|
399
409
|
*/
|
|
400
410
|
export declare const refresh_role_grants: (ctx: RequestContext, deps: QueryDeps) => Promise<RequestContext>;
|
|
401
411
|
/**
|
|
402
|
-
* Build
|
|
403
|
-
*
|
|
412
|
+
* Build an actor-bound `RequestContext` from the account the credential
|
|
413
|
+
* resolved and the actor `resolve_acting_actor` read off it, loading the
|
|
414
|
+
* actor's active role_grants.
|
|
404
415
|
*
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
*
|
|
416
|
+
* Reads only the grants: the account is the credential leg's row
|
|
417
|
+
* (`ResolvedAuth.account`) and the actor the account's own actor list read,
|
|
418
|
+
* so neither is read twice in a request and there is no torn read between
|
|
419
|
+
* the reads — a delete landing after them is the handler's to meet, as on
|
|
420
|
+
* the Rust spine.
|
|
410
421
|
*
|
|
411
|
-
* Called by the
|
|
412
|
-
*
|
|
413
|
-
* `
|
|
422
|
+
* Called by the dispatcher's authorization phase for routes that need an
|
|
423
|
+
* acting actor; account-grain routes get `{account, actor: null,
|
|
424
|
+
* role_grants: []}` with no read at all.
|
|
414
425
|
*
|
|
415
426
|
* @param deps - query dependencies
|
|
416
|
-
* @param
|
|
417
|
-
* @param
|
|
418
|
-
* @returns
|
|
427
|
+
* @param account - the account the credential resolved
|
|
428
|
+
* @param actor - the acting actor, one of `account`'s active actors
|
|
429
|
+
* @returns the actor-bound request context
|
|
419
430
|
*/
|
|
420
|
-
export declare const build_request_context: (deps: QueryDeps,
|
|
421
|
-
/**
|
|
422
|
-
* Build an account-only `RequestContext` (no actor, no role_grants) from
|
|
423
|
-
* an account id.
|
|
424
|
-
*
|
|
425
|
-
* Used by the dispatcher's authorization phase for authenticated routes
|
|
426
|
-
* that don't need an acting actor — account-grain operations (logout,
|
|
427
|
-
* password change, account self-service). Lets handlers read
|
|
428
|
-
* `auth.account.id` / `auth.account.username` uniformly with role_grant-bound
|
|
429
|
-
* routes; the cost is one extra `query_account_by_id` per request.
|
|
430
|
-
*
|
|
431
|
-
* Returns `null` when the account row is missing (e.g. deleted between
|
|
432
|
-
* the auth middleware's session lookup and the dispatcher) — caller
|
|
433
|
-
* surfaces that as a 500 since it represents a torn read.
|
|
434
|
-
*
|
|
435
|
-
* @param deps - query dependencies
|
|
436
|
-
* @param account_id - the account to build context for
|
|
437
|
-
* @returns an account-only request context, or `null` if the account is missing
|
|
438
|
-
*/
|
|
439
|
-
export declare const build_account_context: (deps: QueryDeps, account_id: string) => Promise<RequestContext | null>;
|
|
431
|
+
export declare const build_request_context: (deps: QueryDeps, account: Account, actor: Actor) => Promise<RequestActorContext>;
|
|
440
432
|
/**
|
|
441
433
|
* Resolution-failure shape returned by `apply_authorization_phase`. Each
|
|
442
434
|
* transport binds this to the appropriate wire shape — REST emits the body
|
|
@@ -457,9 +449,9 @@ export type AuthorizationFailureBody = {
|
|
|
457
449
|
} | {
|
|
458
450
|
error: typeof ERROR_ACTOR_NOT_ON_ACCOUNT;
|
|
459
451
|
} | {
|
|
460
|
-
error: typeof
|
|
452
|
+
error: typeof ERROR_AUTHENTICATION_REQUIRED;
|
|
461
453
|
} | {
|
|
462
|
-
error: typeof
|
|
454
|
+
error: typeof ERROR_NO_ACTORS_ON_ACCOUNT;
|
|
463
455
|
};
|
|
464
456
|
/**
|
|
465
457
|
* Result of the authorization phase. Pure data — the auth domain stops
|
|
@@ -472,18 +464,19 @@ export type AuthorizationFailureBody = {
|
|
|
472
464
|
* access on an `'optional'` axis. Public and unauthenticated collapse
|
|
473
465
|
* to the same null `request_context`; every transport already treated
|
|
474
466
|
* them identically.
|
|
475
|
-
* - **`{ok: false, status, body}`** — 400/500 failure. `status` is
|
|
476
|
-
* narrowed to the
|
|
477
|
-
*
|
|
478
|
-
*
|
|
479
|
-
*
|
|
467
|
+
* - **`{ok: false, status, body}`** — 400/401/500 failure. `status` is
|
|
468
|
+
* narrowed to the values the auth phase emits, so Hono's `c.json` status
|
|
469
|
+
* overload accepts the literals directly. The 401 is the dead credential's
|
|
470
|
+
* `authentication_required`: the account was removed since the credential
|
|
471
|
+
* leg read it. The one 500 is `no_actors_on_account`: a live account listed
|
|
472
|
+
* no active actor.
|
|
480
473
|
*/
|
|
481
474
|
export type AuthorizationResult = {
|
|
482
475
|
ok: true;
|
|
483
476
|
request_context: RequestContext | null;
|
|
484
477
|
} | {
|
|
485
478
|
ok: false;
|
|
486
|
-
status: 400 | 500;
|
|
479
|
+
status: 400 | 401 | 500;
|
|
487
480
|
body: AuthorizationFailureBody;
|
|
488
481
|
};
|
|
489
482
|
/**
|
|
@@ -494,33 +487,39 @@ export type AuthorizationResult = {
|
|
|
494
487
|
* input validation 400.
|
|
495
488
|
*
|
|
496
489
|
* Pure data — the function does not touch a Hono context. Each transport
|
|
497
|
-
* passes
|
|
490
|
+
* passes the account its credential resolved (`ResolvedAuth.account`) and
|
|
498
491
|
* binds the returned `AuthorizationResult` to its wire shape. The REST
|
|
499
492
|
* pipeline additionally writes `REQUEST_CONTEXT_KEY` on `c` for downstream
|
|
500
493
|
* `require_role` / `require_credential_types` middleware that still reads
|
|
501
494
|
* the resolved context off the Hono context.
|
|
502
495
|
*
|
|
496
|
+
* The account is never read here: the context is built on the credential
|
|
497
|
+
* leg's row, so a request reads its account once, as on the Rust spine,
|
|
498
|
+
* whose `apply_authorization_phase` takes the resolved account the same way.
|
|
499
|
+
*
|
|
503
500
|
* Branching by `auth.account` × `auth.actor`:
|
|
504
501
|
*
|
|
505
502
|
* - Both `'none'` → `{ok: true, request_context: null}`. Public actions
|
|
506
503
|
* never see a `RequestContext`.
|
|
507
|
-
* - `
|
|
504
|
+
* - `account == null` on any non-public route → same null
|
|
508
505
|
* `request_context`. The `'required'` callers were already rejected at
|
|
509
506
|
* the pre-authorization gate in the dispatcher; only genuine anonymous
|
|
510
507
|
* access on an `'optional'` axis lands here.
|
|
511
|
-
* - `actor === 'none'` →
|
|
512
|
-
*
|
|
508
|
+
* - `actor === 'none'` → an account-only context, `{account, actor: null,
|
|
509
|
+
* role_grants: []}`.
|
|
513
510
|
* - `actor === 'required'` → resolves the actor from `acting_value` (or
|
|
514
|
-
* single-actor account); failures map to 400 / 500.
|
|
511
|
+
* single-actor account); failures map to 400 / 401 / 500.
|
|
515
512
|
* - `actor === 'optional'` → same as `'required'` except multi-actor
|
|
516
513
|
* accounts without an `acting` value fall back to account-only context
|
|
517
514
|
* (no `actor_required` 400). Bad `acting` ids still 400.
|
|
518
515
|
*
|
|
519
|
-
*
|
|
520
|
-
*
|
|
521
|
-
*
|
|
516
|
+
* An account removed since the credential leg read it takes its actors with
|
|
517
|
+
* it: an actor-grain route then finds none, and answers the dead credential's
|
|
518
|
+
* 401 `ERROR_AUTHENTICATION_REQUIRED`, as a request that arrived after the
|
|
519
|
+
* removal does. The one 500 is `ERROR_NO_ACTORS_ON_ACCOUNT`: a live account
|
|
520
|
+
* with no active actor, a signup invariant violation.
|
|
522
521
|
*/
|
|
523
|
-
export declare const apply_authorization_phase: (deps: QueryDeps,
|
|
522
|
+
export declare const apply_authorization_phase: (deps: QueryDeps, account: Account | null, auth: RouteAuth, acting_value: string | undefined) => Promise<AuthorizationResult>;
|
|
524
523
|
/**
|
|
525
524
|
* Run the authorization phase on a Hono request: resolve the acting actor from
|
|
526
525
|
* `acting` against the authenticated account, and set the resulting
|
|
@@ -543,8 +542,9 @@ export declare const apply_authorization_phase: (deps: QueryDeps, account_id: st
|
|
|
543
542
|
* @param deps - query deps for actor resolution
|
|
544
543
|
* @param auth - the route's auth shape
|
|
545
544
|
* @param acting - the `acting` selector, already through `parse_acting`; `undefined` when absent
|
|
546
|
-
* @returns the refusal to answer (`400` actor selection, `
|
|
547
|
-
*
|
|
545
|
+
* @returns the refusal to answer (`400` actor selection, `401` an account
|
|
546
|
+
* removed since its credential was read, `500` a live account with no active
|
|
547
|
+
* actor), or nothing when the request may proceed
|
|
548
548
|
*/
|
|
549
549
|
export declare const run_authorization_phase: (c: Context, deps: QueryDeps, auth: RouteAuth, acting: string | undefined) => Promise<Response | void>;
|
|
550
550
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request_context.d.ts","sourceRoot":"","sources":["../../src/lib/auth/request_context.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"request_context.d.ts","sourceRoot":"","sources":["../../src/lib/auth/request_context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EACN,KAAK,OAAO,EACZ,KAAK,KAAK,EAEV,KAAK,SAAS,EACd,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AASrD,OAAO,EAA0C,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAM/F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElG,OAAO,EACN,6BAA6B,EAG7B,oBAAoB,EACpB,0BAA0B,EAC1B,0BAA0B,EAC1B,MAAM,0BAA0B,CAAC;AAGlC;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,cAAc;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,0DAA0D;AAC1D,e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