Skip to content

JAMES-4215 Implement SASL GSSAPI Kerberos mechanism - #3099

Merged
quantranhong1999 merged 5 commits into
apache:masterfrom
quantranhong1999:sasl-gssapi-kerberos
Jul 27, 2026
Merged

JAMES-4215 Implement SASL GSSAPI Kerberos mechanism#3099
quantranhong1999 merged 5 commits into
apache:masterfrom
quantranhong1999:sasl-gssapi-kerberos

Conversation

@quantranhong1999

Copy link
Copy Markdown
Member

No description provided.

Kerberos GSSAPI SASL tokens can exceed SMTP's existing 8,192-byte line limit.

Allow administrators to increase the SMTP command and SASL continuation line limit while preserving the existing default. Restrict configured values to between 1,000 bytes and 1 MiB to limit memory exposure.
Introduce a dedicated optional SASL Kerberos module implementing GSSAPI authentication according to RFC 4752 through the JDK SASL provider.

Validate the configured service principal and keytab at startup, accept only the auth QOP, inherit auth.requireSSL, and reject Kerberos identities that cannot be mapped injectively to James usernames.

Cover configuration, authorization, resource cleanup, keytab validation, and JDK GSSAPI interoperability with an embedded Kerberos KDC.
Start a memory James server backed by an embedded Kerberos KDC and load the GSSAPI mechanism through the extension factory.

Cover IMAP and SMTP authentication, STARTTLS availability, exchanges without an initial response, invalid tokens, and unauthorized identities.
Document installation and configuration of the optional Kerberos extension for IMAP and SMTP.

Describe service principals, keytabs, identity mapping, TLS policy, supported QOP, extension loading, and SMTP token line limits.
@chibenwa

Copy link
Copy Markdown
Contributor

Can you provide a demo video with a potential client ?

Comment thread protocols/sasl-kerberos/pom.xml

@chibenwa chibenwa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like solid work!

Thanks for putting this together.

@chibenwa

Copy link
Copy Markdown
Contributor

No video in TB?

@quantranhong1999

Copy link
Copy Markdown
Member Author

No video in TB?

I am planning this. Please wait.

@quantranhong1999

Copy link
Copy Markdown
Member Author

Thunderbird + James + Kerberos:

  1. Start James memory app (leverage SaslGssapiIntegrationTest and Apache Kerby's Key Distribution Center server setup)
  2. Obtain Kerberos ticket-granting ticket for ALICE
  3. Start Thunderbird, and enjoy Kerberos as ALICE
demo.kerberos.Thunderbird.mp4

More detail on how to demo: quantranhong1999@26e63bc

@quantranhong1999

Copy link
Copy Markdown
Member Author

Follow-up ticket to improve Kerberos's resource cleanup upon client disconnection: linagora#5577

@quantranhong1999
quantranhong1999 merged commit ddf2749 into apache:master Jul 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants