Skip to content

Add stream access permission model separating read and admin roles #292

Description

@Chuks-coderr

Overview

All admin instructions share a single admin address. As the protocol grows, different operators may need read-only analytics access, fee-parameter changes, or emergency pause authority without sharing a single admin key.

Problem

A monolithic admin role creates a single point of failure and makes fine-grained operational security impossible. Compromise of the admin key would expose all privileged operations.

Proposed Solution

  • Introduce a role registry: Admin, FeeManager, PauseOperator, ReadAnalytics
  • Each role maps to one or more authorized addresses stored in persistent storage
  • Restrict instructions to the appropriate role (e.g. only PauseOperator can call pause)
  • Admin role can assign and revoke all other roles

Acceptance Criteria

  • Role registry stores multiple addresses per role
  • Each privileged instruction checks the correct role and returns StreamError::Unauthorized on mismatch
  • Admin can add/remove addresses from each role
  • Unit tests cover: correct role accepted, wrong role rejected, role reassignment
  • Role assignments emit events for auditability

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity: highComplex feature, refactor, or new integrationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions