33 Commits
Author SHA1 Message Date
Stéphane Nicoll 03d367bb07 Merge branch '4.1.x'
Closes gh-51629
2026-09-08 17:29:34 +02:00
Stéphane Nicoll 18292d400c Merge branch '4.0.x' into 4.1.x
Closes gh-51628
2026-09-08 16:57:00 +02:00
Stéphane Nicoll b1e91c942e Add support for creating a container from a TestImage value
This commit improves TestImage so that an explicit image can trigger
the creation of the container, with optional additional setup. This
removes the need of creating additional container types for images that
have multiple flavors, and to please the static method that can only
create a container based on a single match.

Closes gh-51082
2026-09-08 16:46:48 +02:00
Andy Wilkinson 74f1e37c3d Polish "Configure required authentication operation types for embedded LDAP"
See gh-51461
2026-08-27 14:51:49 +01:00
Sean ab642b82da Configure required authentication operation types for embedded LDAP
Signed-off-by: Sean <seanxu@connect.hku.hk>

See gh-51461
2026-08-27 14:47:11 +01:00
Moritz Halbritter 99274e3143 Fix embedded LDAP SSL and reuse client auto-configuration
Replace the hand-rolled LdapContextSource of the embedded server
with an LdapConnectionDetails implementation, so that
LdapAutoConfiguration creates the context source for both the external
and the embedded case. Previously, the embedded context source derived
the URL scheme from spring.ldap.ssl and never applied an SSL bundle to
the JNDI environment, leaving an embedded LDAPS server unreachable. It
also ignored spring.ldap.anonymous-read-only, spring.ldap.referral,
spring.ldap.base-environment and any DirContextAuthenticationStrategy
bean, all of which now apply.

The embedded server provides everything that describes a connection to
it, so spring.ldap.urls, spring.ldap.username, spring.ldap.password and
spring.ldap.ssl are now ignored while it is used. A spring.ldap
configuration meant for a production server therefore no longer has to
be unset for a test to run against the embedded server. This is a
behavior change: spring.ldap.urls used to take precedence and silently
pointed the client away from the embedded server.

As spring.ldap.base-environment now applies to the embedded case, a
socket factory set there would be replaced by the one of the SSL
bundle. Startup fails instead of using either silently.

LdapProperties.determineUrls has been removed. Its local.ldap.port
handling only ever served the embedded case, which the embedded
connection details now cover, and the default URL derivation has moved
to PropertiesLdapConnectionDetails, its only caller.

Closes gh-51465
2026-08-27 09:32:13 +02:00
Moritz Halbritter bf1b583596 Fail fast if ssl.enabled = true without an SSL bundle
Setting spring.ldap.embedded.ssl.enabled without an SSL bundle started a
plain LDAP listener silently. It now fails at startup as a bundle is
required to provide the server's certificate and private key.

Closes gh-51471
2026-08-27 09:32:13 +02:00
Moritz Halbritter 6c33f551e7 Add missing tests for reflection hints
See gh-51382
2026-08-27 09:32:13 +02:00
Moritz Halbritter 4a3cad7983 Add SSL support for LDAP in Docker Compose
Also fixes missing LDAP entries in the documentation.

See gh-51382
2026-08-26 11:53:08 +02:00
Moritz Halbritter 969f1c03bf Polish "Add SSL bundle support to LDAP auto-configuration"
Configure the SSL bundle through the context source's base environment
rather than a DirContextAuthenticationStrategy. The strategy is not
consulted when read-only operations use an anonymous environment,
which is the default when no username is set, so LDAPS connections
silently used the JVM's default trust material. It was also bypassed
entirely when a custom strategy bean was defined.
Register an SSL bundle update handler so that reloaded key and trust
material is used by subsequent connections.

Target LDAPS rather than StartTLS by setting the JNDI
java.naming.ldap.factory.socket property, and fail at startup if a
bundle is combined with a non-ldaps URL or with a socket factory that
has also been set through spring.ldap.base-environment. Delegate all
socket factory methods so that a configured connect timeout is
applied.

Add spring.ldap.ssl.enabled to use the platform's default trust and
key material without a bundle, default the URL to
ldaps://localhost:636 when SSL is enabled, and register the reflection
hint that JNDI needs to load the socket factory by name in a native
image. Cover the result with integration tests that search over LDAPS
against OpenLDAP and LLDAP containers, including certificates that are
untrusted or issued to a different host.

See gh-51382
2026-08-26 10:35:57 +02:00
dhruv9b 255677d8e7 Add SSL bundle support to LDAP auto-configuration
See gh-51382

