Skip to content

Add SSL bundle support to LDAP auto-configuration - #51382

Open
dhruv9b wants to merge 1 commit into
spring-projects:mainfrom
dhruv9b:ldap-ssl-bundle-support
Open

Add SSL bundle support to LDAP auto-configuration#51382
dhruv9b wants to merge 1 commit into
spring-projects:mainfrom
dhruv9b:ldap-ssl-bundle-support

Conversation

@dhruv9b

@dhruv9b dhruv9b commented Aug 14, 2026

Copy link
Copy Markdown

Spring Boot's LDAP auto-configuration currently supports LDAPS URLs, but there is no way to associate a named SSL Bundle with the auto-configured LdapContextSource.

This change adds support for configuring an SSL Bundle through spring.ldap.ssl.bundle.

The implementation:

  • Adds SSL Bundle configuration to LdapProperties.
  • Resolves the configured SslBundle through SslBundles.
  • Applies the bundle's SSLSocketFactory to a DefaultTlsDirContextAuthenticationStrategy when no custom authentication strategy is configured.
  • Preserves the existing authentication-strategy behavior when custom strategies are present.
  • Adds the required Testcontainers connection-details overrides for the new LdapConnectionDetails API.
  • Adds tests covering SSL Bundle configuration, custom authentication strategies, multiple strategies, and the resulting SSL socket factory.

This allows applications to use dedicated SSL/TLS configuration for LDAP through Spring Boot's existing SSL Bundle infrastructure without replacing the auto-configured LdapContextSource or relying on JVM-wide SSL properties.

The LDAP module tests pass successfully.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 14, 2026
Signed-off-by: dhruv9b <9bdhruv@gmail.com>
@dhruv9b
dhruv9b force-pushed the ldap-ssl-bundle-support branch from 01a40a4 to d01bbc5 Compare August 14, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants