oscerd opened a new pull request, #9066:
URL: https://github.com/apache/camel-quarkus/pull/9066
Fixes #9054.
`CamelLdapConfig.LdapDirContextConfig.securityAuthentication()` carried
`@WithDefault("none")` while its own javadoc says:
> If this property is unspecified, the behaviour is determined by the
service provider.
It was also the only option in that group with a default —
`initial-context-factory`, `provider-url`, `security-protocol` and
`socket-factory` are all `Optional<String>`.
`CamelLdapRecorder` put the value into the JNDI environment unconditionally.
`additionalOptions` is merged afterwards, so an operator who sets
`java.naming.security.authentication` explicitly was fine — but one who
supplied only a principal and credentials through `additional-options` (the
only way to pass them) got `none` and an anonymous bind, with the credentials
silently ignored.
**Change**
- `securityAuthentication()` becomes `Optional<String>`, matching its
javadoc and its sibling options.
- The recorder sets it only when configured, using the same `ifPresent`
style as the lines around it.
- Generated reference docs updated (the default column is now empty).
- Migration guide entry added for 3.40.0, since a context that relied on the
default now lets the provider decide.
**Tests**
`LdapTest.securityAuthenticationOnlySetWhenConfigured` asserts the property
reaches the JNDI environment only for a context that configures it —
`httpserver` sets it explicitly and still reports `none`; `sslserver` does not
and now reports absent. A small `/ldap/dirContextEnv/{name}/{key}` endpoint
exposes the bound environment for the assertion.
Verified as a real regression test: with the previous `@WithDefault("none")`
restored and the runtime module rebuilt, this case fails; with the change it
passes. All 6 `LdapTest` cases are green, including the `ssl` and
`additionalOptions` parameterised runs that previously relied on the removed
default.
`./mvnw clean validate -pl docs` passes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]