我有一个新的Wildfly 11实例,我正在尝试在Elytron中设置基于属性文件的身份验证。我使用Standalone-full.xml并在IDE外部手动部署应用程序。
https://docs.jboss.org/author/display/WFLY/Properties+File+Based+Authentication+Migration
我创建了带有名称值对和包含#$REALM_NAME=myAppPropRealm$的myApp-user和myApp-roles属性文件
我运行了以下CLI命令来创建
创建道具领域
/subsystem=elytron/properties-realm=myAppPropRealm:add(groups-attribute=groups,groups-properties={path=myApp-roles.properties,relative-to=jboss.server.config.dir},users-properties={path=myApp-users.properties,relative-to=jboss.server.config.dir,纯文本=true})
配置安全-域
/subsystem=elytron/security-domain=myAppSecurityDomain:add(realms={realm=myAppPropRealm,角色解码器=组到角色},默认领域=myAppPropRealm,权限映射器=默认权限映射器)
配置http-authentication-factory
/subsystem=elytron/http-authentication-factory=myApp-http-auth:add(http-server-mechanism-factory=global,安全域=myAppSecurityDomain,mechanism-configurations=[{mechanism-name=BASIC,mechanism-realm-configurations={realm-name=myApp_ApplicationDomain}}])
在Undertow中配置应用安全域
/subsystem=undertow/application-security-domain=myApp_ApplicationDomain:add(http-authentication-factory=myApp-http-auth)
JBoss-web.xml </jboss-web> <security-domain>myApp_ApplicationDomain</security-domain> </jboss-web>
当我的应用程序尝试部署时,我收到以下错误
2018-11-29 09:06:55,695错误部署"jboss.security.security-domain.myApp_ApplicationDomain",:操作("deploy")失败-地址:(("deployment“org.jboss.as.controller.management-operation "MyApplication-ws.war")) -失败描述:{ "WFLYCTL0412:未安装的必需服务:”=>“jboss.security.security-domain.myApp_ApplicationDomain”,"WFLYCTL0180:缺少/不可用依赖项的服务“=> [
我怀疑这是因为我没有定义'myApp_ApplicationDomain‘,但这就是我被卡住的地方。我应该运行哪些命令来添加/引用myApp_ApplicationDomain?
发布于 2018-12-12 20:57:28
出于某种原因,Wildfly正在登录遗留安全域jboss.security.security-domain.myApp_ApplicationDomain。但是看起来你已经正确地声明了myApp_ApplicationDomain。很可能你正在使用myApp_ApplicationDomain,而不是在底层子系统的某个地方。
https://stackoverflow.com/questions/53543069
复制相似问题