PAR-182
0
[Epic] Security & RBAC hardening — make Tesks safe for untrusted tenants
DoneHighUnassignedTesksFeature
Tracking epic for the security tranche that must land before the cloud API is exposed to untrusted tenants. From the 2026-06-15 backend+frontend audit, three things are broken/missing and one capability (configurable RBAC) is being expanded per product direction.
Goal
- Close cross-tenant data leakage (IDOR).
- Move RBAC enforcement server-side (API and MCP), not UI-only.
- Configurable roles per workspace (beyond the fixed enum), with sane defaults admin / contributor / viewer, plus an owner that is effectively an admin and cannot be removed/demoted by another admin.
- Stop unguarded hard-deletes.
Children
- PAR-183 — Cross-tenant IDOR: tenant scoping on by-UUID queries (urgent)
- PAR-184 — Configurable RBAC role+permission model + default role set seeding
- PAR-185 — Server-side RBAC enforcement (REST API + service layer)
- PAR-186 — RBAC enforcement in the MCP tool layer
- PAR-187 — UI RBAC alignment (delete→manage, owner/last-owner protection, roles admin screen)
- PAR-188 — Remove/guard destructive hard-delete (MCP
tesks_delete_task)
Key context (from audit)
- Backend authorizes nothing today:
security/ActorContext.java,api/ApiAuthFilter.javaexplicitly delegate policy to the UI; roles stored intenant_member.role(V2__workspaces_and_membership.sql) asowner|member|viewerbut never checked. - IDOR: by-id paths omit
tenant_idpredicate —PostgresTaskSystem.java~lines 285 (taskById), 307 (getTaskDetail), 336 (listComments), 345 (listActivity), 425/467 (updateTask), 540 (deleteTask), label writes 472-477. ContrastreorderTask/moveTaskwhich correctly scope by tenant. - Tenant binding already exists at the edge (
TenantBearerFilter,McpAuthFilter,TenantContext) — enforcement can hook there + per-service. - UI:
lib/roles.tsfixedowner|member|viewer; delete gated byrequireWorkspaceWrite(should be manage); no last-owner guard (lib/actions/members.ts).
Comments
tesks · Jun 16, 2026, 8:11 PM
Epic complete — all children Done and verified live on develop: PAR-183 (IDOR, scoped + regression tests), PAR-184 (configurable role model), PAR-185 (server-side enforcement), PAR-186 (MCP enforcement, working end-to-end), PAR-187 (UI alignment), PAR-188 (hard-delete removed/guarded). Closing.
Activity
- tesks changed status to Status → Done
- tesks commented
- tesks changed status to Status → Pending Release
- tesks description: Description updated
- tesks created the issue