Kerberos SSO setup
This guide explains how to configure Kerberos SSO for Easy.
Easy does not authenticate Kerberos directly. Apache, Nginx, or another reverse proxy must handle Kerberos or SPNEGO first. Easy then reads authenticated user from request.env.
Key fact
SSO login env variablein Easy means key inrequest.env- Not necessarily raw HTTP header name
- Common value:
REMOTE_USER - Typical content:
user@REALM - Easy strips realm, uses
useras local login
If proxy sends custom header, map header to key visible in request.env before request reaches Rails.
Required routes
/sso_autologinMain Kerberos SSO entry point. Must be protected by Kerberos-capable proxy configuration./sso_variablesDebug page. Shows configured env key, current value, parsed login, matched user./sso_loginSeparate SSO login form (EasySsoLoginController). Not part of Kerberos autologin flow.
Requirements
- Working Kerberos or SPNEGO on Apache, Nginx, or another reverse proxy
- Authenticated username exposed to Rails in
request.env - Easy local users pre-created, or LDAP auto-provisioning configured
User provisioning
Two supported models:
- Pre-create users in Easy
- Easy
loginmust match Kerberos username without realm - Create users from LDAP
- Configure LDAP Auth Source
- Enable
on-the-fly registration
Important:
- If Kerberos succeeds but user does not exist in Easy, login fails unless LDAP
on-the-fly registrationis enabled.
Configuration steps
1. Configure Kerberos on proxy
Configure Apache, Nginx, or another reverse proxy to:
- authenticate user with Kerberos or SPNEGO
- protect
/sso_autologin - pass authenticated username to upstream app in
request.env - use stable env key, ideally
REMOTE_USER
Recommended:
- expose same identity on
/sso_variablesfor troubleshooting
Not required:
- protecting whole application with Kerberos
Critical route:
/sso_autologin
2. Configure SSO in Easy
Navigation:
Administration -> Settings -> Authentication
Set:
Enable SSO= enabledSSO login env variable= exact key available inrequest.env
Example:
- Proxy exposes user as
REMOTE_USER - Set
SSO login env variabletoREMOTE_USER
3. Configure LDAP if users are not pre-created
Navigation:
Administration -> LDAP authentication
If Easy should create missing users automatically:
- create or edit LDAP Auth Source
- enable
on-the-fly registration
Use LDAP provisioning when:
- Kerberos identity reaches Easy correctly
- local Easy user does not exist yet
Test procedure
1. Check debug route
Open:
/sso_variables
Verify:
SSO enabled?=trueENV variable= expected keyCurrent value= Kerberos identity, usuallyuser@REALMCurrent login= username without realmCurrent user in DB= matched existing user or LDAP-resolved user (display only; save happens via/sso_autologin)
2. Check login flow
- log out from Easy
- open page that requires authentication
- confirm redirect to
/sso_autologin - confirm Kerberos authentication happens on proxy
- confirm Easy logs user in
- confirm redirect back to original page
Troubleshooting
Symptom
- Easy shows
Cannot login through single sign on.
Check list
Enable SSOenabledSSO login env variableexactly matches key inrequest.env- Kerberos works on
/sso_autologin - proxy forwards authenticated username to Rails
- username format is expected, usually
user@REALM - Easy local
loginmatches parsed username without realm - if user missing, LDAP Auth Source exists and
on-the-fly registrationis enabled
Common causes
- wrong env key configured in Easy
- proxy sends header but value never reaches
request.env REMOTE_USERor chosen env key empty on/sso_autologin- Easy user missing
- LDAP auto-provisioning not configured
Expected flow
- User opens protected Easy page.
- Easy redirects anonymous user to
/sso_autologin. - Proxy authenticates user with Kerberos or SPNEGO.
- Proxy exposes identity in
request.env. - Easy reads configured env key.
- Easy strips realm from
user@REALM. - Easy logs existing user in (respects 2FA if enabled), or creates user through LDAP on-the-fly registration.
- Easy redirects user back to original page.
Technical section
Key source locations:
easy_engines/easy_extensions/config/routes.rbDefines SSO routes:GET /sso_autologin->AccountController#sso_autologinGET /sso_variables->AccountController#sso_variables-
GET|POST /sso_login->EasySsoLoginController#sso_login -
app/controllers/account_controller.rbKerberos SSO entry points: AccountController#sso_autologin(app/controllers/account_controller.rb:261)AccountController#sso_variables(app/controllers/account_controller.rb:284)AccountController#handle_active_user(app/controllers/account_controller.rb:448)-
AccountController#handle_active_twofa(app/controllers/account_controller.rb:457) -
app/utils/easy_extensions/sso.rbCore SSO helper. Reads configured env key fromrequest.env, strips realm (user@REALM->user), finds local user, or creates unsaved user from LDAP attrs. -
app/models/auth_source_ldap.rbLDAP lookup for on-the-fly provisioning: -
AuthSourceLdap#authenticate_without_password(app/models/auth_source_ldap.rb:151) -
easy_engines/easy_extensions/easy_patch/redmine/controllers/application_controller_patch.rbRedirects anonymous users to/sso_autologinwhen SSO is enabled: -
ApplicationController#require_login_with_easy_extensions(easy_engines/easy_extensions/easy_patch/redmine/controllers/application_controller_patch.rb:854) -
easy_engines/easy_extensions/app/views/account/sso_variables.html.erbDebug page: renders configured env key, current value, parsed login, matched/LDAP-resolved user, plus additional request env variables. -
app/controllers/easy_sso_login_controller.rbSeparate SSO login form flow (/sso_login); not Kerberos autologin.