Skip to content

OTOBO Kerberos SSO with Active Directory

Kerberos SSO signs agents in to OTOBO from a domain-joined Windows computer without a second password prompt. Nginx speaks SPNEGO with Active Directory. OTOBO trusts the username only when the proxy also sends the shared secret.

This is the sign-in for the office network. Agents outside the domain, or working from home without a path to the KDC, need OpenID Connect. Accounts, names, and roles still come from LDAP against Active Directory. Kerberos does not replace that synchronisation.

The steps follow the Kerberos chapter of the OTOBO 11.1 installation guide. OTOBO is running as a Docker stack.

  • An Active Directory with a reachable domain controller (KDC).
  • A running OTOBO Docker installation.
  • The name agents open in the browser is an A record, not a CNAME. Example: otobo.example.com points at the host IP. Further aliases may be CNAMEs of that A record.
  • Reverse lookup for the same name.
  • Agent PCs are domain-joined, and clocks differ by only a few minutes.

Create a new user. Do not reuse the LDAP synchronisation account.

The username has the form HTTP/otobo.example.com. HTTP/ is uppercase. Avoid & and other characters that make ktpass fail.

On a domain controller, in a console with administrator rights:

Terminal window
ktpass.exe -princ HTTP/otobo.example.com@EXAMPLE.COM -mapuser EXAMPLE\otobo-svc -crypto All -pass Password -ptype KRB5_NT_PRINCIPAL -out C:\krb5.keytab
  • -princ is the service principal name. The realm after @ is uppercase.
  • -mapuser is the pre-Windows 2000 logon name, not the UPN.
  • -out is the keytab on the domain controller.

Copy the file to the Docker host:

Terminal window
mkdir -p /opt/otobo-docker/nginx-conf
mv /path/to/krb5.keytab /opt/otobo-docker/nginx-conf/krb5.keytab

The Kerberos template ships in the normal Nginx image. Do not compile the SPNEGO module yourself.

Terminal window
cd /opt/otobo-docker
docker compose down
docker volume create otobo_nginx_custom_config
mp=$(docker volume inspect --format '{{ .Mountpoint }}' otobo_nginx_custom_config)
docker create --name tmp-nginx rotheross/otobo-nginx-webproxy:latest-11_0
docker cp tmp-nginx:/etc/nginx/templates/otobo_nginx-kerberos.conf.template.hidden "$mp/otobo_nginx.conf.template"
docker rm tmp-nginx

latest-11_0 is the tag shown in the 11.1 installation chapter. Match the tag to the line you installed before copying the template.

Create docker-compose/otobo-nginx-custom-config.yml:

services:
nginx:
volumes:
- otobo_nginx_custom_config:/etc/nginx/config/template-custom

Back up the current environment and start from the Kerberos template:

Terminal window
mv /opt/otobo-docker/.env /opt/otobo-docker/.env.tmp
cp /opt/otobo-docker/.docker_compose_env_https_kerberos /opt/otobo-docker/.env

Copy at least the database password and TLS certificate paths from .env.tmp. Add the Kerberos values. Leave OTOBO_NGINX_KERBEROS_CONFIG commented out: Nginx generates /etc/krb5.conf.

OTOBO_NGINX_KERBEROS_KEYTAB=/opt/otobo-docker/nginx-conf/krb5.keytab
# leave OTOBO_NGINX_KERBEROS_CONFIG commented out
OTOBO_NGINX_KERBEROS_SERVICE_NAME=HTTP/otobo.example.com
OTOBO_NGINX_KERBEROS_REALM=EXAMPLE.COM
OTOBO_NGINX_KERBEROS_KDC=dc1.example.com
OTOBO_NGINX_KERBEROS_ADMIN_SERVER=dc1.example.com
OTOBO_NGINX_KERBEROS_DEFAULT_DOMAIN=example.com
OTOBO_PROXY_SECRET=a-long-random-value

