RT 4.0.2 and ExternalAuth

Hi,

I install ExternalAuth:
cpan> install RT::Authen::ExternalAuth

And installation finished with OK.

Now i’m trying to configure RT_SiteConfig.pm

Set(@Plugins, qw(RT::Authen::ExternalAuth) );

Set($ExternalAuthPriority, [ ‘My_MySQL’ ]);

Set($ExternalInfoPriority, [ ‘My_MySQL’ ]);

Set($ExternalServiceUsesSSLorTLS, 0);
Set($AutoCreateNonExternalUsers, 0);

Set($ExternalSettings, { # AN EXAMPLE DB SERVICE
’My_MySQL’ => { ## GENERIC SECTION
# The type of
service (db/ldap/cookie)
‘type’
=> ‘db’,
# The server
hosting the service
’server’
=> ‘localhost’,
SERVICE-SPECIFIC SECTION
# The database name
’database’
=> ‘phpbb3’,
# The database table
’table’
=> ‘phpbbusers’,
# The user to
connect to the database as
’user’
=> ‘phpbb3’,
# The password
to use to connect with
’pass’
=> ‘******’,
# The port to
use to connect with (e.g. 3306)
‘port’
=> ‘3306’,
# The name of
the Perl DBI driver to use (e.g. mysql)
‘dbi_driver’
=> ‘mysql’,
# The field in
the table that holds usernames
’u_field’
=> ‘username’,
# The field in
the table that holds passwords
’p_field’
=> ‘user_password’,
# The Perl
package & subroutine used to encrypt passwords
# e.g. if the
passwords are stored using the MySQL v3.23 “PASSWORD”
# function,
then you will need Crypt::MySQL::password, but for the
# MySQL4+
password function you will need Crypt::MySQL::password41
Alternatively, you could use Digest::MD5::md5_hex or any other
# encryption
subroutine you can load in your perl installation
’p_enc_pkg’
=> ‘Crypt::MySQL::password41’,
#‘p_enc_sub’
=> ‘password41’,
# If your
p_enc_sub takes a salt as a second parameter,
# uncomment
this line to add your salt
#‘p_salt’
=> ‘SALT’,
# The field
and values in the table that determines if a user should
# be disabled.
For example, if the field is ‘user_status’ and the values
# are
[‘0’,‘1’,‘2’,‘disabled’] then the user will be disabled if their
# user_status
is set to ‘0’,‘1’,‘2’ or the string ‘disabled’.
# Otherwise,
they will be considered enabled.
‘d_field’
=> ‘disabled’,
‘d_values’
=> [‘0’],
## RT
ATTRIBUTE MATCHING SECTION
# The list of
RT attributes that uniquely identify a user

‘attr_match_list’ => [ ‘Gecos’,

                 'Name'

             ],
                                                    # The mapping

of RT attributes on to field names
’attr_map’
=> { ‘Name’ => ‘username’,

                 'EmailAddress' => 'user_email',

                 'ExternalAuthId' => 'username',

                 'Gecos' => 'user_id'

             }
                                                },

But when i’m try log in to RT i get in log file:

Couldn’t Load Password Encryption Package. Error: Can’t locate
Crypt/MySQL/password.pm
My_MySQL AUTH FAILED The encryption package you gave me (
Crypt::MySQL::password ) does not support the encryption method you
specified ( )

Full log:
[Thu Nov 10 12:52:43 2011] [debug]: Encryption Subroutine:
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/DBI.pm:64)
[Thu Nov 10 12:52:43 2011] [error]: AUTH FAILED, Couldn’t Load
Password Encryption Package. Error: Can’t locate
Crypt/MySQL/password.pm in @INC (@INC contains:
/opt/rt4/sbin/…/local/lib
/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib /opt/rt4/sbin/…/lib
/etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10
/usr/share/perl/5.10 /usr/local/lib/site_perl . /etc/apache2) at (eval
1213) line 3.

Stack:
[(eval 1213):3]
[/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:330]
[/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:156]
[/opt/rt4/local/plugins/RT-Authen-ExternalAuth/html/Elements/DoAuth:10]
[/opt/rt4/local/plugins/RT-Authen-ExternalAuth/html/Callbacks/ExternalAuth/autohandler/Session:2]
[/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:236]
[/opt/rt4/share/html/autohandler:53]
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/DBI.pm:70)
[Thu Nov 10 12:52:43 2011] [warning]: Use of uninitialized value $_[5]
in join or string at /usr/local/share/perl/5.10.1/Log/Dispatch.pm line
23. (/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/DBI.pm:99)
[Thu Nov 10 12:52:43 2011] [error]: My_MySQL AUTH FAILED The
encryption package you gave me ( Crypt::MySQL::password ) does not
support the encryption method you specified ( )
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/DBI.pm:99)
[Thu Nov 10 12:52:43 2011] [debug]: DBI password validation result: 0
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:331)
[Thu Nov 10 12:52:43 2011] [debug]: Password Validation Check Result:
0 (/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:159)
[Thu Nov 10 12:52:43 2011] [debug]: Autohandler called ExternalAuth.
Response: (0, Password Invalid)
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/html/Elements/DoAuth:11)
[Thu Nov 10 12:52:43 2011] [error]: FAILED LOGIN for test321 from
150.254.149.220 (/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:655)
root@adisan-test:/etc/request-tracker3.8#

