@fuzdev/fuz_app 0.104.0 → 0.105.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 +2 -2
- package/dist/actions/action_bridge.d.ts.map +1 -1
- package/dist/actions/action_bridge.js +2 -2
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +3 -3
- package/dist/actions/action_dispatcher.d.ts.map +1 -1
- package/dist/actions/action_dispatcher.js +3 -3
- package/dist/actions/action_event.d.ts.map +1 -1
- package/dist/actions/action_event.js +11 -11
- package/dist/actions/action_event_data.d.ts.map +1 -1
- package/dist/actions/action_event_data.js +2 -2
- package/dist/actions/action_event_helpers.d.ts.map +1 -1
- package/dist/actions/action_event_helpers.js +2 -2
- package/dist/actions/action_event_types.d.ts.map +1 -1
- package/dist/actions/action_event_types.js +4 -4
- package/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +13 -13
- package/dist/actions/action_spec.d.ts.map +1 -1
- package/dist/actions/action_spec.js +6 -6
- package/dist/actions/action_types.d.ts.map +1 -1
- package/dist/actions/broadcast_api.d.ts.map +1 -1
- package/dist/actions/broadcast_api.js +1 -1
- package/dist/actions/cancel.d.ts.map +1 -1
- package/dist/actions/cancel.js +3 -3
- package/dist/actions/compile_action_registry.d.ts.map +1 -1
- package/dist/actions/frontend_rpc_client.d.ts.map +1 -1
- package/dist/actions/frontend_rpc_client.js +3 -3
- package/dist/actions/heartbeat.d.ts.map +1 -1
- package/dist/actions/heartbeat.js +2 -2
- package/dist/actions/peer_ping.d.ts.map +1 -1
- package/dist/actions/peer_ping.js +6 -6
- package/dist/actions/peer_request.d.ts.map +1 -1
- package/dist/actions/perform_action.d.ts.map +1 -1
- package/dist/actions/perform_action.js +13 -13
- package/dist/actions/protocol.d.ts.map +1 -1
- package/dist/actions/protocol.js +1 -1
- package/dist/actions/register_action_ws.d.ts.map +1 -1
- package/dist/actions/register_action_ws.js +14 -11
- package/dist/actions/register_ws_endpoint.d.ts.map +1 -1
- package/dist/actions/register_ws_endpoint.js +3 -3
- package/dist/actions/request_tracker.svelte.d.ts.map +1 -1
- package/dist/actions/request_tracker.svelte.js +2 -2
- package/dist/actions/rpc_client.d.ts.map +1 -1
- package/dist/actions/rpc_client.js +7 -7
- package/dist/actions/socket.svelte.d.ts.map +1 -1
- package/dist/actions/socket.svelte.js +4 -3
- package/dist/actions/transports.d.ts.map +1 -1
- package/dist/actions/transports_http.d.ts.map +1 -1
- package/dist/actions/transports_http.js +7 -7
- package/dist/actions/transports_ws.d.ts.map +1 -1
- package/dist/actions/transports_ws.js +3 -3
- package/dist/actions/transports_ws_auth_guard.d.ts +4 -4
- package/dist/actions/transports_ws_auth_guard.d.ts.map +1 -1
- package/dist/actions/transports_ws_auth_guard.js +5 -5
- package/dist/actions/transports_ws_backend.d.ts.map +1 -1
- package/dist/actions/transports_ws_backend.js +2 -2
- package/dist/actions/ws_endpoint_spec.d.ts +2 -2
- package/dist/actions/ws_endpoint_spec.d.ts.map +1 -1
- package/dist/auth/CLAUDE.md +11 -7
- package/dist/auth/account_action_specs.d.ts +4 -4
- package/dist/auth/account_action_specs.d.ts.map +1 -1
- package/dist/auth/account_action_specs.js +18 -19
- package/dist/auth/account_actions.d.ts +3 -3
- package/dist/auth/account_actions.d.ts.map +1 -1
- package/dist/auth/account_actions.js +10 -10
- package/dist/auth/account_queries.d.ts.map +1 -1
- package/dist/auth/account_queries.js +6 -6
- package/dist/auth/account_route_schema.d.ts.map +1 -1
- package/dist/auth/account_route_schema.js +19 -19
- package/dist/auth/account_routes.d.ts +2 -2
- package/dist/auth/account_routes.d.ts.map +1 -1
- package/dist/auth/account_routes.js +27 -27
- package/dist/auth/account_schema.d.ts +13 -2
- package/dist/auth/account_schema.d.ts.map +1 -1
- package/dist/auth/account_schema.js +22 -11
- package/dist/auth/actor_lookup_action_specs.d.ts.map +1 -1
- package/dist/auth/actor_lookup_action_specs.js +5 -5
- package/dist/auth/actor_lookup_actions.d.ts +4 -2
- package/dist/auth/actor_lookup_actions.d.ts.map +1 -1
- package/dist/auth/actor_lookup_actions.js +3 -3
- package/dist/auth/actor_lookup_queries.d.ts.map +1 -1
- package/dist/auth/actor_search_action_specs.d.ts.map +1 -1
- package/dist/auth/actor_search_action_specs.js +6 -6
- package/dist/auth/actor_search_actions.d.ts +4 -2
- package/dist/auth/actor_search_actions.d.ts.map +1 -1
- package/dist/auth/actor_search_actions.js +5 -5
- package/dist/auth/actor_search_queries.d.ts.map +1 -1
- package/dist/auth/admin_action_specs.d.ts +2 -2
- package/dist/auth/admin_action_specs.d.ts.map +1 -1
- package/dist/auth/admin_action_specs.js +55 -55
- package/dist/auth/admin_actions.d.ts +5 -5
- package/dist/auth/admin_actions.d.ts.map +1 -1
- package/dist/auth/admin_actions.js +45 -44
- package/dist/auth/all_action_spec_registries.d.ts.map +1 -1
- package/dist/auth/all_action_spec_registries.js +1 -1
- package/dist/auth/all_cell_actions.d.ts.map +1 -1
- package/dist/auth/all_cell_actions.js +1 -1
- package/dist/auth/api_token.d.ts.map +1 -1
- package/dist/auth/api_token_queries.d.ts +7 -2
- package/dist/auth/api_token_queries.d.ts.map +1 -1
- package/dist/auth/api_token_queries.js +8 -3
- package/dist/auth/app_settings_queries.d.ts.map +1 -1
- package/dist/auth/app_settings_schema.d.ts.map +1 -1
- package/dist/auth/app_settings_schema.js +3 -3
- package/dist/auth/audit_emitter.d.ts +28 -20
- package/dist/auth/audit_emitter.d.ts.map +1 -1
- package/dist/auth/audit_emitter.js +37 -19
- package/dist/auth/audit_log_ddl.js +1 -1
- package/dist/auth/audit_log_queries.d.ts.map +1 -1
- package/dist/auth/audit_log_queries.js +2 -2
- package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_route_schema.js +1 -1
- package/dist/auth/audit_log_routes.d.ts.map +1 -1
- package/dist/auth/audit_log_routes.js +3 -3
- package/dist/auth/audit_log_schema.d.ts +2 -2
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +69 -68
- package/dist/auth/auth_ddl.js +3 -3
- package/dist/auth/auth_guard_resolver.d.ts.map +1 -1
- package/dist/auth/bearer_auth.d.ts.map +1 -1
- package/dist/auth/bootstrap_account.d.ts.map +1 -1
- package/dist/auth/bootstrap_account.js +5 -5
- package/dist/auth/bootstrap_route_schema.d.ts.map +1 -1
- package/dist/auth/bootstrap_route_schema.js +6 -6
- package/dist/auth/bootstrap_routes.d.ts.map +1 -1
- package/dist/auth/bootstrap_routes.js +7 -7
- package/dist/auth/cell_action_specs.d.ts +1 -1
- package/dist/auth/cell_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_action_specs.js +47 -47
- package/dist/auth/cell_actions.d.ts +2 -2
- package/dist/auth/cell_actions.d.ts.map +1 -1
- package/dist/auth/cell_actions.js +37 -37
- package/dist/auth/cell_audit_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_audit_action_specs.js +4 -4
- package/dist/auth/cell_audit_actions.d.ts.map +1 -1
- package/dist/auth/cell_audit_actions.js +3 -3
- package/dist/auth/cell_audit_events.d.ts.map +1 -1
- package/dist/auth/cell_audit_events.js +5 -5
- package/dist/auth/cell_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_audit_metadata.js +3 -3
- package/dist/auth/cell_authorize.d.ts.map +1 -1
- package/dist/auth/cell_data_schema.d.ts.map +1 -1
- package/dist/auth/cell_data_schema.js +1 -1
- package/dist/auth/cell_field_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_field_action_specs.js +16 -16
- package/dist/auth/cell_field_actions.d.ts +2 -2
- package/dist/auth/cell_field_actions.d.ts.map +1 -1
- package/dist/auth/cell_field_actions.js +11 -11
- package/dist/auth/cell_field_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_field_audit_metadata.js +2 -2
- package/dist/auth/cell_grant_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_grant_action_specs.js +15 -15
- package/dist/auth/cell_grant_actions.d.ts +2 -2
- package/dist/auth/cell_grant_actions.d.ts.map +1 -1
- package/dist/auth/cell_grant_actions.js +12 -12
- package/dist/auth/cell_grant_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_grant_audit_metadata.js +3 -3
- package/dist/auth/cell_item_action_specs.d.ts +6 -2
- package/dist/auth/cell_item_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_item_action_specs.js +25 -21
- package/dist/auth/cell_item_actions.d.ts +2 -2
- package/dist/auth/cell_item_actions.d.ts.map +1 -1
- package/dist/auth/cell_item_actions.js +14 -14
- package/dist/auth/cell_item_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_item_audit_metadata.js +3 -3
- package/dist/auth/cell_relation_visibility.d.ts.map +1 -1
- package/dist/auth/cleanup.d.ts.map +1 -1
- package/dist/auth/cleanup.js +2 -2
- package/dist/auth/credential_type_schema.d.ts.map +1 -1
- package/dist/auth/credential_type_schema.js +5 -5
- package/dist/auth/daemon_token.d.ts.map +1 -1
- package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
- package/dist/auth/daemon_token_middleware.js +2 -2
- package/dist/auth/deps.d.ts +20 -5
- package/dist/auth/deps.d.ts.map +1 -1
- package/dist/auth/grant_path_schema.d.ts.map +1 -1
- package/dist/auth/grant_path_schema.js +8 -8
- package/dist/auth/invite_queries.d.ts.map +1 -1
- package/dist/auth/invite_schema.d.ts.map +1 -1
- package/dist/auth/invite_schema.js +2 -2
- package/dist/auth/keyring.d.ts.map +1 -1
- package/dist/auth/keyring.js +1 -1
- package/dist/auth/middleware.d.ts.map +1 -1
- package/dist/auth/middleware.js +7 -7
- package/dist/auth/migrations.d.ts.map +1 -1
- package/dist/auth/migrations.js +22 -20
- package/dist/auth/password.d.ts.map +1 -1
- package/dist/auth/password_argon2.d.ts.map +1 -1
- package/dist/auth/password_argon2.js +2 -2
- package/dist/auth/request_context.d.ts.map +1 -1
- package/dist/auth/request_context.js +7 -7
- package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_action_specs.js +35 -35
- package/dist/auth/role_grant_offer_actions.d.ts +7 -4
- package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_actions.js +43 -43
- package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_notifications.js +13 -13
- package/dist/auth/role_grant_offer_queries.d.ts +1 -1
- package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_queries.js +11 -11
- package/dist/auth/role_grant_offer_schema.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_schema.js +7 -7
- package/dist/auth/role_grant_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_queries.js +3 -3
- package/dist/auth/role_schema.d.ts.map +1 -1
- package/dist/auth/role_schema.js +7 -7
- package/dist/auth/scope_kind_schema.d.ts.map +1 -1
- package/dist/auth/self_service_role_action_specs.d.ts.map +1 -1
- package/dist/auth/self_service_role_action_specs.js +5 -5
- package/dist/auth/self_service_role_actions.d.ts +3 -3
- package/dist/auth/self_service_role_actions.d.ts.map +1 -1
- package/dist/auth/self_service_role_actions.js +9 -9
- package/dist/auth/session_cookie.d.ts.map +1 -1
- package/dist/auth/session_cookie.js +3 -3
- package/dist/auth/session_middleware.d.ts.map +1 -1
- package/dist/auth/session_middleware.js +4 -4
- package/dist/auth/session_queries.d.ts +14 -4
- package/dist/auth/session_queries.d.ts.map +1 -1
- package/dist/auth/session_queries.js +13 -3
- package/dist/auth/signup_route_schema.d.ts.map +1 -1
- package/dist/auth/signup_route_schema.js +6 -6
- package/dist/auth/signup_routes.d.ts.map +1 -1
- package/dist/auth/signup_routes.js +11 -11
- package/dist/auth/standard_action_specs.d.ts.map +1 -1
- package/dist/auth/standard_action_specs.js +1 -1
- package/dist/auth/standard_rpc_actions.d.ts +4 -4
- package/dist/auth/standard_rpc_actions.d.ts.map +1 -1
- package/dist/auth/standard_rpc_actions.js +3 -3
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/daemon.d.ts.map +1 -1
- package/dist/cli/daemon.js +3 -3
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli/logger.d.ts.map +1 -1
- package/dist/cli/logger.js +1 -1
- package/dist/cli/util.d.ts.map +1 -1
- package/dist/cli/util.js +1 -1
- package/dist/db/cell_audit_queries.d.ts.map +1 -1
- package/dist/db/cell_audit_queries.js +1 -1
- package/dist/db/cell_ddl.d.ts.map +1 -1
- package/dist/db/cell_ddl.js +7 -7
- package/dist/db/cell_field_queries.d.ts.map +1 -1
- package/dist/db/cell_grant_queries.d.ts.map +1 -1
- package/dist/db/cell_grant_queries.js +1 -1
- package/dist/db/cell_history_ddl.d.ts.map +1 -1
- package/dist/db/cell_history_ddl.js +4 -4
- package/dist/db/cell_item_queries.d.ts.map +1 -1
- package/dist/db/cell_queries.d.ts +1 -1
- package/dist/db/cell_queries.d.ts.map +1 -1
- package/dist/db/cell_queries.js +3 -3
- package/dist/db/create_db.d.ts.map +1 -1
- package/dist/db/create_db.js +1 -1
- package/dist/db/db.d.ts.map +1 -1
- package/dist/db/db_pg.d.ts.map +1 -1
- package/dist/db/db_pg.js +1 -1
- package/dist/db/db_pglite.d.ts.map +1 -1
- package/dist/db/db_pglite.js +1 -1
- package/dist/db/fact_ddl.d.ts.map +1 -1
- package/dist/db/fact_ddl.js +3 -3
- package/dist/db/fact_disk_storage.d.ts +1 -1
- package/dist/db/fact_disk_storage.d.ts.map +1 -1
- package/dist/db/fact_disk_storage.js +6 -6
- package/dist/db/fact_queries.d.ts +1 -1
- package/dist/db/fact_queries.d.ts.map +1 -1
- package/dist/db/fact_queries.js +2 -2
- package/dist/db/fact_store.d.ts +1 -1
- package/dist/db/fact_store.d.ts.map +1 -1
- package/dist/db/fact_store.js +9 -9
- package/dist/db/fact_store_errors.d.ts.map +1 -1
- package/dist/db/file_fact_url.d.ts +1 -1
- package/dist/db/file_fact_url.d.ts.map +1 -1
- package/dist/db/file_fact_url.js +1 -1
- package/dist/db/migrate.d.ts.map +1 -1
- package/dist/db/pg_error.d.ts.map +1 -1
- package/dist/db/query_deps.d.ts.map +1 -1
- package/dist/db/schema_ready.d.ts.map +1 -1
- package/dist/db/schema_ready.js +2 -2
- package/dist/db/status.d.ts.map +1 -1
- package/dist/db/status.js +6 -6
- package/dist/dev/setup.d.ts.map +1 -1
- package/dist/dev/setup.js +6 -6
- package/dist/env/dotenv.d.ts.map +1 -1
- package/dist/env/load.d.ts.map +1 -1
- package/dist/env/resolve.d.ts.map +1 -1
- package/dist/hono_context.d.ts.map +1 -1
- package/dist/hono_context.js +2 -2
- package/dist/http/auth_shape.d.ts.map +1 -1
- package/dist/http/auth_shape.js +6 -6
- package/dist/http/client_ip.d.ts.map +1 -1
- package/dist/http/common_routes.d.ts.map +1 -1
- package/dist/http/common_routes.js +8 -8
- package/dist/http/db_routes.d.ts.map +1 -1
- package/dist/http/db_routes.js +27 -23
- package/dist/http/error_schemas.d.ts +1 -1
- package/dist/http/error_schemas.d.ts.map +1 -1
- package/dist/http/error_schemas.js +13 -13
- package/dist/http/jsonrpc.d.ts.map +1 -1
- package/dist/http/jsonrpc.js +9 -9
- package/dist/http/jsonrpc_errors.d.ts.map +1 -1
- package/dist/http/jsonrpc_errors.js +21 -21
- package/dist/http/jsonrpc_helpers.d.ts.map +1 -1
- package/dist/http/jsonrpc_helpers.js +7 -7
- package/dist/http/middleware_spec.d.ts.map +1 -1
- package/dist/http/origin.d.ts.map +1 -1
- package/dist/http/pending_effects.d.ts.map +1 -1
- package/dist/http/proxy.d.ts.map +1 -1
- package/dist/http/proxy.js +1 -1
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +6 -6
- package/dist/http/schema_helpers.d.ts.map +1 -1
- package/dist/http/schema_helpers.js +1 -1
- package/dist/http/surface.d.ts.map +1 -1
- package/dist/http/surface.js +11 -11
- package/dist/http/surface_query.d.ts.map +1 -1
- package/dist/http/surface_query.js +1 -1
- package/dist/primitive_schemas.d.ts.map +1 -1
- package/dist/primitive_schemas.js +1 -1
- package/dist/rate_limiter.d.ts.map +1 -1
- package/dist/rate_limiter.js +4 -4
- package/dist/realtime/sse.d.ts.map +1 -1
- package/dist/realtime/sse.js +2 -2
- package/dist/realtime/sse_auth_guard.d.ts +4 -4
- package/dist/realtime/sse_auth_guard.d.ts.map +1 -1
- package/dist/realtime/sse_auth_guard.js +8 -8
- package/dist/realtime/subscriber_registry.d.ts.map +1 -1
- package/dist/runtime/deno.d.ts.map +1 -1
- package/dist/runtime/deno.js +7 -7
- package/dist/runtime/deps.d.ts.map +1 -1
- package/dist/runtime/fs.d.ts.map +1 -1
- package/dist/runtime/mock.d.ts.map +1 -1
- package/dist/runtime/mock.js +3 -3
- package/dist/runtime/node.d.ts.map +1 -1
- package/dist/runtime/node.js +7 -7
- package/dist/schema_meta.d.ts.map +1 -1
- package/dist/server/app_backend.d.ts +3 -3
- package/dist/server/app_backend.d.ts.map +1 -1
- package/dist/server/app_backend.js +3 -3
- package/dist/server/app_server.d.ts +6 -6
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/server/app_server.js +32 -32
- package/dist/server/app_server_context.d.ts.map +1 -1
- package/dist/server/env.d.ts.map +1 -1
- package/dist/server/env.js +9 -9
- package/dist/server/fact_write.d.ts +1 -1
- package/dist/server/fact_write.d.ts.map +1 -1
- package/dist/server/fact_write.js +2 -1
- package/dist/server/file_fact_fetcher.d.ts.map +1 -1
- package/dist/server/file_fact_fetcher.js +1 -1
- package/dist/server/serve_fact_route.d.ts.map +1 -1
- package/dist/server/serve_fact_route.js +15 -13
- package/dist/server/startup.d.ts.map +1 -1
- package/dist/server/static.d.ts.map +1 -1
- package/dist/server/validate_nginx.js +1 -1
- package/dist/server/x_accel.d.ts.map +1 -1
- package/dist/server/x_accel.js +1 -1
- package/dist/testing/CLAUDE.md +2 -2
- package/dist/testing/admin_integration.d.ts.map +1 -1
- package/dist/testing/admin_integration.js +62 -62
- package/dist/testing/adversarial_404.d.ts.map +1 -1
- package/dist/testing/adversarial_404.js +1 -1
- package/dist/testing/adversarial_headers.d.ts.map +1 -1
- package/dist/testing/adversarial_headers.js +15 -15
- package/dist/testing/adversarial_input.d.ts.map +1 -1
- package/dist/testing/adversarial_input.js +22 -22
- package/dist/testing/app_server.d.ts.map +1 -1
- package/dist/testing/app_server.js +32 -32
- package/dist/testing/assertions.d.ts.map +1 -1
- package/dist/testing/attack_surface.d.ts.map +1 -1
- package/dist/testing/attack_surface.js +12 -12
- package/dist/testing/audit_completeness.d.ts.map +1 -1
- package/dist/testing/audit_completeness.js +41 -41
- package/dist/testing/audit_drift_guard.d.ts +3 -1
- package/dist/testing/audit_drift_guard.d.ts.map +1 -1
- package/dist/testing/audit_drift_guard.js +12 -6
- package/dist/testing/auth_apps.d.ts.map +1 -1
- package/dist/testing/auth_apps.js +4 -4
- package/dist/testing/bootstrap_success.d.ts.map +1 -1
- package/dist/testing/bootstrap_success.js +11 -11
- package/dist/testing/connection_closer_helpers.d.ts.map +1 -1
- package/dist/testing/connection_closer_helpers.js +1 -1
- package/dist/testing/cross_backend/account_lifecycle.d.ts.map +1 -1
- package/dist/testing/cross_backend/account_lifecycle.js +1 -1
- package/dist/testing/cross_backend/action_manifest.d.ts.map +1 -1
- package/dist/testing/cross_backend/action_manifest.js +4 -4
- package/dist/testing/cross_backend/action_manifest_parity.d.ts.map +1 -1
- package/dist/testing/cross_backend/actor_lookup.d.ts.map +1 -1
- package/dist/testing/cross_backend/actor_lookup.js +3 -3
- package/dist/testing/cross_backend/actor_search.d.ts.map +1 -1
- package/dist/testing/cross_backend/actor_search.js +5 -5
- package/dist/testing/cross_backend/app_settings.d.ts.map +1 -1
- package/dist/testing/cross_backend/app_settings.js +6 -6
- package/dist/testing/cross_backend/backend_config.d.ts.map +1 -1
- package/dist/testing/cross_backend/bench/bench_report.d.ts.map +1 -1
- package/dist/testing/cross_backend/bench/bench_report.js +5 -5
- package/dist/testing/cross_backend/bench/run_cross_impl_bench.d.ts.map +1 -1
- package/dist/testing/cross_backend/bench/run_cross_impl_bench.js +2 -2
- package/dist/testing/cross_backend/bench/scenario.d.ts.map +1 -1
- package/dist/testing/cross_backend/bench/scenario.js +1 -1
- package/dist/testing/cross_backend/body_size.d.ts.map +1 -1
- package/dist/testing/cross_backend/body_size.js +1 -1
- package/dist/testing/cross_backend/bootstrap_backend.d.ts.map +1 -1
- package/dist/testing/cross_backend/bootstrap_backend.js +2 -2
- package/dist/testing/cross_backend/build_test_backend_paths.js +1 -1
- package/dist/testing/cross_backend/capabilities.js +2 -2
- package/dist/testing/cross_backend/cell_cross_helpers.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_crud.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_crud.js +5 -2
- package/dist/testing/cross_backend/cell_gated_create.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_gated_create.js +8 -7
- package/dist/testing/cross_backend/cell_grant_role.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_grant_role.js +2 -2
- package/dist/testing/cross_backend/cell_relations.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_relations.js +13 -13
- package/dist/testing/cross_backend/conformance_case.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_case.js +11 -11
- package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_table.js +11 -11
- package/dist/testing/cross_backend/cookie_attributes.d.ts.map +1 -1
- package/dist/testing/cross_backend/cookie_attributes.js +4 -4
- package/dist/testing/cross_backend/create_cross_backend_global_setup.d.ts +1 -1
- package/dist/testing/cross_backend/create_cross_backend_global_setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/create_cross_backend_global_setup.js +1 -1
- package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts +1 -1
- package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/create_dual_spawn_global_setup.js +1 -1
- package/dist/testing/cross_backend/credential_header_robustness.js +1 -1
- package/dist/testing/cross_backend/default_backend_configs.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_backend_configs.js +12 -12
- package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_spine_surface.js +9 -9
- package/dist/testing/cross_backend/fact_serving.d.ts.map +1 -1
- package/dist/testing/cross_backend/fact_serving.js +2 -2
- 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/identity_parity.d.ts.map +1 -1
- package/dist/testing/cross_backend/identity_parity.js +28 -24
- package/dist/testing/cross_backend/in_process_setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/in_process_setup.js +9 -9
- package/dist/testing/cross_backend/login_security.d.ts.map +1 -1
- package/dist/testing/cross_backend/login_security.js +2 -2
- package/dist/testing/cross_backend/make_cross_backend_project.d.ts +1 -1
- package/dist/testing/cross_backend/make_cross_backend_project.d.ts.map +1 -1
- package/dist/testing/cross_backend/make_cross_backend_project.js +3 -3
- package/dist/testing/cross_backend/method_coverage.d.ts.map +1 -1
- package/dist/testing/cross_backend/origin.d.ts.map +1 -1
- package/dist/testing/cross_backend/origin.js +4 -4
- package/dist/testing/cross_backend/peer_ping_ws.d.ts.map +1 -1
- package/dist/testing/cross_backend/peer_ping_ws.js +6 -6
- package/dist/testing/cross_backend/ready.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_enumeration.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_enumeration.js +1 -1
- 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 +1 -1
- package/dist/testing/cross_backend/role_grant_participation.d.ts.map +1 -1
- package/dist/testing/cross_backend/rust_spine_stub_backend_config.d.ts.map +1 -1
- package/dist/testing/cross_backend/rust_spine_stub_backend_config.js +5 -5
- package/dist/testing/cross_backend/setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/setup.js +36 -36
- package/dist/testing/cross_backend/spawn_backend.d.ts.map +1 -1
- package/dist/testing/cross_backend/spawn_backend.js +1 -1
- package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/sse_round_trip.js +10 -7
- package/dist/testing/cross_backend/standard.d.ts.map +1 -1
- package/dist/testing/cross_backend/standard.js +5 -5
- package/dist/testing/cross_backend/testing_backdoor.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_backdoor.js +7 -7
- package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_reset_actions.js +24 -23
- package/dist/testing/cross_backend/testing_server_bun.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_bun.js +3 -3
- package/dist/testing/cross_backend/testing_server_core.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_core.js +1 -1
- package/dist/testing/cross_backend/testing_server_deno.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_deno.js +1 -1
- package/dist/testing/cross_backend/testing_server_node.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_node.js +3 -3
- package/dist/testing/cross_backend/ts_spine_backend_config.d.ts.map +1 -1
- package/dist/testing/cross_backend/ts_spine_backend_config.js +13 -13
- package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_round_trip.js +2 -2
- package/dist/testing/data_exposure.d.ts.map +1 -1
- package/dist/testing/data_exposure.js +8 -8
- package/dist/testing/db.d.ts.map +1 -1
- package/dist/testing/db.js +3 -3
- package/dist/testing/db_entities.d.ts.map +1 -1
- package/dist/testing/db_entities.js +1 -1
- package/dist/testing/entities.d.ts.map +1 -1
- package/dist/testing/entities.js +5 -5
- package/dist/testing/error_coverage.d.ts.map +1 -1
- package/dist/testing/integration.d.ts.map +1 -1
- package/dist/testing/integration.js +106 -106
- package/dist/testing/integration_helpers.d.ts.map +1 -1
- package/dist/testing/integration_helpers.js +3 -3
- package/dist/testing/middleware.d.ts.map +1 -1
- package/dist/testing/middleware.js +11 -11
- package/dist/testing/mock_fs.js +1 -1
- package/dist/testing/rate_limiting.d.ts.map +1 -1
- package/dist/testing/rate_limiting.js +23 -23
- package/dist/testing/role_grant_helpers.d.ts.map +1 -1
- package/dist/testing/role_grant_helpers.js +3 -3
- package/dist/testing/round_trip.d.ts.map +1 -1
- package/dist/testing/round_trip.js +6 -6
- package/dist/testing/rpc_attack_surface.d.ts.map +1 -1
- package/dist/testing/rpc_attack_surface.js +12 -12
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +11 -11
- package/dist/testing/rpc_round_trip.d.ts.map +1 -1
- package/dist/testing/rpc_round_trip.js +3 -3
- package/dist/testing/schema_generators.d.ts.map +1 -1
- package/dist/testing/schema_generators.js +3 -3
- package/dist/testing/schema_introspect.d.ts.map +1 -1
- package/dist/testing/schema_introspect.js +12 -12
- package/dist/testing/schema_parity.d.ts.map +1 -1
- package/dist/testing/schema_parity.js +7 -7
- package/dist/testing/schema_ready_fixture.d.ts.map +1 -1
- package/dist/testing/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/sse_round_trip.js +8 -8
- package/dist/testing/standard.d.ts.map +1 -1
- package/dist/testing/standard.js +8 -8
- package/dist/testing/stubs.d.ts +6 -6
- package/dist/testing/stubs.d.ts.map +1 -1
- package/dist/testing/stubs.js +26 -23
- package/dist/testing/surface_invariants.d.ts.map +1 -1
- package/dist/testing/surface_invariants.js +5 -5
- package/dist/testing/testing_rate_limiter.d.ts.map +1 -1
- package/dist/testing/transports/bootstrap.d.ts.map +1 -1
- package/dist/testing/transports/bootstrap.js +4 -4
- package/dist/testing/transports/fetch_transport.d.ts.map +1 -1
- package/dist/testing/transports/sse_frame_reader.d.ts.map +1 -1
- package/dist/testing/transports/sse_transport.js +1 -1
- package/dist/testing/transports/ws_client.d.ts.map +1 -1
- package/dist/testing/transports/ws_client.js +1 -1
- package/dist/testing/transports/ws_transport.js +4 -4
- package/dist/testing/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/ws_round_trip.js +21 -21
- package/dist/ui/AccountSessions.svelte +11 -11
- package/dist/ui/AdminAccounts.svelte +10 -10
- package/dist/ui/AdminAuditLog.svelte +14 -14
- package/dist/ui/AdminInvites.svelte +13 -13
- package/dist/ui/AdminOverview.svelte +22 -22
- package/dist/ui/AdminRoleGrantHistory.svelte +11 -11
- package/dist/ui/AdminSessions.svelte +12 -12
- package/dist/ui/AdminSettings.svelte +1 -1
- package/dist/ui/AdminSurface.svelte +3 -3
- package/dist/ui/AppShell.svelte +8 -8
- package/dist/ui/AppShell.svelte.d.ts.map +1 -1
- package/dist/ui/BootstrapForm.svelte +9 -9
- package/dist/ui/CLAUDE.md +1 -1
- package/dist/ui/ColumnLayout.svelte +2 -2
- package/dist/ui/ColumnLayout.svelte.d.ts.map +1 -1
- package/dist/ui/ConfirmButton.svelte +8 -8
- package/dist/ui/ConfirmButton.svelte.d.ts.map +1 -1
- package/dist/ui/Datatable.svelte +6 -6
- package/dist/ui/Datatable.svelte.d.ts.map +1 -1
- package/dist/ui/LoginForm.svelte +6 -6
- package/dist/ui/LogoutButton.svelte +2 -2
- package/dist/ui/LogoutButton.svelte.d.ts.map +1 -1
- package/dist/ui/MenuLink.svelte +5 -5
- package/dist/ui/MenuLink.svelte.d.ts.map +1 -1
- package/dist/ui/OpenSignupToggle.svelte +2 -2
- package/dist/ui/PopoverButton.svelte +10 -10
- package/dist/ui/PopoverButton.svelte.d.ts.map +1 -1
- package/dist/ui/RoleGrantOfferForm.svelte +8 -11
- package/dist/ui/RoleGrantOfferForm.svelte.d.ts.map +1 -1
- package/dist/ui/RoleGrantOfferHistory.svelte +11 -11
- package/dist/ui/RoleGrantOfferHistory.svelte.d.ts.map +1 -1
- package/dist/ui/RoleGrantOfferInbox.svelte +6 -6
- package/dist/ui/RoleGrantOfferInbox.svelte.d.ts.map +1 -1
- package/dist/ui/SignupForm.svelte +9 -9
- package/dist/ui/SurfaceExplorer.svelte +11 -11
- package/dist/ui/SurfaceExplorer.svelte.d.ts.map +1 -1
- package/dist/ui/account_sessions_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_accounts_state.svelte.js +2 -2
- package/dist/ui/admin_invites_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_rpc_adapters.d.ts.map +1 -1
- package/dist/ui/admin_rpc_adapters.js +5 -5
- package/dist/ui/admin_sessions_state.svelte.d.ts.map +1 -1
- package/dist/ui/app_settings_state.svelte.d.ts.map +1 -1
- package/dist/ui/async_slot.svelte.d.ts.map +1 -1
- package/dist/ui/audit_log_state.svelte.d.ts.map +1 -1
- package/dist/ui/audit_log_state.svelte.js +1 -1
- package/dist/ui/auth_state.svelte.js +4 -4
- package/dist/ui/form_state.svelte.d.ts.map +1 -1
- package/dist/ui/format_scope.d.ts.map +1 -1
- package/dist/ui/keyed_async_slot.svelte.d.ts.map +1 -1
- package/dist/ui/popover.svelte.d.ts.map +1 -1
- package/dist/ui/popover.svelte.js +1 -1
- package/dist/ui/position_helpers.js +1 -1
- package/dist/ui/role_grant_offers_state.svelte.d.ts.map +1 -1
- package/dist/ui/role_grant_offers_state.svelte.js +1 -1
- package/dist/ui/table_state.svelte.d.ts.map +1 -1
- package/dist/ui/ui_fetch.d.ts.map +1 -1
- package/dist/ui/ui_format.js +2 -2
- package/package.json +13 -12
|
@@ -31,11 +31,11 @@ import { GRANT_PATH_ADMIN } from '../auth/grant_path_schema.js';
|
|
|
31
31
|
import { DEFAULT_TEST_PASSWORD } from './test_credentials.js';
|
|
32
32
|
import { role_grant_offer_and_accept } from './role_grant_helpers.js';
|
|
33
33
|
import { find_auth_route } from './integration_helpers.js';
|
|
34
|
-
import { ErrorCoverageCollector, assert_error_coverage, DEFAULT_INTEGRATION_ERROR_COVERAGE
|
|
35
|
-
import { rpc_call_for_spec, require_rpc_endpoint_path, resolve_rpc_endpoints_for_setup
|
|
36
|
-
import { role_grant_offer_create_action_spec, role_grant_revoke_action_spec
|
|
37
|
-
import { admin_account_list_action_spec, ADMIN_ACCOUNT_LIST_LIMIT_MAX, admin_session_list_action_spec, admin_session_revoke_all_action_spec, admin_token_revoke_all_action_spec, audit_log_list_action_spec, audit_log_role_grant_history_action_spec
|
|
38
|
-
import { account_token_create_action_spec, account_verify_action_spec
|
|
34
|
+
import { ErrorCoverageCollector, assert_error_coverage, DEFAULT_INTEGRATION_ERROR_COVERAGE } from './error_coverage.js';
|
|
35
|
+
import { rpc_call_for_spec, require_rpc_endpoint_path, resolve_rpc_endpoints_for_setup } from './rpc_helpers.js';
|
|
36
|
+
import { role_grant_offer_create_action_spec, role_grant_revoke_action_spec } from '../auth/role_grant_offer_action_specs.js';
|
|
37
|
+
import { admin_account_list_action_spec, ADMIN_ACCOUNT_LIST_LIMIT_MAX, admin_session_list_action_spec, admin_session_revoke_all_action_spec, admin_token_revoke_all_action_spec, audit_log_list_action_spec, audit_log_role_grant_history_action_spec } from '../auth/admin_action_specs.js';
|
|
38
|
+
import { account_token_create_action_spec, account_verify_action_spec } from '../auth/account_action_specs.js';
|
|
39
39
|
/**
|
|
40
40
|
* Pick a role for admin-grant testing, preferring a non-admin app-defined
|
|
41
41
|
* role whose `RoleSpec.grant_paths` includes `'admin'` (the
|
|
@@ -96,7 +96,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
98
|
assert_error_coverage(error_collector, admin_routes, {
|
|
99
|
-
min_coverage: DEFAULT_INTEGRATION_ERROR_COVERAGE
|
|
99
|
+
min_coverage: DEFAULT_INTEGRATION_ERROR_COVERAGE
|
|
100
100
|
});
|
|
101
101
|
});
|
|
102
102
|
/** Make request headers for a given session cookie. */
|
|
@@ -104,7 +104,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
104
104
|
host: 'localhost',
|
|
105
105
|
origin: 'http://localhost:5173',
|
|
106
106
|
cookie: `${cookie_name}=${session_cookie}`,
|
|
107
|
-
...extra
|
|
107
|
+
...extra
|
|
108
108
|
});
|
|
109
109
|
/**
|
|
110
110
|
* Suite-local wrapper around `role_grant_offer_and_accept` that closes
|
|
@@ -130,7 +130,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
130
130
|
path: rpc_path,
|
|
131
131
|
spec: admin_account_list_action_spec,
|
|
132
132
|
params: { limit: ADMIN_ACCOUNT_LIST_LIMIT_MAX },
|
|
133
|
-
headers: fixture.create_session_headers()
|
|
133
|
+
headers: fixture.create_session_headers()
|
|
134
134
|
});
|
|
135
135
|
assert.ok(res.ok, `admin_account_list failed: ${res.ok ? '' : JSON.stringify(res.error)}`);
|
|
136
136
|
assert.ok(Array.isArray(res.result.accounts), 'Expected accounts array');
|
|
@@ -150,7 +150,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
150
150
|
path: rpc_path,
|
|
151
151
|
spec: admin_account_list_action_spec,
|
|
152
152
|
params: {},
|
|
153
|
-
headers: non_admin.create_session_headers()
|
|
153
|
+
headers: non_admin.create_session_headers()
|
|
154
154
|
});
|
|
155
155
|
assert.ok(!res.ok, 'Expected admin_account_list to fail for non-admin');
|
|
156
156
|
assert.strictEqual(res.status, 403);
|
|
@@ -178,7 +178,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
178
178
|
path: rpc_path,
|
|
179
179
|
spec: admin_account_list_action_spec,
|
|
180
180
|
params: {},
|
|
181
|
-
headers: non_admin_keeper.create_session_headers()
|
|
181
|
+
headers: non_admin_keeper.create_session_headers()
|
|
182
182
|
});
|
|
183
183
|
assert.ok(!res.ok, 'Expected admin_account_list to fail for keeper-only account');
|
|
184
184
|
assert.strictEqual(res.status, 403);
|
|
@@ -202,7 +202,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
202
202
|
path: rpc_path,
|
|
203
203
|
spec: admin_session_list_action_spec,
|
|
204
204
|
params: {},
|
|
205
|
-
headers: fixture.create_session_headers()
|
|
205
|
+
headers: fixture.create_session_headers()
|
|
206
206
|
});
|
|
207
207
|
assert.ok(res.ok, `admin_session_list failed: ${res.ok ? '' : JSON.stringify(res.error)}`);
|
|
208
208
|
assert.ok(Array.isArray(res.result.sessions), 'Expected sessions array');
|
|
@@ -217,7 +217,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
217
217
|
path: rpc_path,
|
|
218
218
|
spec: account_verify_action_spec,
|
|
219
219
|
params: undefined,
|
|
220
|
-
headers: create_headers(user_two.session_cookie)
|
|
220
|
+
headers: create_headers(user_two.session_cookie)
|
|
221
221
|
});
|
|
222
222
|
assert.strictEqual(before.status, 200);
|
|
223
223
|
// Admin revokes all sessions for user_two via RPC
|
|
@@ -226,7 +226,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
226
226
|
path: rpc_path,
|
|
227
227
|
spec: admin_session_revoke_all_action_spec,
|
|
228
228
|
params: { account_id: user_two.account.id },
|
|
229
|
-
headers: fixture.create_session_headers()
|
|
229
|
+
headers: fixture.create_session_headers()
|
|
230
230
|
});
|
|
231
231
|
assert.ok(res.ok, `admin_session_revoke_all failed: ${res.ok ? '' : JSON.stringify(res.error)}`);
|
|
232
232
|
assert.strictEqual(res.result.ok, true);
|
|
@@ -237,7 +237,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
237
237
|
path: rpc_path,
|
|
238
238
|
spec: account_verify_action_spec,
|
|
239
239
|
params: undefined,
|
|
240
|
-
headers: create_headers(user_two.session_cookie)
|
|
240
|
+
headers: create_headers(user_two.session_cookie)
|
|
241
241
|
});
|
|
242
242
|
assert.strictEqual(after.status, 401);
|
|
243
243
|
});
|
|
@@ -249,7 +249,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
249
249
|
path: rpc_path,
|
|
250
250
|
spec: admin_session_revoke_all_action_spec,
|
|
251
251
|
params: { account_id: fixture.account.id },
|
|
252
|
-
headers: fixture.create_session_headers()
|
|
252
|
+
headers: fixture.create_session_headers()
|
|
253
253
|
});
|
|
254
254
|
assert.ok(res.ok, `admin_session_revoke_all failed: ${res.ok ? '' : JSON.stringify(res.error)}`);
|
|
255
255
|
assert.strictEqual(res.result.ok, true);
|
|
@@ -260,7 +260,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
260
260
|
path: rpc_path,
|
|
261
261
|
spec: account_verify_action_spec,
|
|
262
262
|
params: undefined,
|
|
263
|
-
headers: fixture.create_session_headers()
|
|
263
|
+
headers: fixture.create_session_headers()
|
|
264
264
|
});
|
|
265
265
|
assert.strictEqual(after.status, 401);
|
|
266
266
|
});
|
|
@@ -282,7 +282,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
282
282
|
spec: account_verify_action_spec,
|
|
283
283
|
params: undefined,
|
|
284
284
|
headers: { authorization: `Bearer ${user_two.api_token}` },
|
|
285
|
-
suppress_default_origin: true
|
|
285
|
+
suppress_default_origin: true
|
|
286
286
|
});
|
|
287
287
|
assert.strictEqual(before.status, 200);
|
|
288
288
|
// Admin revokes all tokens for user_two via RPC
|
|
@@ -291,7 +291,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
291
291
|
path: rpc_path,
|
|
292
292
|
spec: admin_token_revoke_all_action_spec,
|
|
293
293
|
params: { account_id: user_two.account.id },
|
|
294
|
-
headers: fixture.create_session_headers()
|
|
294
|
+
headers: fixture.create_session_headers()
|
|
295
295
|
});
|
|
296
296
|
assert.ok(res.ok, `admin_token_revoke_all failed: ${res.ok ? '' : JSON.stringify(res.error)}`);
|
|
297
297
|
assert.strictEqual(res.result.ok, true);
|
|
@@ -304,7 +304,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
304
304
|
spec: account_verify_action_spec,
|
|
305
305
|
params: undefined,
|
|
306
306
|
headers: { authorization: `Bearer ${user_two.api_token}` },
|
|
307
|
-
suppress_default_origin: true
|
|
307
|
+
suppress_default_origin: true
|
|
308
308
|
});
|
|
309
309
|
assert.strictEqual(after.status, 401);
|
|
310
310
|
});
|
|
@@ -318,7 +318,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
318
318
|
path: rpc_path,
|
|
319
319
|
spec: audit_log_list_action_spec,
|
|
320
320
|
params: {},
|
|
321
|
-
headers: fixture.create_session_headers()
|
|
321
|
+
headers: fixture.create_session_headers()
|
|
322
322
|
});
|
|
323
323
|
assert.ok(res.ok, `audit_log_list failed: ${res.ok ? '' : JSON.stringify(res.error)}`);
|
|
324
324
|
assert.ok(Array.isArray(res.result.events), 'Expected events array');
|
|
@@ -333,7 +333,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
333
333
|
path: rpc_path,
|
|
334
334
|
spec: role_grant_offer_create_action_spec,
|
|
335
335
|
params: { to_account_id: user_two.account.id, role: grantable_role },
|
|
336
|
-
headers: fixture.create_session_headers()
|
|
336
|
+
headers: fixture.create_session_headers()
|
|
337
337
|
});
|
|
338
338
|
assert.ok(offer_res.ok, 'role_grant_offer_create should succeed');
|
|
339
339
|
const res = await rpc_call_for_spec({
|
|
@@ -341,7 +341,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
341
341
|
path: rpc_path,
|
|
342
342
|
spec: audit_log_list_action_spec,
|
|
343
343
|
params: { event_type: 'role_grant_offer_create' },
|
|
344
|
-
headers: fixture.create_session_headers()
|
|
344
|
+
headers: fixture.create_session_headers()
|
|
345
345
|
});
|
|
346
346
|
assert.ok(res.ok, `audit_log_list failed: ${res.ok ? '' : JSON.stringify(res.error)}`);
|
|
347
347
|
assert.ok(res.result.events.length >= 1, 'Expected at least 1 role_grant_offer_create event');
|
|
@@ -358,14 +358,14 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
358
358
|
app: { request: fixture.transport },
|
|
359
359
|
grantor: fixture,
|
|
360
360
|
recipient: user_two,
|
|
361
|
-
role: grantable_role
|
|
361
|
+
role: grantable_role
|
|
362
362
|
});
|
|
363
363
|
const res = await rpc_call_for_spec({
|
|
364
364
|
app: { request: fixture.transport },
|
|
365
365
|
path: rpc_path,
|
|
366
366
|
spec: audit_log_role_grant_history_action_spec,
|
|
367
367
|
params: {},
|
|
368
|
-
headers: fixture.create_session_headers()
|
|
368
|
+
headers: fixture.create_session_headers()
|
|
369
369
|
});
|
|
370
370
|
assert.ok(res.ok, `audit_log_role_grant_history failed: ${res.ok ? '' : JSON.stringify(res.error)}`);
|
|
371
371
|
assert.ok(res.result.events.length >= 1, 'Expected at least 1 role_grant history event');
|
|
@@ -387,7 +387,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
387
387
|
rpc_path,
|
|
388
388
|
grantor: fixture,
|
|
389
389
|
recipient: user_two,
|
|
390
|
-
role: grantable_role
|
|
390
|
+
role: grantable_role
|
|
391
391
|
});
|
|
392
392
|
// Revoke via RPC
|
|
393
393
|
const revoke_res = await rpc_call_for_spec({
|
|
@@ -395,7 +395,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
395
395
|
path: rpc_path,
|
|
396
396
|
spec: role_grant_revoke_action_spec,
|
|
397
397
|
params: { actor_id: user_two.actor.id, role_grant_id },
|
|
398
|
-
headers: fixture.create_session_headers()
|
|
398
|
+
headers: fixture.create_session_headers()
|
|
399
399
|
});
|
|
400
400
|
assert.ok(revoke_res.ok, `role_grant_revoke failed: ${revoke_res.ok ? '' : JSON.stringify(revoke_res.error)}`);
|
|
401
401
|
// Check audit log for role_grant_revoke event
|
|
@@ -404,7 +404,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
404
404
|
path: rpc_path,
|
|
405
405
|
spec: audit_log_list_action_spec,
|
|
406
406
|
params: { event_type: 'role_grant_revoke' },
|
|
407
|
-
headers: fixture.create_session_headers()
|
|
407
|
+
headers: fixture.create_session_headers()
|
|
408
408
|
});
|
|
409
409
|
assert.ok(audit_res.ok, `audit_log_list failed: ${audit_res.ok ? '' : JSON.stringify(audit_res.error)}`);
|
|
410
410
|
assert.ok(audit_res.result.events.length >= 1, 'Expected role_grant_revoke audit event');
|
|
@@ -419,7 +419,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
419
419
|
path: rpc_path,
|
|
420
420
|
spec: admin_session_revoke_all_action_spec,
|
|
421
421
|
params: { account_id: user_two.account.id },
|
|
422
|
-
headers: fixture.create_session_headers()
|
|
422
|
+
headers: fixture.create_session_headers()
|
|
423
423
|
});
|
|
424
424
|
assert.ok(revoke_res.ok, `admin_session_revoke_all failed: ${revoke_res.ok ? '' : JSON.stringify(revoke_res.error)}`);
|
|
425
425
|
// Check audit log
|
|
@@ -428,7 +428,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
428
428
|
path: rpc_path,
|
|
429
429
|
spec: audit_log_list_action_spec,
|
|
430
430
|
params: { event_type: 'session_revoke_all' },
|
|
431
|
-
headers: fixture.create_session_headers()
|
|
431
|
+
headers: fixture.create_session_headers()
|
|
432
432
|
});
|
|
433
433
|
assert.ok(audit_res.ok, 'audit_log_list should succeed');
|
|
434
434
|
assert.ok(audit_res.result.events.length >= 1, 'Expected session_revoke_all audit event');
|
|
@@ -443,7 +443,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
443
443
|
path: rpc_path,
|
|
444
444
|
spec: admin_token_revoke_all_action_spec,
|
|
445
445
|
params: { account_id: user_two.account.id },
|
|
446
|
-
headers: fixture.create_session_headers()
|
|
446
|
+
headers: fixture.create_session_headers()
|
|
447
447
|
});
|
|
448
448
|
assert.ok(revoke_res.ok, `admin_token_revoke_all failed: ${revoke_res.ok ? '' : JSON.stringify(revoke_res.error)}`);
|
|
449
449
|
// Check audit log
|
|
@@ -452,7 +452,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
452
452
|
path: rpc_path,
|
|
453
453
|
spec: audit_log_list_action_spec,
|
|
454
454
|
params: { event_type: 'token_revoke_all' },
|
|
455
|
-
headers: fixture.create_session_headers()
|
|
455
|
+
headers: fixture.create_session_headers()
|
|
456
456
|
});
|
|
457
457
|
assert.ok(audit_res.ok, 'audit_log_list should succeed');
|
|
458
458
|
assert.ok(audit_res.result.events.length >= 1, 'Expected token_revoke_all audit event');
|
|
@@ -468,7 +468,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
468
468
|
path: rpc_path,
|
|
469
469
|
spec: admin_session_revoke_all_action_spec,
|
|
470
470
|
params: { account_id: missing_id },
|
|
471
|
-
headers: fixture.create_session_headers()
|
|
471
|
+
headers: fixture.create_session_headers()
|
|
472
472
|
});
|
|
473
473
|
assert.ok(!res.ok, 'Expected 404 for missing account');
|
|
474
474
|
assert.strictEqual(res.status, 404);
|
|
@@ -481,7 +481,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
481
481
|
path: rpc_path,
|
|
482
482
|
spec: audit_log_list_action_spec,
|
|
483
483
|
params: { event_type: 'session_revoke_all' },
|
|
484
|
-
headers: fixture.create_session_headers()
|
|
484
|
+
headers: fixture.create_session_headers()
|
|
485
485
|
});
|
|
486
486
|
assert.ok(audit_res.ok, 'audit_log_list should succeed');
|
|
487
487
|
const failure = audit_res.result.events.find((e) => e.outcome === 'failure');
|
|
@@ -499,7 +499,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
499
499
|
path: rpc_path,
|
|
500
500
|
spec: admin_token_revoke_all_action_spec,
|
|
501
501
|
params: { account_id: missing_id },
|
|
502
|
-
headers: fixture.create_session_headers()
|
|
502
|
+
headers: fixture.create_session_headers()
|
|
503
503
|
});
|
|
504
504
|
assert.ok(!res.ok, 'Expected 404 for missing account');
|
|
505
505
|
assert.strictEqual(res.status, 404);
|
|
@@ -509,7 +509,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
509
509
|
path: rpc_path,
|
|
510
510
|
spec: audit_log_list_action_spec,
|
|
511
511
|
params: { event_type: 'token_revoke_all' },
|
|
512
|
-
headers: fixture.create_session_headers()
|
|
512
|
+
headers: fixture.create_session_headers()
|
|
513
513
|
});
|
|
514
514
|
assert.ok(audit_res.ok, 'audit_log_list should succeed');
|
|
515
515
|
const failure = audit_res.result.events.find((e) => e.outcome === 'failure');
|
|
@@ -546,12 +546,12 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
546
546
|
headers: {
|
|
547
547
|
host: 'localhost',
|
|
548
548
|
origin: 'http://localhost:5173',
|
|
549
|
-
'content-type': 'application/json'
|
|
549
|
+
'content-type': 'application/json'
|
|
550
550
|
},
|
|
551
551
|
body: JSON.stringify({
|
|
552
552
|
username: user_two.account.username,
|
|
553
|
-
password: DEFAULT_TEST_PASSWORD
|
|
554
|
-
})
|
|
553
|
+
password: DEFAULT_TEST_PASSWORD
|
|
554
|
+
})
|
|
555
555
|
});
|
|
556
556
|
assert.strictEqual(login_res.status, 200);
|
|
557
557
|
// extract user_two session cookie for logout
|
|
@@ -567,8 +567,8 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
567
567
|
headers: {
|
|
568
568
|
host: 'localhost',
|
|
569
569
|
origin: 'http://localhost:5173',
|
|
570
|
-
cookie: `${cookie_name}=${user_two_cookie}
|
|
571
|
-
}
|
|
570
|
+
cookie: `${cookie_name}=${user_two_cookie}`
|
|
571
|
+
}
|
|
572
572
|
});
|
|
573
573
|
}
|
|
574
574
|
// 3. offer role_grant (admin offers grantable_role to user_two) — full
|
|
@@ -578,7 +578,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
578
578
|
app: { request: fixture.transport },
|
|
579
579
|
grantor: fixture,
|
|
580
580
|
recipient: user_two,
|
|
581
|
-
role: grantable_role
|
|
581
|
+
role: grantable_role
|
|
582
582
|
});
|
|
583
583
|
// 4. revoke role_grant (RPC)
|
|
584
584
|
const revoke_res = await rpc_call_for_spec({
|
|
@@ -586,7 +586,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
586
586
|
path: rpc_path,
|
|
587
587
|
spec: role_grant_revoke_action_spec,
|
|
588
588
|
params: { actor_id: user_two.actor.id, role_grant_id },
|
|
589
|
-
headers: fixture.create_session_headers()
|
|
589
|
+
headers: fixture.create_session_headers()
|
|
590
590
|
});
|
|
591
591
|
assert.ok(revoke_res.ok, `role_grant_revoke failed: ${revoke_res.ok ? '' : JSON.stringify(revoke_res.error)}`);
|
|
592
592
|
// 5. create token (RPC)
|
|
@@ -595,19 +595,19 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
595
595
|
path: rpc_path,
|
|
596
596
|
spec: account_token_create_action_spec,
|
|
597
597
|
params: { name: 'audit-test-token' },
|
|
598
|
-
headers: fixture.create_session_headers()
|
|
598
|
+
headers: fixture.create_session_headers()
|
|
599
599
|
});
|
|
600
600
|
assert.ok(token_res.ok, `account_token_create failed: ${token_res.ok ? '' : JSON.stringify(token_res.error)}`);
|
|
601
601
|
// 6. password change
|
|
602
602
|
await fixture.transport(password_route.path, {
|
|
603
603
|
method: 'POST',
|
|
604
604
|
headers: fixture.create_session_headers({
|
|
605
|
-
'content-type': 'application/json'
|
|
605
|
+
'content-type': 'application/json'
|
|
606
606
|
}),
|
|
607
607
|
body: JSON.stringify({
|
|
608
608
|
current_password: DEFAULT_TEST_PASSWORD,
|
|
609
|
-
new_password: 'new-audit-password-789'
|
|
610
|
-
})
|
|
609
|
+
new_password: 'new-audit-password-789'
|
|
610
|
+
})
|
|
611
611
|
});
|
|
612
612
|
// query audit log and verify events
|
|
613
613
|
// re-login as admin since password change revoked sessions
|
|
@@ -616,12 +616,12 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
616
616
|
headers: {
|
|
617
617
|
host: 'localhost',
|
|
618
618
|
origin: 'http://localhost:5173',
|
|
619
|
-
'content-type': 'application/json'
|
|
619
|
+
'content-type': 'application/json'
|
|
620
620
|
},
|
|
621
621
|
body: JSON.stringify({
|
|
622
622
|
username: fixture.account.username,
|
|
623
|
-
password: 'new-audit-password-789'
|
|
624
|
-
})
|
|
623
|
+
password: 'new-audit-password-789'
|
|
624
|
+
})
|
|
625
625
|
});
|
|
626
626
|
assert.strictEqual(relogin_res.status, 200);
|
|
627
627
|
const relogin_cookie_header = relogin_res.headers.get('set-cookie');
|
|
@@ -630,14 +630,14 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
630
630
|
const relogin_headers = {
|
|
631
631
|
host: 'localhost',
|
|
632
632
|
origin: 'http://localhost:5173',
|
|
633
|
-
cookie: `${cookie_name}=${relogin_match[1]}
|
|
633
|
+
cookie: `${cookie_name}=${relogin_match[1]}`
|
|
634
634
|
};
|
|
635
635
|
const audit_res = await rpc_call_for_spec({
|
|
636
636
|
app: { request: fixture.transport },
|
|
637
637
|
path: rpc_path,
|
|
638
638
|
spec: audit_log_list_action_spec,
|
|
639
639
|
params: {},
|
|
640
|
-
headers: relogin_headers
|
|
640
|
+
headers: relogin_headers
|
|
641
641
|
});
|
|
642
642
|
assert.ok(audit_res.ok, `audit_log_list failed: ${audit_res.ok ? '' : JSON.stringify(audit_res.error)}`);
|
|
643
643
|
const events = audit_res.result.events;
|
|
@@ -652,7 +652,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
652
652
|
'role_grant_create',
|
|
653
653
|
'role_grant_revoke',
|
|
654
654
|
'token_create',
|
|
655
|
-
'password_change'
|
|
655
|
+
'password_change'
|
|
656
656
|
];
|
|
657
657
|
for (const event_type of expected_types) {
|
|
658
658
|
const found = events.filter((e) => e.event_type === event_type);
|
|
@@ -668,7 +668,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
668
668
|
// Bootstrap user is admin A. Create admin B.
|
|
669
669
|
const admin_b = await fixture.create_account({
|
|
670
670
|
username: 'admin_b_iso',
|
|
671
|
-
roles: ['admin']
|
|
671
|
+
roles: ['admin']
|
|
672
672
|
});
|
|
673
673
|
// Seed an active role_grant for admin B via the production
|
|
674
674
|
// consent flow. The revoke IDOR check is the subject of this
|
|
@@ -679,7 +679,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
679
679
|
rpc_path,
|
|
680
680
|
grantor: fixture,
|
|
681
681
|
recipient: admin_b,
|
|
682
|
-
role: grantable_role
|
|
682
|
+
role: grantable_role
|
|
683
683
|
});
|
|
684
684
|
// Admin B revokes their own role_grant via RPC — should succeed
|
|
685
685
|
const revoke_res = await rpc_call_for_spec({
|
|
@@ -687,7 +687,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
687
687
|
path: rpc_path,
|
|
688
688
|
spec: role_grant_revoke_action_spec,
|
|
689
689
|
params: { actor_id: admin_b.actor.id, role_grant_id },
|
|
690
|
-
headers: create_headers(admin_b.session_cookie)
|
|
690
|
+
headers: create_headers(admin_b.session_cookie)
|
|
691
691
|
});
|
|
692
692
|
assert.ok(revoke_res.ok, `role_grant_revoke failed: ${revoke_res.ok ? '' : JSON.stringify(revoke_res.error)}`);
|
|
693
693
|
assert.strictEqual(revoke_res.result.revoked, true);
|
|
@@ -696,7 +696,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
696
696
|
const fixture = await options.setup_test();
|
|
697
697
|
const admin_b = await fixture.create_account({
|
|
698
698
|
username: 'admin_b_sess',
|
|
699
|
-
roles: ['admin']
|
|
699
|
+
roles: ['admin']
|
|
700
700
|
});
|
|
701
701
|
// Admin A revokes all of admin B's sessions via RPC
|
|
702
702
|
const res = await rpc_call_for_spec({
|
|
@@ -704,7 +704,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
704
704
|
path: rpc_path,
|
|
705
705
|
spec: admin_session_revoke_all_action_spec,
|
|
706
706
|
params: { account_id: admin_b.account.id },
|
|
707
|
-
headers: fixture.create_session_headers()
|
|
707
|
+
headers: fixture.create_session_headers()
|
|
708
708
|
});
|
|
709
709
|
assert.ok(res.ok, `admin_session_revoke_all failed: ${res.ok ? '' : JSON.stringify(res.error)}`);
|
|
710
710
|
assert.ok(typeof res.result.count === 'number', 'Expected count field in response');
|
|
@@ -714,7 +714,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
714
714
|
const fixture = await options.setup_test();
|
|
715
715
|
const admin_b = await fixture.create_account({
|
|
716
716
|
username: 'admin_b_tok',
|
|
717
|
-
roles: ['admin']
|
|
717
|
+
roles: ['admin']
|
|
718
718
|
});
|
|
719
719
|
// Admin B creates an API token via RPC
|
|
720
720
|
const token_res = await rpc_call_for_spec({
|
|
@@ -722,7 +722,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
722
722
|
path: rpc_path,
|
|
723
723
|
spec: account_token_create_action_spec,
|
|
724
724
|
params: { name: 'admin-b-token' },
|
|
725
|
-
headers: create_headers(admin_b.session_cookie)
|
|
725
|
+
headers: create_headers(admin_b.session_cookie)
|
|
726
726
|
});
|
|
727
727
|
assert.ok(token_res.ok, `account_token_create failed: ${token_res.ok ? '' : JSON.stringify(token_res.error)}`);
|
|
728
728
|
// Admin A revokes all of admin B's tokens via RPC
|
|
@@ -731,7 +731,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
731
731
|
path: rpc_path,
|
|
732
732
|
spec: admin_token_revoke_all_action_spec,
|
|
733
733
|
params: { account_id: admin_b.account.id },
|
|
734
|
-
headers: fixture.create_session_headers()
|
|
734
|
+
headers: fixture.create_session_headers()
|
|
735
735
|
});
|
|
736
736
|
assert.ok(res.ok, `admin_token_revoke_all failed: ${res.ok ? '' : JSON.stringify(res.error)}`);
|
|
737
737
|
assert.ok(typeof res.result.count === 'number', 'Expected count field in response');
|
|
@@ -747,7 +747,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
747
747
|
path: rpc_path,
|
|
748
748
|
spec: admin_account_list_action_spec,
|
|
749
749
|
params: {},
|
|
750
|
-
headers: create_headers(regular_user.session_cookie)
|
|
750
|
+
headers: create_headers(regular_user.session_cookie)
|
|
751
751
|
});
|
|
752
752
|
assert.ok(!res.ok, 'Expected admin_account_list to fail for non-admin');
|
|
753
753
|
assert.strictEqual(res.status, 403);
|
|
@@ -768,7 +768,7 @@ export const describe_standard_admin_integration_tests = (options) => {
|
|
|
768
768
|
for (const route of admin_routes) {
|
|
769
769
|
const res = await fixture.transport(route.path, {
|
|
770
770
|
method: route.method,
|
|
771
|
-
headers: { host: 'localhost' }
|
|
771
|
+
headers: { host: 'localhost' }
|
|
772
772
|
});
|
|
773
773
|
if (res.status === 401 || res.status === 403) {
|
|
774
774
|
error_collector.record(route_specs, route.method, route.path, res.status);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adversarial_404.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/adversarial_404.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAoB7B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"adversarial_404.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/adversarial_404.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAoB7B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAyBlE;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,GAAI,SAAS,sBAAsB,KAAG,IA2E1E,CAAC"}
|
|
@@ -86,7 +86,7 @@ export const describe_adversarial_404 = (options) => {
|
|
|
86
86
|
return spec;
|
|
87
87
|
return {
|
|
88
88
|
...spec,
|
|
89
|
-
handler: (c) => c.json({ error: error_code }, 404)
|
|
89
|
+
handler: (c) => c.json({ error: error_code }, 404)
|
|
90
90
|
};
|
|
91
91
|
});
|
|
92
92
|
const apps = create_auth_test_apps(stub_specs, roles);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adversarial_headers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/adversarial_headers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAY7B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"adversarial_headers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/adversarial_headers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAY7B,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAG7B,OAAO,EAGN,KAAK,0BAA0B,EAC/B,MAAM,iBAAiB,CAAC;AAIzB,+DAA+D;AAC/D,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+GAA+G;IAC/G,qBAAqB,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC;IAClC,qGAAqG;IACrG,oBAAoB,EAAE,QAAQ,GAAG,YAAY,CAAC;CAC9C;AAID;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iCAAiC,GAC7C,gBAAgB,MAAM,KACpB,KAAK,CAAC,qBAAqB,CAiE7B,CAAC;AAIF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qCAAqC,GACjD,YAAY,MAAM,EAClB,SAAS,0BAA0B,EACnC,gBAAgB,MAAM,EACtB,cAAc,KAAK,CAAC,qBAAqB,CAAC,KACxC,IAkCF,CAAC"}
|
|
@@ -9,7 +9,7 @@ import './assert_dev_env.js';
|
|
|
9
9
|
*/
|
|
10
10
|
import { test, assert, describe } from 'vitest';
|
|
11
11
|
import { ApiError, ERROR_FORBIDDEN_ORIGIN } from '../http/error_schemas.js';
|
|
12
|
-
import { create_test_middleware_stack_app, TEST_MIDDLEWARE_PATH
|
|
12
|
+
import { create_test_middleware_stack_app, TEST_MIDDLEWARE_PATH } from './middleware.js';
|
|
13
13
|
// --- Standard adversarial header cases ---
|
|
14
14
|
/**
|
|
15
15
|
* 7 standard adversarial header cases applicable to any middleware stack.
|
|
@@ -27,44 +27,44 @@ export const create_standard_adversarial_cases = (allowed_origin) => [
|
|
|
27
27
|
name: 'bearer token with Origin header is rejected before token validation',
|
|
28
28
|
headers: {
|
|
29
29
|
Authorization: 'Bearer secret_fuz_token_test',
|
|
30
|
-
Origin: 'https://attacker.com'
|
|
30
|
+
Origin: 'https://attacker.com'
|
|
31
31
|
},
|
|
32
32
|
expected_status: 403,
|
|
33
33
|
expected_error: ERROR_FORBIDDEN_ORIGIN,
|
|
34
|
-
validate_expectation: 'not_called'
|
|
34
|
+
validate_expectation: 'not_called'
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
name: 'bearer token with allowed Origin — bearer silently discarded (browser context)',
|
|
38
38
|
headers: {
|
|
39
39
|
Authorization: 'Bearer secret_fuz_token_test',
|
|
40
|
-
Origin: allowed_origin
|
|
40
|
+
Origin: allowed_origin
|
|
41
41
|
},
|
|
42
42
|
expected_status: 200,
|
|
43
|
-
validate_expectation: 'not_called'
|
|
43
|
+
validate_expectation: 'not_called'
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
name: 'request with no auth headers passes through all middleware',
|
|
47
47
|
headers: {},
|
|
48
48
|
expected_status: 200,
|
|
49
|
-
validate_expectation: 'not_called'
|
|
49
|
+
validate_expectation: 'not_called'
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
name: 'empty Origin header is rejected by origin middleware before bearer auth (defense-in-depth)',
|
|
53
53
|
headers: {
|
|
54
54
|
Authorization: 'Bearer secret_fuz_token_test',
|
|
55
|
-
Origin: ''
|
|
55
|
+
Origin: ''
|
|
56
56
|
},
|
|
57
57
|
expected_status: 403,
|
|
58
58
|
expected_error: ERROR_FORBIDDEN_ORIGIN,
|
|
59
|
-
validate_expectation: 'not_called'
|
|
59
|
+
validate_expectation: 'not_called'
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
name: 'lowercase bearer scheme is recognized (case-insensitive per RFC 7235), soft-fails',
|
|
63
63
|
headers: {
|
|
64
|
-
Authorization: 'bearer secret_fuz_token_test'
|
|
64
|
+
Authorization: 'bearer secret_fuz_token_test'
|
|
65
65
|
},
|
|
66
66
|
expected_status: 200,
|
|
67
|
-
validate_expectation: 'called'
|
|
67
|
+
validate_expectation: 'called'
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
name: 'bearer token with rogue Referer (no Origin) passes origin check, bearer silently discarded (browser-context indicator)',
|
|
@@ -73,20 +73,20 @@ export const create_standard_adversarial_cases = (allowed_origin) => [
|
|
|
73
73
|
// the token, so the request reaches the route as unauthenticated.
|
|
74
74
|
headers: {
|
|
75
75
|
Authorization: 'Bearer secret_fuz_token_test',
|
|
76
|
-
Referer: 'https://attacker.com/page'
|
|
76
|
+
Referer: 'https://attacker.com/page'
|
|
77
77
|
},
|
|
78
78
|
expected_status: 200,
|
|
79
|
-
validate_expectation: 'not_called'
|
|
79
|
+
validate_expectation: 'not_called'
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
name: 'bearer token with allowed Referer (no Origin) — bearer silently discarded (browser context)',
|
|
83
83
|
headers: {
|
|
84
84
|
Authorization: 'Bearer secret_fuz_token_test',
|
|
85
|
-
Referer: `${allowed_origin}/page
|
|
85
|
+
Referer: `${allowed_origin}/page`
|
|
86
86
|
},
|
|
87
87
|
expected_status: 200,
|
|
88
|
-
validate_expectation: 'not_called'
|
|
89
|
-
}
|
|
88
|
+
validate_expectation: 'not_called'
|
|
89
|
+
}
|
|
90
90
|
];
|
|
91
91
|
// --- Convenience wrapper ---
|
|
92
92
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adversarial_input.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/adversarial_input.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAiB7B,OAAO,
|
|
1
|
+
{"version":3,"file":"adversarial_input.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/adversarial_input.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAiB7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,OAAO,EAEN,0BAA0B,EAC1B,uBAAuB,EAGvB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AA8ClE,UAAU,aAAa;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,cAAc,EAAE,OAAO,0BAA0B,GAAG,OAAO,uBAAuB,CAAC;CACnF;AAED,UAAU,cAAc;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED,UAAU,aAAa;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAID;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,GAAI,cAAc,CAAC,CAAC,OAAO,KAAG,KAAK,CAAC,aAAa,CAsMtF,CAAC;AAIF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GAAI,eAAe,CAAC,CAAC,SAAS,KAAG,KAAK,CAAC,cAAc,CA+B3F,CAAC;AAIF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GAAI,cAAc,CAAC,CAAC,SAAS,KAAG,KAAK,CAAC,aAAa,CA4CxF,CAAC;AAqBF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GAAI,SAAS,sBAAsB,KAAG,IAkN5E,CAAC"}
|