Skip to content

Implement Backend RBAC Foundation #640

Closed

Description

@pdettori

Add role constants, role hierarchy support, and update the mock user for dev mode. No endpoints are protected yet - this is pure infrastructure.

Changes:

  • kagenti/backend/app/core/auth.py:
    • Add ROLE_VIEWER, ROLE_OPERATOR, ROLE_ADMIN constants
    • Add ROLE_HIERARCHY mapping for role inheritance
    • Update require_roles() to check hierarchy (e.g., kagenti-admin satisfies kagenti-viewer requirement)
    • Update mock user to have kagenti-admin role

Testing:

  • Unit tests for role hierarchy logic
  • Verify dev mode still works with mock user

Estimated size: Small (~50-100 lines)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions