RBAC Redesign Proposal
This document outlines the proposed improvements to Clue2App's Role-Based Access Control system.
Status (as of 2026-08)
Parts of this proposal have already shipped. This page still reads as a forward-looking spec, but the following pieces are in production and documented in RBAC Architecture:
- Invite-by-email flow —
POST /api/accounts/{accountId}/memberswith atomic project role grants (surfaced viac2a user invite -e <email> -P <project> -r <role>; SCK-460). - SoloInvitation redeem — token match uses lowercase-hex
sha256Hex(email)on both sides (SCK-436). - Project-scope roles —
PROJECT_ADMIN,CONTRIBUTOR,VIEWERare live and granted through the invite flow. - Account-scope roles —
ACCOUNT_ADMIN/MEMBER; account-role grants carry audit columns (created_by,updated_by,created_at,updated_at) since V56 (SCK-475).account_limit_overridescarries the same audit columns since V57 (SCK-481).
The Phase 4 (Audit Logging) work below is therefore partially delivered for account roles + limit overrides; the full permission-change audit stream is still on the roadmap.
Current Issues
| Issue | Severity | Impact |
|---|---|---|
| No server-side permission checks | Critical | Security vulnerability |
| Hardcoded permissions in frontend | High | Can't update without deploy |
| Groups = Roles (conflated) | Medium | Inflexible permission model |
| No resource-level permissions | Medium | All-or-nothing access |
| No audit logging | Medium | No accountability |
Proposed Architecture
New Data Model
Permission Code Format
Use a hierarchical permission code system:
{resource}:{action}
Examples:
- apps:create
- apps:read
- apps:update
- apps:delete
- apps:deploy
- apps:logs:read
- projects:create
- projects:members:add
- users:create
- users:password:reset
- groups:create
- roles:assign
Proposed Roles
System Roles (Platform-Wide)
| Role | Permissions | Scope |
|---|---|---|
PLATFORM_ADMIN | All permissions | Global |
PLATFORM_SUPPORT | Read all, limited write | Global |
Account Roles (Account-Wide)
| Role | Permissions |
|---|---|
ACCOUNT_OWNER | Full account control |
ACCOUNT_ADMIN | Manage users, groups, projects |
BILLING_ADMIN | Manage billing only |
Project Roles (Project-Scoped)
| Role | Permissions |
|---|---|
PROJECT_ADMIN | Full project control |
PROJECT_DEVELOPER | Create/edit apps, view logs |
PROJECT_VIEWER | Read-only access |
PROJECT_DEPLOYER | Deploy only (for CI/CD) |