Append the override file to COMPOSE_FILE and set the template directory:

COMPOSE_FILE=docker-compose.yml:docker-compose/otobo-nginx-custom-config.yml
NGINX_ENVSUBST_TEMPLATE_DIR=/etc/nginx/config/template-custom

Keep the COMPOSE_FILE list of your installation and only add the custom file. Then:

Terminal window
docker compose up -d

Behind a reverse proxy the username arrives in the Remote-User header, not in the web-server variable REMOTE_USER. OTOBO ignores that header until TrustProxyHeader is set and the secret matches OTOBO_PROXY_SECRET. The shipped Nginx configuration strips the same header when a client sends it.

In Kernel/Config.pm, replace the previous LDAP or database sign-in for agents:

$Self->{AuthModule} = 'Kernel::System::Auth::HTTPBasicAuth';
$Self->{'AuthModule::HTTPBasicAuth::ReplaceRegExp'} = '^(.+?)@.+?$';
$Self->{'AuthModule::HTTPBasicAuth::TrustProxyHeader'} = 1;
$Self->{'WebServer::ProxySecret'} = 'a-long-random-value';

ReplaceRegExp strips @REALM, leaving jsmith. The OTOBO login must be exactly that remainder, usually sAMAccountName.

LDAP is no longer the sign-in. Synchronisation may stay, with a search user other than the keytab account. Otherwise OTOBO does not create the agent on the first SSO login, and the log shows bind error 52e. Roles come from that synchronisation; see Active Directory via LDAP. The Admin label Group means the rights a role holds.

Leave the customer portal alone on this path. Setting Customer::AuthModule to HTTPBasicAuth does not turn the customer login into domain SSO. Customers outside the domain belong on OpenID Connect.

Chrome and Edge use SPNEGO only for sites in the Local intranet zone, with Integrated Windows Authentication enabled. Add https://otobo.example.com there. On a domain-joined PC, Group Policy often does this already.

Firefox, in about:config:

network.negotiate-auth.trusted-uris = https://otobo.example.com
network.negotiate-auth.delegation-uris = https://otobo.example.com
Terminal window
docker compose ps
docker compose logs nginx -f
docker compose exec nginx cat /etc/krb5.conf
docker compose exec nginx ls -l /etc/krb5.keytab

If the keytab is missing in the container:

Terminal window
docker compose cp /opt/otobo-docker/nginx-conf/krb5.keytab nginx:/etc/krb5.keytab

Inside the Nginx container, check that the KDC issues a ticket:

Terminal window
docker compose exec nginx bash
kinit -VV -k -t /etc/krb5.keytab HTTP/otobo.example.com@EXAMPLE.COM
env KRB5_TRACE=/dev/stdout kvno HTTP/otobo.example.com@EXAMPLE.COM
klist -e

KDC cannot fulfill requested option, or no ticket at all, almost always means the A record, the realm’s capitalisation, or the SPN is wrong. If Nginx reports the user and OTOBO does not know them, LDAP synchronisation is missing or the login is not sAMAccountName.

Three checks before you call the directory team: the PC is domain-joined, the user exists in Active Directory, and the site is in the intranet zone.

Frequently asked questions

Is signing in with an Active Directory password already Kerberos SSO?

No. Checking a username and password against Active Directory is LDAP. Kerberos SSO signs the agent in from a domain-joined computer without a second password prompt. OTOBO needs its own AD account, a keytab, and the Nginx proxy with SPNEGO.

Can the Kerberos account be the same as the LDAP sync user?

No. The HTTP/fqdn account exists only for the keytab. The search user for LDAP synchronisation stays a second account. Reusing one identity produces bind error 52e, and the agent is never created in the database.

Why must the OTOBO name be an A record?

Kerberos resolves the service principal name through the A record. A CNAME as the primary name breaks sign-in. Extra names may be CNAMEs that point at that A record.