fix(platform): a tenant erasure is confirmed only by the tenant's own id #1083

Merged
sharang merged 1 commits from fix/tenant-erasure-confirm into main 2026-11-30 20:46:26 +00:00
Owner

DELETE /api/v1/platform/tenants/{id}/data drops the tenant's database and removes its files. Its doc asked for {"confirm": "<slug or id>"}, but the handler only checked that confirm was not empty: any value erased the tenant named in the path.

Now confirm must equal the tenant id in the path, exactly. A missing, empty or different value is refused with 400 before anything is touched.

  • confirms_erasure in api/handlers/platform.rs, with a unit test (match, missing, empty, other id, case, whitespace, "yes").
  • docs/guide/data-retention.md names the body.

Callers: tenant-registry #154 (unmerged) will call this from the registry purge; it must send {"confirm": "<tenant id>"}. No other caller found.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9

`DELETE /api/v1/platform/tenants/{id}/data` drops the tenant's database and removes its files. Its doc asked for `{"confirm": "<slug or id>"}`, but the handler only checked that `confirm` was not empty: any value erased the tenant named in the path. Now `confirm` must equal the tenant id in the path, exactly. A missing, empty or different value is refused with 400 before anything is touched. - `confirms_erasure` in `api/handlers/platform.rs`, with a unit test (match, missing, empty, other id, case, whitespace, "yes"). - `docs/guide/data-retention.md` names the body. Callers: tenant-registry #154 (unmerged) will call this from the registry purge; it must send `{"confirm": "<tenant id>"}`. No other caller found. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang added 1 commit 2026-11-30 20:22:35 +00:00
fix(platform): a tenant erasure is confirmed only by the tenant's own id
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 5m23s
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 23m11s
f765b1474e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang merged commit 50b1a8b44b into main 2026-11-30 20:46:26 +00:00
Sign in to join this conversation.