CentOS 8 und SingleSignOn
-
- Znuny newbie
- Posts: 12
- Joined: 27 Oct 2020, 17:12
- Znuny Version: 6.0.x
- Real Name: Thomas Etscheid
CentOS 8 und SingleSignOn
Hallo zusammen,
ich habe mich etwas durch das Forum gesucht, dabei auch Einträge gefunden, wie die Config für SSO gehen würde, allerdings scheitere ich schon weiter vorne:
Wie bekomme ich (dummer Windows User mit kaum Linux Erfahrung) denn das "mod_auth_kerb" für den Apache Webserver unter CentOS 8 installiert?
Bezüglich der sonstigen Config habe ich mich an diesen Post gehalten: viewtopic.php?p=158968#p158968
Ich hoffe, das passt soweit noch?
Viele Grüße,
Thomas
ich habe mich etwas durch das Forum gesucht, dabei auch Einträge gefunden, wie die Config für SSO gehen würde, allerdings scheitere ich schon weiter vorne:
Wie bekomme ich (dummer Windows User mit kaum Linux Erfahrung) denn das "mod_auth_kerb" für den Apache Webserver unter CentOS 8 installiert?
Bezüglich der sonstigen Config habe ich mich an diesen Post gehalten: viewtopic.php?p=158968#p158968
Ich hoffe, das passt soweit noch?
Viele Grüße,
Thomas
-
- Administrator
- Posts: 3963
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: CentOS 8 und SingleSignOn
Hi,
mod_auth_kerb bekommst Du gar nicht installiert. Nutze mod_auth_gssapi
- Roy
mod_auth_kerb bekommst Du gar nicht installiert. Nutze mod_auth_gssapi
- 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 ?
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 ?
-
- Znuny newbie
- Posts: 12
- Joined: 27 Oct 2020, 17:12
- Znuny Version: 6.0.x
- Real Name: Thomas Etscheid
Re: CentOS 8 und SingleSignOn
Hi Roy,
danke dir.
Habe ich prompt installiert und folgende Einstellungen dort angegeben, allerdings funktioniert es noch nicht.
der Webserver lädt das mod_auth_gssapi.so hiermit:
Die Config.pm schaut wie folgt:
Ich habe das kerberos.keytab über unseren DC erstellt mit folgendem Befehl (und dann einfach die kerberos.keytab auf unseren OTRS Server kopiert mit der Rechteanpassung.
Rechteanpassung:
krb5.conf:
Muss ich etwas ändern? Macht generell irgendetwas keinen Sinn?
danke dir.
Habe ich prompt installiert und folgende Einstellungen dort angegeben, allerdings funktioniert es noch nicht.
Code: Select all
AuthType GSSAPI
GssapiBasicAuth On
GssapiCredStore keytab:/etc/httpd/keytabs/kerberos.keytab
der Webserver lädt das mod_auth_gssapi.so hiermit:
Code: Select all
LoadModule auth_gssapi_module /usr/lib64/httpd/modules/mod_auth_gssapi.so
Code: Select all
############################################################
### Agent Auth
$Self->{AuthModule} = 'Kernel::System::Auth::HTTPBasicAuth';
$Self->{'AuthModule::HTTPBasicAuth::ReplaceRegExp'} = '^(.+?)@.+?$';
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'ldaps://******';
$Self->{'AuthModule::LDAP::BaseDN'} = 'ou=***,dc=***,dc=***';
$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthModule::LDAP::SearchUserDN'} = '*******';
$Self->{'AuthModule::LDAP::SearchUserPw'} = '*****';
$Self->{'AuthModule::LDAP::Params'} = {
#verify => 'none',
port => 636,
timeout => 120,
async => 0,
version => 3,
cafile => '/opt/otrs/cacerts/***.cer',
};
$Self->{'AuthModule::LDAP::Die'} = 1;
$Self->{'AuthModule::UseSyncBackend'} = 'AuthSyncBackend';
$Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host'} = 'ldaps://******/';
$Self->{'AuthSyncModule::LDAP::BaseDN'} = 'ou=***,dc=***,dc=***';
$Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = '*********';
$Self->{'AuthSyncModule::LDAP::SearchUserPw'} = '*******';
$Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
# DB -> LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
};
$Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
'users',
];
############################################################
### Customer Auth
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::HTTPBasicAuth';
$Self->{'Customer::AuthModule::HTTPBasicAuth::ReplaceRegExp'} = '^(.+?)@.+?$';
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} = 'ldaps://******:636';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'DC=***,DC=***';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = '****';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = '****';
$Self->{CustomerUser1} = {
Name => '**** employees',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => 'ldaps://******:636',
scheme => 'ldaps',
verify => 'none',
port => 636,
timeout => 120,
async => 0,
version => 3,
BaseDN => 'ou=*****,dc=***,dc=***',
SSCOPE => 'sub',
UserDN => '*********',
UserPw => '*****',
SourceCharset => 'utf-8',
DestCharset => 'iso-8859-1',
AlwaysFilter => '(mail=*)',
},
CustomerKey => 'sAMAccountName',
CustomerID => 'department',
CustomerUserListFields => ['givenname', 'sn', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'telephoneNumber', 'mail'],
CustomerUserSearchPrefix => '*',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
CustomerUserExcludePrimaryCustomerID => 0,
AdminSetPreferences => 0,
CacheTTL => 10,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
#[ 'UserTitle', 'Title', 'title1', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'sAMAccountName', 1, 1, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var', '', 0 ],
[ 'UserComment', 'Comment', 'description', 1, 0, 'var', '', 0 ],
[ 'UserCustomerID', 'Department', 'department', 0, 1, 'var', '', 0 ],
# [ 'UserCustomerIDs', 'CustomerIDs', 'second_customer_ids', 1, 0, 'var', '', 0 ],
[ 'UserPhone', 'Phone', 'telephoneNumber', 1, 0, 'var', '', 0 ],
[ 'UserMobile', 'Mobile', 'mobile', 1, 0, 'var', '', 0 ],
# [ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var', '', 0 ],
[ 'UserLocation', 'Location', 'l', 1, 0, 'var', '', 0 ],
],
};
Code: Select all
ktpass -princ HTTP/***@***.***-mapuser ***@***.***-pass **** -crypto AES256-SHA1 -ptype KRB5_NT_PRINCIPAL -out C:\Temp\kerberos.keytab -mapop set
Code: Select all
chmod 0640 kerberos.keytab
Code: Select all
[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
pkinit_anchors = FILE:/etc/pki/tls/certs/ca-bundle.crt
spake_preauth_groups = edwards25519
default_realm = UNSERE.DOMAIN
default_ccache_name = KEYRING:persistent:%{uid}
[realms]
UNSERE.DOMAIN = {
kdc = ******
kdc = ******
kdc = ******
admin_server = *****
}
[domain_realm]
.unsere.domain = UNSERE.DOMAIN
unsere.domain = UNSERE.DOMAIN
-
- Administrator
- Posts: 3963
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: CentOS 8 und SingleSignOn
Hi,
Was genau heisst denn "funktioniert nicht"? Wie sieht denn exakt die Webserverkonfiguration aus?
- Roy
Was genau heisst denn "funktioniert nicht"? Wie sieht denn exakt die Webserverkonfiguration aus?
- 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 ?
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 ?
-
- Znuny newbie
- Posts: 12
- Joined: 27 Oct 2020, 17:12
- Znuny Version: 6.0.x
- Real Name: Thomas Etscheid
Re: CentOS 8 und SingleSignOn
es geschieht halt kein automatisches Anmelden, es bleibt einfach bei der leeren Anmeldemaske.
Anbei die Webserver-Konfigurationen:
cat /etc/httpd/conf/httpd.conf
cat /etc/httpd/conf.d/zzz_otrs.conf
cat /etc/httpd/otrs_sso_include.conf
Anbei die Webserver-Konfigurationen:
cat /etc/httpd/conf/httpd.conf
Code: Select all
ServerRoot "/etc/httpd"
Listen 80
Include conf.modules.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/var/www/html"
<Directory "/var/www">
AllowOverride None
Require all granted
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule mime_module>
TypesConfig /etc/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional conf.d/*.conf
Code: Select all
ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"
Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
<IfModule mod_perl.c>
Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl
PerlModule Apache2::Reload
PerlInitHandler Apache2::Reload
# general mod_perl2 options
<Location /otrs>
ErrorDocument 403 /otrs/index.pl
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
PerlOptions +SetupEnv
<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>
<Location /otrs/nph-genericinterface.pl>
PerlOptions -ParseHeaders
</Location>
</IfModule>
LoadModule auth_gssapi_module /usr/lib64/httpd/modules/mod_auth_gssapi.so
<Directory "/opt/otrs/bin/cgi-bin/index.pl">
include otrs_sso_include.conf
</Directory>
<Directory "/opt/otrs/bin/cgi-bin/customer.pl">
include otrs_sso_include.conf
</Directory>
<Directory "/opt/otrs/bin/cgi-bin/public.pl">
include otrs_no_sso_include.conf
</Directory>
<Directory "/opt/otrs/bin/cgi-bin/calendar.pl">
include otrs_no_sso_include.conf
</Directory>
<Directory "/opt/otrs/bin/cgi-bin/index_nonsso.pl">
include otrs_no_sso_include.conf
</Directory>
<Directory "/opt/otrs/bin/cgi-bin/customer_nonsso.pl">
include otrs_no_sso_include.conf
</Directory>
<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>
AddCharset UTF-8 .css
AddCharset UTF-8 .js
AddType application/font-woff .woff
</Directory>
<IfModule mod_headers.c>
<Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css-cache">
<FilesMatch "\.(css|CSS)$">
Header set Cache-Control "max-age=2592000 must-revalidate"
</FilesMatch>
</Directory>
<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>
<Directory "/opt/otrs/var/httpd/htdocs/js/js-cache">
<FilesMatch "\.(js|JS)$">
Header set Cache-Control "max-age=2592000 must-revalidate"
</FilesMatch>
</Directory>
<Directory "/opt/otrs/var/httpd/htdocs/js/thirdparty/">
<FilesMatch "\.(js|JS)$">
Header set Cache-Control "max-age=14400 must-revalidate"
</FilesMatch>
</Directory>
</IfModule>
MaxRequestsPerChild 4000
Code: Select all
# include OTRS_SSO
# include each time you need to define a filebased sso access inside the directory statement
AllowOverride None
Options +ExecCGI -Includes
# AuthType Kerberos
AuthName "OTRS SSO"
# Krb5Keytab /etc/httpd/keytabs/kerberos.keytab
# KrbAuthRealms TEC.DOM
# KrbMethodNegotiate on
# KrbSaveCredentials off
# KrbMethodK5Passwd on
# KrbLocalUserMapping on
AuthType GSSAPI
GssapiBasicAuth On
GssapiCredStore keytab:/etc/httpd/keytabs/kerberos.keytab
Require valid-user
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>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/javascript text/css text/xml application/json text/json
</IfModule>
-
- Administrator
- Posts: 3963
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: CentOS 8 und SingleSignOn
Hi,
so ca. sieht das bei mir aus. Plus die Konfiguration aus scripts/, die hat aber nicht mit gssapi zu tun und muss i.d.R. auch nicht angefasst werden.
Vielleicht liegts an Deinem fehlenden Location, aber das kann ich so nicht wirkilich sagen.
- Roy
so ca. sieht das bei mir aus. Plus die Konfiguration aus scripts/, die hat aber nicht mit gssapi zu tun und muss i.d.R. auch nicht angefasst werden.
Code: Select all
<LocationMatch "/otrs/(index|customer).pl">
AuthType GSSAPI
AuthName "XXX Login"
GssapiCredStore keytab:/etc/http.keytab
GssapiLocalName on
GssapiUseSessions On
Session On
SessionCookieName gssapi_xxx path=/otrs;httponly;secure;
Require valid-user
</LocationMatch>
- 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 ?
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 ?
-
- Znuny newbie
- Posts: 12
- Joined: 27 Oct 2020, 17:12
- Znuny Version: 6.0.x
- Real Name: Thomas Etscheid
Re: CentOS 8 und SingleSignOn
gibt es ein bestimmtes LOG was ich mir anschauen kann um zu prüfen, warum das mit dem GSSAPI nicht klappt / ob es überhaput genutzt / gestartet wird?
-
- Administrator
- Posts: 3963
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: CentOS 8 und SingleSignOn
Hi,
ja, das Webserverlog, unter /var/log/httpd bei CentOS.
- Roy
ja, das Webserverlog, unter /var/log/httpd bei CentOS.
- 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 ?
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 ?
-
- Znuny newbie
- Posts: 12
- Joined: 27 Oct 2020, 17:12
- Znuny Version: 6.0.x
- Real Name: Thomas Etscheid
Re: CentOS 8 und SingleSignOn
ich habe mal die LocationMatch Sachen noch eingetragen.
Jetzt kommt vom Windows ein Anmeldefenster, sobald ich versuche die Seite zu öffnen.
Trage ich da meine Daten ein, erscheint die Maske nur erneut.
Im ssl_error_log steht folgendes drin:
Damit kann ich jetzt leider auch nichts anfangen, sagt dir das etwas?
Ich habe die Kerberos Datei wie folgt angelegt:
Jetzt kommt vom Windows ein Anmeldefenster, sobald ich versuche die Seite zu öffnen.
Trage ich da meine Daten ein, erscheint die Maske nur erneut.
Im ssl_error_log steht folgendes drin:
Code: Select all
[Thu Nov 05 14:56:38.920725 2020] [auth_gssapi:error] [pid 65174:tid 139733514569472] [client x.x.x.x:4568] GSS ERROR In Negotiate Auth: gss_accept_sec_context() failed: [Unspecified GSS failure. Minor code may provide more information (Request ticket server HTTP/xxxx.x.x@XXX.XXX kvno 3 found in keytab but not with enctype rc4-hmac)]
Ich habe die Kerberos Datei wie folgt angelegt:
Code: Select all
ktpass -princ HTTP/SERVER.FQDN@XXX.XXX -mapuser USER@XXX.XXX -pass PASSWORD -crypto AES256-SHA1 -ptype KRB5_NT_PRINCIPAL -out C:\Temp\kerberos.keytab -mapop set
-
- Znuny newbie
- Posts: 12
- Joined: 27 Oct 2020, 17:12
- Znuny Version: 6.0.x
- Real Name: Thomas Etscheid
Re: CentOS 8 und SingleSignOn
per Anmeldung mittels kinit und meinem Dienstuser für Kerberos komme ich so weit, dass ich mir dann per klist das Kerberos Ticket anschauen kann.
der Output ist:
Ticket cache: KCM:0:61118
Default principal: xxx@XXX.XXX
Valid starting Expires Service principal
11/06/2020 12:22:26 11/06/2020 22:22:26 krbtgt/XXX.XXX@XXX.XXX
renew until 11/13/2020 12:21:55
Somit kann ich doch davon ausgehen, das GSSAPI generell funktioniert. Richtig?
Also liegt es dann jetzt nur noch an einer der conf Dateien für OTRS, oder?
Im Log (weder access_log, noch ssl_error_log noch ssl_access_log oder sonstigem) sehe ich irgendetwas.
Kann ich irgendwo was zwecks Logging noch aufdrehen?
Hat jemand noch eine Idee wo es klemmen könnte?
der Output ist:
Ticket cache: KCM:0:61118
Default principal: xxx@XXX.XXX
Valid starting Expires Service principal
11/06/2020 12:22:26 11/06/2020 22:22:26 krbtgt/XXX.XXX@XXX.XXX
renew until 11/13/2020 12:21:55
Somit kann ich doch davon ausgehen, das GSSAPI generell funktioniert. Richtig?
Also liegt es dann jetzt nur noch an einer der conf Dateien für OTRS, oder?
Im Log (weder access_log, noch ssl_error_log noch ssl_access_log oder sonstigem) sehe ich irgendetwas.
Kann ich irgendwo was zwecks Logging noch aufdrehen?
Hat jemand noch eine Idee wo es klemmen könnte?
-
- Administrator
- Posts: 3963
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: CentOS 8 und SingleSignOn
Hi,
das hat nix mit OTRS zu tun sondern mit Deinem Serviceprincipal und dem DNS.
- Wie heist der Host?
- Gibt's einen PTR Eintrag?
- Was steht als Host in der URL im Browser?
- Roy
das hat nix mit OTRS zu tun sondern mit Deinem Serviceprincipal und dem DNS.
- Wie heist der Host?
- Gibt's einen PTR Eintrag?
- Was steht als Host in der URL im Browser?
- 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 ?
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 ?
-
- Znuny newbie
- Posts: 12
- Joined: 27 Oct 2020, 17:12
- Znuny Version: 6.0.x
- Real Name: Thomas Etscheid
Re: CentOS 8 und SingleSignOn
Hi,
OTRS meine ich auch nur, weil meine Config files für den Apache halt so heissen.
OTRS an sich ist hier derzeit aussen vor.
Host: c-sv-vehelpdesk
PTR: ja. IP verweisst auf den c-sv-vehelpdesk
URL: https://c-sv-vehelpdesk/otrs/index.pl (auch ein https://c-sv-vehelpdesk.tec.dom/otrs/index.pl wird nicht automatisch angemeldet)
SPNs:
klist -k -t /etc/httpd/keytab/kerberos.keytab
Keytab name: FILE:/etc/httpd/keytab/kerberos.keytab
KVNO Timestamp Principal
---- ------------------- ------------------------------------------------------
5 11/06/2020 08:45:08 svc-otrs-kerb@TEC.DOM
5 11/06/2020 08:45:08 svc-otrs-kerb@TEC.DOM
5 11/06/2020 08:45:08 svc-otrs-kerb@TEC.DOM
5 11/06/2020 08:45:08 HTTP/c-sv-vehelpdesk.tec.dom@TEC.DOM
5 11/06/2020 08:45:08 HTTP/c-sv-vehelpdesk.tec.dom@TEC.DOM
5 11/06/2020 08:45:08 HTTP/c-sv-vehelpdesk.tec.dom@TEC.DOM
keytab zuletzt erstellt über den Server direkt:
msktutil --server unser-dc.tec.dom --user-creds-only --update --use-service-account --service HTTP/c-sv-vehelpdesk.tec.dom --keytab /etc/httpd/keytab/kerberos.keytab --password unser-passwort --account-name unser-account-name
chown root:apache auf die kerberos.keytab
chmod 644 auf die kerberos.keytab
OTRS meine ich auch nur, weil meine Config files für den Apache halt so heissen.
OTRS an sich ist hier derzeit aussen vor.
Host: c-sv-vehelpdesk
PTR: ja. IP verweisst auf den c-sv-vehelpdesk
URL: https://c-sv-vehelpdesk/otrs/index.pl (auch ein https://c-sv-vehelpdesk.tec.dom/otrs/index.pl wird nicht automatisch angemeldet)
SPNs:
klist -k -t /etc/httpd/keytab/kerberos.keytab
Keytab name: FILE:/etc/httpd/keytab/kerberos.keytab
KVNO Timestamp Principal
---- ------------------- ------------------------------------------------------
5 11/06/2020 08:45:08 svc-otrs-kerb@TEC.DOM
5 11/06/2020 08:45:08 svc-otrs-kerb@TEC.DOM
5 11/06/2020 08:45:08 svc-otrs-kerb@TEC.DOM
5 11/06/2020 08:45:08 HTTP/c-sv-vehelpdesk.tec.dom@TEC.DOM
5 11/06/2020 08:45:08 HTTP/c-sv-vehelpdesk.tec.dom@TEC.DOM
5 11/06/2020 08:45:08 HTTP/c-sv-vehelpdesk.tec.dom@TEC.DOM
keytab zuletzt erstellt über den Server direkt:
msktutil --server unser-dc.tec.dom --user-creds-only --update --use-service-account --service HTTP/c-sv-vehelpdesk.tec.dom --keytab /etc/httpd/keytab/kerberos.keytab --password unser-passwort --account-name unser-account-name
chown root:apache auf die kerberos.keytab
chmod 644 auf die kerberos.keytab
-
- Administrator
- Posts: 3963
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: CentOS 8 und SingleSignOn
Hi,
das sieht erst mal gut aus. Sonst liegt es i.d.R. am Host der in der URL steckt weil das manchmal ein zweiter A/AAAA Record statt eines CNAME ist.
Das mskutil habe ich noch nie dafür genutzt, immer nur ktpass. Der einzige Unterschied zwischen Deinem und meinem ktpass ist das der FQDN bei mir lowercase ist und der Parameeter crypto. Immer so:
ktpass.exe -princ HTTP/host.example.tld@WINDOMAIN.TLD -mapuser WINDOMAIN\user -crypto RC4-HMAC-NT -ptype KRB5_NT_PRINCIPAL -pass irgendetwas -out otrs.keytab
Und in Deiner Fehlermeldung steht das hier:
Ich würde noch mal die Keytab erzeugen
- Roy
das sieht erst mal gut aus. Sonst liegt es i.d.R. am Host der in der URL steckt weil das manchmal ein zweiter A/AAAA Record statt eines CNAME ist.
Das mskutil habe ich noch nie dafür genutzt, immer nur ktpass. Der einzige Unterschied zwischen Deinem und meinem ktpass ist das der FQDN bei mir lowercase ist und der Parameeter crypto. Immer so:
ktpass.exe -princ HTTP/host.example.tld@WINDOMAIN.TLD -mapuser WINDOMAIN\user -crypto RC4-HMAC-NT -ptype KRB5_NT_PRINCIPAL -pass irgendetwas -out otrs.keytab
Und in Deiner Fehlermeldung steht das hier:
Code: Select all
Request ticket server HTTP/xxxx.x.x@XXX.XXX kvno 3 found in keytab but not with enctype rc4-hmac
- 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 ?
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 ?
-
- Znuny newbie
- Posts: 12
- Joined: 27 Oct 2020, 17:12
- Znuny Version: 6.0.x
- Real Name: Thomas Etscheid
Re: CentOS 8 und SingleSignOn
Hi,
habe die SPNs vom Account nochmal alle gelöscht, dann die Keytab neu angelegt.
Datei wieder hochgeladen, Rechte gesetzt und den Apache neugestartet.
Jetzt sehe ich wieder nur die Anmeldung vom OTRS, aber er macht kein Single-Sign-On.
Auch im ssl_error_log erscheint kein Fehler / Eintrag, ebenso auch im error_log nicht.
Muss ich in der OTRS Config (Config.pm oder halt in den Settings der OTRS Systemadministration) noch etwas besonderes einstellen?
In der Config.pm habe ich ja nur diese Zeilen drin:
sowie:
habe die SPNs vom Account nochmal alle gelöscht, dann die Keytab neu angelegt.
Datei wieder hochgeladen, Rechte gesetzt und den Apache neugestartet.
Jetzt sehe ich wieder nur die Anmeldung vom OTRS, aber er macht kein Single-Sign-On.
Auch im ssl_error_log erscheint kein Fehler / Eintrag, ebenso auch im error_log nicht.
Muss ich in der OTRS Config (Config.pm oder halt in den Settings der OTRS Systemadministration) noch etwas besonderes einstellen?
In der Config.pm habe ich ja nur diese Zeilen drin:
Code: Select all
$Self->{AuthModule} = 'Kernel::System::Auth::HTTPBasicAuth';
$Self->{'AuthModule::HTTPBasicAuth::ReplaceRegExp'} = '^(.+?)@.+?$';
Code: Select all
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::HTTPBasicAuth';
$Self->{'Customer::AuthModule::HTTPBasicAuth::ReplaceRegExp'} = '^(.+?)@.+?$';
-
- Administrator
- Posts: 3963
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: CentOS 8 und SingleSignOn
Hi,
steht der Teil AuthType in einem Location/LocationMatch Block?
- Roy
steht der Teil AuthType in einem Location/LocationMatch Block?
- 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 ?
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 ?
-
- Znuny newbie
- Posts: 12
- Joined: 27 Oct 2020, 17:12
- Znuny Version: 6.0.x
- Real Name: Thomas Etscheid
Re: CentOS 8 und SingleSignOn
Anbei die zzzz_otrs.conf
und hier noch die otrs_sso_include.conf
Code: Select all
cat /etc/httpd/conf.d/zzzz_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
<Location /otrs>
# ErrorDocument 403 /otrs/customer.pl
ErrorDocument 403 /otrs/index.pl
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
PerlOptions +SetupEnv
<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>
<LocationMatch "/otrs/(index|customer).pl">
AuthType GSSAPI
AuthName "LDAPs Login"
GssapiCredStore keytab:/etc/httpd/keytab/kerberos.keytab
GssapiCredStore client_keytab:/etc/httpd/keytab/kerberos.keytab
GssapiLocalName on
GssapiUseSessions On
Session On
SessionCookieName gssapi_session path=/otrs;httponly;secure;
Require valid-user
</LocationMatch>
</IfModule>
#LoadModule auth_kerb_module /usr/lib64/httpd/modules/mod_auth_kerb.so
LoadModule auth_gssapi_module /usr/lib64/httpd/modules/mod_auth_gssapi.so
#<LocationMatch "/otrs/(index|customer).pl">
# AuthType GSSAPI
# AuthName "LDAPs Login"
# GssapiCredStore keytab:/etc/httpd/keytab/kerberos.keytab
# GssapiLocalName on
# GssapiUseSessions On
# Session On
# SessionCookieName gssapi_session path=/otrs;httponly;secure;
# Require valid-user
#</LocationMatch>
# SSO for Index.pl instead of Directory
<Directory "/opt/otrs/bin/cgi-bin/index.pl">
include otrs_sso_include.conf
</Directory>
# SSO for customer.pl instead of Directory
<Directory "/opt/otrs/bin/cgi-bin/customer.pl">
include otrs_sso_include.conf
</Directory>
# No SSO for public.pl
<Directory "/opt/otrs/bin/cgi-bin/public.pl">
include otrs_no_sso_include.conf
</Directory>
# No SSO for calendar.pl
<Directory "/opt/otrs/bin/cgi-bin/calendar.pl">
include otrs_no_sso_include.conf
</Directory>
#No SSO = alternative Agent Login
<Directory "/opt/otrs/bin/cgi-bin/index_nonsso.pl">
include otrs_no_sso_include.conf
</Directory>
#No SSO = alternative Customer Login
<Directory "/opt/otrs/bin/cgi-bin/customer_nonsso.pl">
include otrs_no_sso_include.conf
</Directory>
<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>
# Allow access to public interface for unauthenticated requests on systems with set-up authentication.
# Will work only for RegistrationUpdate, since page resources are still not be loaded.
# <Location /otrs/public.pl>
# <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>
<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
und hier noch die otrs_sso_include.conf
Code: Select all
cat /etc/httpd/otrs_sso_include.conf
# include OTRS_SSO
# include each time you need to define a filebased sso access inside the directory statement
AllowOverride None
Options +ExecCGI -Includes
# AuthType Kerberos
AuthName "OTRS SSO"
# Krb5Keytab /etc/httpd/keytab/kerberos.keytab
# KrbAuthRealms WINDOMAIN.TLD
# KrbMethodNegotiate on
# KrbSaveCredentials off
# KrbMethodK5Passwd on
# KrbLocalUserMapping on
AuthType GSSAPI
# AuthName "LDAP Login"
GssapiBasicAuth On
GssapiCredStore keytab:/etc/httpd/keytab/kerberos.keytab
GssapiCredStore client_keytab:/etc/httpd/keytab/kerberos.keytab
# GssapiLocalName on
Require valid-user
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>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/javascript text/css text/xml application/json text/json
</IfModule>
-
- Znuny newbie
- Posts: 12
- Joined: 27 Oct 2020, 17:12
- Znuny Version: 6.0.x
- Real Name: Thomas Etscheid
Re: CentOS 8 und SingleSignOn
Ich sehe im ssl_access_log, dass mein username da die *.pl Dateien öffnet, somit klappt GSSAPI und das Thema ist abgehakt (danke dafür).
Nur das OTRS meldet sich nicht automatisch an scheinbar, was dann ja nur an der Config.pl liegen kann, oder?
Ich habe im OTRS gesehen, dass dort LDAP als Authentifizierung drin steht, aber das stimmt ja auch ansich, oder?
Oder muss da was anderes stehen:
Customer::AuthModule -> Kernel::System::CustomerAuth::LDAP
Aber ich habe ja diese Zeilen drin stehen, somit sollte das doch dann klappen?
natürlich habe ich noch andere Einträge wie diese, damit die Kunden / Agenten entsprechend aus dem AD kommen:
Überschneiden sich die "AuthModule" Namen? Muss hier etwas anders benannt werden?
Nur das OTRS meldet sich nicht automatisch an scheinbar, was dann ja nur an der Config.pl liegen kann, oder?
Ich habe im OTRS gesehen, dass dort LDAP als Authentifizierung drin steht, aber das stimmt ja auch ansich, oder?
Oder muss da was anderes stehen:
Customer::AuthModule -> Kernel::System::CustomerAuth::LDAP
Aber ich habe ja diese Zeilen drin stehen, somit sollte das doch dann klappen?
Code: Select all
$Self->{AuthModule} = 'Kernel::System::Auth::HTTPBasicAuth';
$Self->{'AuthModule::HTTPBasicAuth::ReplaceRegExp'} = '^(.+?)@.+?$';
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::HTTPBasicAuth';
$Self->{'Customer::AuthModule::HTTPBasicAuth::Replace'} = '@WINDOMAIN.TLD';
Code: Select all
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
...
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
...
-
- Znuny newbie
- Posts: 12
- Joined: 27 Oct 2020, 17:12
- Znuny Version: 6.0.x
- Real Name: Thomas Etscheid
Re: CentOS 8 und SingleSignOn
okay, ich bin mittlerweile einen ganzen Schritt weiter...
Zurück zu Unbuntu 18.04 und mod_auth_kerb hatte ich das System laufen.
Wir wollten dann migrieren vom alten system zum neuen OTRS6.
Auf das alte System sind wir mit einem A-Record gekommen: helpdesk -> IP Adresse altes System.
Den A-Record habe ich umgestellt auf die neue IP.
Dann habe ich vom alten System die SPNs gelöscht (HTTP/helpdesk.domain.tld@DOMAIN.TLD und HTTP/helpdesk)
Für den neuen Kerberos User habe ich dann die beiden SPNs noch hinzugrfügt mit SETSPN -s ...
ktpass.exe neu ausgeführt und die keytab zum Linux Server kopiert. CHOWN und CHMOD gemacht für die Datei auf die WebServer Gruppe und Recht 640.
kdestroy -A um die alten Kerberos Daten zu löschen, OTRS Cache geleert und dann kinit kerberosuser@DOMAIN.TLD, kinit -V um zu schauen ob es passt und ein klist -l hinterher.
Melde ich mich jetzt an, so klappt das SSO nur für den original servernamen, aber nicht für den A-Record "helpdesk".
Im log erscheint mir beim Aufruf von https://helpdesk.. : [auth_kerb:error] [pid 2545:tid 140702247773952] [client 172.30.200.59:1128] gss_acquire_cred() failed: Unspecified GSS failure. Minor code may provide more information (, No key table entry found matching HTTP/helpdesk@)
Rufe ich https://helpdesk.domain.tld/.. auf: [auth_kerb:error] [pid 2546:tid 140702172239616] [client 172.30.200.59:22159] gss_accept_sec_context() failed: Unspecified GSS failure. Minor code may provide more information (, Request ticket server HTTP/helpdesk.domain.tld@TEC.DOM kvno 13 not found in keytab; keytab is likely out of date)
Warum kann ich den Server nur aufrufen über seinen eigentlichen Namen, aber nicht über den A-Record der auf seine IP verweist?
Zurück zu Unbuntu 18.04 und mod_auth_kerb hatte ich das System laufen.
Wir wollten dann migrieren vom alten system zum neuen OTRS6.
Auf das alte System sind wir mit einem A-Record gekommen: helpdesk -> IP Adresse altes System.
Den A-Record habe ich umgestellt auf die neue IP.
Dann habe ich vom alten System die SPNs gelöscht (HTTP/helpdesk.domain.tld@DOMAIN.TLD und HTTP/helpdesk)
Für den neuen Kerberos User habe ich dann die beiden SPNs noch hinzugrfügt mit SETSPN -s ...
ktpass.exe neu ausgeführt und die keytab zum Linux Server kopiert. CHOWN und CHMOD gemacht für die Datei auf die WebServer Gruppe und Recht 640.
kdestroy -A um die alten Kerberos Daten zu löschen, OTRS Cache geleert und dann kinit kerberosuser@DOMAIN.TLD, kinit -V um zu schauen ob es passt und ein klist -l hinterher.
Melde ich mich jetzt an, so klappt das SSO nur für den original servernamen, aber nicht für den A-Record "helpdesk".
Im log erscheint mir beim Aufruf von https://helpdesk.. : [auth_kerb:error] [pid 2545:tid 140702247773952] [client 172.30.200.59:1128] gss_acquire_cred() failed: Unspecified GSS failure. Minor code may provide more information (, No key table entry found matching HTTP/helpdesk@)
Rufe ich https://helpdesk.domain.tld/.. auf: [auth_kerb:error] [pid 2546:tid 140702172239616] [client 172.30.200.59:22159] gss_accept_sec_context() failed: Unspecified GSS failure. Minor code may provide more information (, Request ticket server HTTP/helpdesk.domain.tld@TEC.DOM kvno 13 not found in keytab; keytab is likely out of date)
Warum kann ich den Server nur aufrufen über seinen eigentlichen Namen, aber nicht über den A-Record der auf seine IP verweist?