LDAP-Agentenauthentifizierung Fehler??

Hilfe zu Znuny Problemen aller Art
Locked
raymmcoy
Znuny newbie
Posts: 1
Joined: 25 Feb 2009, 12:30

LDAP-Agentenauthentifizierung Fehler??

Post by raymmcoy »

Hallo ich habe eine Agentenauthentifizierung gegen das AD das auch funkioniert. Ich dachte jedoch das sich die Agenten nur anmelden können wenn Sie zuvor lokal in der Datenbank erstellt wurden. Mit der von mir eingesetzen Config.pm kann sich jedoch jeder der im LDAP einen Account hat sich anmelden. Hat sich in meiner Config.pm ein Fehler eingeschlichen und ist das ein Bug in der von mir verwendeten Version?

Code: Select all

# --
# Kernel/Config.pm - Config file for OTRS kernel
# Copyright (C) 2001-2006 OTRS GmbH, http://otrs.org/
# --
# $Id: Config.pm.dist,v 1.18 2006/09/07 16:15:41 mh Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --
#  Note:
#
#  -->> OTRS does have a lot of config settings. For more settings
#       (Notifications, Ticket::ViewAccelerator, Ticket::NumberGenerator,
#       LDAP, PostMaster, Session, Preferences, ...) see
#       Kernel/Config/Defaults.pm and copy your wanted lines into "this"
#       config file. This file will not be changed on update!
#
# --

package Kernel::Config;

