Do not add domain to the bind user when it is a DN
This change fixes the creation of the bind DN string for active directory realms so that they do not add the `@domain` suffix to the bind DN, when it is a actual DN value. Original commit: elastic/x-pack-elasticsearch@bd04c07e16
This commit is contained in:
parent
f4b9dff71a
commit
20c06578f6
|
@ -190,7 +190,7 @@ class ActiveDirectorySessionFactory extends PoolingSessionFactory {
|
||||||
|
|
||||||
static String getBindDN(Settings settings) {
|
static String getBindDN(Settings settings) {
|
||||||
String bindDN = BIND_DN.get(settings);
|
String bindDN = BIND_DN.get(settings);
|
||||||
if (bindDN.isEmpty() == false && bindDN.indexOf('\\') < 0 && bindDN.indexOf('@') < 0) {
|
if (bindDN.isEmpty() == false && bindDN.indexOf('\\') < 0 && bindDN.indexOf('@') < 0 && bindDN.indexOf('=') < 0) {
|
||||||
bindDN = bindDN + "@" + settings.get(AD_DOMAIN_NAME_SETTING);
|
bindDN = bindDN + "@" + settings.get(AD_DOMAIN_NAME_SETTING);
|
||||||
}
|
}
|
||||||
return bindDN;
|
return bindDN;
|
||||||
|
|
Loading…
Reference in New Issue