[rt-users] RT 4.0.2 and ExternalAuth

Adrian Stel adisan82 at gmail.com
Thu Nov 10 08:07:41 EST 2011


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 at adisan-test:/etc/request-tracker3.8#



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


-- 
Adrian Stelmaszyk



More information about the rt-users mailing list