On Dec 4, 2017, at 5:03 PM, Gary Gwin <garygwin@gmail.com> wrote:
I need two distinct python module authorize methods. One for client authentication with the dynamic_clients virtual server and the other for user authorization in the default virtual server. I can detect state in a single python authorize method using various RADIUS request variables, but that seems fragile. What I'd really like is a way to use a different python authorize method for each the of the dynamci_clients and default virtual servers.
Makes sense...
Have had no luck configuring and referencing unique instance names as suggested in radiusd.conf:
# python mypython1 { # config_item = value # ... # }
# python mypython2 { # config_item = value # ... # }
I've tried various other configuration options.
Is this possible? If yes, what needs to be done?
Yes... just add raddb/mods-enabled/mypython1 with: python mypython1 { ... python1 config ... } and add raddb/mods-enabled/mypython2 with: python mypython2 { ... python2 config ... } The contents are the same as the normal 'python' module. The only real difference is the name (mypython1) and the script you're loading. As always, what does the debug output say? Alan DeKok.