Skip to content

RADIUS protocol support (RFC 2865) #193

Description

@EONRaider

Target: 2.6.0 (Tier 4 — AAA & infrastructure services)

Context

RADIUS is the dominant AAA protocol, UDP ports 1812/1813
(authentication/accounting; legacy 1645/1646 still seen). Fixed
header plus a flat TLV attribute list — no nesting, the simplest of
this tier's two TLV-based protocols (the other is STUN, this same
tier).

Deliverable

Add netprotocols.RADIUS (layer 7, dispatched from udp.port):

  • Decode the 20-byte header (RFC 2865 §3): Code (1 byte), Identifier
    (1 byte), Length (2 bytes), Authenticator (16 bytes, opaque —
    computing/verifying it requires the shared secret, out of scope).
  • Decode the Attribute list (Type 1 byte, Length 1 byte including the
    2-byte TLV header, Value) via _tlv.py's walk_kind_length_value.
  • Name the most common attribute types: User-Name (1), User-Password
    (2, keep raw — it's obfuscated with the shared secret, not
    decodable without it), NAS-IP-Address (4), NAS-Port (5),
    Framed-IP-Address (8), Vendor-Specific (26, keep raw — vendor TLVs
    nested inside are a follow-up, not this issue).
  • Register udp.port 1812 and 1813 → RADIUS, best-effort like every
    other port-table entry.

Acceptance criteria

  • RADIUS decodes the header and attribute list;
    bytes(RADIUS.decode(x)) == x.
  • Named attribute types decode to typed fields; others remain
    correctly shaped but raw.
  • UDP ports 1812/1813 dispatch to RADIUS.
  • Fixture covering an Access-Request/Access-Accept pair;
    truncation.
  • CHANGELOG entry; full ladder green.

References

RFC 2865 · TLV walker: _tlv.py

Part of #174

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions