miroir/crates/miroir-core/src
jedarden 3a61c94d25 test(miroir-proxy): add P10.6 CSRF posture acceptance tests (§9)
Add comprehensive acceptance tests for CSRF posture implementation:

- Cookie-auth POST without X-CSRF-Token → 403 missing_csrf
- Cookie-auth POST with wrong token → 403 csrf_mismatch
- Bearer-auth POST bypasses CSRF (plan §9)
- X-Admin-Key header bypasses CSRF
- Origin validation (same-origin, specific, wildcard, referer fallback)
- CSRF token generation and extraction
- CSP header builder merges overrides additively
- CSP config validation rejects wildcard in overrides
- CSRF middleware skips safe methods (GET, HEAD, OPTIONS)
- CSRF middleware skips non-admin paths
- CSRF middleware skips dispatch-exempt endpoints
- Admin session cookie extraction
- Cross-pod session seal verification (mismatch and match)

All 20 tests pass, validating the CSRF posture implementation
required for Admin UI and Search UI session endpoints.

Closes: miroir-46p.6

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 23:28:58 -04:00
..
alias feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
config feat(vector): implement VectorMergeStrategy for hybrid search (P5.12 §13.12) 2026-05-24 20:24:07 -04:00
config.bak P0.2: Scaffold miroir-core crate 2026-04-18 20:57:47 -04:00
leader_election feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
migrations P6.4: Mode B leader-only singleton coordinator (plan §14.5) 2026-05-23 05:21:16 -04:00
mode_c_worker feat(reshard): tag backfill writes with _miroir_origin for CDC suppression (P5.1.c, miroir-uhj.1.3) 2026-05-24 17:38:23 -04:00
raft_proto Merge remote-tracking branch 'origin/master' 2026-05-24 05:21:32 -04:00
rebalancer_worker test(miroir-core): add drift reconciler acceptance tests (P5.5.d §13.5) 2026-05-24 22:21:14 -04:00
reshard feat(reshard): implement P5.1.e alias swap + dual-write stop 2026-05-24 18:05:30 -04:00
task_store fix(task_store): restore TaskStore implementations from fix commit (bf-103h) 2026-05-24 07:09:35 -04:00
anti_entropy.rs fix: various code style improvements and type fixes 2026-05-24 16:17:05 -04:00
api_error.rs fix(config): implement P6.1 pod resource envelope + fix compilation errors 2026-05-24 16:48:57 -04:00
canary.rs fix(task_store): restore TaskStore implementations from fix commit (bf-103h) 2026-05-24 07:09:35 -04:00
cdc.rs feat(drift): fix compilation and add metrics integration 2026-05-24 14:56:16 -04:00
config.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
drift_reconciler.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
dump.rs P3: Phase 3 Task Registry + Persistence — COMPLETE 2026-05-02 16:50:42 -04:00
dump_chunking.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
dump_import.rs fix(config): implement P6.1 pod resource envelope + fix compilation errors 2026-05-24 16:48:57 -04:00
error.rs feat(reshard): implement P5.1.e alias swap + dual-write stop 2026-05-24 18:05:30 -04:00
explainer.rs feat(ci): add changelog lint script and fix clippy warnings 2026-05-24 09:10:50 -04:00
group_addition.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
group_sync_worker.rs fix(group_sync_worker): add missing Node import in tests 2026-05-24 16:10:52 -04:00
hedging.rs Merge remote-tracking branch 'origin/master' 2026-05-24 05:21:32 -04:00
idempotency.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
ilm.rs feat(ilm): add acceptance tests for ILM rollover (plan §13.17) 2026-05-24 16:57:55 -04:00
lib.rs fix(tests): add missing vector_config field and fix test compilation 2026-05-24 20:45:02 -04:00
merger.rs fix(hedging): implement proper timeout-based hedging for p95 latency 2026-05-24 23:12:09 -04:00
migration.rs Merge remote-tracking branch 'origin/master' 2026-05-24 05:21:32 -04:00
mode_a_coordinator.rs feat(drift): fix compilation and add metrics integration 2026-05-24 14:56:16 -04:00
mode_b_acceptance_tests.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
mode_b_coordinator.rs feat(tests): add property tests and fuzz targets for router, config, and parsers (plan §8, P9.6) 2026-05-24 11:41:48 -04:00
mode_c_acceptance_tests.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
mode_c_coordinator.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
multi_search.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
peer_discovery.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
query_planner.rs feat(hedging): implement tail-latency hedging for reads (§13.2, miroir-uhj.2) 2026-05-24 07:30:16 -04:00
rebalancer.rs fix(task_store): restore TaskStore implementations from fix commit (bf-103h) 2026-05-24 07:09:35 -04:00
replica_selection.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
reshard.rs feat(reshard): implement full six-phase orchestrator with admin API integration 2026-05-24 18:59:36 -04:00
reshard_chunking.rs P6.4: Mode B leader-only singleton coordinator (plan §14.5) 2026-05-23 05:21:16 -04:00
resource_pressure.rs feat(metrics): add resource-pressure metrics collection (plan §14.9) 2026-05-24 10:08:37 -04:00
router.rs feat(tests): add property tests and fuzz targets for router, config, and parsers (plan §8, P9.6) 2026-05-24 11:41:48 -04:00
scatter.rs test(miroir-proxy): add P10.6 CSRF posture acceptance tests (§9) 2026-05-24 23:28:58 -04:00
schema_migrations.rs P6.5: Mode C work-queued chunked jobs (plan §14.5) 2026-05-23 06:11:12 -04:00
scoped_key_rotation.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
score_comparability.rs Phase 0 (miroir-qon): Foundation verification complete 2026-05-08 19:49:03 -04:00
session_pinning.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
settings.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
shadow.rs feat(shadow): implement traffic shadow/teeing to staging cluster (P5.16 §13.16) 2026-05-24 16:04:37 -04:00
task.rs fix(task_store): restore TaskStore implementations from fix commit (bf-103h) 2026-05-24 07:09:35 -04:00
task_pruner.rs fix: add missing trait methods and fix compilation errors 2026-05-24 02:37:36 -04:00
task_registry.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
tenant.rs feat(tenant): integrate tenant affinity into proxy request flow (P5.15 §13.15) 2026-05-24 15:21:36 -04:00
timeout.rs P3: Phase 3 Task Registry + Persistence — COMPLETE 2026-05-02 16:50:42 -04:00
topology.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
ttl.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
vector.rs feat(vector): implement VectorMergeStrategy for hybrid search (P5.12 §13.12) 2026-05-24 20:24:07 -04:00