Do not compare user DN using DN comparison as Ad can login via username@domain

Closes #31196

Signed-off-by: rmartinc <rmartinc@redhat.com>
This commit is contained in:
rmartinc 2024-07-10 17:41:54 +02:00 committed by Pedro Igor
parent bebb314a16
commit bd90ead892

View file

@ -74,7 +74,7 @@ public class LDAPServerCapabilitiesManager {
if (component != null) {
LDAPConfig ldapConfig = new LDAPConfig(component.getConfig());
if (Objects.equals(URI.create(config.getConnectionUrl()), URI.create(ldapConfig.getConnectionUrl()))
&& Objects.equals(LDAPDn.fromString(config.getBindDn()), LDAPDn.fromString(ldapConfig.getBindDN()))) {
&& config.getBindDn() != null && config.getBindDn().equalsIgnoreCase(ldapConfig.getBindDN())) {
bindCredential = ldapConfig.getBindCredential();
}
}