Skip to content

Add Sample Exploring a GSSAPI DirContextAuthenticationStrategy #13

Open

Description

@jzheaux

Spring LDAP has no strategy for authenticating with GSSAPI (Kerberos). Users who need it today have to use KerberosLdapContextSource from spring-security-kerberos, which extends DefaultSpringSecurityContextSource and therefore requires Spring Security.

Please add a Spring Boot sample that builds and uses a GSSAPI DirContextAuthenticationStrategy, purely to see what it looks like. It is reasonable for a sample to use Spring Security since these samples are based on Spring Boot.

Things the sample should explore:

  • how the strategy obtains a Subject (JAAS Configuration / LoginContext) and creates the context on its behalf, using Subject.callAs rather than the deprecated Subject.doAs
  • how much of the behavior overlaps with KerberosLdapContextSource, so we can judge duplication and long-term maintenance before deciding anything further
  • what it takes to run the sample against a real KDC and LDAP server, and whether that can be done in a repeatable way

This is exploratory. The outcome should inform whether a GSSAPI strategy belongs in Spring LDAP, in spring-security-kerberos (possibly with KerberosLdapContextSource delegating to it), or only in documentation. It should not be taken as a commitment to add API to Spring LDAP.

Activity

  1. added
    enhancement
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions