miroir/crates
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
..
miroir-core feat(tenant): implement tenant affinity API endpoints and CLI commands 2026-05-26 19:41:50 -04:00
miroir-ctl feat(tenant): implement tenant affinity API endpoints and CLI commands 2026-05-26 19:41:50 -04:00
miroir-proxy feat(tenant): implement tenant affinity API endpoints and CLI commands 2026-05-26 19:41:50 -04:00