@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")