docs(sso-spnego): correct the Kerberos settings for current AD and JDK 21 - #476
Open
marevol wants to merge 1 commit into
Open
docs(sso-spnego): correct the Kerberos settings for current AD and JDK 21#476marevol wants to merge 1 commit into
marevol wants to merge 1 commit into
Conversation
…K 21 The krb5.conf sample would break SPNEGO on a current Active Directory. It listed "aes128-cts rc4-hmac des3-cbc-sha1 des-cbc-md5 des-cbc-crc" in permitted_enctypes, but Java 17 and later disable RC4, 3DES and DES by default, so the list collapses to AES128 only - and AES256 was never there. The Kerberos acceptor validates the incoming ticket against permitted_enctypes (KrbApReq: "encryption type not in permitted_enctypes list"), so as soon as the KDC issues an AES256 service ticket, which is the normal case, authentication fails. The sample now lists AES-SHA1 256 and 128 plus the AES-SHA2 (RFC 8009) types that Windows Server 2025 supports, with a warning explaining the failure mode and a note about service accounts that hold only an RC4 key. Also corrected in both 15.7 and 15.8: - SPNEGO is initialized on the first login, not at boot, so a missing krb5.conf or auth_login.conf does not stop Fess from starting; only SSO login fails. - spnego.exclude.dirs is removed from the settings table. Only SpnegoHttpFilter consumes it and Fess does not install that filter, so it never excluded anything. - New troubleshooting entries for the two failures that leave no trace in the Fess log: an oversized Kerberos ticket exceeding Tomcat's 8KB header limit, and a service account password change that requires a restart because the server credential is cached for the lifetime of the process. 15.8 only, matching the hardened defaults and the new setting on master: - spnego.allow.unsecure.basic and spnego.allow.localhost now document false, not true. The table previously told operators the localhost bypass was on when it is off by default. - spnego.allowed.realms is documented. - A note showing the keytab form of spnego-server, reachable now that the pre-authentication username and password default to empty. Fixes the German title overline, which was 45 characters under a 60-character title. All 14 pages parse without messages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The SPNEGO page told operators to build a
krb5.confthat breaks against a current Active Directory, and its settings table described defaults that no longer match the implementation. Both 15.7 (current release) and 15.8 are updated; the parts that depend on 15.8-only code changes are applied to 15.8 only.The
krb5.confsample could not authenticate against a current ADThe sample listed:
Two problems compound:
aes128-ctsis inert. On JDK 21 the built-in default encryption types are exactly18, 17, 20, 19— AES only.permitted_enctypes(sun.security.krb5.KrbApReq→"encryption type not in permitted_enctypes list"), so the moment the KDC issues an AES256 service ticket — the normal case for any service account whose password was set on a modern DC — authentication fails.The sample now lists AES-SHA1 256/128 followed by the AES-SHA2 (RFC 8009) types
aes256-cts-hmac-sha384-192/aes128-cts-hmac-sha256-128that Windows Server 2025 supports, with:encryption type not in permitted_enctypes list) and stating that AES256 must be listed;Corrections applied to both 15.7 and 15.8
spnego.exclude.dirsdocumented as "directories to exclude from authentication"SpnegoHttpFilterconsumes it, and Fess callsSpnegoAuthenticator#authenticatedirectly instead of installing that filter, so it never excluded anything.Two new troubleshooting entries, both for failures that leave nothing in the Fess log:
Authorizationheader exceeds Tomcat's default 8KB limit, and the request is rejected before it reaches Fess. Documentstomcat.maxHttpHeaderSizeintomcat_config.properties.spnego.*change, sinceSpnegoFilterConfigis a JVM-wide singleton.15.8 only
These follow code that is on
masterbut not in 15.7:spnego.allow.unsecure.basicandspnego.allow.localhostnow documentfalse. The table saidtruefor both — telling operators the localhost bypass (which authenticates same-host requests as the server OS user with no Kerberos verification) is on when it is off.spnego.allowed.realmsis documented — the allowlist for intentional cross-realm trust. It appeared nowhere before.spnego-serverlogin module, which became reachable oncespnego.preauth.username/.passwordstarted defaulting to empty.Verification
All 14 pages parse with zero docutils messages. This also fixes a pre-existing German title overline (45 characters under a 60-character title), which was the only warning before.
Related: codelibs/fess#3216 (authenticator fixes, including removing the
spnego.exclude.dirsmapping) and codelibs/fess#3220 (admin screen field forspnego.allowed.realms).