sub Load {
    my $Self = shift;
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #         Start of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
		# ---------------------------------------------------- #
    # LDAP Integration - Agentenauthentifizierung
    # ---------------------------------------------------- #

	$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
	$Self->{'AuthModule::LDAP::Host'} = '192.168.1.1';
	$Self->{'AuthModule::LDAP::BaseDN'} = 'dc=example,dc=de';
	$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
	$Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=OTRSuchuser,CN=Users,DC=example,DC=de';
	$Self->{'AuthModule::LDAP::SearchUserPw'} = 'Searchpw';
	
    # UserSyncLDAPMap
    # (map if agent should create/synced from LDAP to DB after login)
    $Self->{UserSyncLDAPMap} = {
        # DB -> LDAP
        UserFirstname => 'givenName',
        UserLastname => 'sn',
        UserEmail => 'mail',
    };
    
    # UserSyncLDAPGroups
    # (If "LDAP" was selected for AuthModule, you can specify
    # initial user groups for first login.)
    $Self->{UserSyncLDAPGroups} = [
        'users',
    ];
    
    # UserTable
    $Self->{DatabaseUserTable} = 'system_user';
    $Self->{DatabaseUserTableUserID} = 'id';
    $Self->{DatabaseUserTableUserPW} = 'pw';
    $Self->{DatabaseUserTableUser} = 'login';	
    
    
    # ---------------------------------------------------- # 
    # Customer Authentifizirung via LDAP # 
    # ---------------------------------------------------- # 
    $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP'; 
    $Self->{'Customer::AuthModule::LDAP::Host'} = '192.168.1.1'; 
    $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=example,dc=de'; 
    $Self->{'Customer::AuthModule::LDAP::AlwaysFilter'} = ''; 
    $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'CN=OTRSuchuser,CN=Users,DC=example,DC=de'; 
    $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'Searchpw'; 
    $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName'; 
    $Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'DN'; 
    #$Self->{'Customer::AuthModule::LDAP::GroupDN'} = ''; 
 
# ---------------------------------------------------- # 
    # customer Auth # 
    # ---------------------------------------------------- # 
    # CustomerUser 
    # (customer user ldap backend and settings) 
    $Self->{CustomerUser} = { 
        Module => 'Kernel::System::CustomerUser::LDAP', 
        Params => { 
        # ldap host 
        Host => '192.168.1.1', 
        # ldap base dn 
        BaseDN => 'dc=example, dc=de', 
        # search scope (one|sub) 
        SSCOPE => 'sub', 
        UserDN => 'OTRSuchuser@example.de', 
        UserPw => 'Searchpw', 
        AlwaysFilter => '', 
        SourceCharset => 'utf-8', 
        DestCharset => 'utf-8', 
    },  
    # customer uniq id 
    CustomerKey => 'sAMAccountName', 
    # customer # 
    CustomerID => 'mail', 
    CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'], 
    CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'], 
    CustomerUserSearchPrefix => '', 
    CustomerUserSearchSuffix => '*', 
    CustomerUserSearchListLimit => 250, 
    CustomerUserPostMasterSearchFields => ['mail'], 
    CustomerUserNameFields => ['givenname', 'sn'], 
    Map => [ 
        # note: Login, Email and CustomerID needed! 
        # var, frontend, storage, shown, required, storage-type 
        #[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ], 
        [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ], 
        [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ], 
        [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ], 
        [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ], 
        [ 'UserCustomerID', 'sAMAccountName', 'mail', 0, 1, 'var' ], 
        [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ], 
        #[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ], 
        #[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ], 
        ], 
    }; 

	
	
    # ---------------------------------------------------- #
    # database settings                                    #
    # ---------------------------------------------------- #
    # DatabaseHost
    # (The database host.)
    $Self->{'DatabaseHost'} = 'localhost';
    # Database
    # (The database name.)
    $Self->{'Database'} = 'otrs';
    # DatabaseUser
    # (The database user.)
    $Self->{'DatabaseUser'} = 'otrs';
    # DatabasePw
    # (The password of database user. You also can use bin/CryptPassword.pl
    # for crypted passwords.)
    $Self->{'DatabasePw'} = 'otrs';
    # DatabaseDSN
    # (The database DSN for MySQL ==> more: "man DBD::mysql")
    $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";

    # (The database DSN for PostgreSQL ==> more: "man DBD::Pg")
    # if you want to use a local socket connection
#    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";
    # if you want to use a tcpip connection
#    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";

    # ---------------------------------------------------- #
    # fs root directory
    # ---------------------------------------------------- #
    $Self->{Home} = '/opt/otrs';

    # ---------------------------------------------------- #
    # insert your own config settings "here"               #
    # config settings taken from Kernel/Config/Defaults.pm #
    # ---------------------------------------------------- #
    # $Self->{SessionUseCookie} = 0;
    # $Self->{'CheckMXRecord'} = 1;

    # ---------------------------------------------------- #

    # ---------------------------------------------------- #
    # data inserted by installer                           #
    # ---------------------------------------------------- #
    # $DIBI$
    $Self->{'SystemID'} = 10;
    $Self->{'SecureMode'} = 1;
    $Self->{'Organization'} = 'EXAMPLE';
    $Self->{'LogModule::LogFile'} = '/tmp/otrs.log';
    $Self->{'LogModule'} = 'Kernel::System::Log::SysLog';
    $Self->{'FQDN'} = 'www.example.de';
    $Self->{'DefaultLanguage'} = 'de';
    $Self->{'AdminEmail'} = 'support@.example.de';
    $Self->{'DefaultCharset'} = 'utf-8';

    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #           End of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
}

# ---------------------------------------------------- #
# needed system stuff (don't edit this)                #
# ---------------------------------------------------- #
use strict;
use vars qw(@ISA $VERSION);
use Kernel::Config::Defaults;
push (@ISA, 'Kernel::Config::Defaults');
$VERSION = '$Revision: 1.18 $';
$VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/;
# -----------------------------------------------------#

1;
Danke für jeden Hinweis


OTRS: 2.3.1
OS: OpenSuse 11
Apache2/MySQL 5
zrako02
Znuny newbie
Posts: 55
Joined: 13 Nov 2006, 09:01

LDAP-Agentenauthentifizierung Fehler??

Post by zrako02 »

Hat sich erledigt.
OTRS: 2.4.5
OS: OpenSuse 11.2
Apache2/MySQL 5
Locked