ich habe schon mal in ähnlicher Sache hier im Forum gepostet.
Die Anbindung an den LDAP als solches geht, nur frage ich mich ob man den Code nicht vereinfachen kann?
Ich Authentifiziere z.Z. 12 unterschiedliche AD Gruppen, für jeden Gruppe sieht das wie folgt aus:
Code: Select all
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'emeadc01.dc1.dc2.dc3';
$Self->{'AuthModule::LDAP::BaseDN'} = 'DC=dc1,DC=dc2,DC=dc3';
$Self->{'AuthModule::LDAP::GroupDN'} = 'CN=ADGROUP1,OU=Organizational,OU=Groups,OU=DE,DC=dc1,DC=dc2,DC=dc3';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthModule::LDAP::SearchUserDN'} = 'otrsauth@dc1.dc2.dc3';
$Self->{'AuthModule::LDAP::SearchUserPw'} = 'password';
$Self->{'AuthModule::LDAP::Params'} = {
port => 3268,
timeout => 120,
async => 0,
version => 3,
};
# Sync data with OTRS DB
$Self->{'UserSyncLDAPMap'};
$Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host'} = 'emeadc01.dc1.dc2.dc3';
$Self->{'AuthSyncModule::LDAP::BaseDN'} = 'DC=dc1,DC=dc2,DC=dc3';
$Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'otrsauth@dc1.dc2.dc3';
$Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'password';
$Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
# DB -> LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
};
# AuthSyncModule::LDAP::UserSyncInitialGroups
# (sync following group with rw permission after initial create of first agent login)
$Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [ 'users', ];
Code: Select all
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::HostX'} = 'emeadc01.dc1.dc2.dc3';
$Self->{'AuthModule::LDAP::BaseDNX'} = 'DC=dc1,DC=dc2,DC=dc3';
$Self->{'AuthModule::LDAP::GroupDNX'} = 'CN=ADGROUP2,OU=Organizational,OU=Groups,OU=DE,DC=dc1,DC=dc2,DC=dc3';
$Self->{'AuthModule::LDAP::AccessAttrX'} = 'member';
$Self->{'AuthModule::LDAP::UIDX'} = 'sAMAccountName';
$Self->{'AuthModule::LDAP::SearchUserDNX'} = 'otrsauth@dc1.dc2.dc3';
$Self->{'AuthModule::LDAP::SearchUserPwX'} = 'password';
$Self->{'AuthModule::LDAP::ParamsX'} = {
port => 3268,
timeout => 120,
async => 0,
version => 3,
};
# Sync data with OTRS DB
$Self->{'UserSyncLDAPMap'};
$Self->{'AuthSyncModuleX'} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::HostX'} = 'emeadc01.dc1.dc2.dc3';
$Self->{'AuthSyncModule::LDAP::BaseDNX'} = 'DC=dc1,DC=dc2,DC=dc3';
$Self->{'AuthSyncModule::LDAP::UIDX'} = 'sAMAccountName';
$Self->{'AuthSyncModule::LDAP::SearchUserDNX'} = 'otrsauth@dc1.dc2.dc3';
$Self->{'AuthSyncModule::LDAP::SearchUserPwX'} = 'password';
$Self->{'AuthSyncModule::LDAP::UserSyncMapX'} = {
# DB -> LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
};
# AuthSyncModule::LDAP::UserSyncInitialGroups
# (sync following group with rw permission after initial create of first agent login)
$Self->{'AuthSyncModule::LDAP::UserSyncInitialGroupsX'} = [ 'users', ];
Jetzt zu meinem Problem:
Ab AD Gruppe 13 funktioniert der Login nicht mehr. In den Logs sind keine Fehler zu sehen. Typo fehler können auch ausgeschlossen werden.
Hat jemand eine Idee wo ich ansetzen kann um den Fehler zu finden? Bzw. oder habe ich die Möglichkeit das Script dafür zu vereinfachen ggf.
zusammen zufassen. Es wird immer nur gegen einen einzigen LDAP Authentifiziert, sind aber Gruppen die Teilweise in Unterschiedlichen OUs gelagert sind.
Des weiteren versuche ich Krampfhaft via:
Code: Select all
$Self->{'AuthSyncModule::LDAP::UserSyncRolesDefinition7'} = {
#LDAP Group
'CN=ADGROUP1,OU=Organizational,OU=Groups,OU=DE,DC=dc1,DC=dc2,DC=dc3' => {
#OTRS Role
'ADGROUP1' => '1',
},
};
verliert der User beim Login die ihm zugewiesene Rolle. Hat da jmd. vllt. mal ein funktionierenden Script-Schnipsel, oder
kann mir sagen ob da evtl. ein Fehler ist.
Ich hoffe mir kann irgend jmd. helfen, denn ich sehe mittlerweile den Wald vor Bäumen nicht mehr.
Die Config.pm ist mittlerweile 850 Zeilen lang und es müssen noch viel viel mehr AD Gruppen dort eingerichtet werden.
Vielen Dank im Voraus.
Es grüßt freundlich
Arne