Could you help me to find what i’m doing wrong ?

Adrian Stelmaszyk

                                                    # The Perl

package & subroutine used to encrypt passwords
# e.g. if the
passwords are stored using the MySQL v3.23 “PASSWORD”
# function,
then you will need Crypt::MySQL::password, but for the
# MySQL4+
password function you will need Crypt::MySQL::password41
#
Alternatively, you could use Digest::MD5::md5_hex or any other
# encryption
subroutine you can load in your perl installation
‘p_enc_pkg’
=> ‘Crypt::MySQL::password41’,
#‘p_enc_sub’
=> ‘password41’,
# If your

Couldn’t Load Password Encryption Package. Error: Can’t locate
Crypt/MySQL/password.pm
My_MySQL AUTH FAILED The encryption package you gave me (
Crypt::MySQL::password ) does not support the encryption method you
specified ( )

You’ve configured it to use Crypt::MySQL::password41,
which is not a perl module.

I suspect you wanted it to load Crypt::MySQL and then use the
password41 method on it.

-kevin

Hi,

now I have :

‘p_enc_pkg’ => ‘Crypt::MySQL’,
‘p_enc_sub’ => ‘password41’,

and still errors:

[error]: AUTH FAILED, Couldn’t Load Password Encryption Package.
Error: Can’t locate Crypt/MySQL.pm in @INC (@INC contains:
/opt/rt4/sbin/…/local/lib
/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib /opt/rt4/sbin/…/lib
/etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10
/usr/share/perl/5.10 /usr/local/lib/site_perl . /etc/apache2) at (eval
1304) line 3.

[error]: My_MySQL AUTH FAILED The encryption package you gave me (
Crypt::MySQL ) does not support the encryption method you specified (
password41 ) (/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/DBI.pm:99)

[Sat Nov 12 12:08:58 2011] [debug]: DBI password validation result: 0
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:331)
[Sat Nov 12 12:08:58 2011] [debug]: Password Validation Check Result:
0 (/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:159)
[Sat Nov 12 12:08:58 2011] [debug]: Autohandler called ExternalAuth.
Response: (0, Password Invalid)
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/html/Elements/DoAuth:11)
[Sat Nov 12 12:08:58 2011] [error]: FAILED LOGIN for test123 from
31.174.157.24 (/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:655)

Any idea why there we Can’t locate Crypt/MySQL.pm ?

Adrian2011/11/10 Kevin Falcone falcone@bestpractical.com:

On Thu, Nov 10, 2011 at 02:07:41PM +0100, Adrian Stel wrote:

                                                    # The Perl

