我正在尝试将一个项目从使用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"
}
然后按照文档中的步骤创建密钥存储库、密钥管理器、server-ssl-context,并切换http -侦听器。然后重新加载服务器。
/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-listener:
/subsystem=undertow/server=default-server/https-listener=https:read-attribute(name=security-realm)
但是结果是未定义的。
{
"outcome" => "success",
"result" => "Undefined"
}
当我检查standalone-full-ha.xml时,SSLContext就在那里。是否有其他方法可以检查迁移是否正常?
它正在做你告诉它做的事情,你正在调用undefine,然后读取你未定义的