Skip to content

security(backend): enforce sender and recipient authorization on every stream path #69

Open

Description

@arisu6804

Problem

A guessed stream ID or alternate endpoint can expose or mutate a stream outside the caller's sender or recipient scope.

Objective

Deliver a production-quality improvement to stream access control and route/service boundaries that creates measurable value for correctness, security, reliability, performance, or maintainability.

Implementation scope

  • Centralize ownership and participant policy at the service layer; cover list, detail, update, cancel, and withdraw paths; prevent enumeration.

Acceptance criteria

  • Only permitted participants can access each action; unauthorized responses do not reveal existence; privileged access is explicit and audited.

Required validation

  • Authorization matrix and API integration tests across sender, recipient, unrelated actor, and operator roles.
  • Existing tests and CI remain passing.
  • Add regression coverage for the original failure mode.
  • Do not weaken, delete, or skip unrelated tests to obtain a green build.

PR quality bar

  • Keep the PR focused and explain design tradeoffs, compatibility impact, and test evidence.
  • Avoid typo-only, documentation-only, cosmetic-only, or unrelated refactor submissions.

Out of scope

  • Broad rewrites not required by the acceptance criteria.
  • Changes to unrelated services, contracts, or user flows.

Activity

  1. added
    enhancementNew feature or request
    GRANTFOX OSSOpen-source issue tracked by GrantFox
    MAYBE REWARDEDThis issue may carry a reward
    priority:highHigh implementation priority
    on Aug 21, 2026
  2. guptakumarranjeet150 commented on Sep 15, 2026

    @guptakumarranjeet150

    Hi there,

    I would like to resolve this issue. Here is my proposed execution plan:

    • Implementation: Build out the handlers for security(backend): enforce sender and recipient authorization on every stream path ensuring proper HTTP status codes and error propagation.
    • Testing: Cover route handlers with automated endpoint integration tests.

    Excited to work on this—please assign to me and I will submit a clean PR shortly!

  3. guptakumarranjeet150 commented on Sep 27, 2026

    @guptakumarranjeet150

    Hi there,

    I can tackle security(backend): enforce sender and recipient authorization on every stream path. Proposed implementation roadmap:

    • Analysis: Inspect current behavior and edge cases in StreamPay-Organization/StreamPay-Backend
    • Core Implementation: Build out the handlers for security(backend): enforce sender and recipient authorization on every stream path ensuring proper HTTP status codes and error propagation.
    • Quality Assurance: Verify API response schemas, authentication middleware, and database rollback safety.

    I am ready to start immediately—please feel free to assign this to me!

  4. Rodrigoue9 commented on Oct 1, 2026

    @Rodrigoue9

    Hi team! I'd love to take on #69 (security(backend): enforce sender and recipient authorization on every stream path).

    Technical Analysis & Implementation Approach

    1. Architectural Scope & Affected Modules:
      • Clean, modular implementation strictly following the existing project structure and conventions.
      • Isolated boundaries ensuring zero regressions on adjacent services.
    2. State Management & Core Logic:
      • Directly addressing key acceptance criteria:
        • Only permitted participants can access each action; unauthorized responses do not reveal existence; privileged access is explicit and audited.
    3. API & Boundary Resilience:
      • Defensive error handling, clean teardown/unmount lifecycle, and typed interfaces.

    Verification & Testing Strategy

    • Comprehensive unit and integration test coverage targeting the acceptance criteria, edge cases, and error recovery.
    • Verification of clean build, strict TypeScript types, and zero regressions across the existing test suite.
    • Production Track Record: Verified merged PRs in cybermax4200/stellar-did-credit #898 & #900 (+400 points Wave 9), approved review in documenso/documenso #3275, merged PRs in Astrea-Payouts/astrea #251, #214, #213, and Bitcoindefi/OpenAO #218.

    Ready for instant push and PR as soon as officially assigned! Looking forward to delivering.

  5. shobhamerabacha-star commented on Oct 3, 2026

    @shobhamerabacha-star

    Hello team,

    I looked into security(backend): enforce sender and recipient authorization on every stream path and have an implementation approach ready.

    Technical outline:

    1. Audit storage layout and state invariants ensuring strict auth guards.
    2. Implement deterministic state transitions with safe checked arithmetic.
    3. Add hermetic unit and regression tests covering authorized, unauthorized, and boundary edge cases.
    4. Profile instruction and CPU/gas limits under Soroban host environment.

    Please assign this to me if the plan looks good. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GRANTFOX OSSOpen-source issue tracked by GrantFoxMAYBE REWARDEDThis issue may carry a rewardThird CampaignThird Campaign contributionenhancementNew feature or requestpriority:highHigh implementation priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions