📋 Feature Description
Clear and concise description of the feature:
Create a middleware that enforces Role-Based Access Control (RBAC) across Express REST endpoints. Supported roles: Admin, Manager, Operator, Auditor.
🎯 Motivation
Why is this feature needed? What problem does it solve?
Roadmap item #62. Organizations need scoped access policies to prevent operators from performing administrative actions (e.g. key deletion).
💡 Proposed Solution
How should this feature work? Include technical details:
Middleware intercepts requests, decodes auth claims, and matches required endpoint scopes.
🔧 Technical Implementation
Implementation details for AI/developers:
Files to Create/Modify
Dependencies
API Changes
export function requireRole(roles: string[]): RequestHandler;
✅ Acceptance Criteria
📚 Additional Context
None.
🔗 Related Issues
🏷️ Labels
Phase: phase-4
Component: api
Priority: critical
📋 Feature Description
Clear and concise description of the feature:
Create a middleware that enforces Role-Based Access Control (RBAC) across Express REST endpoints. Supported roles: Admin, Manager, Operator, Auditor.
🎯 Motivation
Why is this feature needed? What problem does it solve?
Roadmap item #62. Organizations need scoped access policies to prevent operators from performing administrative actions (e.g. key deletion).
💡 Proposed Solution
How should this feature work? Include technical details:
Middleware intercepts requests, decodes auth claims, and matches required endpoint scopes.
🔧 Technical Implementation
Implementation details for AI/developers:
Files to Create/Modify
packages/api/rest/src/middleware/rbac.tsDependencies
API Changes
✅ Acceptance Criteria
📚 Additional Context
None.
🔗 Related Issues
🏷️ Labels
Phase: phase-4
Component: api
Priority: critical