package & subroutine used to encrypt passwords
# e.g. if the
passwords are stored using the MySQL v3.23 “PASSWORD”
# function,
then you will need Crypt::MySQL::password, but for the
# MySQL4+
password function you will need Crypt::MySQL::password41
#
Alternatively, you could use Digest::MD5::md5_hex or any other
# encryption
subroutine you can load in your perl installation
‘p_enc_pkg’
=> ‘Crypt::MySQL::password41’,
#‘p_enc_sub’
=> ‘password41’,
# If your

Couldn’t Load Password Encryption Package. Error: Can’t locate
Crypt/MySQL/password.pm
My_MySQL AUTH FAILED The encryption package you gave me (
Crypt::MySQL::password ) does not support the encryption method you
specified ( )

You’ve configured it to use Crypt::MySQL::password41,
which is not a perl module.

I suspect you wanted it to load Crypt::MySQL and then use the
password41 method on it.

-kevin


RT Training Sessions (http://bestpractical.com/services/training.html)

  • Barcelona, Spain — November 28 & 29, 2011

Pozdrawiam
Adrian Stelmaszyk

Hi,

solution:

install Crypt::MySQL

using CPAN.

Adrian2011/11/12 Adrian Stel adisan82@gmail.com:

Hi,

now I have :

‘p_enc_pkg’ => ‘Crypt::MySQL’,
‘p_enc_sub’ => ‘password41’,

and still errors:

[error]: AUTH FAILED, Couldn’t Load Password Encryption Package.
Error: Can’t locate Crypt/MySQL.pm in @INC (@INC contains:
/opt/rt4/sbin/…/local/lib
/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib /opt/rt4/sbin/…/lib
/etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10
/usr/share/perl/5.10 /usr/local/lib/site_perl . /etc/apache2) at (eval
1304) line 3.

[error]: My_MySQL AUTH FAILED The encryption package you gave me (
Crypt::MySQL ) does not support the encryption method you specified (
password41 ) (/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/DBI.pm:99)

[Sat Nov 12 12:08:58 2011] [debug]: DBI password validation result: 0
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:331)
[Sat Nov 12 12:08:58 2011] [debug]: Password Validation Check Result:
0 (/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:159)
[Sat Nov 12 12:08:58 2011] [debug]: Autohandler called ExternalAuth.
Response: (0, Password Invalid)
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/html/Elements/DoAuth:11)
[Sat Nov 12 12:08:58 2011] [error]: FAILED LOGIN for test123 from
31.174.157.24 (/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:655)

Any idea why there we Can’t locate Crypt/MySQL.pm ?

Adrian

2011/11/10 Kevin Falcone falcone@bestpractical.com:

On Thu, Nov 10, 2011 at 02:07:41PM +0100, Adrian Stel wrote:

                                                    # The Perl

package & subroutine used to encrypt passwords
# e.g. if the
passwords are stored using the MySQL v3.23 “PASSWORD”
# function,
then you will need Crypt::MySQL::password, but for the
# MySQL4+
password function you will need Crypt::MySQL::password41
#
Alternatively, you could use Digest::MD5::md5_hex or any other
# encryption
subroutine you can load in your perl installation
‘p_enc_pkg’
=> ‘Crypt::MySQL::password41’,
#‘p_enc_sub’
=> ‘password41’,
# If your

Couldn’t Load Password Encryption Package. Error: Can’t locate
Crypt/MySQL/password.pm
My_MySQL AUTH FAILED The encryption package you gave me (
Crypt::MySQL::password ) does not support the encryption method you
specified ( )

You’ve configured it to use Crypt::MySQL::password41,
which is not a perl module.

I suspect you wanted it to load Crypt::MySQL and then use the
password41 method on it.

-kevin


RT Training Sessions (http://bestpractical.com/services/training.html)

  • Barcelona, Spain — November 28 & 29, 2011


Pozdrawiam
Adrian Stelmaszyk

Pozdrawiam
Adrian Stelmaszyk