[LDAP-Authentifizierung] Zuweisung der Admin-Rollen

Allgemein Fragen, deutsche News, Ankündigungen & Events zum OTRS
Post Reply
InformatikKFM
Znuny newbie
Posts: 7
Joined: 12 Oct 2011, 16:39
Znuny Version: 5.0.23

[LDAP-Authentifizierung] Zuweisung der Admin-Rollen

Post by InformatikKFM »

Guten Morgen,

ich habe OTRS in Version 5.0.23 installiert und im ersten Schritt erfolgreich an das AD angebunden.
Ich wollte über die Funktion AuthSyncModule::LDAP::UserSyncRolesDefinition eine Zuweisung der AD-Benutzer zu OTRS-Rollen durchführen.
Dazu habe ich im AD eine neue Gruppe "OTRS-Administratoren" hinterlegt und einen Benutzernamen dieser Gruppe hinzugefügt. Leider erhalte ich beim Anmelden folgende Fehlermeldung:

Code: Select all

ERROR: OTRS-CGI-01 Perl: 5.24.1 OS: linux Time: Mon Oct 23 09:34:09 2017

 Message: No UserID found for 'otrsadmin'!

 RemoteAddress: 1.1.1.1
 RequestURI: /otrs/index.pl

 Traceback (16389):
   Module: Kernel::System::User::UserLookup Line: 930
   Module: Kernel::System::Auth::Auth Line: 305
   Module: Kernel::System::Web::InterfaceAgent::Run Line: 228
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler Line: 40
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32
Der LDAP-Abschnitt meiner Konfiguration sieht wie folgt aus:

Code: Select all

	# ---------------------------------------------------- #
    # Active Directory                                     #
    # ---------------------------------------------------- #
    $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
    $Self->{'AuthModule::LDAP::Host'} = 'DC01.domain.local';
    $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=domain,dc=local';
    $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';

    $Self->{'AuthModule::LDAP::GroupDN'} = 'CN=OTRS-Agenten,OU=Gruppen,DC=domain,DC=local';
    $Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
    $Self->{'AuthModule::LDAP::UserAttr1'} = 'DN';

    $Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=OTRS-Suchbenutzer,OU=AD-Servicebenutzer,DC=domain,DC=local';
    $Self->{'AuthModule::LDAP::SearchUserPw'} = '';
    $Self->{'AuthModule::LDAP::AlwaysFilter'} = '(objectclass=user)';

    $Self->{'AuthModule::LDAP::Params'} = {
        scheme => 'ldaps',
        port => 636,
        timeout => 120,
        async => 0,
        version => 3,
    };

   # Synchronisierung mit OTRS-Datenbank
    $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
    $Self->{'AuthSyncModule::LDAP::Host'} = 'DC01.domain.local';
    $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=domain,dc=local';
    $Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
    $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'CN=OTRS-Suchbenutzer,OU=AD-Servicebenutzer,DC=domain,DC=local';
    $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = '';

    $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
        UserFirstname => 'givenName',
        UserLastname  => 'sn',
        UserEmail     => 'mail',
        UserLogin     => 'sAMAccountName',
        UserPhone     => 'telephonenumber',
    };

    # AuthSyncModule::LDAP::UserSyncInitialGroups
    # (sync following group with rw permission after initial create of first agent
    # login)
    $Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
        'users',
    ];

    # AuthSyncModule::LDAP::UserSyncRolesDefinition
    $Self->{'AuthSyncModule::LDAP::UserSyncRolesDefinition'} = {
        # Active Directory Gruppe
        'CN=OTRS-Administratoren,OU=Gruppen,DC=domain,DC=local' => {
            # OTRS Rolle
            'Admins' => 1,
        },
    };
Wo ist mein Denkfehler?
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: [LDAP-Authentifizierung] Zuweisung der Admin-Rollen

Post by root »

HI,

da ggf.noch die richtigen Werte für

Code: Select all

$Self->{'AuthModule::LDAP::AccessAttr'}
$Self->{'AuthModule::LDAP::UserAttr'}
- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
InformatikKFM
Znuny newbie
Posts: 7
Joined: 12 Oct 2011, 16:39
Znuny Version: 5.0.23

Re: [LDAP-Authentifizierung] Zuweisung der Admin-Rollen

Post by InformatikKFM »

Was heißt ggf.? Die Werte wurden ja schon konfiguriert.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: [LDAP-Authentifizierung] Zuweisung der Admin-Rollen

Post by root »

Hi,

Du hast das folgendes gepostet:

Code: Select all

$Self->{'AuthModule::LDAP::UserAttr1'} = 'DN';
für mich ist da die 1 am Ende des Confignamens zu viel.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
InformatikKFM
Znuny newbie
Posts: 7
Joined: 12 Oct 2011, 16:39
Znuny Version: 5.0.23

Re: [LDAP-Authentifizierung] Zuweisung der Admin-Rollen

Post by InformatikKFM »

Das war ein C&P-Fehler, das ist mir auch direkt aufgefallen.
Existiert so in der Konfiguration nicht.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: [LDAP-Authentifizierung] Zuweisung der Admin-Rollen

Post by root »

Hi,

war mein Fehler, hast Du die gesetzt? Das AuthSyncModul braucht eigene:

Code: Select all

$Self->{'AuthSyncModule::LDAP::AccessAttr'}
$Self->{'AuthSyncModule::LDAP::UserAttr'}
- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
InformatikKFM
Znuny newbie
Posts: 7
Joined: 12 Oct 2011, 16:39
Znuny Version: 5.0.23

Re: [LDAP-Authentifizierung] Zuweisung der Admin-Rollen

Post by InformatikKFM »

Ja, sind da.

Code: Select all

   # Now sync data with OTRS DB
    $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
    $Self->{'AuthSyncModule::LDAP::Host'} = 'DC01.domain.local';
    $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=domain,dc=local';
    $Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
    $Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'member';
    $Self->{'AuthSyncModule::LDAP::UserAttr'} = 'DN';
    $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'CN=OTRS-Suchbenutzer,OU=AD-Servicebenutzer,DC=domain,DC=local';
    $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = '';

InformatikKFM
Znuny newbie
Posts: 7
Joined: 12 Oct 2011, 16:39
Znuny Version: 5.0.23

Re: [LDAP-Authentifizierung] Zuweisung der Admin-Rollen

Post by InformatikKFM »

Hat jemand noch eine Idee?
Post Reply