(RADIATOR) AuthBySQL

Paulo Rodrigues prodrigues at vianetworks.pt
Tue Sep 25 10:20:58 CDT 2001


Hi,

I've been trying to do Authentication on one server and Accounting on
another (which works) and my goal now is to have Stops update the
corresponding Start, instead of inserting another row; this is just the
goodies/simple.cfg edited for my purposes; the insert (Start) works, but
the update (Stop) doesn't.

Here is the conf file:

Foreground
LogStdout
LogDir          .
DbDir           .
Trace           9
<Client DEFAULT>
        Secret  mysecret
        DupInterval 0
</Client>
<ClientListSQL>
        DBSource        dbi:Pg:dbname=radiator
        DBUsername      radiator
        DBAuth          radiator
</ClientListSQL>
<Handler Request-Type = Accounting-Request>
    <AuthBy SQL>
        AccountingStartsOnly
        DBSource        dbi:Pg:dbname=radiator
        DBUsername      radiator
        DBAuth          radiator
        AccountingTable ACCOUNTING
        AcctColumnDef   USERNAME,User-Name
        AcctColumnDef   TIME_STAMP,Timestamp,integer
        AcctColumnDef   ACCTSTATUSTYPE,Acct-Status-Type
        AcctColumnDef   ACCTDELAYTIME,Acct-Delay-Time,integer
        AcctColumnDef   ACCTINPUTOCTETS,Acct-Input-Octets,integer
        AcctColumnDef   ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
        AcctColumnDef   ACCTSESSIONID,Acct-Session-Id
        AcctColumnDef   ACCTSESSIONTIME,Acct-Session-Time,integer
        AcctColumnDef   ACCTTERMINATECAUSE,Acct-Terminate-Cause
        AcctColumnDef   NASIDENTIFIER,NAS-Identifier
        AcctColumnDef   NASPORT,NAS-Port,integer
        AcctColumnDef   FRAMEDIPADDRESS,Framed-IP-Address
    </AuthBy SQL>
        AcctLogFileName ./pgdetail
</Handler>
<Handler Request-Type = Accounting-Request>
    <AuthBy SQL>
        AccountingStopsOnly
        DBSource        dbi:Pg:dbname=radiator
        DBUsername      radiator
        DBAuth          radiator
        AcctSQLStatement update ACCOUNTING \
set ACCTSESSIONTIME='%{Acct-Session-Time}', \
ACCTTERMINATECAUSE='%{Acct-Terminate-Cause}', \
ACCTINPUTOCTETS='%{Acct-Input-Octets}', \
ACCTOUTPUTOCTETS='%{Acct-Output-Octets}', \
ACCTSTATUSTYPE='C' where USERNAME='%{User-Name}' and \
ACCTSESSIONID='%{Acct-Session-Id}' and \
ACCTSTATUSTYPE='Start'
    </AuthBy SQL>
        AcctLogFileName ./pgdetail
</Handler>
<Handler>
    <AuthBy SQL>
        DBSource        dbi:Pg:dbname=radiator
        DBUsername      radiator
        DBAuth          radiator
    </AuthBy>
        AcctLogFileName ./pgdetail
</Handler>

This is a snippet of the logfile:

Tue Sep 25 16:02:53 2001: DEBUG: Check if Handler Request-Type =
Accounting-Request should be used to handle this request
Tue Sep 25 16:02:53 2001: DEBUG: Handling request with Handler
'Request-Type = Accounting-Request'
Tue Sep 25 16:02:53 2001: DEBUG:  Deleting session for mikem,
203.63.154.1, 1234
Tue Sep 25 16:02:53 2001: DEBUG: Handling with Radius::AuthSQL
Tue Sep 25 16:02:53 2001: DEBUG: Handling accounting with
Radius::AuthSQL
Tue Sep 25 16:02:53 2001: DEBUG: Accounting accepted
Tue Sep 25 16:02:53 2001: DEBUG: Packet dump:
*** Sending to 127.0.0.1 port 1054 ....
Code:       Accounting-Response
Identifier: 39

As you can see, it doesn't try to run the update; I'm sure I'm missing
something obvious here, can anyone enlighten me? 

Thanks, and sorry for the huge paste,
Paulo

--
Paulo Rodrigues
Professional Services / MIS
prodrigues at vianetworks.pt

VIA NET.WORKS Portugal
http://www.vianetworks.pt
local touch global reach
-------------------------
Sabe quem tem acesso à rede da sua empresa?
http://security.vianetworks.pt/sig/
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list