Skip to content

docs: note on ControlHandler::dispatch that callers MUST enforce the token gate before dispatch #2

Description

@MichaelTaylor3d

Non-gating follow-up from the #1147 (PR #1) loop-security PASS. ControlHandler::dispatch (src/traits.rs) performs NO authorization — it only routes (correctly mirrors dig-node's design, where server.rs enforces the token gate BEFORE its dispatcher). Add a doc-comment on dispatch reminding downstream node implementers (T7-T10 consumers): 'Callers MUST enforce ControlMethod::requires_auth()/is_pairing_admin() (the X-Dig-Control-Token gate) BEFORE invoking dispatch; this performs no authorization.' Prevents a consumer wiring dispatch straight onto a transport + exposing every control method unauthenticated. Not a live vuln in the contract crate (nothing wired here; auth flags are correct + available). Ref DIG-Network/dig_ecosystem#1147 + #1110.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions