@fuzdev/fuz_app 0.180.0 → 0.182.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/dist/actions/CLAUDE.md +38 -20
  2. package/dist/actions/action_rpc.d.ts +25 -6
  3. package/dist/actions/action_rpc.d.ts.map +1 -1
  4. package/dist/actions/action_rpc.js +56 -48
  5. package/dist/actions/action_types.d.ts +31 -13
  6. package/dist/actions/action_types.d.ts.map +1 -1
  7. package/dist/actions/action_types.js +1 -1
  8. package/dist/actions/notification_sender.d.ts +83 -0
  9. package/dist/actions/notification_sender.d.ts.map +1 -0
  10. package/dist/actions/notification_sender.js +85 -0
  11. package/dist/actions/perform_action.d.ts +13 -4
  12. package/dist/actions/perform_action.d.ts.map +1 -1
  13. package/dist/actions/perform_action.js +27 -18
  14. package/dist/actions/register_action_ws.d.ts +20 -2
  15. package/dist/actions/register_action_ws.d.ts.map +1 -1
  16. package/dist/actions/register_action_ws.js +17 -5
  17. package/dist/actions/ws_socket_session.d.ts +3 -0
  18. package/dist/actions/ws_socket_session.d.ts.map +1 -1
  19. package/dist/actions/ws_socket_session.js +3 -2
  20. package/dist/auth/CLAUDE.md +84 -59
  21. package/dist/auth/account_actions.d.ts.map +1 -1
  22. package/dist/auth/account_actions.js +30 -3
  23. package/dist/auth/account_queries.d.ts +213 -2
  24. package/dist/auth/account_queries.d.ts.map +1 -1
  25. package/dist/auth/account_queries.js +255 -2
  26. package/dist/auth/account_route_schema.d.ts +26 -16
  27. package/dist/auth/account_route_schema.d.ts.map +1 -1
  28. package/dist/auth/account_route_schema.js +10 -24
  29. package/dist/auth/account_routes.d.ts +5 -7
  30. package/dist/auth/account_routes.d.ts.map +1 -1
  31. package/dist/auth/account_routes.js +110 -89
  32. package/dist/auth/admin_actions.d.ts.map +1 -1
  33. package/dist/auth/admin_actions.js +117 -25
  34. package/dist/auth/api_token_queries.d.ts +29 -12
  35. package/dist/auth/api_token_queries.d.ts.map +1 -1
  36. package/dist/auth/api_token_queries.js +42 -27
  37. package/dist/auth/audit_log_route_schema.d.ts +1 -1
  38. package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
  39. package/dist/auth/audit_log_routes.d.ts +1 -1
  40. package/dist/auth/audit_log_routes.d.ts.map +1 -1
  41. package/dist/auth/audit_log_routes.js +10 -12
  42. package/dist/auth/audit_log_schema.js +4 -4
  43. package/dist/auth/bearer_auth.d.ts +4 -3
  44. package/dist/auth/bearer_auth.d.ts.map +1 -1
  45. package/dist/auth/bearer_auth.js +37 -32
  46. package/dist/auth/bootstrap_account.d.ts +65 -37
  47. package/dist/auth/bootstrap_account.d.ts.map +1 -1
  48. package/dist/auth/bootstrap_account.js +115 -66
  49. package/dist/auth/bootstrap_route_schema.d.ts +6 -2
  50. package/dist/auth/bootstrap_route_schema.d.ts.map +1 -1
  51. package/dist/auth/bootstrap_route_schema.js +7 -2
  52. package/dist/auth/bootstrap_routes.d.ts +50 -33
  53. package/dist/auth/bootstrap_routes.d.ts.map +1 -1
  54. package/dist/auth/bootstrap_routes.js +109 -87
  55. package/dist/auth/bootstrap_token_store.d.ts +60 -0
  56. package/dist/auth/bootstrap_token_store.d.ts.map +1 -0
  57. package/dist/auth/bootstrap_token_store.js +39 -0
  58. package/dist/auth/credential_headers.d.ts +71 -0
  59. package/dist/auth/credential_headers.d.ts.map +1 -0
  60. package/dist/auth/credential_headers.js +100 -0
  61. package/dist/auth/daemon_token.d.ts +13 -1
  62. package/dist/auth/daemon_token.d.ts.map +1 -1
  63. package/dist/auth/daemon_token.js +14 -2
  64. package/dist/auth/daemon_token_middleware.d.ts +10 -11
  65. package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
  66. package/dist/auth/daemon_token_middleware.js +39 -30
  67. package/dist/auth/deps.d.ts +10 -11
  68. package/dist/auth/deps.d.ts.map +1 -1
  69. package/dist/auth/invite_queries.d.ts +18 -0
  70. package/dist/auth/invite_queries.d.ts.map +1 -1
  71. package/dist/auth/invite_queries.js +24 -0
  72. package/dist/auth/request_context.d.ts +97 -76
  73. package/dist/auth/request_context.d.ts.map +1 -1
  74. package/dist/auth/request_context.js +93 -104
  75. package/dist/auth/resolved_auth.d.ts +10 -5
  76. package/dist/auth/resolved_auth.d.ts.map +1 -1
  77. package/dist/auth/resolved_auth.js +2 -2
  78. package/dist/auth/role_grant_offer_action_specs.d.ts +2 -2
  79. package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
  80. package/dist/auth/role_grant_offer_action_specs.js +5 -3
  81. package/dist/auth/role_grant_offer_actions.d.ts +7 -11
  82. package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
  83. package/dist/auth/role_grant_offer_actions.js +97 -106
  84. package/dist/auth/role_grant_offer_ddl.d.ts +7 -1
  85. package/dist/auth/role_grant_offer_ddl.d.ts.map +1 -1
  86. package/dist/auth/role_grant_offer_ddl.js +9 -2
  87. package/dist/auth/role_grant_offer_notifications.d.ts +87 -38
  88. package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
  89. package/dist/auth/role_grant_offer_notifications.js +75 -22
  90. package/dist/auth/role_grant_offer_queries.d.ts +143 -9
  91. package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
  92. package/dist/auth/role_grant_offer_queries.js +266 -66
  93. package/dist/auth/role_grant_offer_schema.js +1 -1
  94. package/dist/auth/role_grant_queries.d.ts +57 -10
  95. package/dist/auth/role_grant_queries.d.ts.map +1 -1
  96. package/dist/auth/role_grant_queries.js +81 -22
  97. package/dist/auth/role_grant_sql.d.ts +21 -0
  98. package/dist/auth/role_grant_sql.d.ts.map +1 -1
  99. package/dist/auth/role_grant_sql.js +21 -0
  100. package/dist/auth/self_service_role_actions.d.ts.map +1 -1
  101. package/dist/auth/self_service_role_actions.js +9 -2
  102. package/dist/auth/session_cookie.d.ts +105 -25
  103. package/dist/auth/session_cookie.d.ts.map +1 -1
  104. package/dist/auth/session_cookie.js +124 -15
  105. package/dist/auth/session_middleware.d.ts +83 -54
  106. package/dist/auth/session_middleware.d.ts.map +1 -1
  107. package/dist/auth/session_middleware.js +92 -66
  108. package/dist/auth/session_queries.d.ts +95 -14
  109. package/dist/auth/session_queries.d.ts.map +1 -1
  110. package/dist/auth/session_queries.js +98 -19
  111. package/dist/auth/signup_route_schema.d.ts +5 -5
  112. package/dist/auth/signup_route_schema.d.ts.map +1 -1
  113. package/dist/auth/signup_route_schema.js +4 -4
  114. package/dist/auth/signup_routes.d.ts.map +1 -1
  115. package/dist/auth/signup_routes.js +17 -14
  116. package/dist/auth/standard_rpc_actions.d.ts +6 -19
  117. package/dist/auth/standard_rpc_actions.d.ts.map +1 -1
  118. package/dist/auth/standard_rpc_actions.js +5 -6
  119. package/dist/auth/token_scope.d.ts +6 -8
  120. package/dist/auth/token_scope.d.ts.map +1 -1
  121. package/dist/auth/token_scope.js +6 -9
  122. package/dist/dev/setup.d.ts +6 -1
  123. package/dist/dev/setup.d.ts.map +1 -1
  124. package/dist/dev/setup.js +42 -34
  125. package/dist/hono_context.d.ts +21 -0
  126. package/dist/hono_context.d.ts.map +1 -1
  127. package/dist/hono_context.js +17 -0
  128. package/dist/http/CLAUDE.md +156 -48
  129. package/dist/http/auth_shape.d.ts +4 -4
  130. package/dist/http/common_routes.js +1 -1
  131. package/dist/http/db_routes.d.ts +4 -3
  132. package/dist/http/db_routes.d.ts.map +1 -1
  133. package/dist/http/db_routes.js +14 -14
  134. package/dist/http/dev_route_error_check.d.ts +6 -3
  135. package/dist/http/dev_route_error_check.d.ts.map +1 -1
  136. package/dist/http/dev_route_error_check.js +6 -3
  137. package/dist/http/dev_set_cookie_check.d.ts +53 -0
  138. package/dist/http/dev_set_cookie_check.d.ts.map +1 -0
  139. package/dist/http/dev_set_cookie_check.js +80 -0
  140. package/dist/http/error_schemas.d.ts +45 -22
  141. package/dist/http/error_schemas.d.ts.map +1 -1
  142. package/dist/http/error_schemas.js +53 -26
  143. package/dist/http/header_lines.d.ts +42 -0
  144. package/dist/http/header_lines.d.ts.map +1 -0
  145. package/dist/http/header_lines.js +80 -0
  146. package/dist/http/host.d.ts +12 -9
  147. package/dist/http/host.d.ts.map +1 -1
  148. package/dist/http/host.js +25 -20
  149. package/dist/http/origin.d.ts +7 -22
  150. package/dist/http/origin.d.ts.map +1 -1
  151. package/dist/http/origin.js +11 -25
  152. package/dist/http/proxy.d.ts +1 -0
  153. package/dist/http/proxy.d.ts.map +1 -1
  154. package/dist/http/proxy.js +3 -0
  155. package/dist/http/request_headers.d.ts +95 -0
  156. package/dist/http/request_headers.d.ts.map +1 -0
  157. package/dist/http/request_headers.js +110 -0
  158. package/dist/http/request_target.d.ts +134 -0
  159. package/dist/http/request_target.d.ts.map +1 -0
  160. package/dist/http/request_target.js +193 -0
  161. package/dist/http/route_error_check.d.ts +4 -11
  162. package/dist/http/route_error_check.d.ts.map +1 -1
  163. package/dist/http/route_error_check.js +4 -21
  164. package/dist/http/route_result.d.ts +127 -23
  165. package/dist/http/route_result.d.ts.map +1 -1
  166. package/dist/http/route_result.js +97 -19
  167. package/dist/http/route_spec.d.ts +299 -83
  168. package/dist/http/route_spec.d.ts.map +1 -1
  169. package/dist/http/route_spec.js +548 -71
  170. package/dist/http/simple_request.d.ts +19 -14
  171. package/dist/http/simple_request.d.ts.map +1 -1
  172. package/dist/http/simple_request.js +17 -29
  173. package/dist/http/surface.d.ts +2 -0
  174. package/dist/http/surface.d.ts.map +1 -1
  175. package/dist/http/surface.js +4 -1
  176. package/dist/realtime/outbound_budget.d.ts +1 -2
  177. package/dist/realtime/outbound_budget.d.ts.map +1 -1
  178. package/dist/realtime/outbound_budget.js +1 -2
  179. package/dist/realtime/sse.d.ts +47 -17
  180. package/dist/realtime/sse.d.ts.map +1 -1
  181. package/dist/realtime/sse.js +115 -93
  182. package/dist/realtime/sse_constants.d.ts +7 -1
  183. package/dist/realtime/sse_constants.d.ts.map +1 -1
  184. package/dist/realtime/sse_constants.js +12 -1
  185. package/dist/realtime/sse_registry.d.ts +3 -3
  186. package/dist/realtime/sse_registry.js +3 -3
  187. package/dist/runtime/deps.d.ts +20 -4
  188. package/dist/runtime/deps.d.ts.map +1 -1
  189. package/dist/runtime/mock.d.ts +7 -1
  190. package/dist/runtime/mock.d.ts.map +1 -1
  191. package/dist/runtime/mock.js +33 -3
  192. package/dist/runtime/node.d.ts.map +1 -1
  193. package/dist/runtime/node.js +2 -1
  194. package/dist/runtime/secure_file.d.ts +71 -10
  195. package/dist/runtime/secure_file.d.ts.map +1 -1
  196. package/dist/runtime/secure_file.js +91 -11
  197. package/dist/server/app_backend.d.ts +0 -8
  198. package/dist/server/app_backend.d.ts.map +1 -1
  199. package/dist/server/app_backend.js +4 -4
  200. package/dist/server/app_server.d.ts +54 -33
  201. package/dist/server/app_server.d.ts.map +1 -1
  202. package/dist/server/app_server.js +69 -41
  203. package/dist/server/serve_fact_route.d.ts +3 -3
  204. package/dist/server/serve_fact_route.d.ts.map +1 -1
  205. package/dist/server/serve_fact_route.js +59 -55
  206. package/dist/server/static.d.ts +20 -0
  207. package/dist/server/static.d.ts.map +1 -1
  208. package/dist/server/static.js +56 -8
  209. package/dist/server/unmatched_route.d.ts +42 -0
  210. package/dist/server/unmatched_route.d.ts.map +1 -0
  211. package/dist/server/unmatched_route.js +64 -0
  212. package/dist/testing/CLAUDE.md +406 -1202
  213. package/dist/testing/app_server.d.ts +3 -1
  214. package/dist/testing/app_server.d.ts.map +1 -1
  215. package/dist/testing/app_server.js +5 -9
  216. package/dist/testing/auth_apps.d.ts.map +1 -1
  217. package/dist/testing/auth_apps.js +3 -2
  218. package/dist/testing/cross_backend/account_lifecycle.d.ts +11 -4
  219. package/dist/testing/cross_backend/account_lifecycle.d.ts.map +1 -1
  220. package/dist/testing/cross_backend/account_lifecycle.js +320 -6
  221. package/dist/testing/cross_backend/build_test_backend_paths.d.ts +4 -1
  222. package/dist/testing/cross_backend/build_test_backend_paths.d.ts.map +1 -1
  223. package/dist/testing/cross_backend/build_test_backend_paths.js +1 -1
  224. package/dist/testing/cross_backend/capabilities.d.ts +68 -5
  225. package/dist/testing/cross_backend/capabilities.d.ts.map +1 -1
  226. package/dist/testing/cross_backend/capabilities.js +20 -4
  227. package/dist/testing/cross_backend/cell_gated_create.js +1 -1
  228. package/dist/testing/cross_backend/conformance_case.d.ts +63 -21
  229. package/dist/testing/cross_backend/conformance_case.d.ts.map +1 -1
  230. package/dist/testing/cross_backend/conformance_table.d.ts +54 -12
  231. package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
  232. package/dist/testing/cross_backend/conformance_table.js +179 -23
  233. package/dist/testing/cross_backend/cookie_attributes.js +1 -1
  234. package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts +7 -1
  235. package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts.map +1 -1
  236. package/dist/testing/cross_backend/create_dual_spawn_global_setup.js +3 -3
  237. package/dist/testing/cross_backend/credential_conformance.d.ts +196 -0
  238. package/dist/testing/cross_backend/credential_conformance.d.ts.map +1 -0
  239. package/dist/testing/cross_backend/credential_conformance.js +296 -0
  240. package/dist/testing/cross_backend/credential_conformance.json +1284 -0
  241. package/dist/testing/cross_backend/credential_conformance_wire.d.ts +40 -0
  242. package/dist/testing/cross_backend/credential_conformance_wire.d.ts.map +1 -0
  243. package/dist/testing/cross_backend/credential_conformance_wire.js +293 -0
  244. package/dist/testing/cross_backend/credential_header_robustness.d.ts +1 -3
  245. package/dist/testing/cross_backend/credential_header_robustness.d.ts.map +1 -1
  246. package/dist/testing/cross_backend/credential_header_robustness.js +24 -55
  247. package/dist/testing/cross_backend/credential_wire.d.ts +112 -0
  248. package/dist/testing/cross_backend/credential_wire.d.ts.map +1 -0
  249. package/dist/testing/cross_backend/credential_wire.js +188 -0
  250. package/dist/testing/cross_backend/default_backend_configs.d.ts.map +1 -1
  251. package/dist/testing/cross_backend/default_backend_configs.js +22 -2
  252. package/dist/testing/cross_backend/default_spine_surface.d.ts +1 -26
  253. package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
  254. package/dist/testing/cross_backend/default_spine_surface.js +3 -7
  255. package/dist/testing/cross_backend/differential.d.ts +1 -1
  256. package/dist/testing/cross_backend/differential.d.ts.map +1 -1
  257. package/dist/testing/cross_backend/differential.js +3 -2
  258. package/dist/testing/cross_backend/differential_normalize.d.ts +23 -6
  259. package/dist/testing/cross_backend/differential_normalize.d.ts.map +1 -1
  260. package/dist/testing/cross_backend/differential_normalize.js +11 -5
  261. package/dist/testing/cross_backend/full_spine_mount.d.ts +4 -10
  262. package/dist/testing/cross_backend/full_spine_mount.d.ts.map +1 -1
  263. package/dist/testing/cross_backend/full_spine_mount.js +11 -4
  264. package/dist/testing/cross_backend/identity_parity.d.ts.map +1 -1
  265. package/dist/testing/cross_backend/identity_parity.js +4 -0
  266. package/dist/testing/cross_backend/in_process_setup.d.ts.map +1 -1
  267. package/dist/testing/cross_backend/in_process_setup.js +78 -4
  268. package/dist/testing/cross_backend/login_security.d.ts.map +1 -1
  269. package/dist/testing/cross_backend/login_security.js +13 -10
  270. package/dist/testing/cross_backend/peer_ping_ws.d.ts +1 -1
  271. package/dist/testing/cross_backend/peer_ping_ws.js +2 -2
  272. package/dist/testing/cross_backend/request_header_conformance.d.ts +174 -0
  273. package/dist/testing/cross_backend/request_header_conformance.d.ts.map +1 -0
  274. package/dist/testing/cross_backend/request_header_conformance.js +196 -0
  275. package/dist/testing/cross_backend/request_header_conformance.json +1158 -0
  276. package/dist/testing/cross_backend/request_header_conformance_wire.d.ts +39 -0
  277. package/dist/testing/cross_backend/request_header_conformance_wire.d.ts.map +1 -0
  278. package/dist/testing/cross_backend/request_header_conformance_wire.js +284 -0
  279. package/dist/testing/cross_backend/request_target_conformance.d.ts +298 -0
  280. package/dist/testing/cross_backend/request_target_conformance.d.ts.map +1 -0
  281. package/dist/testing/cross_backend/request_target_conformance.js +186 -0
  282. package/dist/testing/cross_backend/request_target_conformance.json +3765 -0
  283. package/dist/testing/cross_backend/request_target_conformance_wire.d.ts +32 -0
  284. package/dist/testing/cross_backend/request_target_conformance_wire.d.ts.map +1 -0
  285. package/dist/testing/cross_backend/request_target_conformance_wire.js +278 -0
  286. package/dist/testing/cross_backend/role_grant_offer_lifecycle.d.ts.map +1 -1
  287. package/dist/testing/cross_backend/role_grant_offer_lifecycle.js +173 -1
  288. package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts +5 -4
  289. package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts.map +1 -1
  290. package/dist/testing/cross_backend/role_grant_offer_notification_ws.js +185 -31
  291. package/dist/testing/cross_backend/rpc_adversarial.d.ts +6 -4
  292. package/dist/testing/cross_backend/rpc_adversarial.d.ts.map +1 -1
  293. package/dist/testing/cross_backend/rpc_adversarial.js +5 -2
  294. package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts +6 -7
  295. package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts.map +1 -1
  296. package/dist/testing/cross_backend/rust_spine_consumer_surface.js +4 -5
  297. package/dist/testing/cross_backend/session_cap.d.ts.map +1 -1
  298. package/dist/testing/cross_backend/session_cap.js +82 -34
  299. package/dist/testing/cross_backend/session_cookie_effect.d.ts +43 -0
  300. package/dist/testing/cross_backend/session_cookie_effect.d.ts.map +1 -0
  301. package/dist/testing/cross_backend/session_cookie_effect.js +103 -0
  302. package/dist/testing/cross_backend/session_login.d.ts +24 -0
  303. package/dist/testing/cross_backend/session_login.d.ts.map +1 -0
  304. package/dist/testing/cross_backend/session_login.js +31 -0
  305. package/dist/testing/cross_backend/setup.d.ts +117 -0
  306. package/dist/testing/cross_backend/setup.d.ts.map +1 -1
  307. package/dist/testing/cross_backend/setup.js +193 -9
  308. package/dist/testing/cross_backend/simple_request.d.ts.map +1 -1
  309. package/dist/testing/cross_backend/simple_request.js +5 -0
  310. package/dist/testing/cross_backend/spine_suites.d.ts +9 -1
  311. package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
  312. package/dist/testing/cross_backend/spine_suites.js +88 -5
  313. package/dist/testing/cross_backend/spine_surface_constants.d.ts +1 -1
  314. package/dist/testing/cross_backend/spine_surface_constants.d.ts.map +1 -1
  315. package/dist/testing/cross_backend/spine_surface_constants.js +1 -0
  316. package/dist/testing/cross_backend/sse_round_trip.d.ts +8 -5
  317. package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
  318. package/dist/testing/cross_backend/sse_round_trip.js +205 -64
  319. package/dist/testing/cross_backend/testing_backdoor.d.ts.map +1 -1
  320. package/dist/testing/cross_backend/testing_backdoor.js +5 -2
  321. package/dist/testing/cross_backend/testing_credential_read.d.ts +165 -0
  322. package/dist/testing/cross_backend/testing_credential_read.d.ts.map +1 -0
  323. package/dist/testing/cross_backend/testing_credential_read.js +175 -0
  324. package/dist/testing/cross_backend/testing_reset_actions.d.ts +19 -0
  325. package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
  326. package/dist/testing/cross_backend/testing_reset_actions.js +22 -6
  327. package/dist/testing/cross_backend/token_lifetime.d.ts.map +1 -1
  328. package/dist/testing/cross_backend/token_lifetime.js +58 -2
  329. package/dist/testing/cross_backend/transport_composition.d.ts +2 -4
  330. package/dist/testing/cross_backend/transport_composition.d.ts.map +1 -1
  331. package/dist/testing/cross_backend/transport_composition.js +13 -10
  332. package/dist/testing/cross_backend/ts_spine_backend_config.d.ts.map +1 -1
  333. package/dist/testing/cross_backend/ts_spine_backend_config.js +5 -3
  334. package/dist/testing/cross_backend/ws_endpoint.d.ts +11 -1
  335. package/dist/testing/cross_backend/ws_endpoint.d.ts.map +1 -1
  336. package/dist/testing/cross_backend/ws_endpoint.js +19 -2
  337. package/dist/testing/cross_backend/ws_role_gated.d.ts.map +1 -1
  338. package/dist/testing/cross_backend/ws_role_gated.js +2 -3
  339. package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
  340. package/dist/testing/cross_backend/ws_round_trip.js +28 -12
  341. package/dist/testing/cross_backend/xfail.d.ts +44 -11
  342. package/dist/testing/cross_backend/xfail.d.ts.map +1 -1
  343. package/dist/testing/cross_backend/xfail.js +68 -23
  344. package/dist/testing/data_exposure.d.ts.map +1 -1
  345. package/dist/testing/data_exposure.js +4 -3
  346. package/dist/testing/integration.d.ts +1 -2
  347. package/dist/testing/integration.d.ts.map +1 -1
  348. package/dist/testing/integration.js +14 -8
  349. package/dist/testing/integration_helpers.d.ts +50 -3
  350. package/dist/testing/integration_helpers.d.ts.map +1 -1
  351. package/dist/testing/integration_helpers.js +87 -9
  352. package/dist/testing/middleware.d.ts +3 -1
  353. package/dist/testing/middleware.d.ts.map +1 -1
  354. package/dist/testing/middleware.js +14 -7
  355. package/dist/testing/resolved_auth.d.ts +3 -1
  356. package/dist/testing/resolved_auth.d.ts.map +1 -1
  357. package/dist/testing/resolved_auth.js +4 -4
  358. package/dist/testing/round_trip.d.ts +6 -2
  359. package/dist/testing/round_trip.d.ts.map +1 -1
  360. package/dist/testing/round_trip.js +17 -6
  361. package/dist/testing/rpc_envelope_cases.d.ts.map +1 -1
  362. package/dist/testing/rpc_envelope_cases.js +7 -0
  363. package/dist/testing/rpc_helpers.d.ts +4 -2
  364. package/dist/testing/rpc_helpers.d.ts.map +1 -1
  365. package/dist/testing/rpc_helpers.js +6 -1
  366. package/dist/testing/rpc_round_trip.d.ts +13 -2
  367. package/dist/testing/rpc_round_trip.d.ts.map +1 -1
  368. package/dist/testing/rpc_round_trip.js +25 -6
  369. package/dist/testing/schema_generators.d.ts +2 -2
  370. package/dist/testing/schema_generators.d.ts.map +1 -1
  371. package/dist/testing/schema_generators.js +4 -4
  372. package/dist/testing/stubs.d.ts +2 -2
  373. package/dist/testing/stubs.d.ts.map +1 -1
  374. package/dist/testing/stubs.js +13 -10
  375. package/dist/testing/transports/fetch_transport.d.ts +6 -3
  376. package/dist/testing/transports/fetch_transport.d.ts.map +1 -1
  377. package/dist/testing/transports/fetch_transport.js +31 -19
  378. package/dist/testing/transports/raw_http.d.ts +61 -1
  379. package/dist/testing/transports/raw_http.d.ts.map +1 -1
  380. package/dist/testing/transports/raw_http.js +61 -1
  381. package/dist/testing/transports/ws_raw_client.d.ts +20 -0
  382. package/dist/testing/transports/ws_raw_client.d.ts.map +1 -1
  383. package/dist/testing/transports/ws_raw_client.js +10 -4
  384. package/dist/testing/transports/ws_transport.d.ts +21 -1
  385. package/dist/testing/transports/ws_transport.d.ts.map +1 -1
  386. package/dist/testing/transports/ws_transport.js +58 -20
  387. package/dist/testing/ws_round_trip.d.ts.map +1 -1
  388. package/dist/testing/ws_round_trip.js +8 -4
  389. package/package.json +1 -1
@@ -0,0 +1,3765 @@
1
+ {
2
+ "query": [
3
+ {
4
+ "name": "no query string at all",
5
+ "query": null,
6
+ "read": {
7
+ "pairs": []
8
+ }
9
+ },
10
+ {
11
+ "name": "an empty query string",
12
+ "query": "",
13
+ "read": {
14
+ "pairs": []
15
+ }
16
+ },
17
+ {
18
+ "name": "one pair",
19
+ "query": "a=1",
20
+ "read": {
21
+ "pairs": [
22
+ [
23
+ "a",
24
+ "1"
25
+ ]
26
+ ]
27
+ }
28
+ },
29
+ {
30
+ "name": "a key with no `=` reads an empty value",
31
+ "query": "a",
32
+ "read": {
33
+ "pairs": [
34
+ [
35
+ "a",
36
+ ""
37
+ ]
38
+ ]
39
+ }
40
+ },
41
+ {
42
+ "name": "a key with an empty value",
43
+ "query": "a=",
44
+ "read": {
45
+ "pairs": [
46
+ [
47
+ "a",
48
+ ""
49
+ ]
50
+ ]
51
+ }
52
+ },
53
+ {
54
+ "name": "a nameless pair is kept, for the caller to skip",
55
+ "query": "=x",
56
+ "read": {
57
+ "pairs": [
58
+ [
59
+ "",
60
+ "x"
61
+ ]
62
+ ]
63
+ }
64
+ },
65
+ {
66
+ "name": "a lone `=`",
67
+ "query": "=",
68
+ "read": {
69
+ "pairs": [
70
+ [
71
+ "",
72
+ ""
73
+ ]
74
+ ]
75
+ }
76
+ },
77
+ {
78
+ "name": "empty pieces between `&` are no pairs",
79
+ "query": "&&a=1&&",
80
+ "read": {
81
+ "pairs": [
82
+ [
83
+ "a",
84
+ "1"
85
+ ]
86
+ ]
87
+ }
88
+ },
89
+ {
90
+ "name": "a repeated key keeps every occurrence, in order",
91
+ "query": "a=1&a=2",
92
+ "read": {
93
+ "pairs": [
94
+ [
95
+ "a",
96
+ "1"
97
+ ],
98
+ [
99
+ "a",
100
+ "2"
101
+ ]
102
+ ]
103
+ }
104
+ },
105
+ {
106
+ "name": "only the first `=` splits a pair",
107
+ "query": "a=1=2",
108
+ "read": {
109
+ "pairs": [
110
+ [
111
+ "a",
112
+ "1=2"
113
+ ]
114
+ ]
115
+ }
116
+ },
117
+ {
118
+ "name": "`;` separates nothing",
119
+ "query": "a=1;b=2",
120
+ "read": {
121
+ "pairs": [
122
+ [
123
+ "a",
124
+ "1;b=2"
125
+ ]
126
+ ]
127
+ }
128
+ },
129
+ {
130
+ "name": "`+` reads as a space, in a key and a value",
131
+ "query": "a+b=c+d",
132
+ "read": {
133
+ "pairs": [
134
+ [
135
+ "a b",
136
+ "c d"
137
+ ]
138
+ ]
139
+ }
140
+ },
141
+ {
142
+ "name": "`%2B` is a plus, not a space",
143
+ "query": "%2B=%2B",
144
+ "read": {
145
+ "pairs": [
146
+ [
147
+ "+",
148
+ "+"
149
+ ]
150
+ ]
151
+ }
152
+ },
153
+ {
154
+ "name": "`%20` is a space",
155
+ "query": "q=%20",
156
+ "read": {
157
+ "pairs": [
158
+ [
159
+ "q",
160
+ " "
161
+ ]
162
+ ]
163
+ }
164
+ },
165
+ {
166
+ "name": "an encoded slash",
167
+ "query": "q=%2F",
168
+ "read": {
169
+ "pairs": [
170
+ [
171
+ "q",
172
+ "/"
173
+ ]
174
+ ]
175
+ }
176
+ },
177
+ {
178
+ "name": "a two-byte character",
179
+ "query": "q=%C3%A9",
180
+ "read": {
181
+ "pairs": [
182
+ [
183
+ "q",
184
+ "é"
185
+ ]
186
+ ]
187
+ }
188
+ },
189
+ {
190
+ "name": "lowercase hex digits",
191
+ "query": "q=%c3%a9",
192
+ "read": {
193
+ "pairs": [
194
+ [
195
+ "q",
196
+ "é"
197
+ ]
198
+ ]
199
+ }
200
+ },
201
+ {
202
+ "name": "a four-byte character",
203
+ "query": "q=%F0%9F%98%80",
204
+ "read": {
205
+ "pairs": [
206
+ [
207
+ "q",
208
+ "😀"
209
+ ]
210
+ ]
211
+ }
212
+ },
213
+ {
214
+ "name": "the replacement character itself, encoded, is a character",
215
+ "query": "q=%EF%BF%BD",
216
+ "read": {
217
+ "pairs": [
218
+ [
219
+ "q",
220
+ "�"
221
+ ]
222
+ ]
223
+ }
224
+ },
225
+ {
226
+ "name": "an encoded NUL is a character",
227
+ "query": "q=%00",
228
+ "read": {
229
+ "pairs": [
230
+ [
231
+ "q",
232
+ "\u0000"
233
+ ]
234
+ ]
235
+ }
236
+ },
237
+ {
238
+ "name": "an encoded percent",
239
+ "query": "q=%25",
240
+ "read": {
241
+ "pairs": [
242
+ [
243
+ "q",
244
+ "%"
245
+ ]
246
+ ]
247
+ }
248
+ },
249
+ {
250
+ "name": "an encoded percent before hex digits decodes once",
251
+ "query": "q=%25FF",
252
+ "read": {
253
+ "pairs": [
254
+ [
255
+ "q",
256
+ "%FF"
257
+ ]
258
+ ]
259
+ }
260
+ },
261
+ {
262
+ "name": "an encoded `&` and `=` stay in the value",
263
+ "query": "q=%26%3D",
264
+ "read": {
265
+ "pairs": [
266
+ [
267
+ "q",
268
+ "&="
269
+ ]
270
+ ]
271
+ }
272
+ },
273
+ {
274
+ "name": "an encoded key",
275
+ "query": "%61cting=x",
276
+ "read": {
277
+ "pairs": [
278
+ [
279
+ "acting",
280
+ "x"
281
+ ]
282
+ ]
283
+ }
284
+ },
285
+ {
286
+ "name": "a lone byte that is no UTF-8",
287
+ "query": "q=%FF",
288
+ "read": {
289
+ "refused": "invalid_utf8"
290
+ }
291
+ },
292
+ {
293
+ "name": "a valid character before an invalid byte",
294
+ "query": "q=%C3%A9%FF",
295
+ "read": {
296
+ "refused": "invalid_utf8"
297
+ }
298
+ },
299
+ {
300
+ "name": "a truncated two-byte sequence",
301
+ "query": "q=%C3",
302
+ "read": {
303
+ "refused": "invalid_utf8"
304
+ }
305
+ },
306
+ {
307
+ "name": "a truncated three-byte sequence",
308
+ "query": "q=%E2%82",
309
+ "read": {
310
+ "refused": "invalid_utf8"
311
+ }
312
+ },
313
+ {
314
+ "name": "a continuation byte alone",
315
+ "query": "q=%80",
316
+ "read": {
317
+ "refused": "invalid_utf8"
318
+ }
319
+ },
320
+ {
321
+ "name": "an overlong encoding of `/`",
322
+ "query": "q=%C0%AF",
323
+ "read": {
324
+ "refused": "invalid_utf8"
325
+ }
326
+ },
327
+ {
328
+ "name": "the bytes of a lone surrogate",
329
+ "query": "q=%ED%A0%80",
330
+ "read": {
331
+ "refused": "invalid_utf8"
332
+ }
333
+ },
334
+ {
335
+ "name": "a code point past U+10FFFF",
336
+ "query": "q=%F4%90%80%80",
337
+ "read": {
338
+ "refused": "invalid_utf8"
339
+ }
340
+ },
341
+ {
342
+ "name": "a bare `%`",
343
+ "query": "q=%",
344
+ "read": {
345
+ "refused": "malformed_escape"
346
+ }
347
+ },
348
+ {
349
+ "name": "a `%` with one hex digit at the end",
350
+ "query": "q=%F",
351
+ "read": {
352
+ "refused": "malformed_escape"
353
+ }
354
+ },
355
+ {
356
+ "name": "a `%` with a non-hex digit",
357
+ "query": "q=%G0",
358
+ "read": {
359
+ "refused": "malformed_escape"
360
+ }
361
+ },
362
+ {
363
+ "name": "a `%` followed by a second `%`",
364
+ "query": "q=%%41",
365
+ "read": {
366
+ "refused": "malformed_escape"
367
+ }
368
+ },
369
+ {
370
+ "name": "a bare `%` in a key",
371
+ "query": "%=x",
372
+ "read": {
373
+ "refused": "malformed_escape"
374
+ }
375
+ },
376
+ {
377
+ "name": "an undecodable key",
378
+ "query": "%FF=1",
379
+ "read": {
380
+ "refused": "invalid_utf8"
381
+ }
382
+ },
383
+ {
384
+ "name": "an undecodable value of a key no route reads",
385
+ "query": "method=x&junk=%FF",
386
+ "read": {
387
+ "refused": "invalid_utf8"
388
+ }
389
+ },
390
+ {
391
+ "name": "an undecodable value behind a repeated key",
392
+ "query": "id=a&id=%FF",
393
+ "read": {
394
+ "refused": "invalid_utf8"
395
+ }
396
+ },
397
+ {
398
+ "name": "the first undecodable component decides the refusal (invalid UTF-8 first)",
399
+ "query": "a=%FF&b=%G0",
400
+ "read": {
401
+ "refused": "invalid_utf8"
402
+ }
403
+ },
404
+ {
405
+ "name": "the first undecodable component decides the refusal (malformed escape first)",
406
+ "query": "a=%G0&b=%FF",
407
+ "read": {
408
+ "refused": "malformed_escape"
409
+ }
410
+ },
411
+ {
412
+ "name": "a malformed escape after invalid bytes in one value",
413
+ "query": "q=%FF%G0",
414
+ "read": {
415
+ "refused": "malformed_escape"
416
+ }
417
+ }
418
+ ],
419
+ "param": [
420
+ {
421
+ "name": "plain text",
422
+ "segment": "abc",
423
+ "read": {
424
+ "value": "abc"
425
+ }
426
+ },
427
+ {
428
+ "name": "an empty segment",
429
+ "segment": "",
430
+ "read": {
431
+ "value": ""
432
+ }
433
+ },
434
+ {
435
+ "name": "`+` stays a plus in a path",
436
+ "segment": "a+b",
437
+ "read": {
438
+ "value": "a+b"
439
+ }
440
+ },
441
+ {
442
+ "name": "an encoded plus",
443
+ "segment": "%2B",
444
+ "read": {
445
+ "value": "+"
446
+ }
447
+ },
448
+ {
449
+ "name": "an encoded slash",
450
+ "segment": "a%2Fb",
451
+ "read": {
452
+ "value": "a/b"
453
+ }
454
+ },
455
+ {
456
+ "name": "an encoded colon",
457
+ "segment": "blake3%3Aabc",
458
+ "read": {
459
+ "value": "blake3:abc"
460
+ }
461
+ },
462
+ {
463
+ "name": "a two-byte character",
464
+ "segment": "%C3%A9",
465
+ "read": {
466
+ "value": "é"
467
+ }
468
+ },
469
+ {
470
+ "name": "lowercase hex digits",
471
+ "segment": "%c3%a9",
472
+ "read": {
473
+ "value": "é"
474
+ }
475
+ },
476
+ {
477
+ "name": "a raw non-ASCII character",
478
+ "segment": "é",
479
+ "read": {
480
+ "value": "é"
481
+ }
482
+ },
483
+ {
484
+ "name": "an encoded NUL is a character",
485
+ "segment": "%00",
486
+ "read": {
487
+ "value": "\u0000"
488
+ }
489
+ },
490
+ {
491
+ "name": "an encoded percent",
492
+ "segment": "%25",
493
+ "read": {
494
+ "value": "%"
495
+ }
496
+ },
497
+ {
498
+ "name": "an encoded percent before hex digits decodes once",
499
+ "segment": "%25FF",
500
+ "read": {
501
+ "value": "%FF"
502
+ }
503
+ },
504
+ {
505
+ "name": "the replacement character itself, encoded",
506
+ "segment": "%EF%BF%BD",
507
+ "read": {
508
+ "value": "�"
509
+ }
510
+ },
511
+ {
512
+ "name": "a lone byte that is no UTF-8",
513
+ "segment": "%FF",
514
+ "read": {
515
+ "refused": "invalid_utf8"
516
+ }
517
+ },
518
+ {
519
+ "name": "a valid character before an invalid byte",
520
+ "segment": "%C3%A9%FF",
521
+ "read": {
522
+ "refused": "invalid_utf8"
523
+ }
524
+ },
525
+ {
526
+ "name": "a truncated two-byte sequence",
527
+ "segment": "%C3",
528
+ "read": {
529
+ "refused": "invalid_utf8"
530
+ }
531
+ },
532
+ {
533
+ "name": "a continuation byte alone",
534
+ "segment": "%80",
535
+ "read": {
536
+ "refused": "invalid_utf8"
537
+ }
538
+ },
539
+ {
540
+ "name": "an overlong encoding of `/`",
541
+ "segment": "%C0%AF",
542
+ "read": {
543
+ "refused": "invalid_utf8"
544
+ }
545
+ },
546
+ {
547
+ "name": "the bytes of a lone surrogate",
548
+ "segment": "%ED%A0%80",
549
+ "read": {
550
+ "refused": "invalid_utf8"
551
+ }
552
+ },
553
+ {
554
+ "name": "a code point past U+10FFFF",
555
+ "segment": "%F4%90%80%80",
556
+ "read": {
557
+ "refused": "invalid_utf8"
558
+ }
559
+ },
560
+ {
561
+ "name": "a bare `%`",
562
+ "segment": "%",
563
+ "read": {
564
+ "refused": "malformed_escape"
565
+ }
566
+ },
567
+ {
568
+ "name": "a `%` with one hex digit at the end",
569
+ "segment": "%F",
570
+ "read": {
571
+ "refused": "malformed_escape"
572
+ }
573
+ },
574
+ {
575
+ "name": "a `%` with a non-hex digit",
576
+ "segment": "%G0",
577
+ "read": {
578
+ "refused": "malformed_escape"
579
+ }
580
+ },
581
+ {
582
+ "name": "a `%` followed by a second `%`",
583
+ "segment": "%%41",
584
+ "read": {
585
+ "refused": "malformed_escape"
586
+ }
587
+ },
588
+ {
589
+ "name": "a malformed escape after invalid bytes",
590
+ "segment": "%FF%G0",
591
+ "read": {
592
+ "refused": "malformed_escape"
593
+ }
594
+ }
595
+ ],
596
+ "wire": [
597
+ {
598
+ "name": "rpc GET: a plain id is echoed",
599
+ "method": "GET",
600
+ "target": "{rpc_path}?method=account_verify&id=wire",
601
+ "as": "keeper_session",
602
+ "expect": {
603
+ "status": 200,
604
+ "jsonrpc": {
605
+ "id": "wire"
606
+ }
607
+ }
608
+ },
609
+ {
610
+ "name": "rpc GET: an encoded two-byte id decodes",
611
+ "method": "GET",
612
+ "target": "{rpc_path}?method=account_verify&id=%C3%A9",
613
+ "as": "keeper_session",
614
+ "expect": {
615
+ "status": 200,
616
+ "jsonrpc": {
617
+ "id": "é"
618
+ }
619
+ }
620
+ },
621
+ {
622
+ "name": "rpc GET: an encoded slash in the id decodes",
623
+ "method": "GET",
624
+ "target": "{rpc_path}?method=account_verify&id=%2F",
625
+ "as": "keeper_session",
626
+ "expect": {
627
+ "status": 200,
628
+ "jsonrpc": {
629
+ "id": "/"
630
+ }
631
+ }
632
+ },
633
+ {
634
+ "name": "rpc GET: an encoded NUL in the id decodes",
635
+ "method": "GET",
636
+ "target": "{rpc_path}?method=account_verify&id=%00",
637
+ "as": "keeper_session",
638
+ "expect": {
639
+ "status": 200,
640
+ "jsonrpc": {
641
+ "id": "\u0000"
642
+ }
643
+ }
644
+ },
645
+ {
646
+ "name": "rpc GET: an encoded percent decodes once",
647
+ "method": "GET",
648
+ "target": "{rpc_path}?method=account_verify&id=%25FF",
649
+ "as": "keeper_session",
650
+ "expect": {
651
+ "status": 200,
652
+ "jsonrpc": {
653
+ "id": "%FF"
654
+ }
655
+ }
656
+ },
657
+ {
658
+ "name": "rpc GET: `+` in the id is a space",
659
+ "method": "GET",
660
+ "target": "{rpc_path}?method=account_verify&id=a+b",
661
+ "as": "keeper_session",
662
+ "expect": {
663
+ "status": 200,
664
+ "jsonrpc": {
665
+ "id": "a b"
666
+ }
667
+ }
668
+ },
669
+ {
670
+ "name": "rpc GET: an encoded plus is a plus",
671
+ "method": "GET",
672
+ "target": "{rpc_path}?method=account_verify&id=%2B",
673
+ "as": "keeper_session",
674
+ "expect": {
675
+ "status": 200,
676
+ "jsonrpc": {
677
+ "id": "+"
678
+ }
679
+ }
680
+ },
681
+ {
682
+ "name": "rpc GET: an encoded integer id is a number",
683
+ "method": "GET",
684
+ "target": "{rpc_path}?method=account_verify&id=%34%32",
685
+ "as": "keeper_session",
686
+ "expect": {
687
+ "status": 200,
688
+ "jsonrpc": {
689
+ "id": 42
690
+ }
691
+ }
692
+ },
693
+ {
694
+ "name": "rpc GET: an invalid byte in the id",
695
+ "method": "GET",
696
+ "target": "{rpc_path}?method=account_verify&id=%FF",
697
+ "as": "keeper_session",
698
+ "expect": {
699
+ "status": 400,
700
+ "jsonrpc": {
701
+ "id": null,
702
+ "code": -32600,
703
+ "reason": "undecodable query string"
704
+ }
705
+ }
706
+ },
707
+ {
708
+ "name": "rpc GET: a valid character before an invalid byte",
709
+ "method": "GET",
710
+ "target": "{rpc_path}?method=account_verify&id=%C3%A9%FF",
711
+ "as": "keeper_session",
712
+ "expect": {
713
+ "status": 400,
714
+ "jsonrpc": {
715
+ "id": null,
716
+ "code": -32600,
717
+ "reason": "undecodable query string"
718
+ }
719
+ }
720
+ },
721
+ {
722
+ "name": "rpc GET: a truncated sequence",
723
+ "method": "GET",
724
+ "target": "{rpc_path}?method=account_verify&id=%C3",
725
+ "as": "keeper_session",
726
+ "expect": {
727
+ "status": 400,
728
+ "jsonrpc": {
729
+ "id": null,
730
+ "code": -32600,
731
+ "reason": "undecodable query string"
732
+ }
733
+ }
734
+ },
735
+ {
736
+ "name": "rpc GET: an overlong encoding",
737
+ "method": "GET",
738
+ "target": "{rpc_path}?method=account_verify&id=%C0%AF",
739
+ "as": "keeper_session",
740
+ "expect": {
741
+ "status": 400,
742
+ "jsonrpc": {
743
+ "id": null,
744
+ "code": -32600,
745
+ "reason": "undecodable query string"
746
+ }
747
+ }
748
+ },
749
+ {
750
+ "name": "rpc GET: the bytes of a lone surrogate",
751
+ "method": "GET",
752
+ "target": "{rpc_path}?method=account_verify&id=%ED%A0%80",
753
+ "as": "keeper_session",
754
+ "expect": {
755
+ "status": 400,
756
+ "jsonrpc": {
757
+ "id": null,
758
+ "code": -32600,
759
+ "reason": "undecodable query string"
760
+ }
761
+ }
762
+ },
763
+ {
764
+ "name": "rpc GET: a bare `%`",
765
+ "method": "GET",
766
+ "target": "{rpc_path}?method=account_verify&id=%",
767
+ "as": "keeper_session",
768
+ "expect": {
769
+ "status": 400,
770
+ "jsonrpc": {
771
+ "id": null,
772
+ "code": -32600,
773
+ "reason": "undecodable query string"
774
+ }
775
+ }
776
+ },
777
+ {
778
+ "name": "rpc GET: a malformed escape",
779
+ "method": "GET",
780
+ "target": "{rpc_path}?method=account_verify&id=%G0",
781
+ "as": "keeper_session",
782
+ "expect": {
783
+ "status": 400,
784
+ "jsonrpc": {
785
+ "id": null,
786
+ "code": -32600,
787
+ "reason": "undecodable query string"
788
+ }
789
+ }
790
+ },
791
+ {
792
+ "name": "rpc GET: an undecodable method",
793
+ "method": "GET",
794
+ "target": "{rpc_path}?method=%FF&id=wire",
795
+ "as": "keeper_session",
796
+ "expect": {
797
+ "status": 400,
798
+ "jsonrpc": {
799
+ "id": null,
800
+ "code": -32600,
801
+ "reason": "undecodable query string"
802
+ }
803
+ }
804
+ },
805
+ {
806
+ "name": "rpc GET: an undecodable params value",
807
+ "method": "GET",
808
+ "target": "{rpc_path}?method=account_verify&id=wire&params=%7B%22x%22%3A%22%FF%22%7D",
809
+ "as": "keeper_session",
810
+ "expect": {
811
+ "status": 400,
812
+ "jsonrpc": {
813
+ "id": null,
814
+ "code": -32600,
815
+ "reason": "undecodable query string"
816
+ }
817
+ }
818
+ },
819
+ {
820
+ "name": "rpc GET: an undecodable key no handler reads",
821
+ "method": "GET",
822
+ "target": "{rpc_path}?method=account_verify&id=wire&junk=%FF",
823
+ "as": "keeper_session",
824
+ "expect": {
825
+ "status": 400,
826
+ "jsonrpc": {
827
+ "id": null,
828
+ "code": -32600,
829
+ "reason": "undecodable query string"
830
+ }
831
+ }
832
+ },
833
+ {
834
+ "name": "rpc GET: an undecodable key name",
835
+ "method": "GET",
836
+ "target": "{rpc_path}?%FF=1&method=account_verify&id=wire",
837
+ "as": "keeper_session",
838
+ "expect": {
839
+ "status": 400,
840
+ "jsonrpc": {
841
+ "id": null,
842
+ "code": -32600,
843
+ "reason": "undecodable query string"
844
+ }
845
+ }
846
+ },
847
+ {
848
+ "name": "rpc GET: an undecodable repeat of a key read first-wins",
849
+ "method": "GET",
850
+ "target": "{rpc_path}?method=account_verify&id=wire&id=%FF",
851
+ "as": "keeper_session",
852
+ "expect": {
853
+ "status": 400,
854
+ "jsonrpc": {
855
+ "id": null,
856
+ "code": -32600,
857
+ "reason": "undecodable query string"
858
+ }
859
+ }
860
+ },
861
+ {
862
+ "name": "rpc GET: an anonymous caller hears the query refusal, read before any action",
863
+ "method": "GET",
864
+ "target": "{rpc_path}?method=account_verify&id=%FF",
865
+ "as": "none",
866
+ "expect": {
867
+ "status": 400,
868
+ "jsonrpc": {
869
+ "id": null,
870
+ "code": -32600,
871
+ "reason": "undecodable query string"
872
+ }
873
+ }
874
+ },
875
+ {
876
+ "name": "account status: an undecodable acting",
877
+ "method": "GET",
878
+ "target": "{account_status_path}?acting=%FF",
879
+ "as": "keeper_session",
880
+ "requires": [
881
+ "account_status"
882
+ ],
883
+ "expect": {
884
+ "status": 400,
885
+ "error": "invalid_query_params"
886
+ }
887
+ },
888
+ {
889
+ "name": "account status: an undecodable key the route never reads",
890
+ "method": "GET",
891
+ "target": "{account_status_path}?junk=%FF",
892
+ "as": "keeper_session",
893
+ "requires": [
894
+ "account_status"
895
+ ],
896
+ "expect": {
897
+ "status": 400,
898
+ "error": "invalid_query_params"
899
+ }
900
+ },
901
+ {
902
+ "name": "account status: an anonymous caller hears 401 first, the query read after it",
903
+ "method": "GET",
904
+ "target": "{account_status_path}?acting=%FF",
905
+ "as": "none",
906
+ "requires": [
907
+ "account_status"
908
+ ],
909
+ "expect": {
910
+ "status": 401,
911
+ "error": "authentication_required"
912
+ }
913
+ },
914
+ {
915
+ "name": "account status: a decodable malformed acting is account-only, not refused",
916
+ "method": "GET",
917
+ "target": "{account_status_path}?acting=%C3%A9",
918
+ "as": "keeper_session",
919
+ "requires": [
920
+ "account_status"
921
+ ],
922
+ "expect": {
923
+ "status": 200
924
+ }
925
+ },
926
+ {
927
+ "name": "ws upgrade: an undecodable acting",
928
+ "method": "GET",
929
+ "target": "{ws_path}?acting=%FF",
930
+ "as": "keeper_session",
931
+ "upgrade": true,
932
+ "requires": [
933
+ "ws"
934
+ ],
935
+ "expect": {
936
+ "status": 400,
937
+ "error": "invalid_query_params"
938
+ }
939
+ },
940
+ {
941
+ "name": "ws upgrade: an undecodable key the upgrade never reads",
942
+ "method": "GET",
943
+ "target": "{ws_path}?junk=%G0",
944
+ "as": "keeper_session",
945
+ "upgrade": true,
946
+ "requires": [
947
+ "ws"
948
+ ],
949
+ "expect": {
950
+ "status": 400,
951
+ "error": "invalid_query_params"
952
+ }
953
+ },
954
+ {
955
+ "name": "ws upgrade: an anonymous caller hears 401 first",
956
+ "method": "GET",
957
+ "target": "{ws_path}?acting=%FF",
958
+ "as": "none",
959
+ "upgrade": true,
960
+ "requires": [
961
+ "ws"
962
+ ],
963
+ "expect": {
964
+ "status": 401,
965
+ "error": "authentication_required"
966
+ }
967
+ },
968
+ {
969
+ "name": "ws upgrade: a decodable malformed acting reads as omitted",
970
+ "method": "GET",
971
+ "target": "{ws_path}?acting=%C3%A9",
972
+ "as": "keeper_session",
973
+ "upgrade": true,
974
+ "requires": [
975
+ "ws"
976
+ ],
977
+ "expect": {
978
+ "status": 101
979
+ }
980
+ },
981
+ {
982
+ "name": "bare fact: an invalid byte in the hash param",
983
+ "method": "GET",
984
+ "target": "/api/facts/%FF",
985
+ "as": "keeper_session",
986
+ "requires": [
987
+ "fact_serving_admin_hash"
988
+ ],
989
+ "expect": {
990
+ "status": 400,
991
+ "error": "invalid_route_params"
992
+ }
993
+ },
994
+ {
995
+ "name": "bare fact: a malformed escape in the hash param",
996
+ "method": "GET",
997
+ "target": "/api/facts/%G0",
998
+ "as": "keeper_session",
999
+ "requires": [
1000
+ "fact_serving_admin_hash"
1001
+ ],
1002
+ "expect": {
1003
+ "status": 400,
1004
+ "error": "invalid_route_params"
1005
+ }
1006
+ },
1007
+ {
1008
+ "name": "bare fact: the param refusal precedes the 401",
1009
+ "method": "GET",
1010
+ "target": "/api/facts/%FF",
1011
+ "as": "none",
1012
+ "requires": [
1013
+ "fact_serving_admin_hash"
1014
+ ],
1015
+ "expect": {
1016
+ "status": 400,
1017
+ "error": "invalid_route_params"
1018
+ }
1019
+ },
1020
+ {
1021
+ "name": "bare fact: an encoded colon in the hash decodes to a well-formed hash",
1022
+ "method": "GET",
1023
+ "target": "/api/facts/blake3%3Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
1024
+ "as": "keeper_session",
1025
+ "requires": [
1026
+ "fact_serving_admin_hash"
1027
+ ],
1028
+ "expect": {
1029
+ "status": 404
1030
+ }
1031
+ },
1032
+ {
1033
+ "name": "bare fact: an undecodable acting",
1034
+ "method": "GET",
1035
+ "target": "/api/facts/blake3:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?acting=%FF",
1036
+ "as": "keeper_session",
1037
+ "requires": [
1038
+ "fact_serving_admin_hash"
1039
+ ],
1040
+ "expect": {
1041
+ "status": 400,
1042
+ "error": "invalid_query_params"
1043
+ }
1044
+ },
1045
+ {
1046
+ "name": "bare fact: an undecodable key the route never reads",
1047
+ "method": "GET",
1048
+ "target": "/api/facts/blake3:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?junk=%C3",
1049
+ "as": "keeper_session",
1050
+ "requires": [
1051
+ "fact_serving_admin_hash"
1052
+ ],
1053
+ "expect": {
1054
+ "status": 400,
1055
+ "error": "invalid_query_params"
1056
+ }
1057
+ },
1058
+ {
1059
+ "name": "bare fact: the param refusal precedes the query refusal",
1060
+ "method": "GET",
1061
+ "target": "/api/facts/%FF?acting=%FF",
1062
+ "as": "keeper_session",
1063
+ "requires": [
1064
+ "fact_serving_admin_hash"
1065
+ ],
1066
+ "expect": {
1067
+ "status": 400,
1068
+ "error": "invalid_route_params"
1069
+ }
1070
+ },
1071
+ {
1072
+ "name": "cell fact: an invalid byte in the cell id",
1073
+ "method": "GET",
1074
+ "target": "/api/cells/%FF/facts/blake3:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
1075
+ "as": "none",
1076
+ "requires": [
1077
+ "fact_serving"
1078
+ ],
1079
+ "expect": {
1080
+ "status": 400,
1081
+ "error": "invalid_route_params"
1082
+ }
1083
+ },
1084
+ {
1085
+ "name": "cell fact: an invalid byte in the hash",
1086
+ "method": "GET",
1087
+ "target": "/api/cells/00000000-0000-0000-0000-000000000000/facts/%C3%A9%FF",
1088
+ "as": "none",
1089
+ "requires": [
1090
+ "fact_serving"
1091
+ ],
1092
+ "expect": {
1093
+ "status": 400,
1094
+ "error": "invalid_route_params"
1095
+ }
1096
+ },
1097
+ {
1098
+ "name": "cell fact: a bare `%` in the hash",
1099
+ "method": "GET",
1100
+ "target": "/api/cells/00000000-0000-0000-0000-000000000000/facts/%",
1101
+ "as": "none",
1102
+ "requires": [
1103
+ "fact_serving"
1104
+ ],
1105
+ "expect": {
1106
+ "status": 400,
1107
+ "error": "invalid_route_params"
1108
+ }
1109
+ },
1110
+ {
1111
+ "name": "cell fact: decodable params that name no cell",
1112
+ "method": "GET",
1113
+ "target": "/api/cells/00000000-0000-0000-0000-000000000000/facts/blake3:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
1114
+ "as": "none",
1115
+ "requires": [
1116
+ "fact_serving"
1117
+ ],
1118
+ "expect": {
1119
+ "status": 404
1120
+ }
1121
+ },
1122
+ {
1123
+ "name": "rpc GET: an encoded key ahead of a plain one is its first occurrence",
1124
+ "method": "GET",
1125
+ "target": "{rpc_path}?%6Dethod=account_verify&method=no_such_method&id=wire",
1126
+ "as": "keeper_session",
1127
+ "expect": {
1128
+ "status": 200,
1129
+ "jsonrpc": {
1130
+ "id": "wire"
1131
+ }
1132
+ }
1133
+ },
1134
+ {
1135
+ "name": "cell fact: a route that reads no query refuses nothing in it",
1136
+ "method": "GET",
1137
+ "target": "/api/cells/00000000-0000-0000-0000-000000000000/facts/blake3:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?junk=%FF",
1138
+ "as": "none",
1139
+ "requires": [
1140
+ "fact_serving"
1141
+ ],
1142
+ "expect": {
1143
+ "status": 404
1144
+ }
1145
+ },
1146
+ {
1147
+ "name": "routing: rpc × GET with a foreign Origin → 403",
1148
+ "method": "GET",
1149
+ "target": "{rpc_path}",
1150
+ "as": "keeper_session",
1151
+ "origin": "http://foreign.invalid",
1152
+ "expect": {
1153
+ "status": 403,
1154
+ "error": "forbidden_origin",
1155
+ "allow": []
1156
+ }
1157
+ },
1158
+ {
1159
+ "name": "routing: rpc × HEAD with a foreign Origin → 403",
1160
+ "method": "HEAD",
1161
+ "target": "{rpc_path}",
1162
+ "as": "keeper_session",
1163
+ "origin": "http://foreign.invalid",
1164
+ "expect": {
1165
+ "status": 403,
1166
+ "media": "json",
1167
+ "allow": []
1168
+ }
1169
+ },
1170
+ {
1171
+ "name": "routing: rpc × POST with a foreign Origin → 403",
1172
+ "method": "POST",
1173
+ "target": "{rpc_path}",
1174
+ "as": "keeper_session",
1175
+ "origin": "http://foreign.invalid",
1176
+ "headers": [
1177
+ "content-type: application/json"
1178
+ ],
1179
+ "expect": {
1180
+ "status": 403,
1181
+ "error": "forbidden_origin",
1182
+ "allow": []
1183
+ }
1184
+ },
1185
+ {
1186
+ "name": "routing: rpc × PUT as none → 405",
1187
+ "method": "PUT",
1188
+ "target": "{rpc_path}",
1189
+ "as": "none",
1190
+ "expect": {
1191
+ "status": 405,
1192
+ "error": "method_not_allowed",
1193
+ "allow": [
1194
+ "GET",
1195
+ "POST",
1196
+ "HEAD"
1197
+ ]
1198
+ }
1199
+ },
1200
+ {
1201
+ "name": "routing: rpc × PUT as keeper_session → 405",
1202
+ "method": "PUT",
1203
+ "target": "{rpc_path}",
1204
+ "as": "keeper_session",
1205
+ "expect": {
1206
+ "status": 405,
1207
+ "error": "method_not_allowed",
1208
+ "allow": [
1209
+ "GET",
1210
+ "POST",
1211
+ "HEAD"
1212
+ ]
1213
+ }
1214
+ },
1215
+ {
1216
+ "name": "routing: rpc × PUT with a foreign Origin → 403",
1217
+ "method": "PUT",
1218
+ "target": "{rpc_path}",
1219
+ "as": "keeper_session",
1220
+ "origin": "http://foreign.invalid",
1221
+ "expect": {
1222
+ "status": 403,
1223
+ "error": "forbidden_origin",
1224
+ "allow": []
1225
+ }
1226
+ },
1227
+ {
1228
+ "name": "routing: rpc × PATCH as none → 405",
1229
+ "method": "PATCH",
1230
+ "target": "{rpc_path}",
1231
+ "as": "none",
1232
+ "expect": {
1233
+ "status": 405,
1234
+ "error": "method_not_allowed",
1235
+ "allow": [
1236
+ "GET",
1237
+ "POST",
1238
+ "HEAD"
1239
+ ]
1240
+ }
1241
+ },
1242
+ {
1243
+ "name": "routing: rpc × PATCH as keeper_session → 405",
1244
+ "method": "PATCH",
1245
+ "target": "{rpc_path}",
1246
+ "as": "keeper_session",
1247
+ "expect": {
1248
+ "status": 405,
1249
+ "error": "method_not_allowed",
1250
+ "allow": [
1251
+ "GET",
1252
+ "POST",
1253
+ "HEAD"
1254
+ ]
1255
+ }
1256
+ },
1257
+ {
1258
+ "name": "routing: rpc × PATCH with a foreign Origin → 403",
1259
+ "method": "PATCH",
1260
+ "target": "{rpc_path}",
1261
+ "as": "keeper_session",
1262
+ "origin": "http://foreign.invalid",
1263
+ "expect": {
1264
+ "status": 403,
1265
+ "error": "forbidden_origin",
1266
+ "allow": []
1267
+ }
1268
+ },
1269
+ {
1270
+ "name": "routing: rpc × DELETE as none → 405",
1271
+ "method": "DELETE",
1272
+ "target": "{rpc_path}",
1273
+ "as": "none",
1274
+ "expect": {
1275
+ "status": 405,
1276
+ "error": "method_not_allowed",
1277
+ "allow": [
1278
+ "GET",
1279
+ "POST",
1280
+ "HEAD"
1281
+ ]
1282
+ }
1283
+ },
1284
+ {
1285
+ "name": "routing: rpc × DELETE as keeper_session → 405",
1286
+ "method": "DELETE",
1287
+ "target": "{rpc_path}",
1288
+ "as": "keeper_session",
1289
+ "expect": {
1290
+ "status": 405,
1291
+ "error": "method_not_allowed",
1292
+ "allow": [
1293
+ "GET",
1294
+ "POST",
1295
+ "HEAD"
1296
+ ]
1297
+ }
1298
+ },
1299
+ {
1300
+ "name": "routing: rpc × DELETE with a foreign Origin → 403",
1301
+ "method": "DELETE",
1302
+ "target": "{rpc_path}",
1303
+ "as": "keeper_session",
1304
+ "origin": "http://foreign.invalid",
1305
+ "expect": {
1306
+ "status": 403,
1307
+ "error": "forbidden_origin",
1308
+ "allow": []
1309
+ }
1310
+ },
1311
+ {
1312
+ "name": "routing: rpc × OPTIONS as none → 405",
1313
+ "method": "OPTIONS",
1314
+ "target": "{rpc_path}",
1315
+ "as": "none",
1316
+ "expect": {
1317
+ "status": 405,
1318
+ "error": "method_not_allowed",
1319
+ "allow": [
1320
+ "GET",
1321
+ "POST",
1322
+ "HEAD"
1323
+ ]
1324
+ }
1325
+ },
1326
+ {
1327
+ "name": "routing: rpc × OPTIONS as keeper_session → 405",
1328
+ "method": "OPTIONS",
1329
+ "target": "{rpc_path}",
1330
+ "as": "keeper_session",
1331
+ "expect": {
1332
+ "status": 405,
1333
+ "error": "method_not_allowed",
1334
+ "allow": [
1335
+ "GET",
1336
+ "POST",
1337
+ "HEAD"
1338
+ ]
1339
+ }
1340
+ },
1341
+ {
1342
+ "name": "routing: rpc × OPTIONS with a foreign Origin → 403",
1343
+ "method": "OPTIONS",
1344
+ "target": "{rpc_path}",
1345
+ "as": "keeper_session",
1346
+ "origin": "http://foreign.invalid",
1347
+ "expect": {
1348
+ "status": 403,
1349
+ "error": "forbidden_origin",
1350
+ "allow": []
1351
+ }
1352
+ },
1353
+ {
1354
+ "name": "routing: rpc × PUT with an invalid session cookie → 405",
1355
+ "method": "PUT",
1356
+ "target": "{rpc_path}",
1357
+ "as": "invalid_session",
1358
+ "expect": {
1359
+ "status": 405,
1360
+ "error": "method_not_allowed",
1361
+ "allow": [
1362
+ "GET",
1363
+ "POST",
1364
+ "HEAD"
1365
+ ],
1366
+ "clears_session": true
1367
+ }
1368
+ },
1369
+ {
1370
+ "name": "routing: rpc × PUT with a foreign Host → 403",
1371
+ "method": "PUT",
1372
+ "target": "{rpc_path}",
1373
+ "as": "none",
1374
+ "host": "foreign.invalid",
1375
+ "expect": {
1376
+ "status": 403,
1377
+ "error": "forbidden_host",
1378
+ "allow": []
1379
+ }
1380
+ },
1381
+ {
1382
+ "name": "routing: rpc × PUT declaring a body over the cap → 413",
1383
+ "method": "PUT",
1384
+ "target": "{rpc_path}",
1385
+ "as": "none",
1386
+ "headers": [
1387
+ "content-length: 100000000"
1388
+ ],
1389
+ "expect": {
1390
+ "status": 413,
1391
+ "error": "payload_too_large",
1392
+ "allow": []
1393
+ }
1394
+ },
1395
+ {
1396
+ "name": "routing: account status (GET only) × GET with a foreign Origin → 403",
1397
+ "method": "GET",
1398
+ "target": "{account_status_path}",
1399
+ "as": "keeper_session",
1400
+ "origin": "http://foreign.invalid",
1401
+ "requires": [
1402
+ "account_status"
1403
+ ],
1404
+ "expect": {
1405
+ "status": 403,
1406
+ "error": "forbidden_origin",
1407
+ "allow": []
1408
+ }
1409
+ },
1410
+ {
1411
+ "name": "routing: account status (GET only) × HEAD with a foreign Origin → 403",
1412
+ "method": "HEAD",
1413
+ "target": "{account_status_path}",
1414
+ "as": "keeper_session",
1415
+ "origin": "http://foreign.invalid",
1416
+ "requires": [
1417
+ "account_status"
1418
+ ],
1419
+ "expect": {
1420
+ "status": 403,
1421
+ "media": "json",
1422
+ "allow": []
1423
+ }
1424
+ },
1425
+ {
1426
+ "name": "routing: account status (GET only) × POST as none → 405",
1427
+ "method": "POST",
1428
+ "target": "{account_status_path}",
1429
+ "as": "none",
1430
+ "headers": [
1431
+ "content-type: application/json"
1432
+ ],
1433
+ "requires": [
1434
+ "account_status"
1435
+ ],
1436
+ "expect": {
1437
+ "status": 405,
1438
+ "error": "method_not_allowed",
1439
+ "allow": [
1440
+ "GET",
1441
+ "HEAD"
1442
+ ]
1443
+ }
1444
+ },
1445
+ {
1446
+ "name": "routing: account status (GET only) × POST as keeper_session → 405",
1447
+ "method": "POST",
1448
+ "target": "{account_status_path}",
1449
+ "as": "keeper_session",
1450
+ "headers": [
1451
+ "content-type: application/json"
1452
+ ],
1453
+ "requires": [
1454
+ "account_status"
1455
+ ],
1456
+ "expect": {
1457
+ "status": 405,
1458
+ "error": "method_not_allowed",
1459
+ "allow": [
1460
+ "GET",
1461
+ "HEAD"
1462
+ ]
1463
+ }
1464
+ },
1465
+ {
1466
+ "name": "routing: account status (GET only) × POST with a foreign Origin → 403",
1467
+ "method": "POST",
1468
+ "target": "{account_status_path}",
1469
+ "as": "keeper_session",
1470
+ "origin": "http://foreign.invalid",
1471
+ "headers": [
1472
+ "content-type: application/json"
1473
+ ],
1474
+ "requires": [
1475
+ "account_status"
1476
+ ],
1477
+ "expect": {
1478
+ "status": 403,
1479
+ "error": "forbidden_origin",
1480
+ "allow": []
1481
+ }
1482
+ },
1483
+ {
1484
+ "name": "routing: account status (GET only) × PUT as none → 405",
1485
+ "method": "PUT",
1486
+ "target": "{account_status_path}",
1487
+ "as": "none",
1488
+ "requires": [
1489
+ "account_status"
1490
+ ],
1491
+ "expect": {
1492
+ "status": 405,
1493
+ "error": "method_not_allowed",
1494
+ "allow": [
1495
+ "GET",
1496
+ "HEAD"
1497
+ ]
1498
+ }
1499
+ },
1500
+ {
1501
+ "name": "routing: account status (GET only) × PUT as keeper_session → 405",
1502
+ "method": "PUT",
1503
+ "target": "{account_status_path}",
1504
+ "as": "keeper_session",
1505
+ "requires": [
1506
+ "account_status"
1507
+ ],
1508
+ "expect": {
1509
+ "status": 405,
1510
+ "error": "method_not_allowed",
1511
+ "allow": [
1512
+ "GET",
1513
+ "HEAD"
1514
+ ]
1515
+ }
1516
+ },
1517
+ {
1518
+ "name": "routing: account status (GET only) × PUT with a foreign Origin → 403",
1519
+ "method": "PUT",
1520
+ "target": "{account_status_path}",
1521
+ "as": "keeper_session",
1522
+ "origin": "http://foreign.invalid",
1523
+ "requires": [
1524
+ "account_status"
1525
+ ],
1526
+ "expect": {
1527
+ "status": 403,
1528
+ "error": "forbidden_origin",
1529
+ "allow": []
1530
+ }
1531
+ },
1532
+ {
1533
+ "name": "routing: account status (GET only) × PATCH as none → 405",
1534
+ "method": "PATCH",
1535
+ "target": "{account_status_path}",
1536
+ "as": "none",
1537
+ "requires": [
1538
+ "account_status"
1539
+ ],
1540
+ "expect": {
1541
+ "status": 405,
1542
+ "error": "method_not_allowed",
1543
+ "allow": [
1544
+ "GET",
1545
+ "HEAD"
1546
+ ]
1547
+ }
1548
+ },
1549
+ {
1550
+ "name": "routing: account status (GET only) × PATCH as keeper_session → 405",
1551
+ "method": "PATCH",
1552
+ "target": "{account_status_path}",
1553
+ "as": "keeper_session",
1554
+ "requires": [
1555
+ "account_status"
1556
+ ],
1557
+ "expect": {
1558
+ "status": 405,
1559
+ "error": "method_not_allowed",
1560
+ "allow": [
1561
+ "GET",
1562
+ "HEAD"
1563
+ ]
1564
+ }
1565
+ },
1566
+ {
1567
+ "name": "routing: account status (GET only) × PATCH with a foreign Origin → 403",
1568
+ "method": "PATCH",
1569
+ "target": "{account_status_path}",
1570
+ "as": "keeper_session",
1571
+ "origin": "http://foreign.invalid",
1572
+ "requires": [
1573
+ "account_status"
1574
+ ],
1575
+ "expect": {
1576
+ "status": 403,
1577
+ "error": "forbidden_origin",
1578
+ "allow": []
1579
+ }
1580
+ },
1581
+ {
1582
+ "name": "routing: account status (GET only) × DELETE as none → 405",
1583
+ "method": "DELETE",
1584
+ "target": "{account_status_path}",
1585
+ "as": "none",
1586
+ "requires": [
1587
+ "account_status"
1588
+ ],
1589
+ "expect": {
1590
+ "status": 405,
1591
+ "error": "method_not_allowed",
1592
+ "allow": [
1593
+ "GET",
1594
+ "HEAD"
1595
+ ]
1596
+ }
1597
+ },
1598
+ {
1599
+ "name": "routing: account status (GET only) × DELETE as keeper_session → 405",
1600
+ "method": "DELETE",
1601
+ "target": "{account_status_path}",
1602
+ "as": "keeper_session",
1603
+ "requires": [
1604
+ "account_status"
1605
+ ],
1606
+ "expect": {
1607
+ "status": 405,
1608
+ "error": "method_not_allowed",
1609
+ "allow": [
1610
+ "GET",
1611
+ "HEAD"
1612
+ ]
1613
+ }
1614
+ },
1615
+ {
1616
+ "name": "routing: account status (GET only) × DELETE with a foreign Origin → 403",
1617
+ "method": "DELETE",
1618
+ "target": "{account_status_path}",
1619
+ "as": "keeper_session",
1620
+ "origin": "http://foreign.invalid",
1621
+ "requires": [
1622
+ "account_status"
1623
+ ],
1624
+ "expect": {
1625
+ "status": 403,
1626
+ "error": "forbidden_origin",
1627
+ "allow": []
1628
+ }
1629
+ },
1630
+ {
1631
+ "name": "routing: account status (GET only) × OPTIONS as none → 405",
1632
+ "method": "OPTIONS",
1633
+ "target": "{account_status_path}",
1634
+ "as": "none",
1635
+ "requires": [
1636
+ "account_status"
1637
+ ],
1638
+ "expect": {
1639
+ "status": 405,
1640
+ "error": "method_not_allowed",
1641
+ "allow": [
1642
+ "GET",
1643
+ "HEAD"
1644
+ ]
1645
+ }
1646
+ },
1647
+ {
1648
+ "name": "routing: account status (GET only) × OPTIONS as keeper_session → 405",
1649
+ "method": "OPTIONS",
1650
+ "target": "{account_status_path}",
1651
+ "as": "keeper_session",
1652
+ "requires": [
1653
+ "account_status"
1654
+ ],
1655
+ "expect": {
1656
+ "status": 405,
1657
+ "error": "method_not_allowed",
1658
+ "allow": [
1659
+ "GET",
1660
+ "HEAD"
1661
+ ]
1662
+ }
1663
+ },
1664
+ {
1665
+ "name": "routing: account status (GET only) × OPTIONS with a foreign Origin → 403",
1666
+ "method": "OPTIONS",
1667
+ "target": "{account_status_path}",
1668
+ "as": "keeper_session",
1669
+ "origin": "http://foreign.invalid",
1670
+ "requires": [
1671
+ "account_status"
1672
+ ],
1673
+ "expect": {
1674
+ "status": 403,
1675
+ "error": "forbidden_origin",
1676
+ "allow": []
1677
+ }
1678
+ },
1679
+ {
1680
+ "name": "routing: account status (GET only) × PUT with an invalid session cookie → 405",
1681
+ "method": "PUT",
1682
+ "target": "{account_status_path}",
1683
+ "as": "invalid_session",
1684
+ "requires": [
1685
+ "account_status"
1686
+ ],
1687
+ "expect": {
1688
+ "status": 405,
1689
+ "error": "method_not_allowed",
1690
+ "allow": [
1691
+ "GET",
1692
+ "HEAD"
1693
+ ],
1694
+ "clears_session": true
1695
+ }
1696
+ },
1697
+ {
1698
+ "name": "routing: login (POST only) × GET as none → 405",
1699
+ "method": "GET",
1700
+ "target": "{account_login_path}",
1701
+ "as": "none",
1702
+ "expect": {
1703
+ "status": 405,
1704
+ "error": "method_not_allowed",
1705
+ "allow": [
1706
+ "POST"
1707
+ ]
1708
+ }
1709
+ },
1710
+ {
1711
+ "name": "routing: login (POST only) × GET as keeper_session → 405",
1712
+ "method": "GET",
1713
+ "target": "{account_login_path}",
1714
+ "as": "keeper_session",
1715
+ "expect": {
1716
+ "status": 405,
1717
+ "error": "method_not_allowed",
1718
+ "allow": [
1719
+ "POST"
1720
+ ]
1721
+ }
1722
+ },
1723
+ {
1724
+ "name": "routing: login (POST only) × GET with a foreign Origin → 403",
1725
+ "method": "GET",
1726
+ "target": "{account_login_path}",
1727
+ "as": "keeper_session",
1728
+ "origin": "http://foreign.invalid",
1729
+ "expect": {
1730
+ "status": 403,
1731
+ "error": "forbidden_origin",
1732
+ "allow": []
1733
+ }
1734
+ },
1735
+ {
1736
+ "name": "routing: login (POST only) × HEAD as none → 405",
1737
+ "method": "HEAD",
1738
+ "target": "{account_login_path}",
1739
+ "as": "none",
1740
+ "expect": {
1741
+ "status": 405,
1742
+ "allow": [
1743
+ "POST"
1744
+ ],
1745
+ "media": "json"
1746
+ }
1747
+ },
1748
+ {
1749
+ "name": "routing: login (POST only) × HEAD as keeper_session → 405",
1750
+ "method": "HEAD",
1751
+ "target": "{account_login_path}",
1752
+ "as": "keeper_session",
1753
+ "expect": {
1754
+ "status": 405,
1755
+ "allow": [
1756
+ "POST"
1757
+ ],
1758
+ "media": "json"
1759
+ }
1760
+ },
1761
+ {
1762
+ "name": "routing: login (POST only) × HEAD with a foreign Origin → 403",
1763
+ "method": "HEAD",
1764
+ "target": "{account_login_path}",
1765
+ "as": "keeper_session",
1766
+ "origin": "http://foreign.invalid",
1767
+ "expect": {
1768
+ "status": 403,
1769
+ "media": "json",
1770
+ "allow": []
1771
+ }
1772
+ },
1773
+ {
1774
+ "name": "routing: login (POST only) × POST with a foreign Origin → 403",
1775
+ "method": "POST",
1776
+ "target": "{account_login_path}",
1777
+ "as": "keeper_session",
1778
+ "origin": "http://foreign.invalid",
1779
+ "headers": [
1780
+ "content-type: application/json"
1781
+ ],
1782
+ "expect": {
1783
+ "status": 403,
1784
+ "error": "forbidden_origin",
1785
+ "allow": []
1786
+ }
1787
+ },
1788
+ {
1789
+ "name": "routing: login (POST only) × PUT as none → 405",
1790
+ "method": "PUT",
1791
+ "target": "{account_login_path}",
1792
+ "as": "none",
1793
+ "expect": {
1794
+ "status": 405,
1795
+ "error": "method_not_allowed",
1796
+ "allow": [
1797
+ "POST"
1798
+ ]
1799
+ }
1800
+ },
1801
+ {
1802
+ "name": "routing: login (POST only) × PUT as keeper_session → 405",
1803
+ "method": "PUT",
1804
+ "target": "{account_login_path}",
1805
+ "as": "keeper_session",
1806
+ "expect": {
1807
+ "status": 405,
1808
+ "error": "method_not_allowed",
1809
+ "allow": [
1810
+ "POST"
1811
+ ]
1812
+ }
1813
+ },
1814
+ {
1815
+ "name": "routing: login (POST only) × PUT with a foreign Origin → 403",
1816
+ "method": "PUT",
1817
+ "target": "{account_login_path}",
1818
+ "as": "keeper_session",
1819
+ "origin": "http://foreign.invalid",
1820
+ "expect": {
1821
+ "status": 403,
1822
+ "error": "forbidden_origin",
1823
+ "allow": []
1824
+ }
1825
+ },
1826
+ {
1827
+ "name": "routing: login (POST only) × PATCH as none → 405",
1828
+ "method": "PATCH",
1829
+ "target": "{account_login_path}",
1830
+ "as": "none",
1831
+ "expect": {
1832
+ "status": 405,
1833
+ "error": "method_not_allowed",
1834
+ "allow": [
1835
+ "POST"
1836
+ ]
1837
+ }
1838
+ },
1839
+ {
1840
+ "name": "routing: login (POST only) × PATCH as keeper_session → 405",
1841
+ "method": "PATCH",
1842
+ "target": "{account_login_path}",
1843
+ "as": "keeper_session",
1844
+ "expect": {
1845
+ "status": 405,
1846
+ "error": "method_not_allowed",
1847
+ "allow": [
1848
+ "POST"
1849
+ ]
1850
+ }
1851
+ },
1852
+ {
1853
+ "name": "routing: login (POST only) × PATCH with a foreign Origin → 403",
1854
+ "method": "PATCH",
1855
+ "target": "{account_login_path}",
1856
+ "as": "keeper_session",
1857
+ "origin": "http://foreign.invalid",
1858
+ "expect": {
1859
+ "status": 403,
1860
+ "error": "forbidden_origin",
1861
+ "allow": []
1862
+ }
1863
+ },
1864
+ {
1865
+ "name": "routing: login (POST only) × DELETE as none → 405",
1866
+ "method": "DELETE",
1867
+ "target": "{account_login_path}",
1868
+ "as": "none",
1869
+ "expect": {
1870
+ "status": 405,
1871
+ "error": "method_not_allowed",
1872
+ "allow": [
1873
+ "POST"
1874
+ ]
1875
+ }
1876
+ },
1877
+ {
1878
+ "name": "routing: login (POST only) × DELETE as keeper_session → 405",
1879
+ "method": "DELETE",
1880
+ "target": "{account_login_path}",
1881
+ "as": "keeper_session",
1882
+ "expect": {
1883
+ "status": 405,
1884
+ "error": "method_not_allowed",
1885
+ "allow": [
1886
+ "POST"
1887
+ ]
1888
+ }
1889
+ },
1890
+ {
1891
+ "name": "routing: login (POST only) × DELETE with a foreign Origin → 403",
1892
+ "method": "DELETE",
1893
+ "target": "{account_login_path}",
1894
+ "as": "keeper_session",
1895
+ "origin": "http://foreign.invalid",
1896
+ "expect": {
1897
+ "status": 403,
1898
+ "error": "forbidden_origin",
1899
+ "allow": []
1900
+ }
1901
+ },
1902
+ {
1903
+ "name": "routing: login (POST only) × OPTIONS as none → 405",
1904
+ "method": "OPTIONS",
1905
+ "target": "{account_login_path}",
1906
+ "as": "none",
1907
+ "expect": {
1908
+ "status": 405,
1909
+ "error": "method_not_allowed",
1910
+ "allow": [
1911
+ "POST"
1912
+ ]
1913
+ }
1914
+ },
1915
+ {
1916
+ "name": "routing: login (POST only) × OPTIONS as keeper_session → 405",
1917
+ "method": "OPTIONS",
1918
+ "target": "{account_login_path}",
1919
+ "as": "keeper_session",
1920
+ "expect": {
1921
+ "status": 405,
1922
+ "error": "method_not_allowed",
1923
+ "allow": [
1924
+ "POST"
1925
+ ]
1926
+ }
1927
+ },
1928
+ {
1929
+ "name": "routing: login (POST only) × OPTIONS with a foreign Origin → 403",
1930
+ "method": "OPTIONS",
1931
+ "target": "{account_login_path}",
1932
+ "as": "keeper_session",
1933
+ "origin": "http://foreign.invalid",
1934
+ "expect": {
1935
+ "status": 403,
1936
+ "error": "forbidden_origin",
1937
+ "allow": []
1938
+ }
1939
+ },
1940
+ {
1941
+ "name": "routing: login (POST only) × PUT with an invalid session cookie → 405",
1942
+ "method": "PUT",
1943
+ "target": "{account_login_path}",
1944
+ "as": "invalid_session",
1945
+ "expect": {
1946
+ "status": 405,
1947
+ "error": "method_not_allowed",
1948
+ "allow": [
1949
+ "POST"
1950
+ ],
1951
+ "clears_session": true
1952
+ }
1953
+ },
1954
+ {
1955
+ "name": "routing: ws path × GET with a foreign Origin → 403",
1956
+ "method": "GET",
1957
+ "target": "{ws_path}",
1958
+ "as": "keeper_session",
1959
+ "origin": "http://foreign.invalid",
1960
+ "requires": [
1961
+ "ws"
1962
+ ],
1963
+ "expect": {
1964
+ "status": 403,
1965
+ "error": "forbidden_origin",
1966
+ "allow": []
1967
+ }
1968
+ },
1969
+ {
1970
+ "name": "routing: ws path × HEAD with a foreign Origin → 403",
1971
+ "method": "HEAD",
1972
+ "target": "{ws_path}",
1973
+ "as": "keeper_session",
1974
+ "origin": "http://foreign.invalid",
1975
+ "requires": [
1976
+ "ws"
1977
+ ],
1978
+ "expect": {
1979
+ "status": 403,
1980
+ "media": "json",
1981
+ "allow": []
1982
+ }
1983
+ },
1984
+ {
1985
+ "name": "routing: ws path × POST as none → 405",
1986
+ "method": "POST",
1987
+ "target": "{ws_path}",
1988
+ "as": "none",
1989
+ "headers": [
1990
+ "content-type: application/json"
1991
+ ],
1992
+ "requires": [
1993
+ "ws"
1994
+ ],
1995
+ "expect": {
1996
+ "status": 405,
1997
+ "error": "method_not_allowed",
1998
+ "allow": [
1999
+ "GET",
2000
+ "HEAD"
2001
+ ]
2002
+ }
2003
+ },
2004
+ {
2005
+ "name": "routing: ws path × POST as keeper_session → 405",
2006
+ "method": "POST",
2007
+ "target": "{ws_path}",
2008
+ "as": "keeper_session",
2009
+ "headers": [
2010
+ "content-type: application/json"
2011
+ ],
2012
+ "requires": [
2013
+ "ws"
2014
+ ],
2015
+ "expect": {
2016
+ "status": 405,
2017
+ "error": "method_not_allowed",
2018
+ "allow": [
2019
+ "GET",
2020
+ "HEAD"
2021
+ ]
2022
+ }
2023
+ },
2024
+ {
2025
+ "name": "routing: ws path × POST with a foreign Origin → 403",
2026
+ "method": "POST",
2027
+ "target": "{ws_path}",
2028
+ "as": "keeper_session",
2029
+ "origin": "http://foreign.invalid",
2030
+ "headers": [
2031
+ "content-type: application/json"
2032
+ ],
2033
+ "requires": [
2034
+ "ws"
2035
+ ],
2036
+ "expect": {
2037
+ "status": 403,
2038
+ "error": "forbidden_origin",
2039
+ "allow": []
2040
+ }
2041
+ },
2042
+ {
2043
+ "name": "routing: ws path × PUT as none → 405",
2044
+ "method": "PUT",
2045
+ "target": "{ws_path}",
2046
+ "as": "none",
2047
+ "requires": [
2048
+ "ws"
2049
+ ],
2050
+ "expect": {
2051
+ "status": 405,
2052
+ "error": "method_not_allowed",
2053
+ "allow": [
2054
+ "GET",
2055
+ "HEAD"
2056
+ ]
2057
+ }
2058
+ },
2059
+ {
2060
+ "name": "routing: ws path × PUT as keeper_session → 405",
2061
+ "method": "PUT",
2062
+ "target": "{ws_path}",
2063
+ "as": "keeper_session",
2064
+ "requires": [
2065
+ "ws"
2066
+ ],
2067
+ "expect": {
2068
+ "status": 405,
2069
+ "error": "method_not_allowed",
2070
+ "allow": [
2071
+ "GET",
2072
+ "HEAD"
2073
+ ]
2074
+ }
2075
+ },
2076
+ {
2077
+ "name": "routing: ws path × PUT with a foreign Origin → 403",
2078
+ "method": "PUT",
2079
+ "target": "{ws_path}",
2080
+ "as": "keeper_session",
2081
+ "origin": "http://foreign.invalid",
2082
+ "requires": [
2083
+ "ws"
2084
+ ],
2085
+ "expect": {
2086
+ "status": 403,
2087
+ "error": "forbidden_origin",
2088
+ "allow": []
2089
+ }
2090
+ },
2091
+ {
2092
+ "name": "routing: ws path × PATCH as none → 405",
2093
+ "method": "PATCH",
2094
+ "target": "{ws_path}",
2095
+ "as": "none",
2096
+ "requires": [
2097
+ "ws"
2098
+ ],
2099
+ "expect": {
2100
+ "status": 405,
2101
+ "error": "method_not_allowed",
2102
+ "allow": [
2103
+ "GET",
2104
+ "HEAD"
2105
+ ]
2106
+ }
2107
+ },
2108
+ {
2109
+ "name": "routing: ws path × PATCH as keeper_session → 405",
2110
+ "method": "PATCH",
2111
+ "target": "{ws_path}",
2112
+ "as": "keeper_session",
2113
+ "requires": [
2114
+ "ws"
2115
+ ],
2116
+ "expect": {
2117
+ "status": 405,
2118
+ "error": "method_not_allowed",
2119
+ "allow": [
2120
+ "GET",
2121
+ "HEAD"
2122
+ ]
2123
+ }
2124
+ },
2125
+ {
2126
+ "name": "routing: ws path × PATCH with a foreign Origin → 403",
2127
+ "method": "PATCH",
2128
+ "target": "{ws_path}",
2129
+ "as": "keeper_session",
2130
+ "origin": "http://foreign.invalid",
2131
+ "requires": [
2132
+ "ws"
2133
+ ],
2134
+ "expect": {
2135
+ "status": 403,
2136
+ "error": "forbidden_origin",
2137
+ "allow": []
2138
+ }
2139
+ },
2140
+ {
2141
+ "name": "routing: ws path × DELETE as none → 405",
2142
+ "method": "DELETE",
2143
+ "target": "{ws_path}",
2144
+ "as": "none",
2145
+ "requires": [
2146
+ "ws"
2147
+ ],
2148
+ "expect": {
2149
+ "status": 405,
2150
+ "error": "method_not_allowed",
2151
+ "allow": [
2152
+ "GET",
2153
+ "HEAD"
2154
+ ]
2155
+ }
2156
+ },
2157
+ {
2158
+ "name": "routing: ws path × DELETE as keeper_session → 405",
2159
+ "method": "DELETE",
2160
+ "target": "{ws_path}",
2161
+ "as": "keeper_session",
2162
+ "requires": [
2163
+ "ws"
2164
+ ],
2165
+ "expect": {
2166
+ "status": 405,
2167
+ "error": "method_not_allowed",
2168
+ "allow": [
2169
+ "GET",
2170
+ "HEAD"
2171
+ ]
2172
+ }
2173
+ },
2174
+ {
2175
+ "name": "routing: ws path × DELETE with a foreign Origin → 403",
2176
+ "method": "DELETE",
2177
+ "target": "{ws_path}",
2178
+ "as": "keeper_session",
2179
+ "origin": "http://foreign.invalid",
2180
+ "requires": [
2181
+ "ws"
2182
+ ],
2183
+ "expect": {
2184
+ "status": 403,
2185
+ "error": "forbidden_origin",
2186
+ "allow": []
2187
+ }
2188
+ },
2189
+ {
2190
+ "name": "routing: ws path × OPTIONS as none → 405",
2191
+ "method": "OPTIONS",
2192
+ "target": "{ws_path}",
2193
+ "as": "none",
2194
+ "requires": [
2195
+ "ws"
2196
+ ],
2197
+ "expect": {
2198
+ "status": 405,
2199
+ "error": "method_not_allowed",
2200
+ "allow": [
2201
+ "GET",
2202
+ "HEAD"
2203
+ ]
2204
+ }
2205
+ },
2206
+ {
2207
+ "name": "routing: ws path × OPTIONS as keeper_session → 405",
2208
+ "method": "OPTIONS",
2209
+ "target": "{ws_path}",
2210
+ "as": "keeper_session",
2211
+ "requires": [
2212
+ "ws"
2213
+ ],
2214
+ "expect": {
2215
+ "status": 405,
2216
+ "error": "method_not_allowed",
2217
+ "allow": [
2218
+ "GET",
2219
+ "HEAD"
2220
+ ]
2221
+ }
2222
+ },
2223
+ {
2224
+ "name": "routing: ws path × OPTIONS with a foreign Origin → 403",
2225
+ "method": "OPTIONS",
2226
+ "target": "{ws_path}",
2227
+ "as": "keeper_session",
2228
+ "origin": "http://foreign.invalid",
2229
+ "requires": [
2230
+ "ws"
2231
+ ],
2232
+ "expect": {
2233
+ "status": 403,
2234
+ "error": "forbidden_origin",
2235
+ "allow": []
2236
+ }
2237
+ },
2238
+ {
2239
+ "name": "routing: ws path × PUT with an invalid session cookie → 405",
2240
+ "method": "PUT",
2241
+ "target": "{ws_path}",
2242
+ "as": "invalid_session",
2243
+ "requires": [
2244
+ "ws"
2245
+ ],
2246
+ "expect": {
2247
+ "status": 405,
2248
+ "error": "method_not_allowed",
2249
+ "allow": [
2250
+ "GET",
2251
+ "HEAD"
2252
+ ],
2253
+ "clears_session": true
2254
+ }
2255
+ },
2256
+ {
2257
+ "name": "routing: audit stream (SSE) × GET with a foreign Origin → 403",
2258
+ "method": "GET",
2259
+ "target": "{sse_path}",
2260
+ "as": "keeper_session",
2261
+ "origin": "http://foreign.invalid",
2262
+ "requires": [
2263
+ "sse"
2264
+ ],
2265
+ "expect": {
2266
+ "status": 403,
2267
+ "error": "forbidden_origin",
2268
+ "allow": []
2269
+ }
2270
+ },
2271
+ {
2272
+ "name": "routing: audit stream (SSE) × HEAD with a foreign Origin → 403",
2273
+ "method": "HEAD",
2274
+ "target": "{sse_path}",
2275
+ "as": "keeper_session",
2276
+ "origin": "http://foreign.invalid",
2277
+ "requires": [
2278
+ "sse"
2279
+ ],
2280
+ "expect": {
2281
+ "status": 403,
2282
+ "media": "json",
2283
+ "allow": []
2284
+ }
2285
+ },
2286
+ {
2287
+ "name": "routing: audit stream (SSE) × POST as none → 405",
2288
+ "method": "POST",
2289
+ "target": "{sse_path}",
2290
+ "as": "none",
2291
+ "headers": [
2292
+ "content-type: application/json"
2293
+ ],
2294
+ "requires": [
2295
+ "sse"
2296
+ ],
2297
+ "expect": {
2298
+ "status": 405,
2299
+ "error": "method_not_allowed",
2300
+ "allow": [
2301
+ "GET",
2302
+ "HEAD"
2303
+ ]
2304
+ }
2305
+ },
2306
+ {
2307
+ "name": "routing: audit stream (SSE) × POST as keeper_session → 405",
2308
+ "method": "POST",
2309
+ "target": "{sse_path}",
2310
+ "as": "keeper_session",
2311
+ "headers": [
2312
+ "content-type: application/json"
2313
+ ],
2314
+ "requires": [
2315
+ "sse"
2316
+ ],
2317
+ "expect": {
2318
+ "status": 405,
2319
+ "error": "method_not_allowed",
2320
+ "allow": [
2321
+ "GET",
2322
+ "HEAD"
2323
+ ]
2324
+ }
2325
+ },
2326
+ {
2327
+ "name": "routing: audit stream (SSE) × POST with a foreign Origin → 403",
2328
+ "method": "POST",
2329
+ "target": "{sse_path}",
2330
+ "as": "keeper_session",
2331
+ "origin": "http://foreign.invalid",
2332
+ "headers": [
2333
+ "content-type: application/json"
2334
+ ],
2335
+ "requires": [
2336
+ "sse"
2337
+ ],
2338
+ "expect": {
2339
+ "status": 403,
2340
+ "error": "forbidden_origin",
2341
+ "allow": []
2342
+ }
2343
+ },
2344
+ {
2345
+ "name": "routing: audit stream (SSE) × PUT as none → 405",
2346
+ "method": "PUT",
2347
+ "target": "{sse_path}",
2348
+ "as": "none",
2349
+ "requires": [
2350
+ "sse"
2351
+ ],
2352
+ "expect": {
2353
+ "status": 405,
2354
+ "error": "method_not_allowed",
2355
+ "allow": [
2356
+ "GET",
2357
+ "HEAD"
2358
+ ]
2359
+ }
2360
+ },
2361
+ {
2362
+ "name": "routing: audit stream (SSE) × PUT as keeper_session → 405",
2363
+ "method": "PUT",
2364
+ "target": "{sse_path}",
2365
+ "as": "keeper_session",
2366
+ "requires": [
2367
+ "sse"
2368
+ ],
2369
+ "expect": {
2370
+ "status": 405,
2371
+ "error": "method_not_allowed",
2372
+ "allow": [
2373
+ "GET",
2374
+ "HEAD"
2375
+ ]
2376
+ }
2377
+ },
2378
+ {
2379
+ "name": "routing: audit stream (SSE) × PUT with a foreign Origin → 403",
2380
+ "method": "PUT",
2381
+ "target": "{sse_path}",
2382
+ "as": "keeper_session",
2383
+ "origin": "http://foreign.invalid",
2384
+ "requires": [
2385
+ "sse"
2386
+ ],
2387
+ "expect": {
2388
+ "status": 403,
2389
+ "error": "forbidden_origin",
2390
+ "allow": []
2391
+ }
2392
+ },
2393
+ {
2394
+ "name": "routing: audit stream (SSE) × PATCH as none → 405",
2395
+ "method": "PATCH",
2396
+ "target": "{sse_path}",
2397
+ "as": "none",
2398
+ "requires": [
2399
+ "sse"
2400
+ ],
2401
+ "expect": {
2402
+ "status": 405,
2403
+ "error": "method_not_allowed",
2404
+ "allow": [
2405
+ "GET",
2406
+ "HEAD"
2407
+ ]
2408
+ }
2409
+ },
2410
+ {
2411
+ "name": "routing: audit stream (SSE) × PATCH as keeper_session → 405",
2412
+ "method": "PATCH",
2413
+ "target": "{sse_path}",
2414
+ "as": "keeper_session",
2415
+ "requires": [
2416
+ "sse"
2417
+ ],
2418
+ "expect": {
2419
+ "status": 405,
2420
+ "error": "method_not_allowed",
2421
+ "allow": [
2422
+ "GET",
2423
+ "HEAD"
2424
+ ]
2425
+ }
2426
+ },
2427
+ {
2428
+ "name": "routing: audit stream (SSE) × PATCH with a foreign Origin → 403",
2429
+ "method": "PATCH",
2430
+ "target": "{sse_path}",
2431
+ "as": "keeper_session",
2432
+ "origin": "http://foreign.invalid",
2433
+ "requires": [
2434
+ "sse"
2435
+ ],
2436
+ "expect": {
2437
+ "status": 403,
2438
+ "error": "forbidden_origin",
2439
+ "allow": []
2440
+ }
2441
+ },
2442
+ {
2443
+ "name": "routing: audit stream (SSE) × DELETE as none → 405",
2444
+ "method": "DELETE",
2445
+ "target": "{sse_path}",
2446
+ "as": "none",
2447
+ "requires": [
2448
+ "sse"
2449
+ ],
2450
+ "expect": {
2451
+ "status": 405,
2452
+ "error": "method_not_allowed",
2453
+ "allow": [
2454
+ "GET",
2455
+ "HEAD"
2456
+ ]
2457
+ }
2458
+ },
2459
+ {
2460
+ "name": "routing: audit stream (SSE) × DELETE as keeper_session → 405",
2461
+ "method": "DELETE",
2462
+ "target": "{sse_path}",
2463
+ "as": "keeper_session",
2464
+ "requires": [
2465
+ "sse"
2466
+ ],
2467
+ "expect": {
2468
+ "status": 405,
2469
+ "error": "method_not_allowed",
2470
+ "allow": [
2471
+ "GET",
2472
+ "HEAD"
2473
+ ]
2474
+ }
2475
+ },
2476
+ {
2477
+ "name": "routing: audit stream (SSE) × DELETE with a foreign Origin → 403",
2478
+ "method": "DELETE",
2479
+ "target": "{sse_path}",
2480
+ "as": "keeper_session",
2481
+ "origin": "http://foreign.invalid",
2482
+ "requires": [
2483
+ "sse"
2484
+ ],
2485
+ "expect": {
2486
+ "status": 403,
2487
+ "error": "forbidden_origin",
2488
+ "allow": []
2489
+ }
2490
+ },
2491
+ {
2492
+ "name": "routing: audit stream (SSE) × OPTIONS as none → 405",
2493
+ "method": "OPTIONS",
2494
+ "target": "{sse_path}",
2495
+ "as": "none",
2496
+ "requires": [
2497
+ "sse"
2498
+ ],
2499
+ "expect": {
2500
+ "status": 405,
2501
+ "error": "method_not_allowed",
2502
+ "allow": [
2503
+ "GET",
2504
+ "HEAD"
2505
+ ]
2506
+ }
2507
+ },
2508
+ {
2509
+ "name": "routing: audit stream (SSE) × OPTIONS as keeper_session → 405",
2510
+ "method": "OPTIONS",
2511
+ "target": "{sse_path}",
2512
+ "as": "keeper_session",
2513
+ "requires": [
2514
+ "sse"
2515
+ ],
2516
+ "expect": {
2517
+ "status": 405,
2518
+ "error": "method_not_allowed",
2519
+ "allow": [
2520
+ "GET",
2521
+ "HEAD"
2522
+ ]
2523
+ }
2524
+ },
2525
+ {
2526
+ "name": "routing: audit stream (SSE) × OPTIONS with a foreign Origin → 403",
2527
+ "method": "OPTIONS",
2528
+ "target": "{sse_path}",
2529
+ "as": "keeper_session",
2530
+ "origin": "http://foreign.invalid",
2531
+ "requires": [
2532
+ "sse"
2533
+ ],
2534
+ "expect": {
2535
+ "status": 403,
2536
+ "error": "forbidden_origin",
2537
+ "allow": []
2538
+ }
2539
+ },
2540
+ {
2541
+ "name": "routing: audit stream (SSE) × PUT with an invalid session cookie → 405",
2542
+ "method": "PUT",
2543
+ "target": "{sse_path}",
2544
+ "as": "invalid_session",
2545
+ "requires": [
2546
+ "sse"
2547
+ ],
2548
+ "expect": {
2549
+ "status": 405,
2550
+ "error": "method_not_allowed",
2551
+ "allow": [
2552
+ "GET",
2553
+ "HEAD"
2554
+ ],
2555
+ "clears_session": true
2556
+ }
2557
+ },
2558
+ {
2559
+ "name": "routing: health (outside /api) × GET with a foreign Origin → 403",
2560
+ "method": "GET",
2561
+ "target": "{health_path}",
2562
+ "as": "keeper_session",
2563
+ "origin": "http://foreign.invalid",
2564
+ "expect": {
2565
+ "status": 403,
2566
+ "error": "forbidden_origin",
2567
+ "allow": []
2568
+ }
2569
+ },
2570
+ {
2571
+ "name": "routing: health (outside /api) × HEAD with a foreign Origin → 403",
2572
+ "method": "HEAD",
2573
+ "target": "{health_path}",
2574
+ "as": "keeper_session",
2575
+ "origin": "http://foreign.invalid",
2576
+ "expect": {
2577
+ "status": 403,
2578
+ "media": "json",
2579
+ "allow": []
2580
+ }
2581
+ },
2582
+ {
2583
+ "name": "routing: health (outside /api) × POST as none → 405",
2584
+ "method": "POST",
2585
+ "target": "{health_path}",
2586
+ "as": "none",
2587
+ "headers": [
2588
+ "content-type: application/json"
2589
+ ],
2590
+ "expect": {
2591
+ "status": 405,
2592
+ "error": "method_not_allowed",
2593
+ "allow": [
2594
+ "GET",
2595
+ "HEAD"
2596
+ ]
2597
+ }
2598
+ },
2599
+ {
2600
+ "name": "routing: health (outside /api) × POST as keeper_session → 405",
2601
+ "method": "POST",
2602
+ "target": "{health_path}",
2603
+ "as": "keeper_session",
2604
+ "headers": [
2605
+ "content-type: application/json"
2606
+ ],
2607
+ "expect": {
2608
+ "status": 405,
2609
+ "error": "method_not_allowed",
2610
+ "allow": [
2611
+ "GET",
2612
+ "HEAD"
2613
+ ]
2614
+ }
2615
+ },
2616
+ {
2617
+ "name": "routing: health (outside /api) × POST with a foreign Origin → 403",
2618
+ "method": "POST",
2619
+ "target": "{health_path}",
2620
+ "as": "keeper_session",
2621
+ "origin": "http://foreign.invalid",
2622
+ "headers": [
2623
+ "content-type: application/json"
2624
+ ],
2625
+ "expect": {
2626
+ "status": 403,
2627
+ "error": "forbidden_origin",
2628
+ "allow": []
2629
+ }
2630
+ },
2631
+ {
2632
+ "name": "routing: health (outside /api) × PUT as none → 405",
2633
+ "method": "PUT",
2634
+ "target": "{health_path}",
2635
+ "as": "none",
2636
+ "expect": {
2637
+ "status": 405,
2638
+ "error": "method_not_allowed",
2639
+ "allow": [
2640
+ "GET",
2641
+ "HEAD"
2642
+ ]
2643
+ }
2644
+ },
2645
+ {
2646
+ "name": "routing: health (outside /api) × PUT as keeper_session → 405",
2647
+ "method": "PUT",
2648
+ "target": "{health_path}",
2649
+ "as": "keeper_session",
2650
+ "expect": {
2651
+ "status": 405,
2652
+ "error": "method_not_allowed",
2653
+ "allow": [
2654
+ "GET",
2655
+ "HEAD"
2656
+ ]
2657
+ }
2658
+ },
2659
+ {
2660
+ "name": "routing: health (outside /api) × PUT with a foreign Origin → 403",
2661
+ "method": "PUT",
2662
+ "target": "{health_path}",
2663
+ "as": "keeper_session",
2664
+ "origin": "http://foreign.invalid",
2665
+ "expect": {
2666
+ "status": 403,
2667
+ "error": "forbidden_origin",
2668
+ "allow": []
2669
+ }
2670
+ },
2671
+ {
2672
+ "name": "routing: health (outside /api) × PATCH as none → 405",
2673
+ "method": "PATCH",
2674
+ "target": "{health_path}",
2675
+ "as": "none",
2676
+ "expect": {
2677
+ "status": 405,
2678
+ "error": "method_not_allowed",
2679
+ "allow": [
2680
+ "GET",
2681
+ "HEAD"
2682
+ ]
2683
+ }
2684
+ },
2685
+ {
2686
+ "name": "routing: health (outside /api) × PATCH as keeper_session → 405",
2687
+ "method": "PATCH",
2688
+ "target": "{health_path}",
2689
+ "as": "keeper_session",
2690
+ "expect": {
2691
+ "status": 405,
2692
+ "error": "method_not_allowed",
2693
+ "allow": [
2694
+ "GET",
2695
+ "HEAD"
2696
+ ]
2697
+ }
2698
+ },
2699
+ {
2700
+ "name": "routing: health (outside /api) × PATCH with a foreign Origin → 403",
2701
+ "method": "PATCH",
2702
+ "target": "{health_path}",
2703
+ "as": "keeper_session",
2704
+ "origin": "http://foreign.invalid",
2705
+ "expect": {
2706
+ "status": 403,
2707
+ "error": "forbidden_origin",
2708
+ "allow": []
2709
+ }
2710
+ },
2711
+ {
2712
+ "name": "routing: health (outside /api) × DELETE as none → 405",
2713
+ "method": "DELETE",
2714
+ "target": "{health_path}",
2715
+ "as": "none",
2716
+ "expect": {
2717
+ "status": 405,
2718
+ "error": "method_not_allowed",
2719
+ "allow": [
2720
+ "GET",
2721
+ "HEAD"
2722
+ ]
2723
+ }
2724
+ },
2725
+ {
2726
+ "name": "routing: health (outside /api) × DELETE as keeper_session → 405",
2727
+ "method": "DELETE",
2728
+ "target": "{health_path}",
2729
+ "as": "keeper_session",
2730
+ "expect": {
2731
+ "status": 405,
2732
+ "error": "method_not_allowed",
2733
+ "allow": [
2734
+ "GET",
2735
+ "HEAD"
2736
+ ]
2737
+ }
2738
+ },
2739
+ {
2740
+ "name": "routing: health (outside /api) × DELETE with a foreign Origin → 403",
2741
+ "method": "DELETE",
2742
+ "target": "{health_path}",
2743
+ "as": "keeper_session",
2744
+ "origin": "http://foreign.invalid",
2745
+ "expect": {
2746
+ "status": 403,
2747
+ "error": "forbidden_origin",
2748
+ "allow": []
2749
+ }
2750
+ },
2751
+ {
2752
+ "name": "routing: health (outside /api) × OPTIONS as none → 405",
2753
+ "method": "OPTIONS",
2754
+ "target": "{health_path}",
2755
+ "as": "none",
2756
+ "expect": {
2757
+ "status": 405,
2758
+ "error": "method_not_allowed",
2759
+ "allow": [
2760
+ "GET",
2761
+ "HEAD"
2762
+ ]
2763
+ }
2764
+ },
2765
+ {
2766
+ "name": "routing: health (outside /api) × OPTIONS as keeper_session → 405",
2767
+ "method": "OPTIONS",
2768
+ "target": "{health_path}",
2769
+ "as": "keeper_session",
2770
+ "expect": {
2771
+ "status": 405,
2772
+ "error": "method_not_allowed",
2773
+ "allow": [
2774
+ "GET",
2775
+ "HEAD"
2776
+ ]
2777
+ }
2778
+ },
2779
+ {
2780
+ "name": "routing: health (outside /api) × OPTIONS with a foreign Origin → 403",
2781
+ "method": "OPTIONS",
2782
+ "target": "{health_path}",
2783
+ "as": "keeper_session",
2784
+ "origin": "http://foreign.invalid",
2785
+ "expect": {
2786
+ "status": 403,
2787
+ "error": "forbidden_origin",
2788
+ "allow": []
2789
+ }
2790
+ },
2791
+ {
2792
+ "name": "routing: health (outside /api) × PUT with an invalid session cookie → 405",
2793
+ "method": "PUT",
2794
+ "target": "{health_path}",
2795
+ "as": "invalid_session",
2796
+ "expect": {
2797
+ "status": 405,
2798
+ "error": "method_not_allowed",
2799
+ "allow": [
2800
+ "GET",
2801
+ "HEAD"
2802
+ ],
2803
+ "clears_session": false
2804
+ }
2805
+ },
2806
+ {
2807
+ "name": "routing: account status × HEAD as keeper_session → 200",
2808
+ "method": "HEAD",
2809
+ "target": "{account_status_path}",
2810
+ "as": "keeper_session",
2811
+ "requires": [
2812
+ "account_status"
2813
+ ],
2814
+ "expect": {
2815
+ "status": 200,
2816
+ "media": "json"
2817
+ }
2818
+ },
2819
+ {
2820
+ "name": "routing: account status × HEAD as none → 401",
2821
+ "method": "HEAD",
2822
+ "target": "{account_status_path}",
2823
+ "as": "none",
2824
+ "requires": [
2825
+ "account_status"
2826
+ ],
2827
+ "expect": {
2828
+ "status": 401,
2829
+ "media": "json"
2830
+ }
2831
+ },
2832
+ {
2833
+ "name": "routing: health × HEAD → 200",
2834
+ "method": "HEAD",
2835
+ "target": "{health_path}",
2836
+ "as": "none",
2837
+ "expect": {
2838
+ "status": 200,
2839
+ "media": "json"
2840
+ }
2841
+ },
2842
+ {
2843
+ "name": "routing: audit stream × HEAD as none → 401",
2844
+ "method": "HEAD",
2845
+ "target": "{sse_path}",
2846
+ "as": "none",
2847
+ "requires": [
2848
+ "sse"
2849
+ ],
2850
+ "expect": {
2851
+ "status": 401,
2852
+ "media": "json"
2853
+ }
2854
+ },
2855
+ {
2856
+ "name": "routing: ws path × GET without upgrade as none → 401",
2857
+ "method": "GET",
2858
+ "target": "{ws_path}",
2859
+ "as": "none",
2860
+ "requires": [
2861
+ "ws"
2862
+ ],
2863
+ "expect": {
2864
+ "status": 401,
2865
+ "error": "authentication_required"
2866
+ }
2867
+ },
2868
+ {
2869
+ "name": "routing: ws path × GET without upgrade, admitted by the gates → 404",
2870
+ "method": "GET",
2871
+ "target": "{ws_path}",
2872
+ "as": "keeper_session",
2873
+ "requires": [
2874
+ "ws"
2875
+ ],
2876
+ "expect": {
2877
+ "status": 404,
2878
+ "error": "route_not_found",
2879
+ "allow": []
2880
+ }
2881
+ },
2882
+ {
2883
+ "name": "routing: ws path × HEAD without upgrade, admitted by the gates → 404",
2884
+ "method": "HEAD",
2885
+ "target": "{ws_path}",
2886
+ "as": "keeper_session",
2887
+ "requires": [
2888
+ "ws"
2889
+ ],
2890
+ "expect": {
2891
+ "status": 404,
2892
+ "allow": [],
2893
+ "media": "json"
2894
+ }
2895
+ },
2896
+ {
2897
+ "name": "routing: an unmatched path under /api × GET as none → 404",
2898
+ "method": "GET",
2899
+ "target": "/api/no_such_route",
2900
+ "as": "none",
2901
+ "expect": {
2902
+ "status": 404,
2903
+ "error": "route_not_found",
2904
+ "allow": []
2905
+ }
2906
+ },
2907
+ {
2908
+ "name": "routing: an unmatched path under /api × HEAD as none → 404",
2909
+ "method": "HEAD",
2910
+ "target": "/api/no_such_route",
2911
+ "as": "none",
2912
+ "expect": {
2913
+ "status": 404,
2914
+ "allow": [],
2915
+ "media": "json"
2916
+ }
2917
+ },
2918
+ {
2919
+ "name": "routing: an unmatched path under /api × POST as none → 404",
2920
+ "method": "POST",
2921
+ "target": "/api/no_such_route",
2922
+ "as": "none",
2923
+ "headers": [
2924
+ "content-type: application/json"
2925
+ ],
2926
+ "expect": {
2927
+ "status": 404,
2928
+ "error": "route_not_found",
2929
+ "allow": []
2930
+ }
2931
+ },
2932
+ {
2933
+ "name": "routing: an unmatched path under /api × PUT as none → 404",
2934
+ "method": "PUT",
2935
+ "target": "/api/no_such_route",
2936
+ "as": "none",
2937
+ "expect": {
2938
+ "status": 404,
2939
+ "error": "route_not_found",
2940
+ "allow": []
2941
+ }
2942
+ },
2943
+ {
2944
+ "name": "routing: an unmatched path under /api × OPTIONS as none → 404",
2945
+ "method": "OPTIONS",
2946
+ "target": "/api/no_such_route",
2947
+ "as": "none",
2948
+ "expect": {
2949
+ "status": 404,
2950
+ "error": "route_not_found",
2951
+ "allow": []
2952
+ }
2953
+ },
2954
+ {
2955
+ "name": "routing: an unmatched path under /api × GET as keeper_session → 404",
2956
+ "method": "GET",
2957
+ "target": "/api/no_such_route",
2958
+ "as": "keeper_session",
2959
+ "expect": {
2960
+ "status": 404,
2961
+ "error": "route_not_found",
2962
+ "allow": []
2963
+ }
2964
+ },
2965
+ {
2966
+ "name": "routing: an unmatched path under /api × GET with a foreign Origin → 403",
2967
+ "method": "GET",
2968
+ "target": "/api/no_such_route",
2969
+ "as": "keeper_session",
2970
+ "origin": "http://foreign.invalid",
2971
+ "expect": {
2972
+ "status": 403,
2973
+ "error": "forbidden_origin",
2974
+ "allow": []
2975
+ }
2976
+ },
2977
+ {
2978
+ "name": "routing: the bare /api × GET as none → 404",
2979
+ "method": "GET",
2980
+ "target": "/api",
2981
+ "as": "none",
2982
+ "expect": {
2983
+ "status": 404,
2984
+ "error": "route_not_found",
2985
+ "allow": []
2986
+ }
2987
+ },
2988
+ {
2989
+ "name": "routing: the bare /api × HEAD as none → 404",
2990
+ "method": "HEAD",
2991
+ "target": "/api",
2992
+ "as": "none",
2993
+ "expect": {
2994
+ "status": 404,
2995
+ "allow": [],
2996
+ "media": "json"
2997
+ }
2998
+ },
2999
+ {
3000
+ "name": "routing: the bare /api × POST as none → 404",
3001
+ "method": "POST",
3002
+ "target": "/api",
3003
+ "as": "none",
3004
+ "headers": [
3005
+ "content-type: application/json"
3006
+ ],
3007
+ "expect": {
3008
+ "status": 404,
3009
+ "error": "route_not_found",
3010
+ "allow": []
3011
+ }
3012
+ },
3013
+ {
3014
+ "name": "routing: the bare /api × PUT as none → 404",
3015
+ "method": "PUT",
3016
+ "target": "/api",
3017
+ "as": "none",
3018
+ "expect": {
3019
+ "status": 404,
3020
+ "error": "route_not_found",
3021
+ "allow": []
3022
+ }
3023
+ },
3024
+ {
3025
+ "name": "routing: the bare /api × OPTIONS as none → 404",
3026
+ "method": "OPTIONS",
3027
+ "target": "/api",
3028
+ "as": "none",
3029
+ "expect": {
3030
+ "status": 404,
3031
+ "error": "route_not_found",
3032
+ "allow": []
3033
+ }
3034
+ },
3035
+ {
3036
+ "name": "routing: the bare /api × GET as keeper_session → 404",
3037
+ "method": "GET",
3038
+ "target": "/api",
3039
+ "as": "keeper_session",
3040
+ "expect": {
3041
+ "status": 404,
3042
+ "error": "route_not_found",
3043
+ "allow": []
3044
+ }
3045
+ },
3046
+ {
3047
+ "name": "routing: the bare /api × GET with a foreign Origin → 403",
3048
+ "method": "GET",
3049
+ "target": "/api",
3050
+ "as": "keeper_session",
3051
+ "origin": "http://foreign.invalid",
3052
+ "expect": {
3053
+ "status": 403,
3054
+ "error": "forbidden_origin",
3055
+ "allow": []
3056
+ }
3057
+ },
3058
+ {
3059
+ "name": "routing: /api/ × GET as none → 404",
3060
+ "method": "GET",
3061
+ "target": "/api/",
3062
+ "as": "none",
3063
+ "expect": {
3064
+ "status": 404,
3065
+ "error": "route_not_found",
3066
+ "allow": []
3067
+ }
3068
+ },
3069
+ {
3070
+ "name": "routing: /api/ × HEAD as none → 404",
3071
+ "method": "HEAD",
3072
+ "target": "/api/",
3073
+ "as": "none",
3074
+ "expect": {
3075
+ "status": 404,
3076
+ "allow": [],
3077
+ "media": "json"
3078
+ }
3079
+ },
3080
+ {
3081
+ "name": "routing: /api/ × POST as none → 404",
3082
+ "method": "POST",
3083
+ "target": "/api/",
3084
+ "as": "none",
3085
+ "headers": [
3086
+ "content-type: application/json"
3087
+ ],
3088
+ "expect": {
3089
+ "status": 404,
3090
+ "error": "route_not_found",
3091
+ "allow": []
3092
+ }
3093
+ },
3094
+ {
3095
+ "name": "routing: /api/ × PUT as none → 404",
3096
+ "method": "PUT",
3097
+ "target": "/api/",
3098
+ "as": "none",
3099
+ "expect": {
3100
+ "status": 404,
3101
+ "error": "route_not_found",
3102
+ "allow": []
3103
+ }
3104
+ },
3105
+ {
3106
+ "name": "routing: /api/ × OPTIONS as none → 404",
3107
+ "method": "OPTIONS",
3108
+ "target": "/api/",
3109
+ "as": "none",
3110
+ "expect": {
3111
+ "status": 404,
3112
+ "error": "route_not_found",
3113
+ "allow": []
3114
+ }
3115
+ },
3116
+ {
3117
+ "name": "routing: /api/ × GET as keeper_session → 404",
3118
+ "method": "GET",
3119
+ "target": "/api/",
3120
+ "as": "keeper_session",
3121
+ "expect": {
3122
+ "status": 404,
3123
+ "error": "route_not_found",
3124
+ "allow": []
3125
+ }
3126
+ },
3127
+ {
3128
+ "name": "routing: /api/ × GET with a foreign Origin → 403",
3129
+ "method": "GET",
3130
+ "target": "/api/",
3131
+ "as": "keeper_session",
3132
+ "origin": "http://foreign.invalid",
3133
+ "expect": {
3134
+ "status": 403,
3135
+ "error": "forbidden_origin",
3136
+ "allow": []
3137
+ }
3138
+ },
3139
+ {
3140
+ "name": "routing: a deep unmatched path under /api × GET as none → 404",
3141
+ "method": "GET",
3142
+ "target": "/api/no/such/route",
3143
+ "as": "none",
3144
+ "expect": {
3145
+ "status": 404,
3146
+ "error": "route_not_found",
3147
+ "allow": []
3148
+ }
3149
+ },
3150
+ {
3151
+ "name": "routing: a deep unmatched path under /api × HEAD as none → 404",
3152
+ "method": "HEAD",
3153
+ "target": "/api/no/such/route",
3154
+ "as": "none",
3155
+ "expect": {
3156
+ "status": 404,
3157
+ "allow": [],
3158
+ "media": "json"
3159
+ }
3160
+ },
3161
+ {
3162
+ "name": "routing: a deep unmatched path under /api × POST as none → 404",
3163
+ "method": "POST",
3164
+ "target": "/api/no/such/route",
3165
+ "as": "none",
3166
+ "headers": [
3167
+ "content-type: application/json"
3168
+ ],
3169
+ "expect": {
3170
+ "status": 404,
3171
+ "error": "route_not_found",
3172
+ "allow": []
3173
+ }
3174
+ },
3175
+ {
3176
+ "name": "routing: a deep unmatched path under /api × PUT as none → 404",
3177
+ "method": "PUT",
3178
+ "target": "/api/no/such/route",
3179
+ "as": "none",
3180
+ "expect": {
3181
+ "status": 404,
3182
+ "error": "route_not_found",
3183
+ "allow": []
3184
+ }
3185
+ },
3186
+ {
3187
+ "name": "routing: a deep unmatched path under /api × OPTIONS as none → 404",
3188
+ "method": "OPTIONS",
3189
+ "target": "/api/no/such/route",
3190
+ "as": "none",
3191
+ "expect": {
3192
+ "status": 404,
3193
+ "error": "route_not_found",
3194
+ "allow": []
3195
+ }
3196
+ },
3197
+ {
3198
+ "name": "routing: a deep unmatched path under /api × GET as keeper_session → 404",
3199
+ "method": "GET",
3200
+ "target": "/api/no/such/route",
3201
+ "as": "keeper_session",
3202
+ "expect": {
3203
+ "status": 404,
3204
+ "error": "route_not_found",
3205
+ "allow": []
3206
+ }
3207
+ },
3208
+ {
3209
+ "name": "routing: a deep unmatched path under /api × GET with a foreign Origin → 403",
3210
+ "method": "GET",
3211
+ "target": "/api/no/such/route",
3212
+ "as": "keeper_session",
3213
+ "origin": "http://foreign.invalid",
3214
+ "expect": {
3215
+ "status": 403,
3216
+ "error": "forbidden_origin",
3217
+ "allow": []
3218
+ }
3219
+ },
3220
+ {
3221
+ "name": "routing: an unmatched path outside /api × GET as none → 404",
3222
+ "method": "GET",
3223
+ "target": "/no_such_path",
3224
+ "as": "none",
3225
+ "requires": [
3226
+ "spine_fallback"
3227
+ ],
3228
+ "expect": {
3229
+ "status": 404,
3230
+ "text": "404 Not Found",
3231
+ "allow": []
3232
+ }
3233
+ },
3234
+ {
3235
+ "name": "routing: an unmatched path outside /api × HEAD as none → 404",
3236
+ "method": "HEAD",
3237
+ "target": "/no_such_path",
3238
+ "as": "none",
3239
+ "requires": [
3240
+ "spine_fallback"
3241
+ ],
3242
+ "expect": {
3243
+ "status": 404,
3244
+ "allow": [],
3245
+ "media": "text"
3246
+ }
3247
+ },
3248
+ {
3249
+ "name": "routing: an unmatched path outside /api × POST as none → 404",
3250
+ "method": "POST",
3251
+ "target": "/no_such_path",
3252
+ "as": "none",
3253
+ "headers": [
3254
+ "content-type: application/json"
3255
+ ],
3256
+ "requires": [
3257
+ "spine_fallback"
3258
+ ],
3259
+ "expect": {
3260
+ "status": 404,
3261
+ "text": "404 Not Found",
3262
+ "allow": []
3263
+ }
3264
+ },
3265
+ {
3266
+ "name": "routing: an unmatched path outside /api × PUT as none → 404",
3267
+ "method": "PUT",
3268
+ "target": "/no_such_path",
3269
+ "as": "none",
3270
+ "requires": [
3271
+ "spine_fallback"
3272
+ ],
3273
+ "expect": {
3274
+ "status": 404,
3275
+ "text": "404 Not Found",
3276
+ "allow": []
3277
+ }
3278
+ },
3279
+ {
3280
+ "name": "routing: an unmatched path outside /api × OPTIONS as none → 404",
3281
+ "method": "OPTIONS",
3282
+ "target": "/no_such_path",
3283
+ "as": "none",
3284
+ "requires": [
3285
+ "spine_fallback"
3286
+ ],
3287
+ "expect": {
3288
+ "status": 404,
3289
+ "text": "404 Not Found",
3290
+ "allow": []
3291
+ }
3292
+ },
3293
+ {
3294
+ "name": "routing: an unmatched path outside /api × GET as keeper_session → 404",
3295
+ "method": "GET",
3296
+ "target": "/no_such_path",
3297
+ "as": "keeper_session",
3298
+ "requires": [
3299
+ "spine_fallback"
3300
+ ],
3301
+ "expect": {
3302
+ "status": 404,
3303
+ "text": "404 Not Found",
3304
+ "allow": []
3305
+ }
3306
+ },
3307
+ {
3308
+ "name": "routing: an unmatched path outside /api × GET with a foreign Origin → 403",
3309
+ "method": "GET",
3310
+ "target": "/no_such_path",
3311
+ "as": "keeper_session",
3312
+ "origin": "http://foreign.invalid",
3313
+ "expect": {
3314
+ "status": 403,
3315
+ "error": "forbidden_origin",
3316
+ "allow": []
3317
+ }
3318
+ },
3319
+ {
3320
+ "name": "routing: the prefix letters without the slash × GET as none → 404",
3321
+ "method": "GET",
3322
+ "target": "/apix",
3323
+ "as": "none",
3324
+ "requires": [
3325
+ "spine_fallback"
3326
+ ],
3327
+ "expect": {
3328
+ "status": 404,
3329
+ "text": "404 Not Found",
3330
+ "allow": []
3331
+ }
3332
+ },
3333
+ {
3334
+ "name": "routing: the prefix letters without the slash × HEAD as none → 404",
3335
+ "method": "HEAD",
3336
+ "target": "/apix",
3337
+ "as": "none",
3338
+ "requires": [
3339
+ "spine_fallback"
3340
+ ],
3341
+ "expect": {
3342
+ "status": 404,
3343
+ "allow": [],
3344
+ "media": "text"
3345
+ }
3346
+ },
3347
+ {
3348
+ "name": "routing: the prefix letters without the slash × POST as none → 404",
3349
+ "method": "POST",
3350
+ "target": "/apix",
3351
+ "as": "none",
3352
+ "headers": [
3353
+ "content-type: application/json"
3354
+ ],
3355
+ "requires": [
3356
+ "spine_fallback"
3357
+ ],
3358
+ "expect": {
3359
+ "status": 404,
3360
+ "text": "404 Not Found",
3361
+ "allow": []
3362
+ }
3363
+ },
3364
+ {
3365
+ "name": "routing: the prefix letters without the slash × PUT as none → 404",
3366
+ "method": "PUT",
3367
+ "target": "/apix",
3368
+ "as": "none",
3369
+ "requires": [
3370
+ "spine_fallback"
3371
+ ],
3372
+ "expect": {
3373
+ "status": 404,
3374
+ "text": "404 Not Found",
3375
+ "allow": []
3376
+ }
3377
+ },
3378
+ {
3379
+ "name": "routing: the prefix letters without the slash × OPTIONS as none → 404",
3380
+ "method": "OPTIONS",
3381
+ "target": "/apix",
3382
+ "as": "none",
3383
+ "requires": [
3384
+ "spine_fallback"
3385
+ ],
3386
+ "expect": {
3387
+ "status": 404,
3388
+ "text": "404 Not Found",
3389
+ "allow": []
3390
+ }
3391
+ },
3392
+ {
3393
+ "name": "routing: the prefix letters without the slash × GET as keeper_session → 404",
3394
+ "method": "GET",
3395
+ "target": "/apix",
3396
+ "as": "keeper_session",
3397
+ "requires": [
3398
+ "spine_fallback"
3399
+ ],
3400
+ "expect": {
3401
+ "status": 404,
3402
+ "text": "404 Not Found",
3403
+ "allow": []
3404
+ }
3405
+ },
3406
+ {
3407
+ "name": "routing: the prefix letters without the slash × GET with a foreign Origin → 403",
3408
+ "method": "GET",
3409
+ "target": "/apix",
3410
+ "as": "keeper_session",
3411
+ "origin": "http://foreign.invalid",
3412
+ "expect": {
3413
+ "status": 403,
3414
+ "error": "forbidden_origin",
3415
+ "allow": []
3416
+ }
3417
+ },
3418
+ {
3419
+ "name": "routing: an unmatched path under /api × GET with an invalid session cookie → 404, cleared",
3420
+ "method": "GET",
3421
+ "target": "/api/no_such_route",
3422
+ "as": "invalid_session",
3423
+ "expect": {
3424
+ "status": 404,
3425
+ "error": "route_not_found",
3426
+ "allow": [],
3427
+ "clears_session": true
3428
+ }
3429
+ },
3430
+ {
3431
+ "name": "routing: an unmatched path outside /api × GET with an invalid session cookie → 404, not cleared",
3432
+ "method": "GET",
3433
+ "target": "/no_such_path",
3434
+ "as": "invalid_session",
3435
+ "requires": [
3436
+ "spine_fallback"
3437
+ ],
3438
+ "expect": {
3439
+ "status": 404,
3440
+ "text": "404 Not Found",
3441
+ "allow": [],
3442
+ "clears_session": false
3443
+ }
3444
+ },
3445
+ {
3446
+ "name": "routing: a trailing slash of a routed path × GET → 404",
3447
+ "method": "GET",
3448
+ "target": "{account_status_path}/",
3449
+ "as": "keeper_session",
3450
+ "requires": [
3451
+ "account_status"
3452
+ ],
3453
+ "expect": {
3454
+ "status": 404,
3455
+ "error": "route_not_found",
3456
+ "allow": []
3457
+ }
3458
+ },
3459
+ {
3460
+ "name": "routing: a doubled slash inside of a routed path × GET → 404",
3461
+ "method": "GET",
3462
+ "target": "/api//account/status",
3463
+ "as": "keeper_session",
3464
+ "requires": [
3465
+ "account_status"
3466
+ ],
3467
+ "expect": {
3468
+ "status": 404,
3469
+ "error": "route_not_found",
3470
+ "allow": []
3471
+ }
3472
+ },
3473
+ {
3474
+ "name": "routing: a doubled leading slash of a routed path × GET → 404",
3475
+ "method": "GET",
3476
+ "target": "//api/account/status",
3477
+ "as": "keeper_session",
3478
+ "requires": [
3479
+ "account_status",
3480
+ "spine_fallback"
3481
+ ],
3482
+ "expect": {
3483
+ "status": 404,
3484
+ "text": "404 Not Found",
3485
+ "allow": []
3486
+ }
3487
+ },
3488
+ {
3489
+ "name": "routing: a case variant of the prefix of a routed path × GET → 404",
3490
+ "method": "GET",
3491
+ "target": "/API/account/status",
3492
+ "as": "keeper_session",
3493
+ "requires": [
3494
+ "account_status",
3495
+ "spine_fallback"
3496
+ ],
3497
+ "expect": {
3498
+ "status": 404,
3499
+ "text": "404 Not Found",
3500
+ "allow": []
3501
+ }
3502
+ },
3503
+ {
3504
+ "name": "routing: a case variant below the prefix of a routed path × GET → 404",
3505
+ "method": "GET",
3506
+ "target": "/api/Account/status",
3507
+ "as": "keeper_session",
3508
+ "expect": {
3509
+ "status": 404,
3510
+ "error": "route_not_found",
3511
+ "allow": []
3512
+ }
3513
+ },
3514
+ {
3515
+ "name": "routing: an encoded letter in the prefix of a routed path × GET → 404",
3516
+ "method": "GET",
3517
+ "target": "/%61pi/account/status",
3518
+ "as": "keeper_session",
3519
+ "requires": [
3520
+ "account_status",
3521
+ "spine_fallback"
3522
+ ],
3523
+ "expect": {
3524
+ "status": 404,
3525
+ "text": "404 Not Found",
3526
+ "allow": []
3527
+ }
3528
+ },
3529
+ {
3530
+ "name": "routing: an encoded letter below the prefix of a routed path × GET → 404",
3531
+ "method": "GET",
3532
+ "target": "/api/%61ccount/status",
3533
+ "as": "keeper_session",
3534
+ "expect": {
3535
+ "status": 404,
3536
+ "error": "route_not_found",
3537
+ "allow": []
3538
+ }
3539
+ },
3540
+ {
3541
+ "name": "routing: an encoded slash after the prefix of a routed path × GET → 404",
3542
+ "method": "GET",
3543
+ "target": "/api%2Faccount/status",
3544
+ "as": "keeper_session",
3545
+ "requires": [
3546
+ "account_status",
3547
+ "spine_fallback"
3548
+ ],
3549
+ "expect": {
3550
+ "status": 404,
3551
+ "text": "404 Not Found",
3552
+ "allow": []
3553
+ }
3554
+ },
3555
+ {
3556
+ "name": "routing: an encoded letter in a fact route literal of a routed path × GET → 404",
3557
+ "method": "GET",
3558
+ "target": "/api/%66acts/%FF",
3559
+ "as": "keeper_session",
3560
+ "expect": {
3561
+ "status": 404,
3562
+ "error": "route_not_found",
3563
+ "allow": []
3564
+ }
3565
+ },
3566
+ {
3567
+ "name": "routing: an encoded letter in the prefix of the rpc path × PUT → 404, not 405",
3568
+ "method": "PUT",
3569
+ "target": "/%61pi/rpc",
3570
+ "as": "none",
3571
+ "requires": [
3572
+ "spine_fallback"
3573
+ ],
3574
+ "expect": {
3575
+ "status": 404,
3576
+ "text": "404 Not Found",
3577
+ "allow": []
3578
+ }
3579
+ },
3580
+ {
3581
+ "name": "routing: an encoded letter below the prefix of the rpc path × PUT → 404, not 405",
3582
+ "method": "PUT",
3583
+ "target": "/api/%72pc",
3584
+ "as": "none",
3585
+ "expect": {
3586
+ "status": 404,
3587
+ "error": "route_not_found",
3588
+ "allow": []
3589
+ }
3590
+ },
3591
+ {
3592
+ "name": "routing: dot segments: a `..` segment out of /api × GET",
3593
+ "method": "GET",
3594
+ "target": "/api/../health",
3595
+ "as": "none",
3596
+ "expect": {
3597
+ "status": 404,
3598
+ "error": "route_not_found",
3599
+ "allow": []
3600
+ },
3601
+ "expect_where_dot_segments_resolved": {
3602
+ "status": 200
3603
+ },
3604
+ "note": "each runtime as it reads dot segments (`runtime_resolves_dot_segments`)"
3605
+ },
3606
+ {
3607
+ "name": "routing: dot segments: an encoded `..` segment out of /api × GET",
3608
+ "method": "GET",
3609
+ "target": "/api/%2e%2e/health",
3610
+ "as": "none",
3611
+ "expect": {
3612
+ "status": 404,
3613
+ "error": "route_not_found",
3614
+ "allow": []
3615
+ },
3616
+ "expect_where_dot_segments_resolved": {
3617
+ "status": 200
3618
+ },
3619
+ "note": "each runtime as it reads dot segments (`runtime_resolves_dot_segments`)"
3620
+ },
3621
+ {
3622
+ "name": "routing: dot segments: an encoded `..` segment, upper case out of /api × GET",
3623
+ "method": "GET",
3624
+ "target": "/api/%2E%2E/health",
3625
+ "as": "none",
3626
+ "expect": {
3627
+ "status": 404,
3628
+ "error": "route_not_found",
3629
+ "allow": []
3630
+ },
3631
+ "expect_where_dot_segments_resolved": {
3632
+ "status": 200
3633
+ },
3634
+ "note": "each runtime as it reads dot segments (`runtime_resolves_dot_segments`)"
3635
+ },
3636
+ {
3637
+ "name": "routing: dot segments: a half-encoded `..` segment out of /api × GET",
3638
+ "method": "GET",
3639
+ "target": "/api/.%2e/health",
3640
+ "as": "none",
3641
+ "expect": {
3642
+ "status": 404,
3643
+ "error": "route_not_found",
3644
+ "allow": []
3645
+ },
3646
+ "expect_where_dot_segments_resolved": {
3647
+ "status": 200
3648
+ },
3649
+ "note": "each runtime as it reads dot segments (`runtime_resolves_dot_segments`)"
3650
+ },
3651
+ {
3652
+ "name": "routing: dot segments: a `..` segment out of /api × PUT",
3653
+ "method": "PUT",
3654
+ "target": "/api/../health",
3655
+ "as": "none",
3656
+ "expect": {
3657
+ "status": 404,
3658
+ "error": "route_not_found",
3659
+ "allow": []
3660
+ },
3661
+ "expect_where_dot_segments_resolved": {
3662
+ "status": 405,
3663
+ "error": "method_not_allowed",
3664
+ "allow": [
3665
+ "GET",
3666
+ "HEAD"
3667
+ ]
3668
+ },
3669
+ "note": "each runtime as it reads dot segments (`runtime_resolves_dot_segments`)"
3670
+ },
3671
+ {
3672
+ "name": "routing: dot segments: a `.` segment before /api × GET",
3673
+ "method": "GET",
3674
+ "target": "/./api/account/status",
3675
+ "as": "keeper_session",
3676
+ "requires": [
3677
+ "account_status",
3678
+ "spine_fallback"
3679
+ ],
3680
+ "expect": {
3681
+ "status": 404,
3682
+ "text": "404 Not Found",
3683
+ "allow": []
3684
+ },
3685
+ "expect_where_dot_segments_resolved": {
3686
+ "status": 200
3687
+ },
3688
+ "note": "each runtime as it reads dot segments (`runtime_resolves_dot_segments`)"
3689
+ },
3690
+ {
3691
+ "name": "routing: dot segments: a `.` segment under /api × GET",
3692
+ "method": "GET",
3693
+ "target": "/api/./account/status",
3694
+ "as": "keeper_session",
3695
+ "requires": [
3696
+ "account_status"
3697
+ ],
3698
+ "expect": {
3699
+ "status": 404,
3700
+ "error": "route_not_found",
3701
+ "allow": []
3702
+ },
3703
+ "expect_where_dot_segments_resolved": {
3704
+ "status": 200
3705
+ },
3706
+ "note": "each runtime as it reads dot segments (`runtime_resolves_dot_segments`)"
3707
+ },
3708
+ {
3709
+ "name": "routing: dot segments: a `..` segment into /api × GET",
3710
+ "method": "GET",
3711
+ "target": "/x/../api/account/status",
3712
+ "as": "keeper_session",
3713
+ "requires": [
3714
+ "account_status",
3715
+ "spine_fallback"
3716
+ ],
3717
+ "expect": {
3718
+ "status": 404,
3719
+ "text": "404 Not Found",
3720
+ "allow": []
3721
+ },
3722
+ "expect_where_dot_segments_resolved": {
3723
+ "status": 200
3724
+ },
3725
+ "note": "each runtime as it reads dot segments (`runtime_resolves_dot_segments`)"
3726
+ },
3727
+ {
3728
+ "name": "routing: dot segments: an encoded `..` as the bare fact hash",
3729
+ "method": "GET",
3730
+ "target": "/api/facts/%2e%2e",
3731
+ "as": "keeper_session",
3732
+ "requires": [
3733
+ "fact_serving_admin_hash"
3734
+ ],
3735
+ "expect": {
3736
+ "status": 400,
3737
+ "error": "invalid_route_params"
3738
+ },
3739
+ "expect_where_dot_segments_resolved": {
3740
+ "status": 404,
3741
+ "error": "route_not_found",
3742
+ "allow": []
3743
+ },
3744
+ "note": "each runtime as it reads dot segments (`runtime_resolves_dot_segments`)"
3745
+ },
3746
+ {
3747
+ "name": "routing: dot segments: an encoded `..` as the cell id of a cell fact",
3748
+ "method": "GET",
3749
+ "target": "/api/cells/%2e%2e/facts/blake3:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3750
+ "as": "none",
3751
+ "requires": [
3752
+ "fact_serving"
3753
+ ],
3754
+ "expect": {
3755
+ "status": 400,
3756
+ "error": "invalid_route_params"
3757
+ },
3758
+ "expect_where_dot_segments_resolved": {
3759
+ "status": 401,
3760
+ "error": "authentication_required"
3761
+ },
3762
+ "note": "each runtime as it reads dot segments (`runtime_resolves_dot_segments`)"
3763
+ }
3764
+ ]
3765
+ }