-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
- We have no reason to override the transport ssl settings in AbstractAdLdapRealmTestCase so use what was generated already - Handle renaming properly in MultipleAdRealmIT
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
import org.apache.logging.log4j.LogManager; | ||
import org.elasticsearch.common.settings.Settings; | ||
import org.elasticsearch.xpack.core.security.authc.ldap.LdapRealmSettings; | ||
import org.junit.BeforeClass; | ||
|
||
import java.io.IOException; | ||
|
@@ -49,8 +50,13 @@ protected Settings nodeSettings(int nodeOrdinal) { | |
final Settings secondarySettings = super.buildRealmSettings(secondaryRealmConfig, secondaryRoleMappings, | ||
getNodeTrustedCertificates()); | ||
secondarySettings.keySet().forEach(name -> { | ||
String newName = name.replace(XPACK_SECURITY_AUTHC_REALMS_AD_EXTERNAL, XPACK_SECURITY_AUTHC_REALMS_AD_EXTERNAL + "2"); | ||
builder.copy(newName, name, secondarySettings); | ||
final String newname; | ||
if (name.contains(LdapRealmSettings.AD_TYPE)) { | ||
newname = name.replace(XPACK_SECURITY_AUTHC_REALMS_AD_EXTERNAL, XPACK_SECURITY_AUTHC_REALMS_AD_EXTERNAL + "2"); | ||
} else { | ||
newname = name.replace(XPACK_SECURITY_AUTHC_REALMS_LDAP_EXTERNAL, XPACK_SECURITY_AUTHC_REALMS_LDAP_EXTERNAL + "2"); | ||
} | ||
builder.copy(newname, name, secondarySettings); | ||
This comment has been minimized.
Sorry, something went wrong.
albertzaharovits
Contributor
|
||
}); | ||
|
||
return builder.build(); | ||
|
This is unimportant , it did not cause the test to fail, right?