0
votes

How to add ssl trustStore and trustStorePassword on thorntail application, using config project-defaults yaml or using wildfly standalone.xml.

This how to add keyStore and its keyStorePassword using yaml

thorntail:
  management:
    http:
      port: 8010
    security-realms:
      ApplicationRealm:
        jaas-authentication:
          name: OSecDom
        ssl-server-identity:
          alias: ${private.key.alias}
          keystore-provider: ${javax.net.ssl.keyStoreType}
          keystore-path: ${javax.net.ssl.keyStore}
          keystore-password: ${javax.net.ssl.keyStorePassword}

Is it possible with thorntail, without having to add ssl trustStore as a Java - JVM argurments like below.

RUN_ARGS="-jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -Djavax.net.ssl.trustStore=/opt/myscerts/cacerts -Djavax.net.ssl.trustStorePassword=changeit  ${PROJECT_ARTIFACT} -P ${PROJECT_PROP} -s ${PROJECT_CONFIG}"
/usr/lib/java/jdk-11.0.5/bin/java $RUN_ARGS $*
1

1 Answers

1
votes

Adding a truststore is possible:

thorntail:
  management:
    security-realms:
      my-ssl-realm:
        ssl-server-identity:
          keystore-path: server-keystore.jks
          keystore-password: server-password
          alias: server-key
          key-password: server-password
        truststore-authentication:
          keystore-path: server-truststore.jks
          keystore-password: server-password

See https://github.com/rhoar-qe/thorntail-test-suite/tree/master/protocols for a couple of complete examples, using both legacy security and Elytron.