为SSL配置Wildfly Swarm [英] Configure Wildfly Swarm for SSL

查看:109
本文介绍了为SSL配置Wildfly Swarm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将Wildfly Swarm配置为使用SSL启用HTTPS连接.我的应用程序只有一个REST API端点(JAX-RS).通过使用standalone.xml进行配置,我找到了一些有关经典Wildfy的信息. 我知道我也可以使用standalone.xml,但是我不确定是否可以将此配置也放入project-defaults.yml中.

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.

推荐答案

肯定可以在project-defaults.yml中配置SSL.我在这里有一个示例项目: https://github .com/Ladicek/swarm-test-suite/tree/master/protocols/https .它不使用JAX-RS,仅使用Servlet,但应该足够.

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.

project-defaults.yml的相关部分如下所示:

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

如果您的密钥库包含一个单个项,其密码与密钥库密码相同,则不需要key.alias属性.在这种情况下,这就足够了:

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

这篇关于为SSL配置Wildfly Swarm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