Repository navigation
radius
Pre-Alpha. This page describes behavior that may change.
Ze authenticates operator logins (SSH, web, MCP) against RADIUS servers (RFC 2865) when the system.authentication.radius block is present. It is a PAP admin-authentication backend in the AAA chain, mirroring the existing TACACS+ backend. Local bcrypt users keep working as the fallback, so an unreachable server cannot lock you out of the device.
This is the operator / admin login path. It is separate from, and does not touch, the pre-existing L2TP subscriber RADIUS path (l2tp.auth.radius), which authenticates PPP sessions and lives under the l2tp config root. That path also does subscriber accounting and CoA/DM; see L2TP accounting attributes for what an Accounting-Request carries.
| Function | Status | Notes |
|---|---|---|
| Authentication | Production | PAP (RFC 2865 User-Password, hidden per Section 5.2 with the shared secret), CHAP (Section 5.3 CHAP-Password with a CHAP-Challenge), or EAP with MD5-Challenge or MS-CHAPv2 carried in EAP-Message attributes (RFC 3579). auth-method selects one; the default is pap. |
| Authorization | Via profiles | An Access-Accept reply attribute (default Filter-Id) maps the user to local RBAC profiles. |
| Accounting | Not in MVP | Admin-session accounting is deferred; subscriber accounting stays in the L2TP path. |
system {
authentication {
radius {
server 10.0.0.1 { port 1812; key "$9$encrypted-key"; }
server 10.0.0.2 { port 1812; key "$9$encrypted-key"; }
timeout 3
retries 3
profile-attribute filter-id
auth-method pap
default-profile read-only
}
}
authorization {
profile admin { run { default-action allow; } edit { default-action allow; } }
profile read-only { run { default-action allow; } edit { default-action deny; } }
}
}
| Leaf | Type | Default | Notes |
|---|---|---|---|
radius.server <ip> |
list, ordered | - | IPv4 only; tried in declaration order on failure. |
radius.server <ip>.port |
uint16 (1-65535) | 1812 | UDP authentication port. |
radius.server <ip>.require-message-authenticator |
boolean | true | Discard an Access-Accept, Reject, Challenge or Protocol-Error from this server that carries no Message-Authenticator (BlastRADIUS). Set false only for a server that cannot sign. Never applies to accounting. |
radius.server <ip>.key |
string ($9$), length 1..max |
required | Shared secret, stored as ciphertext. An empty secret is refused at commit. |
radius.timeout |
uint16 (1-60) | 3 | Per-server request timeout in seconds. |
radius.retries |
uint8 (0-10) | 3 | Transmit attempts per server before failover. |
radius.source-address |
ip-address | none | Local source IP for outbound RADIUS UDP. |
radius.auth-method |
enum pap, chap, eap-md5, eap-mschapv2
|
pap |
Credential the Access-Request carries. chap and eap-md5 need the server to hold the password in cleartext; eap-mschapv2 needs the NT hash. |
radius.profile-attribute |
enum filter-id
|
filter-id |
Access-Accept reply attribute carrying profile names. filter-id is the only value. |
radius.default-profile |
leaf-list | none | Profiles applied when the Access-Accept carries no profile-attribute. |
When RADIUS, TACACS+, and local users are all configured, the chain is tried in priority order (lower first): RADIUS, then TACACS+, then local bcrypt.
| Backend | Priority |
|---|---|
| RADIUS | 50 |
| TACACS+ | 100 |
| Local bcrypt | 200 |
The chain distinguishes two failure kinds:
- Access-Reject (explicit rejection) stops the chain immediately. Local bcrypt is NOT tried, so a wrong password against RADIUS cannot succeed via a stale local hash.
-
No usable answer from any server (timeout, unreachable, or every answer discarded) is treated as an infrastructure error, and the error names each server and why its answer was not used. The chain falls through to the next backend and ultimately to local bcrypt. A dead server, a bad
source-address, or an unreachable network never locks the operator out of SSH.
The total time one login spends talking to RADIUS is bounded, so a slow server falls through rather than hanging the login. If the RADIUS client cannot even start (for example an unbindable source-address), the backend contributes nothing and logs an error rather than failing the whole AAA bundle, so local and TACACS+ still authenticate.
Each Access-Request carries User-Name, the credential auth-method selects, Service-Type=Login, NAS-Identifier (the hostname), NAS-Port-Id naming the access channel (ssh for an SSH login, web for a web login; a login whose caller names no channel sends none), and NAS-IP-Address when source-address is set. RFC 2865 and RFC 3579 permit one credential type per request, and the client refuses before the socket any Access-Request carrying two of User-Password, CHAP-Password, ARAP-Password and EAP-Message.
Whatever the auth method, Ze puts a Message-Authenticator as the first attribute of every Access-Request, keyed with the secret of the server it goes to (draft-ietf-radext-deprecating-radius Section 4.2, CVE-2024-3596). This is not configurable.
Each server row carries require-message-authenticator, default true. An answer from that server without a Message-Authenticator is silently discarded before any authenticator is checked, counted on ze_radius_unsigned_response_discards_total{server}, and logged at most once a minute per server with the set command that accepts that server. When every retry ends that way, the error and ze doctor (doctor-radius-admin-unsigned-response) name the server and the fix. A server that predates 2024 and cannot sign needs:
set system authentication radius server <address> require-message-authenticator false
With eap-md5 or eap-mschapv2, Ze runs the whole RADIUS/EAP conversation itself, as the EAP peer. The operator types a password into SSH or the web login as usual, and Ze answers each Access-Challenge on their behalf, copying the server's State attribute back byte for byte without reading it. No EAP frame reaches the operator's client, so both methods work over every login surface. Every EAP Access-Request carries a Message-Authenticator (RFC 3579 Section 3.1), and a reply whose Message-Authenticator does not verify is discarded (RFC 2869 Section 5.14). The Access-Request stays outstanding and the client retransmits, so a forged packet cannot end a login.
A reply that carries an EAP-Message and no Message-Authenticator is discarded the same way (RFC 3579 Section 3.1), logged with that reason and counted on ze_radius_unsigned_eap_discards_total. A reply with neither attribute is accepted only from a server whose require-message-authenticator is false.
The EAP header is checked in both directions (RFC 3579 Section 2.2). A server packet whose Length does not fit the octets carried, or an Access-Challenge whose EAP packet is not a Request, never reaches the peer: the login ends as an infrastructure error and the chain tries the next backend. The peer's answer is forwarded only when it is a Response carrying the Identifier of the server's Request.
Ze's authorization model is name-based, so a RADIUS-accepted user must map to one or more locally-defined system.authorization.profile entries.
- With the default
profile-attribute filter-id, each Filter-Id attribute (RFC 2865 Section 5.11) in the Access-Accept supplies one profile name; multiple Filter-Id attributes yield multiple profiles. Ze reads no profile out of the Class attribute: RFC 2865 Section 5.25 says "the client MUST NOT interpret the attribute locally", so theclassvalue was removed. - When the Access-Accept carries no such attribute, the
default-profileleaf-list applies. - When neither is present the login resolves to no profile and is rejected, with a
RADIUS admin auth rejected: no profiles resolvedwarning naming the user. Ze never authorizes a user it cannot attach a profile to: an authenticated login always carries at least one profile name. The rejection stops the chain, exactly as an Access-Reject does, because the server did answer (this is not the unreachable-server case that falls through to local).
Configure the RADIUS server to return Filter-Id = admin (or your profile name) for operators, and define a matching system.authorization.profile. If your server does not send a profile attribute, set default-profile instead; otherwise no RADIUS user can log in.
A successful login is tagged in the daemon log so you can confirm which backend answered:
INFO SSH auth success subsystem=ssh username=alice remote=10.0.0.1:51408 source=radius
source=radius confirms RADIUS returned Access-Accept; source=local means RADIUS was unreachable or unconfigured and the local bcrypt user accepted the credentials.
The chain order above applies when RADIUS answers. A RADIUS block Ze cannot build a client from is a different case, and so is a TACACS+ server declared with no shared secret. That backend is dropped and the rest of the chain composes without it, with the drop logged at ERROR. A user who exists locally still logs in against the local backend, and the local authorization profiles still govern what they run. The order does not change: a reject still stops the chain, and only a failure to answer reaches the local account.
When every backend fails to build there is no chain: nothing authenticates and SSH is not started. A commit that would produce that is refused while a chain is already running. ze doctor warns with doctor-aaa-no-local-fallback when a remote backend is configured and no local system authentication user exists to fall back to.
ze doctor probes every configured RADIUS admin server with an Access-Request before the daemon starts. When none answers a verifiable response it emits doctor-radius-admin-unreachable, a warning (local fallback still works). A missing or wrong shared key counts as unreachable, because a verifiable response requires the correct shared secret. This check is distinct from the L2TP subscriber path's own doctor-radius-unreachable check.
ze doctor --json config router.conf
ze show diagnostic doctor-radius-admin-unreachable
| Metric | Meaning |
|---|---|
ze_radius_unsigned_response_discards_total{server} |
Answers with no Message-Authenticator discarded because the server row requires one. A rising value names a server that does not sign: configure it to sign, or set require-message-authenticator false on its row. |
ze_radius_unsigned_eap_discards_total |
Answers carrying an EAP-Message and no Message-Authenticator, discarded under RFC 3579 Section 3.1. One series serves every RADIUS client in the daemon, admin login and subscriber authentication alike. It tells a discard apart from an unreachable server. |
ze_task_panics_total{component="radius",task="read"} |
Answers whose handling hit a Ze defect. The reader recovers, logs at ERROR, writes a crash record (ze show crashes) and reads on; the request retransmits as on a timeout. Any value above zero is a defect to report with the crash record. |
Functional tests drive a RADIUS mock that behaves as a server updated for BlastRADIUS unless told otherwise (le mock radius, with --require-message-authenticator and --sign-responses). Because a mock built beside Ze's encoder agrees with it by construction, the same paths also run against FreeRADIUS in ./le test integration interop-radius (one scenario at a time with RADIUS_INTEROP_SCENARIO=<name>):
| Scenario | Proves |
|---|---|
radius-admin-pap-freeradius |
SSH login accepted by FreeRADIUS, the Filter-Id profile governs commands, the local password is not a fall-through |
radius-admin-chap-freeradius, radius-admin-chap-hashed-freeradius
|
FreeRADIUS reproduces Ze's CHAP digest; a hashed entry accepts PAP and refuses CHAP |
radius-admin-eap-freeradius |
EAP-MSCHAPv2 completes against a server Ze did not write |
radius-admin-eap-unsigned-freeradius |
An EAP answer stripped of its Message-Authenticator by a relay is discarded |
radius-admin-pap-unsigned-freeradius, radius-admin-pap-unsigned-legacy-freeradius
|
A stripped Access-Accept is discarded on a default row, and accepted on a row with require-message-authenticator false
|
-
Shared secrets are stored as
$9$ciphertext, never plaintext. The CLI never echoes them;ze config dump --strip-privatereplaces them with/* SECRET-DATA */. -
An empty shared secret is refused at commit. The
keyleaf carrieslength "1..max". RFC 2865 Section 3 states that the secret "MUST NOT be empty (length 0) since this would allow packets to be trivially forged". -
CHAP and EAP need the right server-side secret.
chapandeap-md5hash the password with a challenge, so the server must hold it in cleartext;eap-mschapv2needs the NT hash.ze doctorprobes with a fixed PAP credential whateverauth-methodsays. -
Same client as the L2TP subscriber path (
internal/component/radius), so retransmit, failover, and Response-Authenticator verification behave identically. That client isudp4, so RADIUS admin servers must be IPv4.
- TACACS+ for the sibling admin-authentication backend this mirrors.
- Web UI and System for the login surfaces and authorization profiles this backend feeds.
- RFC 2865: Remote Authentication Dial In User Service (RADIUS).
Adapted from main/docs/guide/radius.md.
Unreviewed draft. This wiki was authored in bulk and has not been reviewed. File corrections on the issue tracker.
- Install
- Docker
- netlab
- Appliance
- Quick Start
- Use Ze with an AI agent
- ExaBGP Migration
- CLI Tour
- Web UI Tour
- Overview
- YANG Model
- Editor Workflow
- Archive and Rollback
- Backup and Restore
- System
- Interfaces
- VRRP
- BFD
- FIB
- OSPF
- IS-IS
- MPLS / LDP / RSVP-TE
- RSVP-TE
- SRv6
- Static Routes
- Policy Routing
- Firewall
- Traffic Control
- Class of Service
- L2TP/PPP
- PPPoE
- VPP Data Plane
- RPKI
- IPsec VPN
- Path MTU
- TACACS+ AAA
- RADIUS AAA
- AS112 DNS
- DNS
- Authorization
- Fleet
- BGP
- Starting and Stopping
- Show Commands
- Monitoring
- Telemetry
- Flow Export
- DDoS Mitigation
- Anomaly Detection
- Health Checks
- Audit Trail
- Production Diagnostics
- Logging
- Operational Reports
- Healthcheck
- Self-Update
- Zero-Touch Provisioning
- MRT Analysis
- Upgrade and Restart
- Storage
- Policy
- Core
- Resilience
- Validation
- Link State
- Capabilities
- Address Families
- Protocol
- Subsystems
- Infrastructure
- Route Server at an IXP
- Transit Edge with RPKI
- Public Looking Glass
- ExaBGP Migration Walkthrough
- FlowSpec Injection
- Chaos-Tested Peering
- AS Path Topology