miroir/crates/miroir-proxy
jedarden d8d5cc815f feat(tenant): implement tenant affinity API endpoints and CLI commands
Implements admin API endpoints and CLI commands for managing tenant
mappings (api_key mode) as specified in plan §13.15:

Admin API endpoints:
- POST /_miroir/tenants - Add a tenant mapping (api_key → tenant_id → group_id)
- GET /_miroir/tenants - List all tenant mappings
- DELETE /_miroir/tenants - Delete a tenant mapping by api_key

CLI commands (miroir-ctl tenant):
- miroir-ctl tenant add --api-key KEY --tenant ID --group N
- miroir-ctl tenant list
- miroir-ctl tenant remove --api-key KEY

TaskStore changes:
- Added list_tenant_mappings() method to TaskStore trait
- Implemented in SQLite and Redis backends
- Updated all MockTaskStore implementations in test files

Security: API keys are hashed using SHA-256 before storage (never stored
plaintext). Mappings are persisted to task_store for HA deployments.

Closes: bf-38mn2

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 19:41:50 -04:00
..
admin-ui/dist feat(admin-ui): add 2PC settings preview endpoint and UI integration 2026-05-25 00:03:35 -04:00
src feat(tenant): implement tenant affinity API endpoints and CLI commands 2026-05-26 19:41:50 -04:00
static feat(search-ui): add embeddable modes and custom templates (P5.21.e) 2026-05-24 14:37:00 -04:00
tests test(search-ui): add HTTP endpoint tests and scoped key rotation documentation 2026-05-26 18:29:11 -04:00
Cargo.toml feat(dump-import): implement multipart upload and broadcast fallback 2026-05-26 13:43:33 -04:00