claire/tests
Natalie 5f316cde24 feat(sync): HMAC-SHA256 auth on /api/v1/sync/*
Adds shared-secret HMAC-SHA256 authentication to peer sync endpoints.
Sync requests now include X-Clare-Timestamp + X-Clare-Signature headers
covering ts/method/path/body. Server validates against local sync_secret
and rejects with 401 on mismatch, missing headers, or >300s skew.

- config.py: new sync_secret field (auto-generated on first run) and
  PeerConfig list (back-compat: plain-string peers still parse)
- sync.py: signs outbound peer + loopback requests; sync_peer takes
  PeerConfig and local_secret
- web/api.py: require_sync_auth dependency on /sync/* routes; /health
  remains unauthenticated; when sync_secret is unset, sync stays open
  for back-compat with fresh installs
- tests: 10 new auth tests cover valid/tampered/expired/missing/no-secret
  paths plus full two-Clare convergence with matched secrets
2026-05-18 03:04:42 -07:00
..
conftest.py feat: initial Clare scaffold — project manager for the Claude agent fleet 2026-05-18 02:20:23 -07:00
test_api.py feat: initial Clare scaffold — project manager for the Claude agent fleet 2026-05-18 02:20:23 -07:00
test_cli_smoke.py feat: initial Clare scaffold — project manager for the Claude agent fleet 2026-05-18 02:20:23 -07:00
test_config.py feat: initial Clare scaffold — project manager for the Claude agent fleet 2026-05-18 02:20:23 -07:00
test_db.py feat: initial Clare scaffold — project manager for the Claude agent fleet 2026-05-18 02:20:23 -07:00
test_events.py feat: initial Clare scaffold — project manager for the Claude agent fleet 2026-05-18 02:20:23 -07:00
test_hlc.py feat: initial Clare scaffold — project manager for the Claude agent fleet 2026-05-18 02:20:23 -07:00
test_rclaude_wrapper.py feat: initial Clare scaffold — project manager for the Claude agent fleet 2026-05-18 02:20:23 -07:00
test_scheduler.py feat: initial Clare scaffold — project manager for the Claude agent fleet 2026-05-18 02:20:23 -07:00
test_sync_auth.py feat(sync): HMAC-SHA256 auth on /api/v1/sync/* 2026-05-18 03:04:42 -07:00
test_sync_convergence.py feat(sync): HMAC-SHA256 auth on /api/v1/sync/* 2026-05-18 03:04:42 -07:00