Configure Wildfly Swarm for SSL

南笙酒味 提交于 2019-12-11 14:21:59

问题


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.


回答1:


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 :-) )



来源:https://stackoverflow.com/questions/49294778/configure-wildfly-swarm-for-ssl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!