[HowTo] Kerberos Login - Korrektur Anleitung

Hallo Leute,

ich beziehe mich auf diese beiden Einträge von mir:

Mittlerweile bin ich auf Version 2.1 angekommen und konnte nun alles beheben. Die offizielle Anleitung besagt das das man das Cookie-Auth nur abschalten soll wenn man Logins nur über Kerberos zulassen möchte. Das Kerberos funktioniert muss man es grundsätzlich immer abschalten. War bei 20.04 so und ist auch bei Ubuntu 22.04 so.

Auch muss man diese Zeile auskommentieren:

ErrorDocument 401 /${SITE}/check_mk/login.py

Um nun beim Versagen von Kerberos, oder wenn man sich auch von außerhalb einloggen möchte zu einer Passwortabfrage zu kommen, setzt man auch noch das auf ON:

KrbMethodK5Passwd on

Nagvis kann sich seit CheckMK Version 2.x nicht mehr via Kerberos authentifizieren. Hierfür habe ich leider noch keine Lösung.

Für die weitere erfolgreiche Registrierung des Agents über TLS gibt es hier die Lösung:

# cookie provided by the user
  Require expr %{HTTP_COOKIE} =~ /auth_/
  Require expr %{REQUEST_URI} = "/${SITE}/check_mk/register_agent.py"
  Require expr %{REQUEST_URI} = '/${SITE}/check_mk/deploy_agent.py'
  Require expr %{REQUEST_URI} = '/${SITE}/check_mk/run_cron.py'
  Require expr %{REQUEST_URI} = '/${SITE}/check_mk/webapi.py'
  Require expr %{REQUEST_URI} = '/${SITE}/check_mk/automation.py'
  Require expr %{REQUEST_URI} -strmatch '/${SITE}/check_mk/api/*'
  Require expr %{QUERY_STRING} =~ /(_secret=|auth_|register_agent)/
  Require expr %{REQUEST_URI} =~ m#^/${SITE}/(omd/|check_mk/((images|themes)/.*\.(png|svg)|login\.py|.*\.(css|js)))#
  Require valid-user
1 Like

Hi - I just aligned the article for kerberos with the article for saml. Thanks for the input! I also added some other input. It may worth looking into the article (Available beginning with 2023 Aug, 3rd): Single Sign-On mit Kerberos

The translation of the changed texts to english will be made as soon as some reviews are done.

Maybe worh mentioning: For 2.2.0 (and for 2.1.0) you should add an exception for the restapi as well. See in the revised article.

1 Like