miroir/crates/miroir-proxy/tests
jedarden e7721f962f test(search-ui): add HTTP endpoint tests and scoped key rotation documentation
Added comprehensive tests for the POST /_miroir/ui/search/{index}/rotate-scoped-key
endpoint and verified old key rejection after rotation. Also added documentation
for the scoped key rotation procedure.

New tests:
- test_http_endpoint_rotate_scoped_key_with_admin_auth: Verifies HTTP endpoint
  triggers rotation with admin authentication
- test_http_endpoint_force_rotation_bypasses_timing: Verifies force=true
  bypasses the timing gate
- test_old_scoped_key_rejected_after_rotation: Verifies old scoped keys are
  cleared from Redis after rotation completes

Documentation:
- docs/runbooks/scoped-key-rotation.md: Complete runbook for scoped key rotation
  covering automatic rotation flow, manual rotation via API/UI, timing and cadence,
  monitoring, troubleshooting, and verification steps.

All acceptance criteria for bead bf-5dy9k are now satisfied:
1.  Comprehensive tests for rotate-scoped-key endpoint
2.  Leader-coordinated rotation before expiry (timing gate) - existing tests
3.  Force=true bypasses timing gate - existing tests
4.  Revocation safety gate confirmed - existing tests
5.  Old scoped keys rejected after rotation - new test
6.  Rotation procedure and timing documented
7.  Integration tests for full rotation lifecycle - existing tests

Closes: bf-5dy9k
2026-05-26 18:29:11 -04:00
..
docker_compose_integration.rs fix(tests): integration tests skip gracefully when Docker unavailable 2026-05-26 14:42:28 -04:00
error_format_parity.rs fix(clippy): auto-fix format strings and deprecated IndexMap::remove 2026-05-25 21:31:17 -04:00
header_contract.rs test(header_contract): un-ignore tests for implemented §13 features 2026-05-26 15:16:07 -04:00
integration_test.rs fix(cli): add --version and --help flags to miroir-proxy 2026-05-26 03:02:56 -04:00
p2_2_write_path_acceptance.rs fix(cli): add --version and --help flags to miroir-proxy 2026-05-26 03:02:56 -04:00
p2_5_task_reconciliation.rs fix(clippy): auto-fix format strings and deprecated IndexMap::remove 2026-05-25 21:31:17 -04:00
p2_8_middleware_acceptance_tests.rs fix(cli): add --version and --help flags to miroir-proxy 2026-05-26 03:02:56 -04:00
p2_phase2_dod.rs fix(cli): add --version and --help flags to miroir-proxy 2026-05-26 03:02:56 -04:00
p3_phase3_task_registry.rs fix(cli): add --version and --help flags to miroir-proxy 2026-05-26 03:02:56 -04:00
p5_1_d_reshard_verify.rs feat(reshard): implement backfill phase with pagination and rehashing 2026-05-26 08:05:45 -04:00
p5_1_e_reshard_alias_swap.rs fix(clippy): auto-fix format strings and deprecated IndexMap::remove 2026-05-25 21:31:17 -04:00
p5_5_two_phase_settings_broadcast.rs fix(clippy): auto-fix format strings and deprecated IndexMap::remove 2026-05-25 21:31:17 -04:00
p5_8_a_anti_entropy_fingerprint.rs fix(cli): add --version and --help flags to miroir-proxy 2026-05-26 03:02:56 -04:00
p5_8_b_anti_entropy_diff.rs fix(clippy): auto-fix format strings and deprecated IndexMap::remove 2026-05-25 21:31:17 -04:00
p5_14_ttl_automatic_expiration.rs feat(ttl): implement actual TTL sweep logic with NodeClient integration 2026-05-26 13:21:33 -04:00
p6_7_resource_pressure_metrics.rs fix(cli): add --version and --help flags to miroir-proxy 2026-05-26 03:02:56 -04:00
p7_1_core_metrics.rs fix(clippy): auto-fix format strings and deprecated IndexMap::remove 2026-05-25 21:31:17 -04:00
p7_5_structured_logging.rs fix(cli): add --version and --help flags to miroir-proxy 2026-05-26 03:02:56 -04:00
p7_6_opentelemetry.rs fix(cli): add --version and --help flags to miroir-proxy 2026-05-26 03:02:56 -04:00
p10_2_node_master_key_rotation.rs fix(tests): integration tests skip gracefully when Docker unavailable 2026-05-26 14:42:28 -04:00
p10_5_scoped_key_rotation.rs test(search-ui): add HTTP endpoint tests and scoped key rotation documentation 2026-05-26 18:29:11 -04:00
p10_6_csrf_posture.rs fix(cli): add --version and --help flags to miroir-proxy 2026-05-26 03:02:56 -04:00
p10_7_admin_login_rate_limit.rs fix(tests): integration tests skip gracefully when Docker unavailable 2026-05-26 14:42:28 -04:00
p10_admin_session_revocation.rs fix(tests): integration tests skip gracefully when Docker unavailable 2026-05-26 14:42:28 -04:00
p13_6_session_pinning.rs fix(cli): add --version and --help flags to miroir-proxy 2026-05-26 03:02:56 -04:00
p13_7_alias_resolution.rs fix(clippy): auto-fix format strings and deprecated IndexMap::remove 2026-05-25 21:31:17 -04:00
p13_7_full_alias_integration.rs fix(clippy): auto-fix format strings and deprecated IndexMap::remove 2026-05-25 21:31:17 -04:00
p13_19_admin_ui_2pc_preview.rs fix(cli): add --version and --help flags to miroir-proxy 2026-05-26 03:02:56 -04:00
p13_21_beacon_cdc_integration.rs feat(search-ui): add analytics beacon CDC integration tests and docs 2026-05-26 18:23:52 -04:00
p24_index_lifecycle.rs fix(clippy): auto-fix format strings and deprecated IndexMap::remove 2026-05-26 01:14:31 -04:00
p29_reserved_field_rejection.rs fix(clippy): auto-fix format strings and deprecated IndexMap::remove 2026-05-25 21:31:17 -04:00
phase2_integration_test.rs fix(cli): add --version and --help flags to miroir-proxy 2026-05-26 03:02:56 -04:00
README_integration.md P9.2: Integration test harness with docker-compose 2026-05-23 07:33:34 -04:00
test_helper.rs fix(tests): integration tests skip gracefully when Docker unavailable 2026-05-26 14:42:28 -04:00