Difference between revisions of "ExternalAuth"
m (1 revision: Import (2/2) from Kwiki on wiki.bestpractical.com)
Revision as of 14:17, 22 November 2010
- 1 External Authentication and Information for Request Tracker
- 2 Modifications & Bugs
- 3 Extra Support
- 4 Help, it's not working!!
- 5 Migrate old usernames
External Authentication and Information for Request Tracker
RT::Authen::ExternalAuth is an RTx-style extension for RT that allows the use of multiple external information sources for lookup of authentication and information.
What this means in practice is that you may store your RT users in an external database and RT will validate against that database when logging users in as well as its own. It also means that the users' information can also be looked up against an external database, and it can even be a different one to the one providing authentication.
The currently supported types of external information service are LDAP and DBI.
- LDAP support means support for OpenLDAP & Active Directory both of which are commonly used for centralising user authentication and information.
- DBI support means support for any type of database service for which a Perl DBI driver exists and can be installed into your system. Current examples of available drivers include: MySQL, Oracle, PostgreSQL, Flat files and many many others.
RT::Authen::ExternalAuth is designed to allow multiple independent sources to be checked sequentially, and to allow independent sources to be used for each of information lookup and authentication. For example, you could have an LDAP server that stores usernames, passwords and groups for authenticating access to RT, and a separate MySQL server that stores e-mail addresses and other information about those users; or perhaps multiple MySQL servers, each of which will be checked in turn until a user with valid information is found.
As of v0.08 you may also now use browser cookies to implement Single Sign-On (SSO) with other website code so that if you login to another web application and it writes a browser cookie, RT may use that cookie to automatically log you in to RT as the same user you logged in as in the other application.
Installation is simple, and configuration is simple so long as you understand how your information sources work.
There is now a new wiki page (ExternalAuthUsers) for discovering just who is using RT::Authen::ExternalAuth to authenticate their users. If you use it and you're not on the list, please feel free to add yourself - I'd personally love to know where my work is being used :)
For RT versions 3.4.x and 3.6.x it is still recommended that you use RT::Authen::ExternalAuth v0.05. It is perfectly compatible with these versions and works very well. Later versions of ExternalAuth have been developed with RT-3.8.x in mind and, while they /should/ be compatible with earlier versions of RT, there could be some unforeseen difficulties.
The current version of RT::Authen::ExternalAuth for RT-3.8.x is 0.08
To install on a system running CPAN:
cpan -i RT::Authen::ExternalAuth
or, from a CPAN prompt:
cpan> install RT::Authen::ExternalAuth
- remember to add your rt lib path to PERL5LIB before beginning a cpan install. For instance, on CentOS 5.3 do "export PERL5LIB=/usr/lib/rt". failing to do this will lead to the installer complaining that it can't find RT.pm.
- if you install rt into /opt/rt3, then you will want to "export PERL5LIB=/opt/rt3/lib" before the cpan install.
Download the extension tarball from: http://www.cpan.org/authors/id/Z/ZO/ZORDRAK/RT-Authen-ExternalAuth-0.08.tar.gz
Then, unzip and untar the module:
tar -xvzf RT-Authen-ExternalAuth-0.08.tar.gz
Change into the extension directory:
Run Makefile.PL and answer the prompt as to your RT base directory:
Then run make and make install to complete the installation:
You can choose to install the latest development trunk straight out of subversion to get the absolute latest code:
cd trunk perl Makefile.PL make make install
As of right now (24/01/2009) the trunk is identical to the release version 0.08
Once you've installed the extension, you will need to amend your $RTHOME/etc/RT_SiteConfig.pm to add the new configuration options required for your external sources. The installation process should place an example set of configuration options in $RTHOME/local/plugins/RT-Authen-ExternalAuth/etc/RT_SiteConfig.pm (or for RT-3.6.x and ealier $RTHOME/local/etc/RT_SiteConfig.pm). You can choose to either use the examples as a basis for manually adding options to your SiteConfig, or you can include the $RTHOME/local/plugins/RT-Authen-ExternalAuth/etc/RT_SiteConfig.pm file directly from the base of your SiteConfig, and modify the settings accordingly.
- Remember to add ==> Set( @Plugins, qw(RT::Authen::ExternalAuth) ); <== to your SiteConfig.
- Remember to READ THE README!
- <em>No longer supported for RT-3.8.x - Integrated into v0.08 of RT::Authen::ExternalAuth
This module provides the ability to seamlessly integrate RT-3.6.x with a website that uses browser cookies to keep users authenticated once they have logged in in combination with ExternalAuth v0.05.
Modifications & Bugs
The extensions above are released under the GNU General Public License v2 and you are free to modify the extension however you want, but I ask that you PLEASE document your changes and either add information here or contact me with them directly so they may be considered for future releases and the improvement of ExternalAuth for everybody.
Similarly, if you encounter any bugs, please let me know and I'll update the code accordingly. Hopefully I've tested it thoroughly enough that you shouldn't find any, but I expect that is wishful thinking. You can let me know about bugs however you like, but it'd be worth also entering them into the CPAN copy of RT via this e-mail address:
I have also done my very best to document each and every line worth documenting in the included files so that understanding the code should be easy and modification should be easy too.
I try to make myself available to provide support and should be easily contactable if you want any help with development or to request features or whatever; however the RT-Users mailing list and the #rt IRC channel are the best places to get help because if I'm not around to help, someone else probably will be. I make no guarantee that e-mails direct to me will get a response as I am a very busy man :)
- The RT-Users mailing list: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
- #rt on irc.perl.org (Zordrak)
- zordrak at cpan dot org
- rt at tpa dot me dot uk
Help, it's not working!!
- After installing RT::Authen::ExternalAuth successfully via CPAN, Apache won't start. In the error_log, the last entry begins: [Thu Sep 03 00:52:17 2009] error Can't locate Net/LDAP.pm... etc.
ExternalAuth requires Net::LDAP, which can be installed from cpan.
Migrate old usernames
- rt_logins_email2ldap - script to convert email usernames to LDAP/Active Directory usernames