Thanks Myrat

That will help me should I go down the LDAPimport route which was the fallback 
position.

From: Myrat Saparow [mailto:[email protected]]
Sent: Friday, 2 October 2015 4:32 PM
To: Anton Panetta <[email protected]>; 
[email protected]
Subject: Re: [rt-users] RT External Auth Ldap pass on to Custom Fields

Hi Anton,

I am not sure whether ExternalAuth plugin supports Custom Fields, but I know 
that LdapImport does.

The way I worked it, was to autheticate user with ExternalAuth, create it on 
first logon with minimal mappings (name, e-mail), and update the rest of the 
needed data with LdapImport on a regular cycle.

Here's part of the siteconfig file I use:

Set( $LDAPMapping, {
        Name            => 'sAMAccountName',
        EmailAddress    => 'mail',
        RealName        => 'cn',
        WorkPhone       => 'telephoneNumber',
        Organization    => 'departmentName',
        'UserCF.Project'        => 'physicalDeliveryOfficeName'
                    });

Regards,

Myrat


On Tue, Sep 29, 2015 at 7:40 AM Anton Panetta 
<[email protected]<mailto:[email protected]>> wrote:
Hi

I see several questions around the web, with incomplete answers to this. Which 
suggests people have tried and succeeded, or given up.

RT 4.2.11
RT External Auth 0.25

What I am trying to achieve is the use of RT External auth to pull in or 
refresh user details on login, I am aware I could use ldap import but a more 
real time process makes more sense to me.

My goal is to be able to pull in ldap fields into custom fields, eg department, 
Company, for use elsewhere.

I can map existing attr no problem, but its when I get to custom fields that I 
run into issue

Everything I have read suggests it should be either UserCF.CustomFieldName 
CF.CustomFieldName UserCF.{CustomFieldName} CF.{CustomFieldName} or even 
{CustomFieldName}

Am I barking up the wrong tree, is this actually not possible, do I need to 
declare it somewhere else first or am I just getting the syntax wrong


Here is what I have defined as the attr_map

        'attr_map' => {
            'Name'         => 'sAMAccountName',
            'EmailAddress' => 'mail',
            'RealName'     => 'cn',
            'WorkPhone'    => 'telephoneNumber',
            'MobilePhone'  => 'mobile',
            'Address1'     => 'streetAddress',
            'City'         => 'l',
            'State'        => 'st',
            'Zip'          => 'postalCode',
            'Country'      => 'co',
            'CF.Department'   => 'department',


If anyone has managed success in this in the past id appreciate knowing what I 
am missing.


Here is a snip of the log I get

It shows the department string is being pulled from Ldap (AD in this instance) 
and then failing due like 748 in Record.pm (which I assume is me putting the 
wrong prefix to the CF sending it the wrong way)



[4828] [Tue Sep 29 02:00:17 2015] [info]: 
RT::Authen::ExternalAuth::LDAP::GetAuth External Auth OK ( My_LDAP ): snip  
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:301)
[4828] [Tue Sep 29 02:00:17 2015] [info]: 
RT::Authen::ExternalAuth::CanonicalizeUserInfo returning Address1: , 
CF.Department: IT, City: Hindmarsh, Country: Australia, EmailAddress: snip, 
MobilePhone: snip , Name: snip, RealName: snip, State: South Australia, 
WorkPhone: snip , Zip: 5007 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:868)
[4828] [Tue Sep 29 02:00:17 2015] [warning]: Use of uninitialized value $column 
in hash element at /opt/rt4/sbin/../lib/RT/Record.pm line 748. 
(/opt/rt4/sbin/../lib/RT/Record.pm:748)
[4828] [Tue Sep 29 02:00:17 2015] [warning]: Use of uninitialized value $column 
in hash element at /opt/rt4/sbin/../lib/RT/Record.pm line 748. 
(/opt/rt4/sbin/../lib/RT/Record.pm:748)
[4828] [Tue Sep 29 02:00:17 2015] [warning]: Use of uninitialized value $column 
in hash element at /opt/rt4/sbin/../lib/RT/Record.pm line 748. 
(/opt/rt4/sbin/../lib/RT/Record.pm:748)
[4828] [Tue Sep 29 02:00:17 2015] [warning]: Use of uninitialized value $column 
in hash element at /opt/rt4/sbin/../lib/RT/Record.pm line 748. 
(/opt/rt4/sbin/../lib/RT/Record.pm:748)
[4828] [Tue Sep 29 02:00:17 2015] [warning]: Use of uninitialized value $column 
in hash element at /opt/rt4/sbin/../lib/RT/Record.pm line 748. 
(/opt/rt4/sbin/../lib/RT/Record.pm:748)
[4828] [Tue Sep 29 02:00:17 2015] [warning]: Use of uninitialized value $column 
in hash element at /opt/rt4/sbin/../lib/RT/Record.pm line 748. 
(/opt/rt4/sbin/../lib/RT/Record.pm:748)
[4828] [Tue Sep 29 02:00:17 2015] [error]: RT::User::CF.Department 
Unimplemented in RT::Record. (/opt/rt4/sbin/../lib/RT/Record.pm line 983)



Regards
Anton



The information contained in this email message and any attachments may be 
confidential information. If you are not the intended recipient, any use, 
interference with, disclosure or copying of this material is unauthorised and 
prohibited. If you have received this email in error, please advise us 
immediately and delete the email and all copies. The content and opinions in 
non-business email are not necessarily those of Haircare Australia. 
[http://thinkbeforeprinting.org/struct/signature-1.gif]
The information contained in this email message and any attachments may be 
confidential information. If you are not the intended recipient, any use, 
interference with, disclosure or copying of this material is unauthorised and 
prohibited. If you have received this email in error, please advise us 
immediately and delete the email and all copies. The content and opinions in 
non-business email are not necessarily those of Haircare Australia. 
[http://thinkbeforeprinting.org/struct/signature-1.gif]

Reply via email to