[rt-users] External Authentication

Bryon Baker bbaker at copesan.com
Wed Jun 26 16:26:29 EDT 2013


Update 
 ok I have successful connection and select of database.  Used this configuration
       'type'                      =>  'db',
       'server'                    =>  '192.168.000.000',
       'database'                  =>  'DBName;Driver=SQLServer;DSN=SQLServer',
       'table'                     =>  '[USER]',  *** Put square brackets because "user" is a keyword.
       'user'                      =>  'SearchUserID',
       'pass'                      =>  ' SearchUserPassword ',
       'port'                      =>  '1433',
       'dbi_driver'                =>  'ODBC',
       'u_field'                   =>  'Email',
       'p_field'                   =>  'password',
       'p_enc_pkg'                 =>  'Digest::SHA1',
       'p_enc_sub'                 =>  'password',
       'd_field'                   =>  'disabled',
       'd_values'                  =>  ['0'],
       'attr_match_list'           =>  [   'Gecos'
                                       ],
        'attr_map'                 =>  {   'Name' => 'Firstname',
                                   'EmailAddress' => 'Email',
                                 'ExternalAuthId' => 'Email',
                                          'Gecos' => 'Email'
                                        }
                          },

Now on to the next problem the password are stored in the database using SHA.  
None of the user I am using to test pass authentication.

Do I have the right configuration for RT to use this kind of Hash?

Thanks
Bryon Baker
Network Operations Manager
Copesan - Specialists in Pest Solutions
800-267-3726  •  262-783-6261 ext. 2296
bbaker at copesan.com
www.copesan.com
"Servicing North America with Local Care"


-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Bryon Baker
Sent: Wednesday, June 26, 2013 2:10 PM
To: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] External Authentication

This is the Perl connect string that I test and works.
DBI->connect("dbi:ODBC:Driver=SQLServer;DSN=SQLServer;UID=UserID;PWD=pas
DBI->sword");

Thanks
Bryon Baker
Network Operations Manager
Copesan - Specialists in Pest Solutions
800-267-3726  •  262-783-6261 ext. 2296
bbaker at copesan.com
www.copesan.com
"Servicing North America with Local Care"


-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Bryon Baker
Sent: Wednesday, June 26, 2013 1:51 PM
To: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] External Authentication

Looks like to me that is a little closer.

[Wed Jun 26 18:48:08 2013] [debug]: Calling UserExists with $username (bbaker) and $service (Connect_MSSQL) (/usr/lib/perl5/vendor_perl/5.16.2/RT/Authen/ExternalAuth.pm:227)
[Wed Jun 26 18:48:08 2013] [warning]: DBD::ODBC::db selectall_hashref failed: [unixODBC][FreeTDS][SQL Server]Incorrect syntax near the keyword 'USER'. (SQL-42000) at /usr/lib/perl5/vendor_perl/5.16.2/RT/Authen/ExternalAuth/DBI.pm line 219. (/usr/lib/perl5/vendor_perl/5.16.2/RT/Authen/ExternalAuth/DBI.pm:219)
[Wed Jun 26 18:48:08 2013] [warning]: Issuing rollback() due to DESTROY without explicit disconnect() of DBD::ODBC::db handle database=RapidTrax6a;Driver=SQLServer;DSN=SQLServer;host=192.168.250.29;port=1433 at /usr/lib/perl5/vendor_perl/5.16.2/RT/Authen/ExternalAuth/DBI.pm line 219. (/usr/lib/perl5/vendor_perl/5.16.2/RT/Authen/ExternalAuth/DBI.pm:219)
[Wed Jun 26 18:48:08 2013] [error]: DBD::ODBC::db selectall_hashref failed: [unixODBC][FreeTDS][SQL Server]Incorrect syntax near the keyword 'USER'. (SQL-42000) at /usr/lib/perl5/vendor_perl/5.16.2/RT/Authen/ExternalAuth/DBI.pm line 219.

Thanks
Bryon Baker
Network Operations Manager
Copesan - Specialists in Pest Solutions
800-267-3726  •  262-783-6261 ext. 2296
bbaker at copesan.com
www.copesan.com
"Servicing North America with Local Care"


-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Thomas Sibley
Sent: Wednesday, June 26, 2013 1:32 PM
To: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] External Authentication

On 06/26/2013 10:25 AM, Bryon Baker wrote:
> I agree Thomas.
> 
> As stated before I have the correct information and setup for the ODBC 
> drivers I have tested this with isql and tsql and I wrote a quick perl 
> scrip to test the connection string and that works.
> 
> What I can's figure out is what information needs to be put in the "
> 'dbi_driver'                =>  'DBI_DRIVER'," so that RT will use
> the DSN entry in the ODBC configs.

RT::Authen::ExternalAuth expects to build a DSN like so:

   dbi:$dbi_driver:database=$db_database;host=$db_server;port=$db_port

Yet ODBC wants a sub-driver, so try this hack:

   dbi_driver => 'ODBC',
   database   => 'FooBar;driver=FreeTDS',



More information about the rt-users mailing list