CustomerAuth has multiple, too.

Moderator: crythias

Locked
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

CustomerAuth has multiple, too.

Post by crythias »

This probably doesn't mean anything to anyone, but http://doc.otrs.org/2.4/en/html/x1872.html doesn't mention anything about multiple AuthModules. However, Kernel/System/CustomerAuth.pm does have this nice piece of code:

Code: Select all

    for my $Count ( '', 1 .. 10 ) {
        my $GenericModule = $Self->{ConfigObject}->Get("Customer::AuthModule$Count");
Which, btw, in case you're wondering, is equivalent (?) to CustomerUser.pm for:

Code: Select all

    for my $Count ( '', 1 .. 10 ) {

        # next if customer backend is used
        next if !$Self->{ConfigObject}->Get("CustomerUser$Count");
Also significant, though not brought forth in the docs, is that '' (nothing) is *still* valid, even though the docs say that you should or must use "1", "2", etc for multiple CustomerUser databases. That isn't necessarily the case. With nothing, it appears you get 11 entries.

Yes, but what does it mean?
It means for me: I have two organizations under two different LDAP configurations, and that apparently I can have them authenticate separately with minimal fuss. Customer::AuthModule, Customer::AuthModule1, etc.
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
1010
Znuny newbie
Posts: 6
Joined: 20 Oct 2010, 17:25
Znuny Version: 3.0b5

Re: CustomerAuth has multiple, too.

Post by 1010 »

Hi !

I'm trying to use this but I'm stuck, I can only get one Auth working.

Here is what is set in Config.pm :

Code: Select all

        $Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::LDAP';
        $Self->{'Customer::AuthModule1::LDAP::AlwaysFilter'} =  '(objectclass=user)';
        $Self->{'Customer::AuthModule1::LDAP::SearchUserPw'} =  'xx';
        $Self->{'Customer::AuthModule1::LDAP::SearchUserDN'} =  'xx';
        $Self->{'Customer::AuthModule1::LDAP::UserAttr'} =  'DN';
        $Self->{'Customer::AuthModule1::LDAP::AccessAttr'} =  'member';
        $Self->{'Customer::AuthModule1::LDAP::UID'} =  'cn';
        $Self->{'Customer::AuthModule1::LDAP::BaseDN'} =  'OU=IN,DC=server,DC=fr';
        $Self->{'Customer::AuthModule1::LDAP::Host'} =  'server';

        $Self->{'Customer::AuthModule2'} = 'Kernel::System::CustomerAuth::LDAP';
        $Self->{'Customer::AuthModule2::LDAP::AlwaysFilter'} =  '(objectclass=user)';
        $Self->{'Customer::AuthModule2::LDAP::SearchUserPw'} =  'yy';
        $Self->{'Customer::AuthModule2::LDAP::SearchUserDN'} =  'yy';
        $Self->{'Customer::AuthModule2::LDAP::UserAttr'} =  'DN';
        $Self->{'Customer::AuthModule2::LDAP::AccessAttr'} =  'member';
        $Self->{'Customer::AuthModule2::LDAP::UID'} =  'cn';
        $Self->{'Customer::AuthModule2::LDAP::BaseDN'} =  'OU=TA,DC=anotherserver,DC=fr';
        $Self->{'Customer::AuthModule2::LDAP::Host'} =  'anotherserver';
I think I am close and it is "only" a problem of definition but I don't know how ...

Thanks for your help,
1010
1010
Znuny newbie
Posts: 6
Joined: 20 Oct 2010, 17:25
Znuny Version: 3.0b5

Re: CustomerAuth has multiple, too.

Post by 1010 »

OK. Replying to myself.
Syntax is :

$Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host1'} = 'XXX.XXX.XXX.XXX:3268';
$Self->{'Customer::AuthModule::LDAP::BaseDN1'} = 'dc=XXX, dc=de';
$Self->{'Customer::AuthModule::LDAP::UID1'} = 'mail';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN1'} = 'CN=OTRS,OU=Administration & Services,OU=Benutzer - Sonstige,DC=XXX,DC=de';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw1'} = 'XXX';


$Self->{'Customer::AuthModule2'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host2'} = 'XXX.XXX.XXX.XXX:3268';
$Self->{'Customer::AuthModule::LDAP::BaseDN2'} = 'dc=XXX, dc=de';
$Self->{'Customer::AuthModule::LDAP::UID2'} = 'mail';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN2'} = 'CN=OTRS,OU=Administration & Services,OU=Benutzer - Sonstige,DC=XXX,DC=de';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw2'} = 'XXX';


Working now on this part.
Locked