[rt-users] Using RT-Authen-ExternalAuth to update RT's Users table.

Ricardo Marimón rmarimon at nimbox.com
Fri Mar 11 18:24:23 EST 2011


I've managed to get RT 3.8.9 working with LDAP authentication using RT-Authen-ExternalAuth 0.08_01.  My internal users, the ones handling tickets, are authenticated via LDAP and it works great.  On the other hand, most of the people submitting tickets are in an external database.  

I would like to implement this behavior: when an email comes in, and RT processes it, it gets the user info from the external database.  If it is a new user create it and if it is an old user update it, based on the information on the external database.  So for example, If an email comes in and it matches one of the emails in the external database, get the user name, the mobile phone, the work phone, and update RT's Users database with that information.  This way I can use the most up to date information in templates and such.

I've browsed trough the perl code and I'm sure that there is something to do with 'CanonicalizeUserInfo' and 'UpdateUserInfo'.  Any pointers on how to do this, or even if it is possible?

Here is my RT_SiteConfig so far...

# 
# RT_Config.pm
#

# basic configuration

Set($rtname, 'rt.domain.com');
Set($Organization, 'domain.com');

# logging

Set($LogToFile, 'info');
Set($LogDir, '/var/log');
Set($LogToFileNamed, 'rt.log');

# web configuration

Set( $WebDomain, 'rt.domain.com' );

# authentication

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

Set($ExternalAuthPriority,['MY_LDAP']);
Set($ExternalInfoPriority,['MY_LDAP','MY_Members']);

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

Set($ExternalSettings, {
    'MY_LDAP' =>  {
	'type' =>  'ldap',
	'server' => '10.10.10.10',
	'auth' => 1,
	'info' => 1,
	'base' => 'ou=People,dc=domain,dc=com',
	'filter' => '(objectClass=person)',
	'd_filter' => '(objectClass=FooBarBaz)',
	'tls' => 0,
	'net_ldap_args' => [ version => 3],
	'attr_match_list' => [ 'Name' ],
	'attr_map' =>  {
	    'Name' => 'uid',
	    'RealName' => 'cn',
	    'ExternalAuthId' => 'uid',
	    'Gecos' => 'uid',
	    'EmailAddress' => 'mail',
	    'WorkPhone' => 'telephoneNumber'
	}
    },
    'MY_Members => {
	'type' => 'db',
	'server' => '10.10.10.10',
	'auth' => 0,
	'info' => 1,
	'database' => '********',
	'table' => '*******',
	'user' => '********',
	'pass' => '*********',
	'port' => 3306,
	'dbi_driver' => 'mysql',
	'attr_match_list' => [ 'EmailAddress' ],
	'attr_map' => { 
	    'WorkPhone' => 'phone_office',
	    'MobilePhone' => 'phone_mobile',
	    'EmailAddress' => 'email'
	}
    }
    });

1;




More information about the rt-users mailing list