【问题标题】:Wildfly 11 Elytron - Properties File Based Authentication failing with required services not installedWildfly 11 Elytron - 基于属性文件的身份验证失败,未安装所需的服务
【发布时间】:2019-05-01 18:07:40
【问题描述】:

我有一个 Wildfly 11 的新实例,我正在尝试在 Elytron 中设置基于属性文件的身份验证。我正在使用 Standalone-full.xml 并在 IDE 之外手动部署应用程序。

https://docs.jboss.org/author/display/WFLY/Properties+File+Based+Authentication+Migration

我使用名称值对创建了 myApp-user 和 myApp-roles 属性文件,并包含了 #$REALM_NAME=myAppPropRealm$

我运行了以下 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,plain-text=true})

配置安全域

/subsystem=elytron/security-domain=myAppSecurityDomain:add(realms=[{realm=myAppPropRealm,role-decoder=groups-to-roles}],default-realm=myAppPropRealm,permission-mapper=default-permission-映射器)

配置http-authentication-factory

/subsystem=elytron/http-authentication-factory=myApp-http-auth:add(http-server-mechanism-factory=global,security-domain=myAppSecurityDomain,mechanism-configurations=[{mechanism-name=BASIC,机制领域配置=[{领域名称=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 错误 [org.jboss.as.controller.management-operation](控制器引导线程)​​WFLYCTL0013:操作(“部署”)失败 - 地址:([(“部署” => "MyApplication-ws.war")]) - 失败描述:{ "WFLYCTL0412: 未安装的必需服务:" => ["jboss.security.security-domain.myApp_ApplicationDomain"], “WFLYCTL0180:缺少/不可用依赖项的服务”=> [

我怀疑这是因为我没有定义“myApp_ApplicationDomain”,但这是我卡住的地方。我运行什么命令来添加/引用 myApp_ApplicationDomain?

【问题讨论】:

    标签: wildfly


    【解决方案1】:

    Wildfly 出于某种原因正在寻找遗留安全域 jboss.security.security-domain.myApp_ApplicationDomain。但似乎你已经正确地声明了 myApp_ApplicationDomain 。很可能您在 undertow 子系统之外的某个地方使用 myApp_ApplicationDomain。

    【讨论】:

      猜你喜欢
      • 2019-11-04
      • 1970-01-01
      • 2022-06-13
      • 1970-01-01
      • 1970-01-01
      • 2018-02-05
      • 2015-07-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多