[RADIATOR] RewriteUsername with variable from SQL

Gianlu Bol wlasagne at gmail.com
Mon Mar 11 21:00:11 UTC 2019


Are there any examples with PostAuthSelectHook?

Il gio 7 mar 2019, 18:01 Heikki Vatiainen <hvn at open.com.au> ha scritto:

> On 06/03/2019 12.47, Gianlu Bol wrote:
>
> > is it possible to use the RewriteUsername with variable? example
> RewriteUsername s/^([^@]+)/$MyVariable/
> >
> > I have to change the User-Name looking in a SQL DB (from the original
> username to different value in a specifica column)
>
> If the desired value ($MyVariable) is fetched from the SQL, you could
> consider doing it with PostAuthSelectHook
>
> https://open.com.au/radiator/ref/PostAuthSelectHook.html
>
> If you need to rewrite it before a SQL query, you could consider
> PreAuthHook:
> https://open.com.au/radiator/ref/PreAuthHook.html
>
> With PreAuthHook you can change the username directly, or add a new
> attribute with desired value to the current request and configure SQL
> lookup to use the new variable.
>
> There are likely multiple other ways to do this, but the details depend
> on knowing more of your configuration and requirements.
>
> Thanks,
> Heikki
>
> --
> Heikki Vatiainen <hvn at open.com.au>
>
> Radiator: the most portable, flexible and configurable RADIUS server
> anywhere. SQL, proxy, DBM, files, LDAP, TACACS+, PAM, Active Directory,
> EAP, TLS, TTLS, PEAP, WiMAX, RSA, Vasco, Yubikey, HOTP, TOTP,
> DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, etc.
> _______________________________________________
> radiator mailing list
> radiator at lists.open.com.au
> https://lists.open.com.au/mailman/listinfo/radiator
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.open.com.au/pipermail/radiator/attachments/20190311/e0a25a0e/attachment.html>


More information about the radiator mailing list