@fuzdev/fuz_app 0.158.0 → 0.160.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 +7 -2
- package/dist/actions/protocol.d.ts +7 -0
- package/dist/actions/protocol.d.ts.map +1 -1
- package/dist/actions/protocol.js +19 -4
- package/dist/auth/CLAUDE.md +40 -15
- package/dist/auth/account_schema.d.ts +2 -2
- package/dist/auth/account_schema.d.ts.map +1 -1
- package/dist/auth/account_schema.js +1 -1
- package/dist/auth/audit_log_route_schema.d.ts +18 -6
- package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_route_schema.js +7 -3
- package/dist/auth/credential_type_schema.d.ts +4 -4
- package/dist/auth/credential_type_schema.d.ts.map +1 -1
- package/dist/auth/credential_type_schema.js +6 -6
- package/dist/auth/grant_path_schema.d.ts +4 -4
- package/dist/auth/grant_path_schema.d.ts.map +1 -1
- package/dist/auth/grant_path_schema.js +6 -6
- package/dist/auth/request_context.js +1 -1
- package/dist/auth/role_grant_offer_action_specs.d.ts +2257 -400
- package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_action_specs.js +109 -102
- package/dist/auth/role_grant_offer_actions.d.ts +6 -3
- package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_actions.js +15 -6
- package/dist/auth/role_grant_offer_ddl.d.ts +5 -4
- package/dist/auth/role_grant_offer_ddl.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_ddl.js +5 -4
- package/dist/auth/role_grant_offer_notifications.d.ts +1364 -255
- package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_notifications.js +100 -47
- package/dist/auth/role_grant_offer_schema.d.ts +90 -22
- package/dist/auth/role_grant_offer_schema.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_schema.js +40 -39
- package/dist/auth/role_schema.d.ts +15 -2
- package/dist/auth/role_schema.d.ts.map +1 -1
- package/dist/auth/role_schema.js +17 -4
- package/dist/auth/role_schema_fuz.d.ts +29 -0
- package/dist/auth/role_schema_fuz.d.ts.map +1 -0
- package/dist/auth/role_schema_fuz.js +28 -0
- package/dist/auth/scope_kind_schema.d.ts +27 -15
- package/dist/auth/scope_kind_schema.d.ts.map +1 -1
- package/dist/auth/scope_kind_schema.js +30 -18
- package/dist/auth/scope_kind_schema_fuz.d.ts +30 -0
- package/dist/auth/scope_kind_schema_fuz.d.ts.map +1 -0
- package/dist/auth/scope_kind_schema_fuz.js +29 -0
- package/dist/auth/self_service_role_action_specs.d.ts +70 -27
- package/dist/auth/self_service_role_action_specs.d.ts.map +1 -1
- package/dist/auth/self_service_role_action_specs.js +16 -14
- package/dist/auth/token_scope.d.ts +3 -2
- package/dist/auth/token_scope.d.ts.map +1 -1
- package/dist/auth/token_scope.js +4 -3
- package/dist/http/CLAUDE.md +6 -0
- package/dist/http/db_routes.d.ts.map +1 -1
- package/dist/http/db_routes.js +8 -3
- package/dist/server/serve_fact_route.d.ts.map +1 -1
- package/dist/server/serve_fact_route.js +3 -2
- package/dist/server/surface_route.d.ts.map +1 -1
- package/dist/server/surface_route.js +3 -2
- package/dist/testing/CLAUDE.md +27 -16
- package/dist/testing/cross_backend/default_spine_surface.d.ts +1 -1
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts +15 -3
- 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 +60 -17
- package/dist/testing/cross_backend/role_grant_role_grammar.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_role_grammar.js +94 -6
- package/dist/testing/cross_backend/spine_suites.d.ts +4 -3
- package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
- package/dist/testing/cross_backend/spine_suites.js +2 -1
- package/dist/ui/CLAUDE.md +4 -4
- package/dist/ui/admin_accounts_state.svelte.d.ts +8 -8
- package/dist/ui/role_grant_offers_state.svelte.d.ts +9 -9
- package/dist/ui/role_grant_offers_state.svelte.js +4 -4
- package/package.json +1 -1
package/dist/http/db_routes.js
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* @module
|
|
11
11
|
*/
|
|
12
12
|
import { z } from 'zod';
|
|
13
|
+
import { object } from '@fuzdev/fuz_schema/schema.ts';
|
|
14
|
+
import { ActingActor as ActingActorFuz } from '../primitive_schemas_fuz.js';
|
|
13
15
|
import { get_route_params, get_route_query } from './route_spec.js';
|
|
14
16
|
import { ActingActor } from './auth_shape.js';
|
|
15
17
|
import { ForeignKeyError, ERROR_TABLE_NOT_FOUND, ERROR_TABLE_NO_PRIMARY_KEY, ERROR_TABLE_NOT_DELETABLE, ERROR_ROW_NOT_FOUND, ERROR_FOREIGN_KEY_VIOLATION, ERROR_INVALID_ROUTE_PARAMS, ERROR_DATABASE_CONNECTION_FAILED } from './error_schemas.js';
|
|
@@ -161,7 +163,7 @@ export const create_db_route_specs = (deps, options) => {
|
|
|
161
163
|
credential_types: ['daemon_token']
|
|
162
164
|
},
|
|
163
165
|
description: 'Database health and stats',
|
|
164
|
-
query:
|
|
166
|
+
query: object({ acting: ActingActorFuz }),
|
|
165
167
|
input: z.null(),
|
|
166
168
|
output: z.looseObject({ connected: z.boolean() }),
|
|
167
169
|
errors: {
|
|
@@ -204,7 +206,7 @@ export const create_db_route_specs = (deps, options) => {
|
|
|
204
206
|
credential_types: ['daemon_token']
|
|
205
207
|
},
|
|
206
208
|
description: 'List browsable tables with row counts',
|
|
207
|
-
query:
|
|
209
|
+
query: object({ acting: ActingActorFuz }),
|
|
208
210
|
input: z.null(),
|
|
209
211
|
output: z.looseObject({
|
|
210
212
|
tables: z.array(z.strictObject({ name: z.string(), row_count: z.number() }))
|
|
@@ -241,6 +243,9 @@ export const create_db_route_specs = (deps, options) => {
|
|
|
241
243
|
},
|
|
242
244
|
description: 'Get table columns and rows (paginated)',
|
|
243
245
|
params: z.strictObject({ name: z.string().regex(VALID_SQL_IDENTIFIER) }),
|
|
246
|
+
// Zod, unlike the `{acting}`-only queries here: its paging params are
|
|
247
|
+
// `query_int`'s Zod preprocess, which stays with the rest of these
|
|
248
|
+
// routes' Zod schemas
|
|
244
249
|
query: z.strictObject({
|
|
245
250
|
acting: ActingActor,
|
|
246
251
|
offset: query_int(z.number().int().min(0), 0),
|
|
@@ -330,7 +335,7 @@ export const create_db_route_specs = (deps, options) => {
|
|
|
330
335
|
name: z.string().regex(VALID_SQL_IDENTIFIER),
|
|
331
336
|
id: z.string()
|
|
332
337
|
}),
|
|
333
|
-
query:
|
|
338
|
+
query: object({ acting: ActingActorFuz }),
|
|
334
339
|
input: z.null(),
|
|
335
340
|
output: z.looseObject({ success: z.boolean() }),
|
|
336
341
|
errors: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve_fact_route.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/server/serve_fact_route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmIG;AAMH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"serve_fact_route.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/server/serve_fact_route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmIG;AAMH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAgBtD,OAAO,EAAuC,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAU5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAoCjD,MAAM,WAAW,+BAA+B;IAC/C,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACZ;AAkJD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iCAAiC,GAC7C,SAAS,+BAA+B,KACtC,SA0DF,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,4BAA4B,GACxC,SAAS,+BAA+B,KACtC,SA+CF,CAAC"}
|
|
@@ -134,10 +134,11 @@ import { open } from 'node:fs/promises';
|
|
|
134
134
|
import { Readable } from 'node:stream';
|
|
135
135
|
import { join } from 'node:path';
|
|
136
136
|
import { FactHashSchema, Uuid } from '../primitive_schemas.js';
|
|
137
|
+
import { ActingActor } from '../primitive_schemas_fuz.js';
|
|
137
138
|
import { z } from 'zod';
|
|
139
|
+
import { object } from '@fuzdev/fuz_schema/schema.ts';
|
|
138
140
|
import { build_request_context, get_public_account_id, get_request_context, has_scoped_role } from '../auth/request_context.js';
|
|
139
141
|
import { ROLE_ADMIN } from '../auth/role_schema.js';
|
|
140
|
-
import { ActingActor } from '../http/auth_shape.js';
|
|
141
142
|
import { query_active_actors_by_account } from '../auth/account_queries.js';
|
|
142
143
|
import { get_route_params } from '../http/route_spec.js';
|
|
143
144
|
import { ERROR_INVALID_ROUTE_PARAMS } from '../http/error_schemas.js';
|
|
@@ -407,7 +408,7 @@ export const create_serve_fact_route_spec = (options) => {
|
|
|
407
408
|
// authorization phase to resolve an acting actor — registry-time
|
|
408
409
|
// invariant 2 requires the `acting?` slot. On a GET it lives on
|
|
409
410
|
// `query` (a multi-actor admin disambiguates via `?acting=<actor>`).
|
|
410
|
-
query:
|
|
411
|
+
query: object({ acting: ActingActor }),
|
|
411
412
|
input: z.null(),
|
|
412
413
|
// The body is a binary stream; no JSON output schema applies.
|
|
413
414
|
output: z.null(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface_route.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/server/surface_route.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"surface_route.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/server/surface_route.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,8CAA8C;AAC9C,MAAM,WAAW,mBAAmB;IACnC,2GAA2G;IAC3G,OAAO,EAAE,UAAU,CAAC;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,GAAI,SAAS,mBAAmB,KAAG,SAmBvE,CAAC"}
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
10
|
import { z } from 'zod';
|
|
11
|
-
import {
|
|
11
|
+
import { object } from '@fuzdev/fuz_schema/schema.ts';
|
|
12
|
+
import { ActingActor } from '../primitive_schemas_fuz.js';
|
|
12
13
|
import { ROLE_ADMIN } from '../auth/role_schema.js';
|
|
13
14
|
/**
|
|
14
15
|
* Create the admin-only route spec that serves the `AppSurface` as JSON.
|
|
@@ -37,7 +38,7 @@ export const create_surface_route_spec = (options) => ({
|
|
|
37
38
|
},
|
|
38
39
|
handler: (c) => c.json(options.surface),
|
|
39
40
|
description: 'Application surface (routes, middleware, schemas) — admin only',
|
|
40
|
-
query:
|
|
41
|
+
query: object({ acting: ActingActor }),
|
|
41
42
|
input: z.null(),
|
|
42
43
|
output: z.looseObject({
|
|
43
44
|
routes: z.array(z.looseObject({})),
|
package/dist/testing/CLAUDE.md
CHANGED
|
@@ -534,9 +534,7 @@ handler needing real seeded state, a path segment no schema describes. A
|
|
|
534
534
|
route whose params merely carry a format needs no entry: `resolve_valid_path`
|
|
535
535
|
synthesizes a segment the route accepts.
|
|
536
536
|
|
|
537
|
-
Also exported: `describe_adversarial_auth(options)` (group 3 on its own)
|
|
538
|
-
`build_error_schema_lookup(specs, middleware_specs?)` (pre-built
|
|
539
|
-
`Map<string, RouteErrorSchemas>` for per-response validation).
|
|
537
|
+
Also exported: `describe_adversarial_auth(options)` (group 3 on its own).
|
|
540
538
|
|
|
541
539
|
### `adversarial_input.ts` + `adversarial_input_cases.ts` — schema-walk payload generation
|
|
542
540
|
|
|
@@ -1627,19 +1625,26 @@ globalSetup handle.
|
|
|
1627
1625
|
### `cross_backend/role_grant_offer_notification_ws.ts` — `describe_role_grant_offer_notification_ws_tests`
|
|
1628
1626
|
|
|
1629
1627
|
Real-upgrade coverage of the consentful-role-grants WS notification fan-out —
|
|
1630
|
-
the
|
|
1628
|
+
the server-initiated notifications (`received` → recipient,
|
|
1631
1629
|
`accepted`/`declined` → grantor, `retracted` → recipient, flat
|
|
1632
|
-
`
|
|
1633
|
-
superseded sibling's grantor on **both**
|
|
1630
|
+
`role_grant_revoked` → revokee, global and scoped, and
|
|
1631
|
+
`role_grant_offer_supersede` → each superseded sibling's grantor on **both**
|
|
1632
|
+
the accept- and revoke-cascade paths).
|
|
1634
1633
|
`describe_role_grant_offer_notification_ws_tests({setup_test, capabilities,
|
|
1635
|
-
base_url, ws_path, ws_required_roles?})` opens the
|
|
1634
|
+
base_url, ws_path, ws_required_roles?, scoped_role?, scope_kind?})` opens the
|
|
1635
|
+
affected counterparty's socket
|
|
1636
1636
|
(`create_admitted_ws_transport` — a targeted notification reaches only an
|
|
1637
1637
|
admitted connection, and the handshake alone doesn't say it is one), drives the
|
|
1638
1638
|
lifecycle RPC over `fixture.transport`, then
|
|
1639
|
-
strict-parses the delivered frame against its canonical
|
|
1640
|
-
`auth/role_grant_offer_notifications.ts` (
|
|
1641
|
-
field / null / datetime / the flat
|
|
1642
|
-
|
|
1639
|
+
strict-parses the delivered frame against its canonical `@fuzdev/fuz_schema`
|
|
1640
|
+
params schema from `auth/role_grant_offer_notifications.ts` (`parse_or_throw`;
|
|
1641
|
+
the guard against serialization drift — field / null / datetime / the flat
|
|
1642
|
+
revoke shape with its `scope_kind` and `scope_id` / the supersede `reason` +
|
|
1643
|
+
`cause_id`). The scoped-revoke case has the keeper assign `scoped_role`
|
|
1644
|
+
(default `SPINE_PARTICIPANT_ROLE`; `spine_suites` passes
|
|
1645
|
+
`suite_roles.conferral`) in a `scope_kind` scope (default `'space'`, `null`
|
|
1646
|
+
for a builtin role, which skips the case), revokes it, and holds the frame to
|
|
1647
|
+
that pair. Every case also opens a **bystander** — a third account's
|
|
1643
1648
|
admitted socket, party to nothing the case drives — and once the targeted
|
|
1644
1649
|
frame has landed sends a `heartbeat` on it and asserts it received nothing
|
|
1645
1650
|
but the answers to its own requests. The barrier is what makes the silence
|
|
@@ -2534,19 +2539,25 @@ Cross-process only — the per-surface in-process TS pins live beside each
|
|
|
2534
2539
|
module's own tests (`account_status.test.ts`, `action_rpc.test.ts`,
|
|
2535
2540
|
`serve_fact_route.db.test.ts`);
|
|
2536
2541
|
|
|
2537
|
-
### Grant-verb role grammar parity — `cross_backend/role_grant_role_grammar.ts`
|
|
2542
|
+
### Grant-verb role and scope-kind grammar parity — `cross_backend/role_grant_role_grammar.ts`
|
|
2538
2543
|
|
|
2539
2544
|
`describe_role_grant_role_grammar_cross_tests({setup_test, rpc_path?})` — an
|
|
2540
|
-
off-grammar `role` (uppercase, hyphen, digit, leading or
|
|
2541
|
-
space, empty, or all lowercase and one character past the length
|
|
2545
|
+
off-grammar `role` (uppercase, hyphen, digit, leading, trailing or consecutive
|
|
2546
|
+
underscores, space, empty, or all lowercase and one character past the length
|
|
2547
|
+
cap) on `role_grant_assign` and `role_grant_offer_create` answers
|
|
2542
2548
|
`invalid_params` with no `data.reason`, and after the refusals no
|
|
2543
2549
|
`role_grant_create` / `role_grant_offer_create` audit row carries one of those
|
|
2544
2550
|
strings. The control — an on-grammar role no registry holds, refused past
|
|
2545
2551
|
validation with `role_not_web_grantable` — keeps the audit read from being
|
|
2546
2552
|
vacuous, and the same refusal for a role exactly at the length cap pins that
|
|
2547
|
-
boundary.
|
|
2553
|
+
boundary. An off-grammar `scope_kind` with its `scope_id` (the same grammar
|
|
2554
|
+
and cap, `ScopeKindName`, among them `'GLOBAL'` with the all-zeros uuid, the
|
|
2555
|
+
partial unique indexes' key for a global grant) is refused the same way and
|
|
2556
|
+
recorded in no row; with an unregistered role, on-grammar ones (one at the cap)
|
|
2557
|
+
are refused past validation with the verb's not-grantable reason. Exists
|
|
2558
|
+
because the action-manifest parity gate captures no param
|
|
2548
2559
|
schemas while the Rust spine parses params by hand, and the grant verbs write
|
|
2549
|
-
the role they refuse into their failure rows. Ungated; cross-process only (it
|
|
2560
|
+
the role and `scope_kind` they refuse into their failure rows. Ungated; cross-process only (it
|
|
2550
2561
|
reads the audit log behind `_testing_drain_effects`).
|
|
2551
2562
|
|
|
2552
2563
|
### API-token lifetime parity — `cross_backend/token_lifetime.ts`
|
|
@@ -45,7 +45,7 @@ export interface SpineRpcEndpointsOptions {
|
|
|
45
45
|
/**
|
|
46
46
|
* WS notification sender threaded into the role-grant-offer sub-factory for
|
|
47
47
|
* server-initiated fan-out (`role_grant_offer_received` / `_accepted` /
|
|
48
|
-
* `_declined` / `_retracted` / `_supersede`, flat `
|
|
48
|
+
* `_declined` / `_retracted` / `_supersede`, flat `role_grant_revoked`).
|
|
49
49
|
*
|
|
50
50
|
* **Shared-instance trap.** Pass the SAME `ConnectionRegistry`
|
|
51
51
|
* instance the WS endpoint registers connections against — the registry
|
|
@@ -16,12 +16,24 @@ export interface RoleGrantOfferNotificationWsTestOptions extends WsEndpointTarge
|
|
|
16
16
|
* that close instead of the notification frame.
|
|
17
17
|
*/
|
|
18
18
|
readonly ws_required_roles?: ReadonlyArray<string>;
|
|
19
|
+
/**
|
|
20
|
+
* The role the scoped-revoke case assigns in a scope and revokes — one the
|
|
21
|
+
* backend's registry holds with the `admin` grant path. Default
|
|
22
|
+
* `SPINE_PARTICIPANT_ROLE`, the spine's own.
|
|
23
|
+
*/
|
|
24
|
+
readonly scoped_role?: string;
|
|
25
|
+
/**
|
|
26
|
+
* A scope kind `scoped_role` applies to, for the scoped-revoke case; `null`
|
|
27
|
+
* skips that case. Default `'space'` (the spine participant's), or `null`
|
|
28
|
+
* for a builtin role, which is global-only.
|
|
29
|
+
*/
|
|
30
|
+
readonly scope_kind?: string | null;
|
|
19
31
|
}
|
|
20
32
|
/**
|
|
21
|
-
* Register the role-grant-offer WS notification suite —
|
|
33
|
+
* Register the role-grant-offer WS notification suite — cases over a real
|
|
22
34
|
* upgrade, one per server-initiated notification (received / accepted /
|
|
23
|
-
* declined / retracted / revoke + supersede on both the
|
|
24
|
-
* cascades). Each opens the affected counterparty's socket, drives the
|
|
35
|
+
* declined / retracted / revoke, global and scoped, + supersede on both the
|
|
36
|
+
* accept and revoke cascades). Each opens the affected counterparty's socket, drives the
|
|
25
37
|
* lifecycle RPC, and strict-parses the delivered frame against its canonical
|
|
26
38
|
* params schema. Gated on `capabilities.ws`.
|
|
27
39
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role_grant_offer_notification_ws.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/role_grant_offer_notification_ws.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"role_grant_offer_notification_ws.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/role_grant_offer_notification_ws.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAsF9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AAKtE,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,YAAY,CAAC;AAEzD,OAAO,EAAmB,KAAK,gBAAgB,EAAyB,MAAM,kBAAkB,CAAC;AAKjG,2EAA2E;AAC3E,MAAM,WAAW,uCAAwC,SAAQ,gBAAgB;IAChF,8EAA8E;IAC9E,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,uEAAuE;IACvE,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C;;;;;;OAMG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACnD;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,+CAA+C,GAC3D,SAAS,uCAAuC,KAC9C,IA6eF,CAAC"}
|
|
@@ -2,13 +2,16 @@ import '../assert_dev_env.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Cross-process **role-grant-offer lifecycle WS notification** suite — the
|
|
4
4
|
* machinery proof for the consentful-role-grants notification fan-out across
|
|
5
|
-
* any spine backend. Covers
|
|
5
|
+
* any spine backend. Covers every server-initiated notification of the
|
|
6
|
+
* lifecycle:
|
|
6
7
|
*
|
|
7
8
|
* - `role_grant_offer_received` → recipient (offer created)
|
|
8
9
|
* - `role_grant_offer_accepted` → grantor (recipient accepts)
|
|
9
10
|
* - `role_grant_offer_declined` → grantor (recipient declines)
|
|
10
11
|
* - `role_grant_offer_retracted` → recipient (grantor retracts)
|
|
11
|
-
* - `
|
|
12
|
+
* - `role_grant_revoked` (flat, omits `revoked_by`) → revokee (active grant
|
|
13
|
+
* revoked by the `role_grant_revoke` action), for a global grant and a
|
|
14
|
+
* scoped one unless `scope_kind` is `null`
|
|
12
15
|
* - `role_grant_offer_supersede` → each superseded sibling's grantor, fired on
|
|
13
16
|
* BOTH the accept-cascade (`reason: 'sibling_accepted'`) and the
|
|
14
17
|
* revoke-cascade (`reason: 'role_grant_revoked'`)
|
|
@@ -58,29 +61,36 @@ import '../assert_dev_env.js';
|
|
|
58
61
|
* @module
|
|
59
62
|
*/
|
|
60
63
|
import { assert, describe } from 'vitest';
|
|
64
|
+
import { parse_or_throw } from '@fuzdev/fuz_schema/schema.ts';
|
|
61
65
|
import { rpc_call } from '../rpc_helpers.js';
|
|
62
66
|
import { WS_ADMISSION_PROBE_ID } from '../transports/ws_transport.js';
|
|
63
67
|
import { is_notification_with, is_response_for } from '../transports/ws_client.js';
|
|
64
|
-
import { ROLE_ADMIN } from '../../auth/role_schema.js';
|
|
68
|
+
import { ROLE_ADMIN, is_builtin_role } from '../../auth/role_schema.js';
|
|
65
69
|
import { WS_CLOSE_PERMISSION_REVOKED } from '../../actions/transports.js';
|
|
66
|
-
import { ROLE_GRANT_OFFER_RECEIVED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_ACCEPTED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_DECLINED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_RETRACTED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_SUPERSEDE_NOTIFICATION_METHOD,
|
|
70
|
+
import { ROLE_GRANT_OFFER_RECEIVED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_ACCEPTED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_DECLINED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_RETRACTED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_SUPERSEDE_NOTIFICATION_METHOD, ROLE_GRANT_REVOKED_NOTIFICATION_METHOD, RoleGrantOfferReceivedParams, RoleGrantOfferAcceptedParams, RoleGrantOfferDeclinedParams, RoleGrantOfferRetractedParams, RoleGrantOfferSupersedeParams, RoleGrantRevokedParams } from '../../auth/role_grant_offer_notifications.js';
|
|
67
71
|
import { test_if } from './capabilities.js';
|
|
68
72
|
import { create_active_role_grant, create_pending_role_grant_offer } from './role_grant_cross_helpers.js';
|
|
69
|
-
import { SPINE_RPC_PATH } from './spine_surface_constants.js';
|
|
73
|
+
import { SPINE_PARTICIPANT_ROLE, SPINE_RPC_PATH } from './spine_surface_constants.js';
|
|
70
74
|
import { open_session_ws } from './ws_endpoint.js';
|
|
71
75
|
/** The request id the bystander's barrier `heartbeat` goes out under. */
|
|
72
76
|
const BYSTANDER_BARRIER_ID = 'bystander_barrier';
|
|
73
77
|
/**
|
|
74
|
-
* Register the role-grant-offer WS notification suite —
|
|
78
|
+
* Register the role-grant-offer WS notification suite — cases over a real
|
|
75
79
|
* upgrade, one per server-initiated notification (received / accepted /
|
|
76
|
-
* declined / retracted / revoke + supersede on both the
|
|
77
|
-
* cascades). Each opens the affected counterparty's socket, drives the
|
|
80
|
+
* declined / retracted / revoke, global and scoped, + supersede on both the
|
|
81
|
+
* accept and revoke cascades). Each opens the affected counterparty's socket, drives the
|
|
78
82
|
* lifecycle RPC, and strict-parses the delivered frame against its canonical
|
|
79
83
|
* params schema. Gated on `capabilities.ws`.
|
|
80
84
|
*/
|
|
81
85
|
export const describe_role_grant_offer_notification_ws_tests = (options) => {
|
|
82
86
|
const { setup_test, capabilities, ws_required_roles = [] } = options;
|
|
83
87
|
const revoke_closes_the_socket = ws_required_roles.includes(ROLE_ADMIN);
|
|
88
|
+
const scoped_role = options.scoped_role ?? SPINE_PARTICIPANT_ROLE;
|
|
89
|
+
const scope_kind = options.scope_kind === undefined
|
|
90
|
+
? is_builtin_role(scoped_role)
|
|
91
|
+
? null
|
|
92
|
+
: 'space'
|
|
93
|
+
: options.scope_kind;
|
|
84
94
|
// -- shared helpers -------------------------------------------------------
|
|
85
95
|
/**
|
|
86
96
|
* Open a WS transport on an account's session, admitted before it resolves:
|
|
@@ -158,7 +168,7 @@ export const describe_role_grant_offer_notification_ws_tests = (options) => {
|
|
|
158
168
|
const frame = await recipient_ws.wait_for(is_notification_with(ROLE_GRANT_OFFER_RECEIVED_NOTIFICATION_METHOD, (p) => p.offer.to_account_id === recipient.account.id), 5000);
|
|
159
169
|
// Params strict-parse against the canonical wire schema — guards
|
|
160
170
|
// the serialization against field/null/datetime drift.
|
|
161
|
-
const params = RoleGrantOfferReceivedParams
|
|
171
|
+
const params = parse_or_throw(RoleGrantOfferReceivedParams, frame.params);
|
|
162
172
|
assert.strictEqual(params.offer.to_account_id, recipient.account.id);
|
|
163
173
|
assert.strictEqual(params.offer.role, ROLE_ADMIN);
|
|
164
174
|
await assert_bystander_heard_nothing(bystander_ws);
|
|
@@ -183,7 +193,7 @@ export const describe_role_grant_offer_notification_ws_tests = (options) => {
|
|
|
183
193
|
const accepted = await rpc(fixture, 'role_grant_offer_accept', { offer_id: offer.id }, recipient.create_session_headers());
|
|
184
194
|
assert.isTrue(accepted.ok, `accept failed: ${JSON.stringify(accepted)}`);
|
|
185
195
|
const frame = await grantor.wait_for(is_notification_with(ROLE_GRANT_OFFER_ACCEPTED_NOTIFICATION_METHOD, (p) => p.offer.id === offer.id), 5000);
|
|
186
|
-
const params = RoleGrantOfferAcceptedParams
|
|
196
|
+
const params = parse_or_throw(RoleGrantOfferAcceptedParams, frame.params);
|
|
187
197
|
assert.strictEqual(params.offer.id, offer.id);
|
|
188
198
|
assert.isNotNull(params.offer.accepted_at);
|
|
189
199
|
await assert_bystander_heard_nothing(bystander_ws);
|
|
@@ -207,7 +217,7 @@ export const describe_role_grant_offer_notification_ws_tests = (options) => {
|
|
|
207
217
|
const declined = await rpc(fixture, 'role_grant_offer_decline', { offer_id: offer.id, reason: 'no thanks' }, recipient.create_session_headers());
|
|
208
218
|
assert.isTrue(declined.ok, `decline failed: ${JSON.stringify(declined)}`);
|
|
209
219
|
const frame = await grantor.wait_for(is_notification_with(ROLE_GRANT_OFFER_DECLINED_NOTIFICATION_METHOD, (p) => p.offer.id === offer.id), 5000);
|
|
210
|
-
const params = RoleGrantOfferDeclinedParams
|
|
220
|
+
const params = parse_or_throw(RoleGrantOfferDeclinedParams, frame.params);
|
|
211
221
|
assert.strictEqual(params.offer.id, offer.id);
|
|
212
222
|
// Decline reason rides inside the offer row, not a sibling field.
|
|
213
223
|
assert.strictEqual(params.offer.decline_reason, 'no thanks');
|
|
@@ -233,7 +243,7 @@ export const describe_role_grant_offer_notification_ws_tests = (options) => {
|
|
|
233
243
|
const retracted = await rpc(fixture, 'role_grant_offer_retract', { offer_id: offer.id }, fixture.create_session_headers());
|
|
234
244
|
assert.isTrue(retracted.ok, `retract failed: ${JSON.stringify(retracted)}`);
|
|
235
245
|
const frame = await recipient_ws.wait_for(is_notification_with(ROLE_GRANT_OFFER_RETRACTED_NOTIFICATION_METHOD, (p) => p.offer.id === offer.id), 5000);
|
|
236
|
-
const params = RoleGrantOfferRetractedParams
|
|
246
|
+
const params = parse_or_throw(RoleGrantOfferRetractedParams, frame.params);
|
|
237
247
|
assert.strictEqual(params.offer.id, offer.id);
|
|
238
248
|
assert.strictEqual(params.offer.to_account_id, recipient.account.id);
|
|
239
249
|
assert.isNotNull(params.offer.retracted_at);
|
|
@@ -249,7 +259,7 @@ export const describe_role_grant_offer_notification_ws_tests = (options) => {
|
|
|
249
259
|
});
|
|
250
260
|
test_if(capabilities.ws, revoke_closes_the_socket
|
|
251
261
|
? 'revoke closes the revokee WS gated on the revoked role'
|
|
252
|
-
: 'revoke delivers a flat
|
|
262
|
+
: 'revoke delivers a flat role_grant_revoked to the revokee WS', async () => {
|
|
253
263
|
const fixture = await setup_test();
|
|
254
264
|
const revokee = await fixture.create_account({ roles: [ROLE_ADMIN] });
|
|
255
265
|
const role_grant_id = await create_active_role_grant(fixture, revokee, {
|
|
@@ -261,13 +271,15 @@ export const describe_role_grant_offer_notification_ws_tests = (options) => {
|
|
|
261
271
|
try {
|
|
262
272
|
const revoked = await rpc(fixture, 'role_grant_revoke', { actor_id: revokee.actor.id, role_grant_id, reason: 'cleanup' }, fixture.create_session_headers());
|
|
263
273
|
assert.isTrue(revoked.ok, `revoke failed: ${JSON.stringify(revoked)}`);
|
|
264
|
-
const is_revoke_frame = is_notification_with(
|
|
274
|
+
const is_revoke_frame = is_notification_with(ROLE_GRANT_REVOKED_NOTIFICATION_METHOD, (p) => p.role_grant_id === role_grant_id);
|
|
265
275
|
// Flat params — guards the no-`offer`-wrapper, `revoked_by`-omitted
|
|
266
276
|
// shape against drift.
|
|
267
277
|
const assert_flat_revoke = (frame) => {
|
|
268
|
-
const params =
|
|
278
|
+
const params = parse_or_throw(RoleGrantRevokedParams, frame.params);
|
|
269
279
|
assert.strictEqual(params.role_grant_id, role_grant_id);
|
|
270
280
|
assert.strictEqual(params.role, ROLE_ADMIN);
|
|
281
|
+
assert.strictEqual(params.scope_kind, null);
|
|
282
|
+
assert.strictEqual(params.scope_id, null);
|
|
271
283
|
assert.strictEqual(params.reason, 'cleanup');
|
|
272
284
|
assert.notProperty(frame.params, 'revoked_by');
|
|
273
285
|
};
|
|
@@ -295,6 +307,37 @@ export const describe_role_grant_offer_notification_ws_tests = (options) => {
|
|
|
295
307
|
await bystander_ws.close();
|
|
296
308
|
}
|
|
297
309
|
});
|
|
310
|
+
test_if(capabilities.ws && scope_kind !== null, 'a scoped revoke delivers its scope_kind and scope_id to the revokee WS', async () => {
|
|
311
|
+
const fixture = await setup_test();
|
|
312
|
+
// `ROLE_ADMIN` opens a socket gated on it; the scoped revoke below takes
|
|
313
|
+
// no global grant, so a gated socket stays open
|
|
314
|
+
const revokee = await fixture.create_account({ roles: [ROLE_ADMIN] });
|
|
315
|
+
const scope_id = '44444444-4444-4444-8444-444444444444';
|
|
316
|
+
const assigned = await rpc(fixture, 'role_grant_assign', { to_account_id: revokee.account.id, role: scoped_role, scope_kind, scope_id }, fixture.create_session_headers());
|
|
317
|
+
assert.isTrue(assigned.ok, `assign failed: ${JSON.stringify(assigned)}`);
|
|
318
|
+
const { role_grant_id } = assigned.result;
|
|
319
|
+
const bystander_ws = await open_bystander(fixture);
|
|
320
|
+
try {
|
|
321
|
+
const revokee_ws = await open_ws(revokee);
|
|
322
|
+
try {
|
|
323
|
+
const revoked = await rpc(fixture, 'role_grant_revoke', { actor_id: revokee.actor.id, role_grant_id }, fixture.create_session_headers());
|
|
324
|
+
assert.isTrue(revoked.ok, `revoke failed: ${JSON.stringify(revoked)}`);
|
|
325
|
+
const frame = await revokee_ws.wait_for(is_notification_with(ROLE_GRANT_REVOKED_NOTIFICATION_METHOD, (p) => p.role_grant_id === role_grant_id), 5000);
|
|
326
|
+
const params = parse_or_throw(RoleGrantRevokedParams, frame.params);
|
|
327
|
+
assert.strictEqual(params.role, scoped_role);
|
|
328
|
+
assert.strictEqual(params.scope_kind, scope_kind);
|
|
329
|
+
assert.strictEqual(params.scope_id, scope_id);
|
|
330
|
+
assert.strictEqual(params.reason, null);
|
|
331
|
+
await assert_bystander_heard_nothing(bystander_ws);
|
|
332
|
+
}
|
|
333
|
+
finally {
|
|
334
|
+
await revokee_ws.close();
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
finally {
|
|
338
|
+
await bystander_ws.close();
|
|
339
|
+
}
|
|
340
|
+
});
|
|
298
341
|
test_if(capabilities.ws, 'accept of a sibling delivers role_grant_offer_supersede to the other grantor WS', async () => {
|
|
299
342
|
const fixture = await setup_test();
|
|
300
343
|
// Three identities: keeper (grantor 1, socket), a second admin grantor
|
|
@@ -314,7 +357,7 @@ export const describe_role_grant_offer_notification_ws_tests = (options) => {
|
|
|
314
357
|
const accepted = await rpc(fixture, 'role_grant_offer_accept', { offer_id: grantor2_offer.id }, recipient.create_session_headers());
|
|
315
358
|
assert.isTrue(accepted.ok, `accept failed: ${JSON.stringify(accepted)}`);
|
|
316
359
|
const frame = await grantor1_ws.wait_for(is_notification_with(ROLE_GRANT_OFFER_SUPERSEDE_NOTIFICATION_METHOD, (p) => p.offer.id === keeper_offer.id), 5000);
|
|
317
|
-
const params = RoleGrantOfferSupersedeParams
|
|
360
|
+
const params = parse_or_throw(RoleGrantOfferSupersedeParams, frame.params);
|
|
318
361
|
assert.strictEqual(params.offer.id, keeper_offer.id);
|
|
319
362
|
assert.strictEqual(params.reason, 'sibling_accepted');
|
|
320
363
|
// cause_id points at the accepted sibling (grantor 2's offer).
|
|
@@ -348,7 +391,7 @@ export const describe_role_grant_offer_notification_ws_tests = (options) => {
|
|
|
348
391
|
const revoked = await rpc(fixture, 'role_grant_revoke', { actor_id: revokee.actor.id, role_grant_id }, fixture.create_session_headers());
|
|
349
392
|
assert.isTrue(revoked.ok, `revoke failed: ${JSON.stringify(revoked)}`);
|
|
350
393
|
const frame = await grantor_ws.wait_for(is_notification_with(ROLE_GRANT_OFFER_SUPERSEDE_NOTIFICATION_METHOD, (p) => p.offer.id === sibling_offer.id), 5000);
|
|
351
|
-
const params = RoleGrantOfferSupersedeParams
|
|
394
|
+
const params = parse_or_throw(RoleGrantOfferSupersedeParams, frame.params);
|
|
352
395
|
assert.strictEqual(params.offer.id, sibling_offer.id);
|
|
353
396
|
assert.strictEqual(params.reason, 'role_grant_revoked');
|
|
354
397
|
// cause_id points at the revoked role_grant.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role_grant_role_grammar.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/role_grant_role_grammar.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"role_grant_role_grammar.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/role_grant_role_grammar.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAiD9B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAG3D,8EAA8E;AAC9E,MAAM,MAAM,oCAAoC,GAAG,wBAAwB,CAAC;AAoE5E,eAAO,MAAM,4CAA4C,GACxD,SAAS,oCAAoC,KAC3C,IAqKF,CAAC"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import '../assert_dev_env.js';
|
|
2
2
|
/**
|
|
3
|
-
* Cross-backend parity suite for an **off-grammar `role`** on
|
|
3
|
+
* Cross-backend parity suite for an **off-grammar `role` or `scope_kind`** on
|
|
4
|
+
* the grant verbs.
|
|
4
5
|
*
|
|
5
6
|
* `role_grant_assign` and `role_grant_offer_create` declare `role` as
|
|
6
|
-
* `RoleName` (lowercase letters and underscores, no leading or
|
|
7
|
-
*
|
|
8
|
-
* validation — JSON-RPC `invalid_params`, with no
|
|
9
|
-
* no audit row: a role is caller-chosen text until
|
|
10
|
-
* the grant verbs record the role they refuse in
|
|
7
|
+
* `RoleName` (lowercase letters and underscores, no leading, trailing or
|
|
8
|
+
* consecutive underscores, at most 64 characters). A role string outside that
|
|
9
|
+
* grammar is refused at input validation — JSON-RPC `invalid_params`, with no
|
|
10
|
+
* `data.reason` — and writes no audit row: a role is caller-chosen text until
|
|
11
|
+
* it passes the grammar, and the grant verbs record the role they refuse in
|
|
12
|
+
* their failure rows.
|
|
11
13
|
*
|
|
12
14
|
* - **refused at validation** — each off-grammar role, on each verb, answers
|
|
13
15
|
* `invalid_params` with no reason, so the refusal is the input schema's and
|
|
@@ -19,6 +21,13 @@ import '../assert_dev_env.js';
|
|
|
19
21
|
* on-grammar role no registry holds is refused past validation with
|
|
20
22
|
* `role_not_web_grantable`, the refusal a failure row records — as is one
|
|
21
23
|
* exactly at the length cap, which pins the boundary.
|
|
24
|
+
* - **`scope_kind` too** — `scope_kind` is a `ScopeKindName`, the same grammar
|
|
25
|
+
* and cap, so an off-grammar one with its `scope_id` is refused the same way
|
|
26
|
+
* and recorded in no row. Among them is `'GLOBAL'` with the all-zeros
|
|
27
|
+
* uuid, the partial unique indexes' key for a global grant, which a spine
|
|
28
|
+
* letting it through would answer with a 500 on an actor already holding
|
|
29
|
+
* the role globally. The role is on the grammar and held by no registry, so
|
|
30
|
+
* a `scope_kind` let through is refused past validation with a reason.
|
|
22
31
|
*
|
|
23
32
|
* Exists because the action-manifest parity gate captures no param schemas
|
|
24
33
|
* while the Rust spine parses params by hand — a spine that let an off-grammar
|
|
@@ -30,6 +39,7 @@ import '../assert_dev_env.js';
|
|
|
30
39
|
* @module
|
|
31
40
|
*/
|
|
32
41
|
import { assert, describe, test } from 'vitest';
|
|
42
|
+
import { ERROR_ROLE_GRANT_OFFER_ROLE_NOT_GRANTABLE } from '../../auth/role_grant_offer_action_specs.js';
|
|
33
43
|
import { ERROR_ROLE_NOT_WEB_GRANTABLE } from '../../http/error_schemas.js';
|
|
34
44
|
import { JSONRPC_ERROR_CODES } from '../../http/jsonrpc_errors.js';
|
|
35
45
|
import { list_audit_events } from './audit_cross_helpers.js';
|
|
@@ -52,13 +62,41 @@ const OFF_GRAMMAR_ROLES = [
|
|
|
52
62
|
'role1', // digit
|
|
53
63
|
'_role', // leading underscore
|
|
54
64
|
'role_', // trailing underscore
|
|
65
|
+
'role__name', // a run of two underscores
|
|
66
|
+
'role___name', // a run of three
|
|
55
67
|
'role name', // space
|
|
56
68
|
'', // empty
|
|
57
69
|
OVER_LENGTH_ROLE // on the alphabet, one past the length cap
|
|
58
70
|
];
|
|
59
71
|
/** On the grammar, held by no registry. */
|
|
60
72
|
const UNREGISTERED_ROLE = 'not_a_registered_role';
|
|
73
|
+
/**
|
|
74
|
+
* The longest scope kind the grammar admits — an independent copy of the
|
|
75
|
+
* producers' `SCOPE_KIND_LENGTH_MAX`.
|
|
76
|
+
*/
|
|
77
|
+
const SCOPE_KIND_LENGTH_MAX = 64;
|
|
78
|
+
/** Each breaks one rule of the `ScopeKindName` grammar. */
|
|
79
|
+
const OFF_GRAMMAR_SCOPE_KINDS = [
|
|
80
|
+
'GLOBAL', // the partial unique indexes' token for a global grant
|
|
81
|
+
'Classroom', // uppercase
|
|
82
|
+
'a__b', // a run of two underscores
|
|
83
|
+
'_a', // leading underscore
|
|
84
|
+
'a_', // trailing underscore
|
|
85
|
+
'a1', // digit
|
|
86
|
+
'', // empty
|
|
87
|
+
'a'.repeat(SCOPE_KIND_LENGTH_MAX + 1) // on the alphabet, one past the length cap
|
|
88
|
+
];
|
|
89
|
+
/** On the grammar, the second exactly at the length cap. */
|
|
90
|
+
const ON_GRAMMAR_SCOPE_KINDS = [
|
|
91
|
+
'classroom',
|
|
92
|
+
'a'.repeat(SCOPE_KIND_LENGTH_MAX)
|
|
93
|
+
];
|
|
61
94
|
const GRANT_METHODS = ['role_grant_assign', 'role_grant_offer_create'];
|
|
95
|
+
/** What each grant verb refuses an unregistered role with, past validation. */
|
|
96
|
+
const NOT_GRANTABLE_REASONS = {
|
|
97
|
+
role_grant_assign: ERROR_ROLE_NOT_WEB_GRANTABLE,
|
|
98
|
+
role_grant_offer_create: ERROR_ROLE_GRANT_OFFER_ROLE_NOT_GRANTABLE
|
|
99
|
+
};
|
|
62
100
|
/** The audit event types the grant verbs write. */
|
|
63
101
|
const GRANT_EVENT_TYPES = ['role_grant_create', 'role_grant_offer_create'];
|
|
64
102
|
export const describe_role_grant_role_grammar_cross_tests = (options) => {
|
|
@@ -111,4 +149,54 @@ export const describe_role_grant_role_grammar_cross_tests = (options) => {
|
|
|
111
149
|
}
|
|
112
150
|
});
|
|
113
151
|
});
|
|
152
|
+
describe('grant verbs refuse an off-grammar scope_kind at validation', () => {
|
|
153
|
+
const scoped = (scope_kind) => ({
|
|
154
|
+
to_account_id: NIL_UUID,
|
|
155
|
+
role: UNREGISTERED_ROLE,
|
|
156
|
+
scope_kind,
|
|
157
|
+
scope_id: NIL_UUID
|
|
158
|
+
});
|
|
159
|
+
for (const method of GRANT_METHODS) {
|
|
160
|
+
test(`${method}: an off-grammar scope_kind is invalid_params with no reason`, async () => {
|
|
161
|
+
const fixture = await setup_test();
|
|
162
|
+
const t = fixture.fresh_transport();
|
|
163
|
+
for (const scope_kind of OFF_GRAMMAR_SCOPE_KINDS) {
|
|
164
|
+
const res = await cross_rpc_call(t, rpc_path, method, scoped(scope_kind), fixture.create_session_headers());
|
|
165
|
+
const label = `${method} scope_kind=${JSON.stringify(scope_kind)}`;
|
|
166
|
+
assert.strictEqual(res.ok, false, `${label}: expected a refusal`);
|
|
167
|
+
assert.strictEqual(res.error?.code, JSONRPC_ERROR_CODES.invalid_params, label);
|
|
168
|
+
// a validation refusal, not the grant-path one an unregistered role gets
|
|
169
|
+
assert.strictEqual(error_reason(res), undefined, `${label}: no data.reason`);
|
|
170
|
+
}
|
|
171
|
+
// on the grammar, the same call reaches the grant-path gate
|
|
172
|
+
for (const scope_kind of ON_GRAMMAR_SCOPE_KINDS) {
|
|
173
|
+
const res = await cross_rpc_call(t, rpc_path, method, scoped(scope_kind), fixture.create_session_headers());
|
|
174
|
+
assert.strictEqual(error_reason(res), NOT_GRANTABLE_REASONS[method], `${method} scope_kind=${JSON.stringify(scope_kind)}: passes validation`);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
test('an off-grammar scope_kind writes no audit row', async () => {
|
|
179
|
+
const fixture = await setup_test();
|
|
180
|
+
const t = fixture.fresh_transport();
|
|
181
|
+
const session = fixture.create_session_headers();
|
|
182
|
+
for (const method of GRANT_METHODS) {
|
|
183
|
+
for (const scope_kind of [...OFF_GRAMMAR_SCOPE_KINDS, ...ON_GRAMMAR_SCOPE_KINDS]) {
|
|
184
|
+
await cross_rpc_call(t, rpc_path, method, scoped(scope_kind), session);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
for (const event_type of GRANT_EVENT_TYPES) {
|
|
188
|
+
const events = await list_audit_events(fixture, { event_type }, rpc_path);
|
|
189
|
+
const scope_kinds = events.map((event) => event.metadata?.scope_kind);
|
|
190
|
+
for (const scope_kind of scope_kinds) {
|
|
191
|
+
assert.ok(typeof scope_kind !== 'string' || !OFF_GRAMMAR_SCOPE_KINDS.includes(scope_kind), `${event_type}: an audit row records the off-grammar scope_kind ${JSON.stringify(scope_kind)}`);
|
|
192
|
+
}
|
|
193
|
+
if (event_type === 'role_grant_create') {
|
|
194
|
+
// the on-grammar refusals' failure rows are in the same read, so it is not vacuous
|
|
195
|
+
for (const scope_kind of ON_GRAMMAR_SCOPE_KINDS) {
|
|
196
|
+
assert.ok(scope_kinds.includes(scope_kind), `the scope_kind=${JSON.stringify(scope_kind)} refusal wrote its failure row`);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
});
|
|
114
202
|
};
|
|
@@ -165,10 +165,11 @@ export interface SpineSuiteRoles {
|
|
|
165
165
|
*/
|
|
166
166
|
readonly cell_grant?: string;
|
|
167
167
|
/**
|
|
168
|
-
* The admin-grantable role `role_grant_offer_lifecycle` offers
|
|
169
|
-
* `role_grant_participation` confers
|
|
168
|
+
* The admin-grantable role `role_grant_offer_lifecycle` offers,
|
|
169
|
+
* `role_grant_participation` confers, and `role_grant_offer_notification_ws`
|
|
170
|
+
* assigns in a scope and revokes. Default `SPINE_PARTICIPANT_ROLE`;
|
|
170
171
|
* `ROLE_ADMIN` serves a backend with only the builtin roles (the scoped
|
|
171
|
-
* assign
|
|
172
|
+
* assign and scoped revoke cases then skip, as a builtin is global-only).
|
|
172
173
|
*/
|
|
173
174
|
readonly conferral?: string;
|
|
174
175
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spine_suites.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/spine_suites.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAwF9B,OAAO,EAA2B,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAmC,KAAK,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAClG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAEN,KAAK,gCAAgC,EACrC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEN,KAAK,2BAA2B,EAChC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEN,KAAK,2BAA2B,EAChC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAkC,KAAK,wBA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|
404
404
|
ws_path: c.config.ws_path,
|
|
405
|
-
ws_required_roles: c.options.ws_required_roles
|
|
405
|
+
ws_required_roles: c.options.ws_required_roles,
|
|
406
|
+
scoped_role: c.options.suite_roles?.conferral
|
|
406
407
|
}),
|
|
407
408
|
describe: describe_role_grant_offer_notification_ws_tests,
|
|
408
409
|
required: { setup_test: true, capabilities: true, base_url: true, ws_path: true }
|