All;
I believe I have run into a bug in how Auth.pm handles Auth Sync modules in OTRS 6.0.10.
I have two different LDAP (Active Directory) domains which need to authenticate agents, thus I have the following in Config.pm:
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP'; $Self->{'AuthModule::LDAP::Host'} = ''; .
.
.
$Self->{'AuthModule::UseSyncBackend'} = 'AuthSyncBackend'; $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host'} = ''; .
.
.
$Self->{'AuthModule1'} = 'Kernel::System::Auth::LDAP'; $Self->{'AuthModule::LDAP::Host'} = ''; .
.
.
$Self->{'AuthModule::UseSyncBackend1'} = 'AuthSyncBackend'; $Self->{'AuthSyncModule1'} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host1'} = ''; .
.
.
I'm sorry, I don't have line numbers for this, but the problem appears to come from here:
# configured auth sync backend
my $AuthSyncBackend = $ConfigObject->Get("AuthModule::UseSyncBackend$Count"); // Despite $Count being 1, the configuration for host 0 is returned here.
if ( !defined $AuthSyncBackend ) {
$AuthSyncBackend = $ConfigObject->Get("AuthModule{$Count}::UseSyncBackend");
}
# for backwards compatibility, OTRS 3.1.1, 3.1.2 and 3.1.3 used this wrong format (see bug#8387)
# sync with configured auth backend
if ( defined $AuthSyncBackend ) {
# if $AuthSyncBackend is defined but empty, don't sync with any backend
if ($AuthSyncBackend) {
# sync configured backend
$Self->{$AuthSyncBackend}->Sync( %Param, User => $User ); // Attempts to sync against host 0, when authenticated by host 1
}
}
I don't believe this is the correct fix, but by changing these lines from:
if ($AuthSyncBackend) {
.
.
.
$Self->{$AuthSyncBackend}->Sync( %Param, User => $User );
To:
if ("AuthSyncBackend$Count") {
.
.
.
$Self->{"AuthSyncBackend$Count"}->Sync( %Param, User => $User );
Synchronization occurs correctly.
Thank you,
Dominic Hilsbos
Director - Information Technology
Perform Air International Inc.
DHilsbos@PerformAir.com
www.PerformAir.com