@Override
protected SecurityRealm[] getSecurityRealms() {
final RealmKeystore.Builder keyStoreBuilder = new RealmKeystore.Builder().keystorePassword(KEYSTORE_PASSWORD);
final String ldapsUrl = "ldaps://" + Utils.getSecondaryTestAddress(managementClient) + ":" + LDAPS_PORT;
final SecurityRealm sslConfRealm = new SecurityRealm.Builder().name(SSL_CONF_REALM).authentication(
new Authentication.Builder().truststore(keyStoreBuilder.keystorePath(TRUSTSTORE_FILE_JBAS.getAbsolutePath())
.build()).build()).serverIdentity(new ServerIdentity.Builder().ssl(
keyStoreBuilder.keystorePath(KEYSTORE_FILE_JBAS.getAbsolutePath()).build()).build()).build();
final SecurityRealm ldapsAuthRealm = new SecurityRealm.Builder().name(LDAPS_AUTHN_REALM).authentication(
new Authentication.Builder().ldap(new LdapAuthentication.Builder()
// shared attributes
.connection(LDAPS_CONNECTION)
// ldap-connection
.url(ldapsUrl).searchDn(SECURITY_PRINCIPAL).searchCredential(SECURITY_CREDENTIALS).securityRealm(SSL_CONF_REALM)