gpt4 book ai didi

jboss - 如何将 https-listener 添加到 WildFly 的默认服务器?

转载 作者:行者123 更新时间:2023-12-03 21:19:58 27 4
gpt4 key购买 nike

我正在关注以下教程:https://github.com/jbosstm/quickstart/tree/master/XTS/ssl

使用 jboss-cli 成功添加了安全领域:

/core-service=management/security-realm=SSLRealm:add()
/core-service=management/security-realm=SSLRealm/server-identity=ssl:add( \
keystore-path=./standalone/configuration/server.keystore, \
keystore-password=client, \
alias=client)

当我尝试添加 https-listener 时:
/subsystem=undertow/server=default-server/https-listener=https:add( \
socket-binding="https", security-realm="SSLRealm" \
)

WildFly 抛出异常:
{
"outcome" => "failed",
"failure-description" => "JBAS014750: Operation handler failed to complete",
"rolled-back" => true
}

任何想法如何添加 https-listener ?

最佳答案

以下是在 WildFly 8.1 上对我有用的内容:

添加一个领域:

[standalone@localhost:9990 /] /core-service=management/security-realm=WebSocketRealm:add()
{"outcome" => "success"}

配置它:
[standalone@localhost:9990 /] /core-service=management/security-realm=WebSocketRealm/server-identity=ssl:add(keystore-path=websocket.keystore, keystore-relative-to=jboss.server.config.dir, keystore-password=websocket)
{
"outcome" => "success",
"response-headers" => {
"operation-requires-reload" => true,
"process-state" => "reload-required"
}
}

添加一个新的监听器:
[standalone@localhost:9990 /] /subsystem=undertow/server=default-server/https-listener=https:add(socket-binding=https, security-realm=WebSocketRealm)
{
"outcome" => "success",
"response-headers" => {"process-state" => "reload-required"}
}

然后重新启动:
[standalone@localhost:9990 /] reload

这将以下片段添加到 standalone/configuration/standalone.xml:
<security-realm name="WebSocketRealm">
<server-identities>
<ssl>
<keystore path="websocket.keystore" relative-to="jboss.server.config.dir" keystore-password="websocket"/>
</ssl>
</server-identities>
</security-realm>


<https-listener name="https" socket-binding="https" security-realm="WebSocketRealm"/>

您使用的是哪个版本的 WildFly?

关于jboss - 如何将 https-listener 添加到 WildFly 的默认服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24305910/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com