# ServerTACACSPLUS.pm # # Object for receiving TACACS+ requests and satisfying them # Incoming TACACS+ authentication requests are converted into # Radius requests. ASCII, PAP, CHAP and MSCHAP are supported. # Incoming TACACS+ authorization requests are always approved, # and any cisco-avpair reply items from the previous Radius Access-Accept are # used as authorization attribute-value pairs # Incoming TACACS+ accounting requests are converted into Radius # accounting requests. # # Based on draft-grant-tacacs-02.txt # # Author: Mike McCauley (mikem@open.com.au) # Copyright (C) 2003 Open System Consultants # $Id: ServerTACACSPLUS.pm,v 1.90 2008/01/14 04:05:21 mikem Exp $ package Radius::ServerTACACSPLUS; @ISA = qw(Radius::Configurable); use Radius::Client; use Radius::Configurable; use Radius::Context; use Radius::Tacacsplus; use Digest::MD5; use Socket; use strict; # Map between Tacacs+ service types and Radius Service-Type %Radius::ServerTACACSPLUS::service_to_service_type = ( $Radius::Tacacsplus::TAC_PLUS_AUTHEN_SVC_LOGIN => 'Login-User', $Radius::Tacacsplus::TAC_PLUS_AUTHEN_SVC_ENABLE => 'Administrative-User', $Radius::Tacacsplus::TAC_PLUS_AUTHEN_SVC_PPP => 'Framed-User', ); ##################################################################### # This hash describes all the standards types of keywords understood by this # class. If a keyword is not present in ConfigKeywords for this # class, or any of its superclasses, Configurable will call sub keyword # to parse the keyword # See Configurable.pm for the list of permitted keywordtype %Radius::ServerTACACSPLUS::ConfigKeywords = ( 'Port' => ['string', 'This optional parameter specifies which TCP port the server will listen on for incoming Tacacs+ connections. Defaults to 49 (which generally requires root or other privileged access) Any valid port number or service name can be used.', 1], 'BindAddress' => ['string', 'This optional parameter specifies one or more network interface addresses to listen for incoming Tacacs+ connections on. It is only useful if you are running Radiator on a multi-homed host (i.e. a host that has more than one network address). Defaults to the global BindAddress, which defaults to 0.0.0.0 (i.e. listens on all networks connected to the host).', 1], 'MaxBufferSize' => ['integer', 'Maximum input buffer size', 2], 'Key' => ['string', 'This parameter specifies the default shared secret to be used to decrypt Tacacs+ messages. When a new connection from a Tacacs+ client is received, Server TACACSPLUS tries to find a Key to use for decrypting that connection. It looks in the following places for a Key until it finds one that has been defined: