Subject: | ExternalInfo checks only look at Name attribute regardless of what is set in attr_match_list |
Date: | Tue, 20 Dec 2011 10:33:53 -0500 |
To: | bug-RT-Authen-ExternalAuth [...] rt.cpan.org |
From: | Pete Gillis <pgillis [...] usm.maine.edu> |
Distribution name and version: RT-Authen-ExternalAuth-0.9
Perl version: 5.10.0
Operating System vendor and version: Linux rt 2.6.32.36-0.5-pae #1 SMP 2011-04-14 10:12:31 +0200 i686 i686 i386 GNU/Linux
The error in the log shows up as:
Dec 19 13:04:00 rt RT: Attempting to use this canonicalization key: ExternalAuthId
Dec 19 13:04:00 rt RT: This attribute ( ExternalAuthId ) is null or incorrectly defined in the attr_map for this service ( NDS_LDAP )
In RT_SiteConfig.pm the following is part of the configuration for the LDAP service:
'NDS_LDAP' => { ## GENERIC SECTION
## RT ATTRIBUTE MATCHING SECTION
# The list of RT attributes that uniquely identify a user
# This example shows what you *can* specify.. I recommend reducing this
# to just the Name and EmailAddress to save encountering problems later.
'attr_match_list' => [ 'ExternalAuthId' ],
# The mapping of RT attributes on to LDAP attributes
'attr_map' => { 'EmailAddress' => 'mail',
'ExternalAuthId' => 'employeeID',
The following "patch" works for me, although it is not a very generalized solution.
--- /Users/pgillis/Documents/workspace/RT/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm 2011-12-20 09:19:46.000000000 -0500
+++ RT-Authen-ExternalAuth-0.09/lib/RT/Authen/ExternalAuth.pm 2011-05-06 17:07:37.000000000 -0400
@@ -279,7 +279,7 @@ sub UpdateUserInfo {
# Update their info from external service using the username as the lookup key
# CanonicalizeUserInfo will work out for itself which service to use
# Passing it a service instead could break other RT code
- my %args = (Name => $username, ExternalAuthId => $UserObj->ExternalAuthId);
+ my %args = (Name => $username);
$UserObj->CanonicalizeUserInfo(\%args);
# For each piece of information returned by CanonicalizeUserInfo,
When I get some time I plan on trying to make a more general solution, but at present just don't know enough about how the plugin works. Thanks for the great plugin!!
Pete