|
@@ -66,7 +66,6 @@ public class ActiveDirectorySessionFactoryTests extends AbstractActiveDirectoryT
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
public void testAdAuth() throws Exception {
|
|
|
RealmConfig config = configureRealm("ad-test", buildAdSettings(AD_LDAP_URL, AD_DOMAIN, false));
|
|
|
try (ActiveDirectorySessionFactory sessionFactory = getActiveDirectorySessionFactory(config, sslService, threadPool)) {
|
|
@@ -101,7 +100,6 @@ public class ActiveDirectorySessionFactoryTests extends AbstractActiveDirectoryT
|
|
|
return new RealmConfig(identifier, mergedSettings, env, new ThreadContext(globalSettings));
|
|
|
}
|
|
|
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
public void testNetbiosAuth() throws Exception {
|
|
|
final String adUrl = randomFrom(AD_LDAP_URL, AD_LDAP_GC_URL);
|
|
|
RealmConfig config = configureRealm("ad-test", buildAdSettings(adUrl, AD_DOMAIN, false));
|
|
@@ -139,7 +137,6 @@ public class ActiveDirectorySessionFactoryTests extends AbstractActiveDirectoryT
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
public void testAuthenticate() throws Exception {
|
|
|
Settings settings = buildAdSettings(REALM_ID, AD_LDAP_URL, AD_DOMAIN, "CN=Users,DC=ad,DC=test,DC=elasticsearch,DC=com",
|
|
|
LdapSearchScope.ONE_LEVEL, false);
|
|
@@ -163,7 +160,6 @@ public class ActiveDirectorySessionFactoryTests extends AbstractActiveDirectoryT
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
public void testAuthenticateBaseUserSearch() throws Exception {
|
|
|
Settings settings = buildAdSettings(REALM_ID, AD_LDAP_URL, AD_DOMAIN,
|
|
|
"CN=Bruce Banner, CN=Users,DC=ad,DC=test,DC=elasticsearch,DC=com", LdapSearchScope.BASE, false);
|
|
@@ -208,7 +204,6 @@ public class ActiveDirectorySessionFactoryTests extends AbstractActiveDirectoryT
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
public void testAuthenticateWithUserPrincipalName() throws Exception {
|
|
|
Settings settings = buildAdSettings(REALM_ID, AD_LDAP_URL, AD_DOMAIN, "CN=Users,DC=ad,DC=test,DC=elasticsearch,DC=com",
|
|
|
LdapSearchScope.ONE_LEVEL, false);
|
|
@@ -229,7 +224,6 @@ public class ActiveDirectorySessionFactoryTests extends AbstractActiveDirectoryT
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
public void testAuthenticateWithSAMAccountName() throws Exception {
|
|
|
Settings settings = buildAdSettings(REALM_ID, AD_LDAP_URL, AD_DOMAIN, "CN=Users,DC=ad,DC=test,DC=elasticsearch,DC=com",
|
|
|
LdapSearchScope.ONE_LEVEL, false);
|
|
@@ -251,7 +245,6 @@ public class ActiveDirectorySessionFactoryTests extends AbstractActiveDirectoryT
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
public void testCustomUserFilter() throws Exception {
|
|
|
Settings settings = Settings.builder()
|
|
|
.put(buildAdSettings(REALM_ID, AD_LDAP_URL, AD_DOMAIN, "CN=Users,DC=ad,DC=test,DC=elasticsearch,DC=com",
|
|
@@ -275,7 +268,6 @@ public class ActiveDirectorySessionFactoryTests extends AbstractActiveDirectoryT
|
|
|
}
|
|
|
|
|
|
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
public void testStandardLdapConnection() throws Exception {
|
|
|
String groupSearchBase = "DC=ad,DC=test,DC=elasticsearch,DC=com";
|
|
|
String userTemplate = "CN={0},CN=Users,DC=ad,DC=test,DC=elasticsearch,DC=com";
|
|
@@ -341,7 +333,6 @@ public class ActiveDirectorySessionFactoryTests extends AbstractActiveDirectoryT
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
public void testStandardLdapWithAttributeGroups() throws Exception {
|
|
|
String userTemplate = "CN={0},CN=Users,DC=ad,DC=test,DC=elasticsearch,DC=com";
|
|
|
Settings settings = LdapTestCase.buildLdapSettings(new String[]{AD_LDAP_URL}, userTemplate, false);
|