SSO Version 4.0.11 auf CentOS7

Hilfe zu OTRS Problemen aller Art
Post Reply
alexboehm
Znuny newbie
Posts: 3
Joined: 05 Mar 2015, 11:50
Znuny Version: 4.0.2

SSO Version 4.0.11 auf CentOS7

Post by alexboehm »

Hallo Zusammen,

langsam verzweifele ich :(

ich versuche SSO mit dem aktuellen OTRS 4.0.11 auf einem Centos7 zum laufen zu bringen, allerdings komme ich -nach dieversen Threads hier im Forum und im www- nicht wirklich weiter.

Die installation, sowie die LDAP authentifizierung war kein Problem, nur SSO will nicht... :/

Folgendes Szenario:
Windows 2012R2 Domänen Controller, CentOS7 mit OTRS installation. Die Domainnamen habe ich durch logisch Equivalente ersetzt.

Auf dem DC habe ich ein Keytab für Kerberos erstellt:

Code: Select all

ktpass -princ HTTP/otrssrv.domain.local@DOMAIN.LOCAL -mapuser ldapread@DOMAIN.LOCAL -crypto RC4-HMAC-NT ptype KRB5_NT_PRINCIPAL -mapop set –pass password -out "C:\tmp\otrssrv.keytab"
Kerberos erfolgreich überprüft:

Code: Select all

[root@localhost conf.d]# kinit -VV -k -t /etc/httpd/keytabs/otrssrv.keytab HTTP/otrssrv.domain.local@DOMAIN.LOCAL
Using existing cache: persistent:0:0
Using principal: HTTP/otrssrv.domain.local@DOMAIN.LOCAL
Using keytab: /etc/httpd/keytabs/otrssrv.keytab
Authenticated to Kerberos v5
Die Module für den apache (httpd unter Centos) sind installiert, und die /etc/krb5.conf passend angepasst:

Code: Select all

[root@localhost conf.d]# cat /etc/krb5.conf
[logging]
 default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log

[libdefaults]
 dns_lookup_realm = false
 ticket_lifetime = 24h
 renew_lifetime = 7d
 forwardable = true
 rdns = false
 default_realm = DOMAIN.LOCAL
 default_ccache_name = KEYRING:persistent:%{uid}

[realms]
DOMAIN.LOCAL = {
 kdc = dc01.domain.local
 kdc = dc02.domain.local
 admin_server = dc01.domain.local
 }

[domain_realm]
.domain.local = DOMAIN.LOCAL
domain.local = DOMAIN.LOCAL
Da die Authentifizierung funktioniert (mit einer anderen Website auf dem gleichen Server getestet) scheint die implementierung in die zzz_otrs.conf des apachen nicht richtig zu sein...

Code: Select all

[root@localhost conf.d]# cat /etc/httpd/conf.d/zzz_otrs.conf
# --
# added for OTRS (http://otrs.org/)
# --

ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"
Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"



<IfModule mod_perl.c>

    # Setup environment and preload modules
    Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl

    # Reload Perl modules when changed on disk
    PerlModule Apache2::Reload
    PerlInitHandler Apache2::Reload

    # general mod_perl2 options


LoadModule auth_kerb_module usr/lib/httpd/modules/mod_auth_kerb.so

    <Location /otrs>
#        ErrorDocument 403 /otrs/customer.pl
        ErrorDocument 403 /otrs/index.pl
        SetHandler  perl-script
        PerlResponseHandler ModPerl::Registry
        Options +ExecCGI
        PerlOptions +ParseHeaders
        PerlOptions +SetupEnv

  AuthType Kerberos
  AuthName "OTRS"
  Krb5Keytab /etc/httpd/keytabs/otrssrv.keytab
  KrbAuthRealms DOMAIN.LOCAL
  KrbMethodNegotiate on
  KrbSaveCredentials  on
  KrbMethodK5Passwd on
  Require valid-user
  KrbVerifyKDC Off
  KrbServiceName HTTP
  Order allow,deny
  Allow from all

        <IfModule mod_version.c>
            <IfVersion < 2.4>
                Order allow,deny
                Allow from all
            </IfVersion>
            <IfVersion >= 2.4>
                Require all granted
            </IfVersion>
        </IfModule>
        <IfModule !mod_version.c>
            Order allow,deny
            Allow from all
        </IfModule>
    </Location>

    # mod_perl2 options for GenericInterface
    <Location /otrs/nph-genericinterface.pl>
        PerlOptions -ParseHeaders
    </Location>

</IfModule>

<Directory "/opt/otrs/bin/cgi-bin/">

    AllowOverride None
    Options +ExecCGI -Includes

    <IfModule mod_version.c>
        <IfVersion < 2.4>
            Order allow,deny
            Allow from all
        </IfVersion>
        <IfVersion >= 2.4>
            Require all granted
        </IfVersion>
    </IfModule>
    <IfModule !mod_version.c>
        Order allow,deny
        Allow from all
    </IfModule>

    <IfModule mod_filter.c>
        <IfModule mod_deflate.c>
            AddOutputFilterByType DEFLATE text/html text/javascript application/javascript text/css text/xml application/json text/json
         </IfModule>
    </IfModule>

</Directory>

<Directory "/opt/otrs/var/httpd/htdocs/">
    AllowOverride None

    <IfModule mod_version.c>
        <IfVersion < 2.4>
            Order allow,deny
            Allow from all
        </IfVersion>
        <IfVersion >= 2.4>
            Require all granted
        </IfVersion>
    </IfModule>
    <IfModule !mod_version.c>
        Order allow,deny
        Allow from all
    </IfModule>

    <IfModule mod_filter.c>
        <IfModule mod_deflate.c>
            AddOutputFilterByType DEFLATE text/html text/javascript application/javascript text/css text/xml application/json text/json
         </IfModule>
    </IfModule>

    # Make sure CSS and JS files are read as UTF8 by the browsers.
    AddCharset UTF-8 .css
    AddCharset UTF-8 .js

    # Set explicit mime type for woff fonts since it is relatively new and apache may not know about it.
    AddType application/font-woff .woff

</Directory>

<IfModule mod_headers.c>
    # Cache css-cache for 30 days
    <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css-cache">
        <FilesMatch "\.(css|CSS)$">
            Header set Cache-Control "max-age=2592000 must-revalidate"
        </FilesMatch>
    </Directory>

    # Cache css thirdparty for 4 hours, including icon fonts
    <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css/thirdparty">
        <FilesMatch "\.(css|CSS|woff|svg)$">
            Header set Cache-Control "max-age=14400 must-revalidate"
        </FilesMatch>
    </Directory>

    # Cache js-cache for 30 days
    <Directory "/opt/otrs/var/httpd/htdocs/js/js-cache">
        <FilesMatch "\.(js|JS)$">
            Header set Cache-Control "max-age=2592000 must-revalidate"
        </FilesMatch>
    </Directory>

    # Cache js thirdparty for 4 hours
    <Directory "/opt/otrs/var/httpd/htdocs/js/thirdparty/">
        <FilesMatch "\.(js|JS)$">
            Header set Cache-Control "max-age=14400 must-revalidate"
        </FilesMatch>
    </Directory>
</IfModule>

# Limit the number of requests per child to avoid excessive memory usage
MaxRequestsPerChild 4000
Es ist auch egal, ob ich die den Kerberos Block unter /Location oder unter /Directory eintrage... beide male bekomme ich im syslog nur die Meldung:

Code: Select all

Aug 20 16:15:10 localhost OTRS-CGI-00[13091]: [Notice][Kernel::System::CustomerAuth::HTTPBasicAuth::Auth] User: No $ENV{REMOTE_USER} or $ENV{HTTP_REMOTE_USER} !(REMOTE_ADDR: 172.20.8.71).

Code: Select all

#--------------------------------------------------------------------------------------------
#                                  Kunden Authentifizierung SSO                             #
#--------------------------------------------------------------------------------------------
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::HTTPBasicAuth';
$Self->{'Customer::AuthModule::HTTPBasicAuth::ReplaceRegExp'} = '@DOMAIN.LOCAL';
#--------------------------------------------------------------------------------------------
#                                     Kundendaten                                           #
#--------------------------------------------------------------------------------------------
   $Self->{CustomerUser1} = {
    Module => 'Kernel::System::CustomerUser::LDAP',
    Params => {
      Host => '172.20.101.81',
      BaseDN => 'OU=Benutzer,OU=OUs,DC=domainl,DC=local',
      SSCOPE => 'sub',
      UserDN => 'ldapread@domail.local',
      UserPw => 'ldapread',
    },
    CustomerKey => 'sAMAccountName',
    CustomerID => 'mail',
    CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
    CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
    CustomerUserPostMasterSearchFields => ['mail'],
    CustomerUserNameFields => ['givenname', 'sn'],
    Map => [

      # 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', 'CustomerID', 'mail', 0, 1, 'var' ],
      [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
#       [ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
#       [ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
    ],
  };
Ich verstehe nicht, wo ich noch suchen soll, wie gesagt, die LDAP Authentifizierung geht problemlos, und auch das Kerberos schein zu funktionieren...
Anscheinend liegt es irgendwo an der Apache Konfiguration, aber an dieser Stelle bin ich extrem Ratlos und hoffe ihr könnt mir weiterhelfen...

Vielen Dank schonmal :)

Gruß Alex
wurzel
Znuny guru
Posts: 3234
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: SSO Version 4.0.11 auf CentOS7

Post by wurzel »

Hi,

dann solltest Du vielleicht im apache Forum fragen.
Ich habe mit einem Ubuntu 2 Wochen gebraucht mit dem aktuellen Apache 2.4.x

Aber fit bin ich da nicht :-(

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
michaelG
Znuny newbie
Posts: 3
Joined: 09 Oct 2015, 10:25
Znuny Version: 4.0.13

Re: SSO Version 4.0.11 auf CentOS7

Post by michaelG »

Hallo,

deine config sieht erst mal gut aus. Kannst du bitte mal ins log vom apache schauen ob dort eine Fehler steht.

Mit freundlichen Grüßen

Michael Gottschlich
Rooobaaat
Znuny wizard
Posts: 432
Joined: 11 Sep 2014, 16:28
Znuny Version: OTRS 5.0.x

Re: SSO Version 4.0.11 auf CentOS7

Post by Rooobaaat »

Greifst du per HTTP oder per HTTPS auf das OTRS zu?
My english is better than your german :P

"Produktiv": OTRS: 5.0.x, OTRS::ITSM 5.0.x
"Testing": OTRS 6 git
OS: Debian 8.0 (Jessie)
Apache2.4.10/MySQL 5.5.41
Post Reply