@Before
    public void setupJetty() throws Exception {
        server = new Server();
        server.setStopAtShutdown(true);

        http_config = new HttpConfiguration();
        http_config.setSecureScheme("https");

        jettySslContextFactory = new SslContextFactory.Server();
        jettySslContextFactory.setTrustStorePath(getResourcePath("2waytest/mutual_trust_via_ca/common_ts.jks"));
        jettySslContextFactory.setTrustStorePassword("changeme");
        jettySslContextFactory.setKeyStorePath(getResourcePath("2waytest/mutual_trust_via_ca/service_ks.jks"));
        jettySslContextFactory.setKeyStorePassword("changeme");
        jettySslContextFactory.setKeyManagerPassword("changeme");
        // Use default trust store
        // No client auth
        jettySslContextFactory.setNeedClientAuth(false);
        jettySslContextFactory.setWantClientAuth(false);

        HttpConfiguration https_config = new HttpConfiguration(http_config);
        https_config.addCustomizer(new SecureRequestCustomizer());

        ServerConnector sslConnector = new ServerConnector(server,
            new SslConnectionFactory(jettySslContextFactory,"http/1.1"),
            new HttpConnectionFactory(https_config));
        sslConnector.setPort(8008);

        server.addConnector(sslConnector);
        // Thanks to Jetty getting started guide.
        server.setHandler(new AbstractHandler() {

            @Override
            public void handle(String target, Request baseRequest, HttpServletRequest request,
                    HttpServletResponse response) throws IOException, ServletException {

                jettyRequestAttributes = new HashMap<>();
                Enumeration<String> requestAttrNames = request.getAttributeNames();

                while (requestAttrNames.hasMoreElements()) {
                    String elem = requestAttrNames.nextElement();
                    jettyRequestAttributes.put(elem, request.getAttribute(elem).toString());
                    System.out.println(elem + " - " + request.getAttribute(elem).toString());
                }

                response.setStatus(HttpServletResponse.SC_OK);
                baseRequest.setHandled(true);
                response.getWriter().println("apiman");
            }
        });
    }
Tests various standard TLS scenarios, in which the client is *not* authenticated. Some of these include
authentication of the server certificate, whilst others are all trusting (devmode).

@author Marc Savy <msavy@redhat.com>
gateway/platforms/servlet/src/test/java/io/apiman/gateway/platforms/servlet/auth/tls/CipherAndProtocolSelectionTest.java