[SOLVED] Using both Database and LDAP for customers
Moderator: crythias
[SOLVED] Using both Database and LDAP for customers
I have set OTRS 2.4.9 up with two backends and they both work for storing customer users; however as soon as I implemented the LDAP authentication for our internal customers, I lost the ability to sign in as external customers (who are stored in the database). The manual seems to describe how to set up two backends, but not how to get OTRS to authenticate against whichever is appropriate. is this possible? If so, how do I set it up?
Last edited by Mothra on 09 Nov 2010, 17:37, edited 1 time in total.
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Using both Database and LDAP for customers
you can set multiple back ends. http://doc.otrs.org/2.4/en/html/x1801.h ... r-backends
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
Re: Using both Database and LDAP for customers
Forgive me but, as I said in my OP, I have already set multiple customer-backends up successfully.crythias wrote:you can set multiple back ends. http://doc.otrs.org/2.4/en/html/x1801.h ... r-backends
What I can't get working is having LDAP customers authenticate via LDAP and database customers authenticate against their database-stored credentials.
When I implement the AD authentication, my AD customers can sign in but my database customers cannot. When I comment out the AD authentication, my AD customers cannot sign in, but my database customers can.
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
Re: Using both Database and LDAP for customers
Look through your Config.pm file and make sure that you do not have two lines that are the same as this: $Self->{CustomerUser}
You need to differentiate between the two methods by adding a number to each line. $Self->{CustomerUser1} $Self->{CustomerUser2}
Same thing goes for agent authentication. $Self->{'AuthModule1'} $Self->{'AuthModule2'}
You need to differentiate between the two methods by adding a number to each line. $Self->{CustomerUser1} $Self->{CustomerUser2}
Same thing goes for agent authentication. $Self->{'AuthModule1'} $Self->{'AuthModule2'}
Re: Using both Database and LDAP for customers
I've got this bit right already... but it only gives me the choice of 2 backends, not two methods of authentication.Khris wrote:Look through your Config.pm file and make sure that you do not have two lines that are the same as this: $Self->{CustomerUser}
You need to differentiate between the two methods by adding a number to each line. $Self->{CustomerUser1} $Self->{CustomerUser2}
This doesn't seem to work, as it breaks the OTRS login screen (which prompts me to download the perl script, indicating a fatal error that prevented it from creating valid HTML).Khris wrote:Same thing goes for agent authentication. $Self->{'AuthModule1'} $Self->{'AuthModule2'}
At present, I have:
Code: Select all
# Customer DB Authentication
#$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::DB';
#$Self->{'Customer::AuthModule::DB::Table'} = 'customer_user';
#$Self->{'Customer::AuthModule::DB::CustomerKey'} = 'login';
#$Self->{'Customer::AuthModule::DB::CustomerPassword'} = 'pw';
# Customer LDAP Authentication
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} = 'ad.acme.com';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=acme,dc=com';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'cn=otrs-customer,ou=Security Groups,ou=Exchange,ou=Acme,dc=acme,dc=com';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'cn=OTRS,ou=Services,ou=Exchange,ou=Acme,dc=acme,dc=com';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'xyz123';
$Self->{'Customer::AuthModule::LDAP::AlwaysFilter'} = '(objectCategory=CN=Person,CN=Schema,CN=Configuration,DC=acme,DC=com)';
$Self->{'Customer::AuthModule::LDAP::Params'} = { async => 0, port => 389, timeout => 120, version =>3, };
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
Re: Using both Database and LDAP for customers
Just to summarise my problem: I have two types of customer -
internal company customers who are in Active Directory
and
external customers who are just in the database.
Adding several hundred external customers to our company Active Directory is something I would rather avoid if possible.
With two separate backends, I want both LDAP and Database customers to be able to log in without having to switch the authentication mechanism manually.
internal company customers who are in Active Directory
and
external customers who are just in the database.
Adding several hundred external customers to our company Active Directory is something I would rather avoid if possible.
With two separate backends, I want both LDAP and Database customers to be able to log in without having to switch the authentication mechanism manually.
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
Re: Using both Database and LDAP for customers
This should help:
Code: Select all
# Customer DB Authentication
$Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::DB';
$Self->{'Customer::AuthModule::DB::Table'1} = 'customer_user';
$Self->{'Customer::AuthModule::DB::CustomerKey'1} = 'login';
$Self->{'Customer::AuthModule::DB::CustomerPassword1'} = 'pw';
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Re: Using both Database and LDAP for customers
jojo wrote:This should help:
Code: Select all
# Customer DB Authentication $Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::DB'; $Self->{'Customer::AuthModule::DB::Table'1} = 'customer_user'; $Self->{'Customer::AuthModule::DB::CustomerKey'1} = 'login'; $Self->{'Customer::AuthModule::DB::CustomerPassword1'} = 'pw';
Thank you! That did the trick.

OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
Re: Using both Database and LDAP for customers
I should add, to avoid breaking the "CustomerPanelLostPassword" and "CustomerPanelCreateAccount" (which you may want to retain for your database customers, you need to make the change in the LDAP auth config, thus
... and so on.
This is because Layout.pm checks the original module name before displaying the features:
$Self->{ConfigObject}->Get('[Customer::AuthModule') eq 'Kernel::System::CustomerAuth::DB'
With that caveat, I shall mark this as solved.
Code: Select all
# Customer LDAP Authentication
$Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host1'} = 'ad.acme.com';
$Self->{'Customer::AuthModule::LDAP::BaseDN1'} = 'dc=acme,dc=com';
$Self->{'Customer::AuthModule::LDAP::UID1'} = 'sAMAccountName';
....
This is because Layout.pm checks the original module name before displaying the features:
$Self->{ConfigObject}->Get('[Customer::AuthModule') eq 'Kernel::System::CustomerAuth::DB'
With that caveat, I shall mark this as solved.
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.