wildfly 10.1 ssl misconfigured: browser handshake error. Where the error?
milspec Feb 28, 2017 5:08 PMHi all,
I likely have missed an obvious setting here, so I apologize in advance
Context
I've tried to set up wildfly 10.1 to terminate SSL per the configuration below
Result
Wildfly starts up ok, however my browser cannot connect. Firefox shows "The connection to localhost was interrupted while the page was loading.". Openssl shows a handshake failure. [I associate a 'handshake error' with this scenario: browser tries to connect w/ SSL, but the server sends back 'plain http']
Open ssl output:
$ openssl s_client -connect ${HOST}:${PORT} -showcerts </dev/null
140074818008736:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:177:
Questions
-I've pasted my configuraiton below: security-realm, socket-binding, listener. What am I missing?
-what formats does wildfly support for public cert files (jks/x509/pkcs7/pkcs12)
thanks in advance
Configurations
Security Realm
<security-realm name="SslRealm">
<server-identities>
<ssl>
<keystore path="/home/joedeveloper/ssl_files/learn.better.jks"
keystore-password="learn.better.password"
key-password="learn.better.password"
alias="learn.better.alias"
/>
</ssl>
</server-identities>
Https Listener
<subsystem xmlns="urn:jboss:domain:undertow:3.0">
<buffer-cache name="default"/>
<server name="default-server" >
<https-listener name="default-ssl" socket-binding="https" security-realm="SslRealm"/>
<http-listener name="default" socket-binding="http" redirect-socket="https" worker="http-worker"
socket binding
<socket-binding name="https" port="${jboss.https.port:443}"/>
Certificate Generation
SSL_KEY_ALIAS=learn.better.alias
SSL_KEY_PASSWORD=learn.better.password
SSL_KEYSTORE_PASSWORD=learn.better.password
SSL_KEYSTORE_FILE=learn.better.jks
keytool \
-alias ${SSL_KEY_ALIAS} \
-genkey \
-keyalg RSA \
-keypass ${SSL_KEY_PASSWORD} \
-keystore ${SSL_KEYSTORE_FILE} \
-sigalg MD5withRSA \
-storepass ${SSL_KEYSTORE_PASSWORD} \
-validity 9999
Reference
SSL setup guide - WildFly 8 - Project Documentation Editor
Wildfly 9 http to https - Stack Overflow
Configuring SSL in Wildfly 8/9/10 | Real Life Java
Setting up SSL/TLS with Wildfly 10
thanks in advance