protected static void startServer() throws IOException {
final InputStream trustStore = Server.class.getResourceAsStream("/truststore_server");
final InputStream keyStore = Server.class.getResourceAsStream("/keystore_server");
// Grizzly ssl configuration
SSLContextConfigurator sslContext = new SSLContextConfigurator();
// set up security context
sslContext.setKeyStoreBytes(ByteStreams.toByteArray(keyStore)); // contains server keypair
sslContext.setKeyStorePass("asdfgh");
sslContext.setTrustStoreBytes(ByteStreams.toByteArray(trustStore)); // contains client certificate
sslContext.setTrustStorePass("asdfgh");
ResourceConfig rc = new ResourceConfig();
rc.register(new LoggingFilter(LOGGER, true));
rc.registerClasses(RootResource.class, SecurityFilter.class, AuthenticationExceptionMapper.class);