Use python module to inject parameters to radius context

Herwin Weststrate herwin at quarantainenet.nl
Fri May 27 08:02:07 CEST 2016


On 27-05-16 02:31, Anuruddha Premalal wrote:
> Hi All,
> 
> I'm trying to urlencode a string and put that value in a vendor specific
> attribute via python; and later refer that in  site configuration.
> 
> Here's a snippet of the site configuration authenticate section
> 
> authenticate {
> Auth-Type PAP {
>      python_custom
>              update reply {
>                     User-Name = "%{User-Name}"
>                     My-Redirection-URL = "%{*My-URL-Param*}"
>                     My-ACL-Policy = "default_unauth_sla"
>                     My-QoS-Policy = "32M_Full"
>                     Calling-Station-Id = "%{Calling-Station-Id}"
>              }
> 
>             }
> }
> digest
> eap
> }
> 
> 
> Here's the python code snippet in python_custom module
> 
> def authenticate(p):

The parameter "p" to authenticate is the request key-value store, not
the reply. This is documented at
http://wiki.freeradius.org/modules/Rlm_python


-- 
Herwin Weststrate



More information about the Freeradius-Users mailing list