我正在尝试将一个项目从使用Legacy Security迁移到使用Elytron。我按照文档中的步骤进行了操作:https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.1/html/migration_guide/migrating_to_elytron#migrate_ssl_configurations
我首先通过运行以下命令进行了验证:
/subsystem=undertow/server=default-server/https-listener=https:read-attribute(name=security-realm)
结果:
{
"outcome" => "success",
"result" => "ApplicationRealm"
}
然后,我按照文档中的步骤创建了密钥库、密钥管理器、服务器SSL上下文,并切换了https侦听器,重新加载了服务器。
/subsystem=elytron/key-store=KeyStore:add(path=$keystore_file,type=JKS,credential-reference={clear-text=$keystore_password})
/subsystem=elytron/key-manager=KeyManager:add(key-store=KeyStore,credential-reference={clear-text=$keystore_password})
/subsystem=elytron/server-ssl-context=SSLContext:add(key-manager=KeyManager)
batch
/subsystem=undertow/server=default-server/https-listener=https:undefine-attribute(name=security-realm)
/subsystem=undertow/server=default-server/https-listener=https:write-attribute(name=ssl-context,value=SSLContext)
run-batch
然后我再次检查了https侦听器:
/subsystem=undertow/server=default-server/https-listener=https:read-attribute(name=security-realm)
但结果并不明朗。
{
"outcome" => "success",
"result" => "Undefined"
}
当我检查standalone-full-ha.xml时,SSLContext就在那里。有没有其他方法来检查迁移是否正常?
1条答案
按热度按时间luaexgnf1#
它完全按照你告诉它的去做,你调用undefine,然后读回你未定义的内容