ich habe OTRS 3.1.10 auf einer CentOS Maschine laufen. Die Agents sollen gegen einen W2k8 AD Server authentifiziert werden, was auch schon klappt. Nun möchte ich das sich nur Agents, die in einer bestimmten AD Security Gruppe sind, einloggen können.
Dafür habe ich folgendes zu meiner Config.pm hinzugefügt:
Code: Select all
# Check if the user is allowed to auth in a posixGroup
# (e. g. user needs to be in a group xyz to use otrs)
$Self->{'AuthModule::LDAP::GroupDN1'} = 'cn=OTRSAgents,ou=Gruppen,ou=Security Groups,ou=MyBusiness,dc=xxx,dc=local';
$Self->{'AuthModule::LDAP::AccessAttr1'} = 'member';
$Self->{'AuthModule::LDAP::UserAttr1'} = 'DN';
Hier meine vollständige Config.pm:
Code: Select all
package Kernel::Config;
use utf8;
sub Load {
my $Self = shift;
$Self->{'HttpType'} = 'https';
$Self->{'DatabaseHost'} = 'localhost';
$Self->{'Database'} = 'otrs';
$Self->{'DatabaseUser'} = 'otrs';
$Self->{'DatabasePw'} = 'pwd';
$Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";
$Self->{Home} = '/opt/otrs';
$Self->{AuthModule1} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host1'} = 'ad.xxx.local';
$Self->{'AuthModule::LDAP::BaseDN1'} = 'dc=xxx,dc=local';
$Self->{'AuthModule::LDAP::UID1'} = 'sAMAccountName';
$Self->{'AuthModule::LDAP::SearchUserDN1'} = 'CN=otrs,OU=Search-User,OU=SBSUsers,OU=Users,OU=MyBusiness,DC=xxx,DC=local';
$Self->{'AuthModule::LDAP::SearchUserPw1'} = 'searchuserpwd';
$Self->{'AuthModule::LDAP::GroupDN1'} = 'cn=OTRSAgents,ou=Groups,ou=Security Groups,ou=MyBusiness,dc=xxx,dc=local';
$Self->{'AuthModule::LDAP::AccessAttr1'} = 'member';
$Self->{'AuthModule::LDAP::UserAttr1'} = 'DN';
$Self->{'AuthModule::LDAP::Params'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
};
$Self->{AuthSyncModule1} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host1'} = 'ad.xxx.local';
$Self->{'AuthSyncModule::LDAP::BaseDN1'} = 'dc=xxx,dc=local';
$Self->{'AuthSyncModule::LDAP::UID1'} = 'sAMAccountName';
$Self->{'AuthSyncModule::LDAP::SearchUserDN1'} = 'CN=otrs,OU=Search-User,OU=SBSUsers,OU=Users,OU=MyBusiness,DC=xxx,DC=local';
$Self->{'AuthSyncModule::LDAP::SearchUserPw1'} = 'searchuserpwd';
$Self->{'AuthSyncModule::LDAP::UserSyncMap1'} = {
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
};
$Self->{'AuthSyncModule::LDAP::Params'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
};
}
use strict;
use warnings;
use vars qw(@ISA $VERSION);
$VERSION = qw($Revision: 1.25 $)[1];
use Kernel::Config::Defaults;
push (@ISA, 'Kernel::Config::Defaults');
1;
Grüsse
Chris