Zum Inhalt springen

RADIUS

Taranac authenticates and authorizes device administration over RADIUS in addition to TACACS+. Use RADIUS when a network device — or a platform that only speaks RADIUS for admin login — needs to authenticate operators against Taranac and receive an authorization result (a privilege level, a role, a group name) in the Access-Accept reply.

Unlike TACACS+, where the whole policy ruleset is compiled into the tac_plus-ng daemon, all RADIUS policy evaluation runs inside Taranac’s own handler. A RADIUS Access-Request is matched against the same shared AAA policy table you use for TACACS+, then — depending on the matched rule — answered with an Access-Reject, a bare Access-Accept, or an Access-Accept carrying the reply attributes rendered from a RADIUS profile. There is no per-command authorization and no enable concept in RADIUS; authorization is what the device does with the attributes it receives at login.

Building an Access-Accept: each attribute resolves profile value → template default → omit, then the surviving values are assembled into the reply.
TermWhat it is
TemplateA per-vendor schema: which attributes exist, their data types, and how compound values are assembled. Carries defaults but no per-user values. Identified by an immutable slug.
ProfileThe runtime values returned on a match — privilege level, role, timeouts, reply message. References exactly one template.
Vendor IDThe IANA Private Enterprise Number (PEN) of the vendor, e.g. Cisco = 9, Juniper = 2636. 0 means generic / no VSAs.
VSAVendor-Specific Attribute. The template names the attribute (e.g. Cisco-AVPair); the FreeRADIUS dictionary maps the name to vendor_id + sub-type on the wire.
Static fieldA structured sub-value inside a compound attribute, built from a pattern such as shell:priv-lvl={level} and one or more typed inputs.
Raw attributeA freeform attribute added directly to a profile, outside the template schema, as a name/value pair.
Profile modeWhat a matched policy rule does for RADIUS: none, deny, auth_only, or profile.

A template answers “what can this vendor accept?”; a profile answers “what do we grant this operator?”. Templates are reusable across many profiles. A profile that references a template cannot be orphaned — the template is protected from deletion while any profile points at it.

Each template defines:

  • defaults — optional service_type, session_timeout, idle_timeout, and reply_message applied when a profile leaves the field blank.
  • attributes — a list of attribute definitions, each with a name, optional vsa_type, data_type (string / integer / enum / boolean / ip), and optional static sub-fields for compound values.

A fresh install ships with eight templates covering the common device-administration platforms:

TemplateVendor IDKey attributeNotes
Cisco IOS / IOS-XE9Cisco-AVPair (VSA 1)shell:priv-lvl={level}, level 0–15
Cisco NX-OS9Cisco-AVPair (VSA 1)shell:roles="{role}", multi-value
Juniper JunOS2636Juniper-Local-User-Name (VSA 1)Maps to a local user template on the device
Fortinet FortiGate12356Fortinet-Group-Name (VSA 1)Must match a user group on the FortiGate
Palo Alto PAN-OS25461PaloAlto-Admin-Role (VSA 3)superuser / superreader / deviceadmin
HPE/Aruba Switch11HP-Privilege-Level (VSA 2)Integer; Manager = 15, Operator = 1
Huawei VRP2011Huawei-Exec-Privilege (VSA 29)15 = management, 3 = monitoring, 1 = visit
Generic RADIUS0No VSAs; use raw attributes for standard/arbitrary attributes

On first install Taranac also seeds ready-to-use profiles — typically a full-access and a read-only variant per vendor (Cisco priv 15/1, NX-OS network-admin/operator, Juniper super-user/operator, FortiGate admin, Palo Alto superuser/superreader, HPE/Aruba 15/1, Huawei 15/3).

Profiles live under AAA → RADIUS → Profiles.

RADIUS profiles list in the Taranac admin UI

The RADIUS Profiles list — each profile references one vendor template.

A profile form has two columns. The left column holds identity and protocol-level fields:

FieldBehaviour
NameRequired, unique.
DescriptionOptional.
TemplateThe vendor schema this profile fills in. Selected from a list.
Service-TypeLogin-User, Administrative-User, or NAS-Prompt-User; blank inherits the template default.
Session-TimeoutSeconds; overrides the template default. 0 is a valid explicit value (no timeout).
Idle-TimeoutSeconds; overrides the template default. 0 is valid.
Reply-MessageText sent in the Access-Accept. Max 253 bytes.
EnabledA disabled profile is excluded from policy evaluation.

The right column shows one card per attribute defined in the chosen template. The input widget follows the attribute’s data_type: text for string/ip, a number field for integer, a toggle for boolean. Compound attributes (static fields) render one input per {placeholder} in the pattern — for example a single Privilege Level input that produces shell:priv-lvl=15.

A raw attributes editor at the bottom lets you append attributes that are not part of the template — each is a name plus value (with optional vendor_id and vsa_type), value capped at 253 characters. This is how you add standard attributes such as Filter-Id on top of a vendor profile, or build a complete reply on the Generic template.

Templates are created through a four-step wizard (Basic info → Defaults → Attributes → Review). Step one fixes the slug (immutable after creation; locked when editing, suffixed -copy when duplicating), the display name, the vendor string, and the integer vendor_id (0–99999). Step two sets the optional defaults. Step three builds the attribute list, including static fields with their patterns and typed sub-fields. Step four reviews the result as YAML/JSON. In most cases the eight built-in templates are enough — define a new one only for a vendor or attribute layout Taranac doesn’t ship.