Signed-off-by: dhruv9b <9bdhruv@gmail.com>
2026-08-26 08:23:35 +02:00
Phillip Webb ca0772effd Merge branch '4.1.x'
Closes gh-51442
2026-08-25 11:49:40 -07:00
Phillip Webb 014bbcca82 Polish LdapHealthIndicator
See gh-51441
2026-08-25 11:46:03 -07:00
2heunxun d5ace369bd Fix LdapHealthIndicator reporting when LDAP version is unavailable
Fix regression caused by commit d26b6895 which caused
`doHealthCheck()` to only call `builder.up()` when the LDAP
server's protocol version (`java.naming.ldap.version`) could be
read from the JNDI environment.

See gh-51441

Signed-off-by: 2heunxun <seapeon@naver.com>
2026-08-25 11:43:49 -07:00
Venkata Naga Sai Srikanth Gollapudi 87c4755a86 Harmonize use of Collections and Maps in configuration properties
See gh-50367

Signed-off-by: Venkata Naga Sai Srikanth Gollapudi <42247688+gollapudisrikanth@users.noreply.github.com>
2026-07-15 11:37:31 +02:00
leestana01 af2f956c7d Embedded LDAP SSL should not be enabled when its bundle is empty
See gh-50700

Signed-off-by: leestana01 <leestana01@naver.com>
2026-06-09 16:07:40 +02:00
Stéphane Nicoll 5bf2a32b11 Merge branch '4.0.x' 2026-05-30 14:39:57 +02:00
Stéphane Nicoll 98084aab2b Reformat additional-spring-configuration-metadata.json files 2026-05-30 14:28:53 +02:00
Andy Wilkinson 6a74bb85a3 Merge branch '4.0.x'
Closes gh-50440
2026-05-14 15:03:44 +01:00
Andy Wilkinson add52b6ccd Merge branch '3.5.x' into 4.0.x
Closes gh-50439
2026-05-14 15:02:24 +01:00
Andy Wilkinson d26b6895ef Start building against Spring LDAP 4.1.0-M1 snapshots
See gh-49119
2026-02-10 09:24:12 +00:00
Andy Wilkinson dfd41a6b9f Polish "Add LDAPS support to embedded LDAP server"
See gh-48315
2025-12-19 11:26:02 +00:00
CatiaCorreia 0934edf556 Add LDAPS support to embedded LDAP server
Signed-off-by: CatiaCorreia <catia.correia97@gmail.com>

See gh-48315
2025-12-19 11:25:52 +00:00
Stéphane Nicoll d1e5fe3248 Merge branch '3.5.x'
Closes gh-48106
2025-11-13 10:31:25 +01:00
Eddú Meléndez 7f64615690 Upgrade to Testcontainers 2.0.1
* Update dependencies name
  Modules are prefixed with `testcontainers-`
* Update container classes
  Container classes are under `org.testcontainers.<module-name>` package

See gh-47664

Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
2025-10-17 17:11:24 +02:00
Moritz Halbritter 489336255a Add nullability annotations to tests in module/spring-boot-ldap
See gh-47263
2025-10-06 13:07:58 +02:00
Phillip WebbandMoritz Halbritter 239f384ac0 Update PropertyMapper to better support nullability
Refactor `PropertyMapper` so that it no longer calls adapter or
predicate methods by default when the source value is `null`. This
effectively makes all default calls the same as using
`alwaysWhenNotNull` in the previous generation of the code.

For the limited times when you do need to deal with `null` values, the
new `always()` method can be used.

For example,

	map.from(source::method).to(destination::method);

Will not call `destination.method(...)` if `source.method()` returns
`null`.

Where as:

	map.from(source::method).always().to(destination::method);

Will call  `destination.method(null)` if `source.method()` returns
`null`.

This update provides clearer semantics for the API and allows for better
JSpecify nullability annotations. It has also simplified much of our
existing property mapper code.

Closes gh-47024

Co-authored-by: Moritz Halbritter <moritz.halbritter@broadcom.com>
2025-09-05 14:43:33 -07:00
Moritz Halbritter 3fa7c3a521 Improve null-safety of module/spring-boot-ldap
See gh-46926
2025-08-26 14:22:55 +02:00
Moritz Halbritter 7ad90fb963 Improve null-safety of core/spring-boot-docker-compose
See gh-46926
2025-08-26 14:22:53 +02:00
Stéphane Nicoll b5b95b88c9 Review configuration properties
This commit reviews the configuration properties to fix a number of
oddities found in the first milestone:

* Additional configuration metadata file in the wrong location.
* Missing manual error metadata for removed properties

Closes gh-46535
2025-08-18 11:41:07 +02:00
Moritz Halbritter 97ad5cb204 Add nullability annotations to module/spring-boot-ldap
See gh-46587
2025-08-04 11:27:41 +02:00
Moritz Halbritter c0f1f641ce Make auto-configurations final and remove public members
Closes gh-32883
2025-07-29 09:48:49 +02:00
Phillip Webb decc32dde3 Restructure project directories to better fit Gradle
Closes gh-46358
2025-07-10 17:54:08 -07:00