Marged
Marged

Reputation: 10953

Run selenium server using SSL

Please note that my question is not about testing ssl/tls secured http links and not about making Webdriver accept certain certificates.

My question is about how to make the embedded Jetty of selenium standalone server provide a secured https connection.

In the sourcecode of 3.4.0 I can see this section:

HttpConfiguration httpConfig = new HttpConfiguration();
httpConfig.setSecureScheme("https");
httpConfig.setSecurePort(config.port);
log.info("Will listen on " + config.port);
ServerConnector http = new ServerConnector(server, new HttpConnectionFactory(httpConfig));
http.setPort(config.port);
server.addConnector(http);

From the logs I can see that this code is reached but the connection is not secured (how should it be, there isn't even a certificate involved):

10:57:00.023 INFO - Selenium build info: version: '3.4.0', revision: 'unknown'
10:57:00.024 INFO - Launching Selenium Grid hub
2017-05-09 10:57:01.707:INFO::main: Logging initialized @2044ms to org.seleniumhq.jetty9.util.log.StdErrLog
10:57:01.721 INFO - Will listen on 4444
2017-05-09 10:57:01.800:INFO:osjs.Server:main: jetty-9.4.3.v20170317
2017-05-09 10:57:01.851:INFO:osjs.session:main: DefaultSessionIdManager workerName=node0

Because of company security governance we are forced to provide all services secured. This means I need to secure at least the hub of selenium grid, nodes would be perfect too. I know that I could do some tunneling, proxying or ipsec but I want to avoid this complexity if possible.

I even tried if Jetty somehow "automagically" knows to respond accordingly if ssl is used but as expected this fails: failing curl because of missing ssl/tls support

Upvotes: 2

Views: 1282

Answers (0)

Related Questions