use of org.jboss.as.test.integration.security.common.config.realm.SecurityRealm in project wildfly by wildfly.
the class WebCERTTestsSecurityDomainSetup method getSecurityRealms.
@Override
protected SecurityRealm[] getSecurityRealms() throws Exception {
URL keystoreResource = Thread.currentThread().getContextClassLoader().getResource("security/server.keystore");
URL truststoreResource = Thread.currentThread().getContextClassLoader().getResource("security/jsse.keystore");
RealmKeystore keystore = new RealmKeystore.Builder().keystorePassword("changeit").keystorePath(keystoreResource.getPath()).build();
RealmKeystore truststore = new RealmKeystore.Builder().keystorePassword("changeit").keystorePath(truststoreResource.getPath()).build();
return new SecurityRealm[] { new SecurityRealm.Builder().name("ssl-cert-realm").serverIdentity(new ServerIdentity.Builder().ssl(keystore).build()).authentication(new Authentication.Builder().truststore(truststore).build()).build() };
}
Aggregations