Skip to content

Build authoritative ACL policy state before advertising or activating the data plane #67

Description

@forkwright

Finding

Hamma advertises a capability version that includes ACL delivery but has no authoritative effective-policy state to receive or enforce it.

Evidence

  • MapRequest advertises version 68 in crates/dictyon/src/control/mod.rs:326-336.
  • crates/hamma-core/src/types.rs:152-197 omits MapResponse.PacketFilter, whose absent/empty semantics have existed since capability version 6.
  • Netmap at crates/dictyon/src/control/mod.rs:100-115 has no effective policy state.
  • PeerChange.CapMap is parsed at crates/hamma-core/src/types.rs:320-365, but apply_peer_change discards it at crates/dictyon/src/control/mod.rs:510-546; Node has nowhere to retain it.
  • Tests establish parsing only and use cap_map: None in behavioral cases.
  • The reference contract distinguishes absent packet filter (unchanged) from present empty filter (deny all), and atomically replaces capability-map patches.
  • Hamma's README names ACLs in the Phase A feature target, so this is not an optional future protocol field.

Why this matters

If the WireGuard data plane lands on the current model, traffic has no control-plane policy object to authorize it. Treating missing/uninterpretable policy as no restriction would create a fail-open mesh; treating every omission as empty would incorrectly revoke established policy.

Required mechanism

  • Add a typed effective-policy state before activating Milestone 4.
  • Preserve absent, present-empty, and present-non-empty filter semantics exactly.
  • Parse policy into the data-plane matcher before publishing a netmap update; fail closed when a policy update cannot be interpreted.
  • Store and atomically replace node/peer capability maps, including revocation.
  • Gate advertised capability version on this implemented semantic surface.
  • Add full → unchanged → deny-all → replacement → malformed-policy tests proving atomicity and fail-closed behavior.

Activity

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

    bugUnintended behavior or production defectsecuritySecurity advisory or hardening requirementseverity:highSignificant breakage with no available workaround

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions