oscerd opened a new issue, #9054:
URL: https://github.com/apache/camel-quarkus/issues/9054
`extensions/ldap/.../CamelLdapConfig.java:60-68`
The javadoc states:
> The security level to use. [...] If this property is unspecified, the
behaviour is determined by the service provider.
but the option carries `@WithDefault("none")`, so it is never unspecified.
`CamelLdapRecorder.createDirContexts` then does:
```java
env.put(Context.SECURITY_AUTHENTICATION, dirConfig.securityAuthentication());
...
env.putAll(dirConfig.additionalOptions());
```
`additionalOptions` is merged afterwards, so setting
`java.naming.security.authentication` there does take effect. But an operator
who supplies only `java.naming.security.principal` and
`java.naming.security.credentials` through `additional-options` — the only way
to pass credentials — silently gets an anonymous bind, because `none` is
already in the map and nothing overrides it.
**Suggested fix**
Make `securityAuthentication()` an `Optional<String>` set only when
configured (matching the javadoc), or derive `simple` automatically when a
principal/credentials are present. Either way the javadoc and the behaviour
should agree.
--
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]