首页 > 解决方案 > 如何在 Wildfly swarm 中禁用 TLS 1.0

问题描述

刚刚发现在 Wildfly Swarm 2018.5.0 中,我们无法禁用旧的 TLSv1.0 和 TLSv1.1 协议。

我们曾经在 2017.x 中这样做过;

-Dswarm.undertow.servers.default-server.https-listeners.https.enabled-protocols="TLSv1.2"

然而,现在,这给了我一个奇怪的信息,没有太多解释。

INFO  [org.wildfly.security] (ServerService Thread Pool -- 4) ELY00001: WildFly Elytron version 1.1.6.Final
ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 8) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "undertow"),
("server" => "default-server"),
("https-listener" => "https")
]) - failure description: "WFLYCTL0155: 'socket-binding' may not be null"
ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) "WFLYCTL0193: Failed executing subsystem undertow boot operations"
ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("parallel-subsystem-boot") failed - address: ([]) - failure description: "\"WFLYCTL0193: Failed executing subsystem undertow boot operations\""
FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

任何帮助将非常感激!

标签: sslwildflywildfly-swarm

解决方案


我不确定它曾经在哪个 2017.x 版本中为您工作,因为这个“问题”是由这一行引起的:https ://github.com/thorntail/thorntail/blob/2.5.0.Final/fractions /javaee/undertow/src/main/java/org/wildfly/swarm/undertow/runtime/HTTPSCustomizer.java#L78这已经有一段时间了。

基本上,如果您不配置任何 HTTPS 侦听器,default-https则会自动创建默认的侦听器(称为 )。但是您确实配置了一个(称为https),因此不会发生默认配置。您需要至少提供HTTPSCustomizer如上所示配置的两个属性。那是:

-Dswarm.undertow.servers.default-server.https-listeners.https.security-realm=SSLRealm
-Dswarm.undertow.servers.default-server.https-listeners.https.socket-binding=https
-Dswarm.undertow.servers.default-server.https-listeners.https.enabled-protocols="TLSv1.2"

推荐阅读