When an Access-Request arrives, Taranac:

  1. Looks up the user and checks eligibility (exists, active, not locked). A failure here is an immediate Access-Reject with a fixed message (User not found, Account disabled, Account locked).
  2. Evaluates the AAA policy table — first matching enabled rule wins across the WHO, WHERE, SOURCE, and WHEN dimensions. Rules whose RADIUS action is none are skipped. Policy evaluation happens before the password is checked, so the matched rule can declare whether MFA is required.
  3. Verifies the password (local bcrypt or LDAP bind), optionally challenging for MFA.
  4. Acts on the matched rule’s RADIUS mode.
RADIUS modeResult
denyAccess-Reject. Reply-Message comes from the rule’s radius_message, defaulting to Access denied by policy.
auth_onlyAccess-Accept with no authorization attributes (just an optional Reply-Message). The device applies its own default privileges.
profileAccess-Accept carrying the attributes rendered from the rule’s RADIUS profile.
noneRule is ignored for RADIUS.

If no rule matches, the request is implicitly rejected (No matching policy). A default catch-all rule (high order, WHO = any) guarantees every request gets an explicit answer.

For profile mode, Taranac renders the profile’s attributes in this fixed order, resolving each value as profile value → template default → omit:

  1. Service-Type
  2. Session-Timeout
  3. Idle-Timeout
  4. Reply-Message
  5. Template attributes — compiled static fields, then any per-attribute raw values, then simple values
  6. Raw attributes not tied to the template

Resolution detail worth knowing:

  • A timeout of 0 is sent (it explicitly disables the timeout); a blank field falls back to the template default, and only a value that is absent at both levels is omitted.
  • An empty Reply-Message is treated as “not set” and is not sent.
  • A static field whose required inputs are all blank is skipped; a multi-value static field (e.g. NX-OS roles) emits one attribute instance per value.

A worked example — a Cisco IOS profile with privilege 15, a 7200-second session timeout, and a raw Filter-Id, against a template whose defaults are Login-User / 3600 / 600 — yields:

Service-Type = Login-User # blank profile field → template default
Session-Timeout = 7200 # profile override
Idle-Timeout = 600 # blank profile field → template default
Reply-Message = Welcome, admin # profile value
Cisco-AVPair = shell:priv-lvl=15
Filter-Id = ADMIN_ACL # raw attribute

RADIUS and TACACS+ share one ordered policy table (AAA → Policies). Each rule carries an independent action per protocol: a single rule can, for example, grant a TACACS+ profile and a RADIUS profile, or apply to only one of them.

AAA policy table with per-protocol actions

One ordered policy table drives both protocols; each rule has independent RADIUS and TACACS+ actions.

The matching dimensions are shared:

  • WHO — users and/or groups (or “any”).
  • WHERE — devices and/or device groups (or “any”).
  • SOURCE — the calling station’s network. RADIUS does not support the console-only source option; that is a TACACS+ concept and such a rule never matches a RADIUS request.
  • WHEN — always, or a time range (overnight ranges supported).

To grant RADIUS access, set a rule’s RADIUS action to profile and pick the profile; use auth_only to authenticate without sending attributes, or deny to refuse the matched population.

Use the Policy tester to dry-run a hypothetical login (user, device, source, time) and see which rule wins and which RADIUS profile it would apply, without sending real traffic.

  • Cisco IOS admin vs read-only. Two profiles on the Cisco IOS template (priv-lvl=15 and priv-lvl=1), bound to two rules whose WHO targets your admin and operator groups.
  • Juniper role mapping. A profile returning Juniper-Local-User-Name = remote-su (super-user) or remote (operator); the named local user template must already exist on the JunOS device.
  • Mixed estate, one rule. A single rule with WHERE = a device group, granting a TACACS+ profile to Cisco gear and a RADIUS profile to the RADIUS-only platforms in the same group.
  • Authenticate without authorizing. A rule in auth_only mode for appliances that handle their own role mapping but still want central credential checks.
  • Standard-attribute-only device. Build the reply on the Generic template using raw attributes (e.g. Service-Type, Session-Timeout, Filter-Id).
CapabilityTACACS+RADIUS
Per-command authorizationYes (command sets)No
Enable / privilege escalationYes (inheritance chain)No
Console-only source matchingYesNo (ignored)
Authorization granularityLogin + per-commandLogin only (attributes in Accept)
Where policy is evaluatedIn the tac_plus-ng configIn the Taranac handler
Typical useRouter/switch CLI with command loggingDevices/platforms that only do RADIUS admin login

Prefer TACACS+ for network gear where you want per-command accounting and authorization or an enable workflow. Use RADIUS for devices and platforms that authenticate administration only over RADIUS (many firewalls, controllers, and appliances), or where a simple privilege/role attribute at login is all that’s needed.

Profile fields

FieldTypeNotes
namestringRequired, unique
template_idreferenceThe vendor template; protected from deletion while referenced
service_typestringLogin-User / Administrative-User / NAS-Prompt-User; blank = template default
session_timeoutintegerSeconds; 0 = no timeout; blank = template default
idle_timeoutintegerSeconds; 0 = no timeout; blank = template default
reply_messagestring≤ 253 bytes; empty = not sent
attribute_valuesstructuredPer-attribute static / simple / raw values
raw_attributeslistFreeform {name, value, vendor_id?, vsa_type?}
is_enabledbooleanDisabled profiles are excluded from policy

Per-protocol policy fields

FieldApplies toNotes
radius_profile_modeRADIUSnone / deny / auth_only / profile
radius_profile_idRADIUSProfile applied in profile mode
radius_messageRADIUSReply-Message for deny / auth_only; ≤ 253 bytes
tacacs_messageTACACS+Terminal message; no length limit