To test ma LDAP service. I set up the embedded LDAP config like that:
spring:
ldap:
base: OU=Internals,DC=int,DC=springboot,DC=dev
username: uid=admin
password: secret
urls: ldap://localhost:8389/
embedded:
base-dn: DC=springboot,DC=dev
credential:
username: uid=admin
password: secret
ldif: classpath:export2-ldap.ldif
port: 8389
validation:
enabled: false
I notice that the ldaptemplate base is not correctly set:

I've dug into the EmbeddedLdapAutoConfiguration and LdapAutoConfiguration code, and I've noticed that the EmbeddedLdapAutoConfiguration creates a bean LdapContextSource, without the base, before the LdapAutoConfiguration class.
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(ContextSource.class)
static class EmbeddedLdapContextConfiguration {
@Bean
@DependsOn("directoryServer")
@ConditionalOnMissingBean
LdapContextSource ldapContextSource(Environment environment, LdapProperties properties,
EmbeddedLdapProperties embeddedProperties) {
LdapContextSource source = new LdapContextSource();
if (embeddedProperties.getCredential().isAvailable()) {
source.setUserDn(embeddedProperties.getCredential().getUsername());
source.setPassword(embeddedProperties.getCredential().getPassword());
}
source.setUrls(properties.determineUrls(environment));
return source;
}
}
Is it normal, is not possible to use both spring.ldap.base and spring.ldap.embedded.* ? Or maybe something is not correctly set in my projet.