authid translation using SASL sql auxprop

Dan White dwhite at olp.net
Wed Aug 5 15:17:36 EDT 2009


Michael Ulitskiy wrote:
> Hello,
>
> Is there a way in cyrus/sasl to transparently change user authid according to result of some sql query?
> I.e. I want that if user successfully authenticates as user 'john' to transparently change his authid to user 
> 'jack' and so let him see user.jack as his INBOX.
> After initial reading of documentation I thought I could something like the following:
>
> sasl_sql_select: SELECT password as userPassword, mailbox as authid FROM emails WHERE username='%u' and domain='%r'
>
> I can do all kind of username/domain translation within sql domain (views/stored procedures/etc) so there's no problem to
> authenticate someone as someone else there, but how can I change the authid? Can it be done with Cyrus/SASL?
> Thanks,
>   

Michael,

Cyrus SASL provides a canonicalization plugin hook to provide that 
service. The result of the canonicalization action determines what user 
id gets passed up to the calling application.

Currently, there is only an LDAP canon_plugin, and it's only available 
in CVS.

See 'doc/plugprog.html' in the source tree, and:

https://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/~checkout~/src/sasl/doc/options.html?rev=1.33;content-type=text/html

for ldapdb documentation.

- Dan

 



More information about the Info-cyrus mailing list