Skip to content

WindowsDesktopSSO: login after the service credentials expire returns LOGIN_IGNORE unless debug logging is on #1173

Closed

Description

@vharseko

Summary

When the cached service credentials of the WindowsDesktopSSO module expire, the module logs in again and retries the token. If the retry succeeds, the module still returns LOGIN_IGNORE instead of LOGIN_SUCCEED, unless message-level debug logging is enabled. A user with a valid Kerberos ticket is therefore not logged in by the module.

Cause

process() has two retry branches for GSSException.CREDENTIALS_EXPIRED: one for a GSSException wrapped in a PrivilegedActionException, one for a bare GSSException. In both, result = ISAuthConstants.LOGIN_SUCCEED sits inside if (debug.messageEnabled()):

authenticateToken(kerberosToken, trustedKerberosRealms);
if (debug.messageEnabled()){
    debug.message("Authentication succeeded with new cred.");
        result = ISAuthConstants.LOGIN_SUCCEED;
}

result starts as LOGIN_IGNORE (L164), so with debug logging at its default level the successful retry is lost.

Impact

  • The first login after the service credentials expire is ignored by the module. In a chain the user falls through to the next module (typically the password form); in a Kerberos-only chain the login fails.
  • The bug disappears as soon as message-level debug logging is turned on, which makes it hard to reproduce while investigating.

Expected

A successful retry returns LOGIN_SUCCEED regardless of the debug level: move the assignment out of the if in both branches.

Test

The Kerby-based module test proposed in #1172 does not reach these branches. A test that forces CREDENTIALS_EXPIRED on the first acceptSecContext (or expires the service ticket) and asserts LOGIN_SUCCEED with debug at its default level would cover it.

Activity

  1. added
    javaPull requests that update java code
    kerberosKerberos / SPNEGO (WindowsDesktopSSO) authentication
    on Oct 12, 2026
  2. self-assigned this
    on Oct 13, 2026
  3. added 3 commits that reference this issue on Oct 14, 2026
  4. added a commit that references this issue on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugjavaPull requests that update java codekerberosKerberos / SPNEGO (WindowsDesktopSSO) authentication

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions