Subject: | RT-Authen-ExternalAuth modification |
Date: | Wed, 9 Jan 2013 19:05:46 +0200 |
To: | <tsibley [...] cpan.org> |
From: | Viktor Larionov <Viktor.Larionov [...] salva.ee> |
Hi Thomas!
First of all thanks a million for a great job you've done with
RT::Authen::ExternalAuth.
Great stuff. We use it to allow certain groups of our users to our internal
RT instance.
Here
http://requesttracker.wikia.com/wiki/ExternalAuth#RT::Authen::ExternalAuth
you have mentioned, you'd like to hear about updates to your code done by
end-users, so I thought our minor change could be of use also.
The case with us, is that passwords on our database are encrypted using
Crypt::PasswdMD5 with salt residing inside the hash. (the good old unix way,
you know)
RT::Authen::ExternalAuth by default can deal only with a static salt, as far
as I understood, so we did a quick and dirty update to your original code in
order to fix that.
An update looks like this (sorry for not making a nice and shiny diff):
File: T-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/DBI.pm, line 80:
if($pass_from_db =~ /\A\$[0-9]\$([^\$]+)\$.+\Z/) {
$RT::Logger->info($service, "Supplied password hash contains
a salt, extracting and using it instead of static.");
$db_p_salt = $1;
}
Works like a charm.
Cheers!
Viktor "vik" Larionov
head of IT ops, Salva Insurance plc., Tallinn, Estonia
Viktor Larionov
IT osakonna juhataja
IT-osakond
Salva Kindlustuse AS
Tel: (+372) 683 0630 | GSM: (+372) 566 86811 | Viktor.Larionov@salva.ee | www.salva.ee
(SMX)338844