FreeRADIUS/mod_auth_radius — pull request #2 by darksoul42 (2012-12-27 05:29:46+00:00)
Title: Add custom csid conf option

I stumbled upon a case where I needed to authenticate against a custom RADIUS server (using the Calling Station ID attribute as a security token, something close in this instance to a group name, to ensure a user both has valid credentials AND proper authorization to access the protected service), and where the default behavior of sending the client's remote IP was not what I wanted.

Therefore I created a patch to add a configuration option to define a different CSID per-directory. Behavior is unchanged from the original implementation, as long as AddRadiusCallingStationID is not used.

My purpose here is to make mod_auth_radius more flexible and usable even with oddball implementations, while not impairing standard use cases.

Note : The "empty string" case does not have any special handling whatsoever, but I am considering about further making it so that if the option is specified with an empty string, then it would be understood as really wanting to remove the Calling Station ID attribute, and have mod_auth_radius not include it in user_login(), but I wonder if this is appropriate.