mod_auth_radius values

Ayres G.J. G.J.Ayres at swansea.ac.uk
Fri Aug 19 13:06:48 CEST 2005


Hi,
	I have written a php script that lists the request and response
headers, the result of which is below:

Request Headers
Accept: */*
Accept-Language: en-gb
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: xxxxxx
Connection: Keep-Alive
Authorization: Basic bHNreVJlZ2o6ZnSpZGF5Mw==
Cookie: foo=bar

Response Headers
Set-Cookie: RADIUS=51f673efff8c5h235410d95289666de85305b928; path=/;
X-Powered-By: PHP/4.4.0

After the cookie is set the 'Set-Cookie' header appears in the Request
Header as 'Cookie: foo=bar;
RADIUS=51f673efff8c5h235410d95289666de85305b928;'.
(I have modified the values above slightly incase I am inadvertently sending
a username/password to the list ;)

Ive read through mod_auth_radius-2.0.c and it appears the cookie is a MD5
hash of the users information. So, is it possible to get the information
from the cookie?

Gareth.


-----Original Message-----
From: freeradius-users-bounces at lists.freeradius.org
[mailto:freeradius-users-bounces at lists.freeradius.org] On Behalf Of Alan
DeKok
Sent: 18 August 2005 16:25
To: FreeRadius users mailing list
Subject: Re: mod_auth_radius values 

"Ayres G.J." <G.J.Ayres at swansea.ac.uk> wrote:
> 	I am developing a web system that authenticates users to a web site
> through free radius using the mod_auth_radius module for apache. It all
> works fine, but I would like to get the username of the user that has
> authenticated for use on pages once they have authenticated. 

  It's in the HTTP headers.  The username & password are sent in every
request.

> I am not sure how to go about this. I guess that the values are set in a
> cookie or in the HTTP Headers by mod_auth_radius? Does anyone know a way I
> could retrieve the values, either through HTML or PHP?

  Not HTML.  Maybe PHP, if it allows you to get HTTP headers.  See the
module source code for where the headers are, and the PHP docs for how
to get at them.

  Alan DeKok.

- 
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list