[Solved] LDAP customers: customer_user_id & login ID
Moderator: crythias
-
- Znuny newbie
- Posts: 9
- Joined: 27 Mar 2014, 14:33
- Znuny Version: 3.3.5
- Real Name: Richard Martin
- Company: University of Strathclyde
[Solved] LDAP customers: customer_user_id & login ID
Please help!
Customers are able to authenticate and login using their LDAP Active Directory credentials. They can create tickets via the web interface and these are visible under "My Tickets".
However, any tickets submitted via email (as well as web tickets) are visible under "Company Tickets" (CompanyID is set to 'mail').
Problem is customer_user_id of email tickets is set to the email address forename.suraname@institution, but customer_user_id of webtickets is set to the login ID (sAMAccountName).
Ideally, everything should be visible under "My Tickets" rather than "Company Tickets".
I think there are two options:
1. perform an LDAP query on incoming email tickets to find sAMAccountName and set customer_user_id=sAMAccountName
2. have customers authenticate using their AD userID (sAMAccountName) but use the email address as the login ID and consequently have customer_user_id = email address for any web tickets.
But I don't know how to do either. Any help or alternative suggestions would be most appreciated.
Richard.
Customers are able to authenticate and login using their LDAP Active Directory credentials. They can create tickets via the web interface and these are visible under "My Tickets".
However, any tickets submitted via email (as well as web tickets) are visible under "Company Tickets" (CompanyID is set to 'mail').
Problem is customer_user_id of email tickets is set to the email address forename.suraname@institution, but customer_user_id of webtickets is set to the login ID (sAMAccountName).
Ideally, everything should be visible under "My Tickets" rather than "Company Tickets".
I think there are two options:
1. perform an LDAP query on incoming email tickets to find sAMAccountName and set customer_user_id=sAMAccountName
2. have customers authenticate using their AD userID (sAMAccountName) but use the email address as the login ID and consequently have customer_user_id = email address for any web tickets.
But I don't know how to do either. Any help or alternative suggestions would be most appreciated.
Richard.
Last edited by rmstrath on 28 Mar 2014, 14:22, edited 1 time in total.
OTRS version 3.3.5, Linux (Centos 6.5) & MySQL 5.1.73
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: LDAP customers: customer_user_id & login ID
This is because your Config.pm of CustomerUser Map is referencing a field lookup for the email address that it can't find in ldap to match to a user.rmstrath wrote:Problem is customer_user_id of email tickets is set to the email address forename.suraname@institution,
What is your Config.pm?
"My Tickets = current username" "Company Tickets = "customer_id""rmstrath wrote:Ideally, everything should be visible under "My Tickets" rather than "Company Tickets".
viewtopic.php?f=60&t=16543
viewtopic.php?f=60&t=7531
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 9
- Joined: 27 Mar 2014, 14:33
- Znuny Version: 3.3.5
- Real Name: Richard Martin
- Company: University of Strathclyde
Re: LDAP customers: customer_user_id & login ID
Are you saying that the OTRS attempts an LDAP search based on the email address for incoming tickets? When logging in via the web interface, it correctly matches a userid -> email address since I can see all the "company tickets" which have customer_id = email address (CustomerID => 'mail' in config below).This is because your Config.pm of CustomerUser Map is referencing a field lookup for the email address that it can't find in ldap to match to a user.
From my Config.pm
Code: Select all
CustomerKey => 'sAMAccountName',
CustomerID => 'mail',
#CustomerID => '[customer_id]',
CustomerUserListFields => ['sAMAccountName', 'sn', 'givenname', 'company', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'sn', 'givenname', 'company', 'mail'],
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
CustomerUserValidFilter => '(company=*)',
Map => [
[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
[ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
],
};
I know, but "current username" = AD userID & "customer_id" / "customer_user_id" = incoming email address for email tickets."My Tickets = current username" "Company Tickets = "customer_id""
I've already read both of the linked topics, but still couldn't figure it out.
Thanks.
OTRS version 3.3.5, Linux (Centos 6.5) & MySQL 5.1.73
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: LDAP customers: customer_user_id & login ID
Yes, it's practically the only user-identifying feature on a ticket.rmstrath wrote:Are you saying that the OTRS attempts an LDAP search based on the email address for incoming tickets?
Summary: check "from" address vs CustomerUserPostMasterSearchFields => ['mail'],
Which makes sense, because the user asserts a login name at the web interface.rmstrath wrote:When logging in via the web interface, it correctly matches a userid -> email address since I can see all the "company tickets" which have customer_id = email address (CustomerID => 'mail' in config below).
So, the real question is if the mail from address is different from LDAP mail stored attribute for given user.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 9
- Joined: 27 Mar 2014, 14:33
- Znuny Version: 3.3.5
- Real Name: Richard Martin
- Company: University of Strathclyde
Re: LDAP customers: customer_user_id & login ID
Don't think so. Email ticket from address:So, the real question is if the mail from address is different from LDAP mail stored attribute for given user.
Code: Select all
From: Archie contact <contact-archie@xxxxx.xx.xx>
Code: Select all
mail: contact-archie@xxxxx.xx.xx;
Many thanks.
OTRS version 3.3.5, Linux (Centos 6.5) & MySQL 5.1.73
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: LDAP customers: customer_user_id & login ID
any errors?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 9
- Joined: 27 Mar 2014, 14:33
- Znuny Version: 3.3.5
- Real Name: Richard Martin
- Company: University of Strathclyde
Re: LDAP customers: customer_user_id & login ID
Sorry - none.any errors?
OTRS version 3.3.5, Linux (Centos 6.5) & MySQL 5.1.73
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: LDAP customers: customer_user_id & login ID
Please edit your signature (see mine) so I can follow along with your OTRS Version, OS, database
Did you make changes to SysConfig as well as Config.pm for LDAP lookup?
For a ticket that is sent via email, what's the user information attached? does it look like Customer Information is there on ticket zoom or is it blank as if random person submitted it?
What's the username attached to the ticket?
Did you make changes to SysConfig as well as Config.pm for LDAP lookup?
For a ticket that is sent via email, what's the user information attached? does it look like Customer Information is there on ticket zoom or is it blank as if random person submitted it?
What's the username attached to the ticket?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 9
- Joined: 27 Mar 2014, 14:33
- Znuny Version: 3.3.5
- Real Name: Richard Martin
- Company: University of Strathclyde
Re: LDAP customers: customer_user_id & login ID
No, but I set CustomerGroupSupport = Yes & CustomerGroupAlwaysGroups = users in Framework -> Frontend::CustomerDid you make changes to SysConfig as well as Config.pm for LDAP lookup?
There is no customer information or username visible on the ticket zoom - only the senders email address.For a ticket that is sent via email, what's the user information attached? does it look like Customer Information is there on ticket zoom or is it blank as if random person submitted it?
What's the username attached to the ticket?
Customer Information reports "none"
Ticket Type reports "customer – email-external"
"From" reports the senders email address & CustomerID under the Ticket Information is the same email address.
Your help is much appreciated. Thanks.
OTRS version 3.3.5, Linux (Centos 6.5) & MySQL 5.1.73
-
- Znuny newbie
- Posts: 9
- Joined: 27 Mar 2014, 14:33
- Znuny Version: 3.3.5
- Real Name: Richard Martin
- Company: University of Strathclyde
[Solved] LDAP customers: customer_user_id & login ID
Solved! ... but its late. Will tidy up and post solution tomorrow ... 

OTRS version 3.3.5, Linux (Centos 6.5) & MySQL 5.1.73
-
- Znuny newbie
- Posts: 9
- Joined: 27 Mar 2014, 14:33
- Znuny Version: 3.3.5
- Real Name: Richard Martin
- Company: University of Strathclyde
[Solved] LDAP customers: customer_user_id & login ID
After reading several posts, I can across one which suggested removing GroupDN from the LDAP search and changed CustomerUserValidFilter => '(company=*) to CustomerUserValidFilter => '(mail=*)'. We don't have a company tag in our user records, so that explains the null search in part. Don't know why GroupDN causes a problem.
Anyway working code is:
Now, incoming tickets are properly mapped to the LDAP userID and both email & web tickets can be viewed under "My Tickets" by the Customer. In fact, any ticket can be updated either by email or via the customer.pl interface - perfect!
Anyway working code is:
Code: Select all
$Self->{CustomerUser} = {
Name => 'LDAP Lookup',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => 'XXXXXXXXXXX',
BaseDN => 'XXXXXXXXXXXXXXXXX',
SSCOPE => 'sub',
UserDN => 'cn=XXXXX,ou=XXXXXXX,ou=XXXXX,dc=XX,dc=XXXX,dc=XX,dc=XX',
UserPw => 'XXXXXXXX',
AlwaysFilter => '',
# GroupDN => 'ou=XXXXX,dc=XX,dc=XXXXX,dc=XX,dc=XX',
# AccessAttr => 'member',
# UserAttr => 'DN',
},
CustomerKey => 'sAMAccountName',
CustomerID => 'mail',
CustomerUserListFields => ['sAMAccountName', 'sn', 'givenname', 'company', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'sn', 'givenname', 'company', 'mail'],
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
CustomerUserValidFilter => '(mail=*)(lockoutTime=0)',
Map => [
[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
[ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
],
};
OTRS version 3.3.5, Linux (Centos 6.5) & MySQL 5.1.73