I try to configure Wildfly Swarm to use SSL to enable HTTPS Connections. My Application has only an REST API Endpoint (JAX-RS). I found some information about classic Wildfy, using the standalone.xml for configuration. I understand that I could use standalone.xml as well, but I am not sure if I can put this configuration ind the project-defaults.yml as well.
Configuring SSL in project-defaults.yml
is definitely possible. I have an example project doing this here: https://github.com/Ladicek/swarm-test-suite/tree/master/protocols/https. It doesn't use JAX-RS, merely Servlet, but should be enough.
The relevant part of project-defaults.yml
looks like this:
swarm:
https:
keystore:
path: ${project.build.directory}/keystore.jks
password: password
key:
alias: httpskey
password: password
EDIT: if you have a keystore with a single entry whose password is the same as the keystore password, you don't need the key.alias
and key.password
properties. In such case, this would be perfectly enough:
swarm:
https:
keystore:
path: ${project.build.directory}/keystore.jks
password: password
(This is actually the case in the example project, so you can clone it and try :-) )