Security domain not found in WildFly Elytron

我与影子孤独终老i 提交于 2020-01-15 04:23:26

问题


In Wildfly 14.0.1, I have configured a security realm ProxyRealm in the console, I have used the CLI to configure a security domain ProxyDomain that uses the ProxyRealm, and then I have even created an Undertow application security domain ProxyDomain that uses Elytron's ProxyDomain.

I have a simple ear with only one jar that contains an EJB, and to that ear META-INF folder I have added a jboss-app.xml with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-app>
   <security-domain>ProxyDomain</security-domain>
</jboss-app>

When I deploy the application, I get the following message:

2019-01-07 13:48:04,920 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {  
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.security.security-domain.ProxyDomain"],  
    "WFLYCTL0180: Services with missing/unavailable dependencies" => [  
        "jboss.ws.endpoint.\"prototipoEarCitas-0.0.1-SNAPSHOT.ear\".\"prototipoEjbCitas-0.0.1-SNAPSHOT.jar\".ApiCitasPublicoImpl is missing [jboss.security.security-domain.ProxyDomain]",  
        "jboss.deployment.subunit.\"prototipoEarCitas-0.0.1-SNAPSHOT.ear\".\"prototipoEjbCitas-0.0.1-SNAPSHOT.jar\".component.ApiCitasPublicoImpl.CREATE is missing [jboss.security.security-domain.ProxyDomain]"  
    ]  
}

What am I missing?


回答1:


I was getting the same error few hours ago, try with

<?xml version="1.0" encoding="UTF-8"?>
<jboss-app>
   <security-domain>java:/jaas/ProxyDomain</security-domain>
</jboss-app>

Also, you need to configure standalone.xml according your database and security setting

<security-domain name="ProxyDomain">
                    <authentication>
                        <login-module code="Remoting" flag="optional">
                            <module-option name="password-stacking" value="useFirstPass"/>
                        </login-module>
                        <login-module code="Database" flag="required">
                            <module-option name="dsJndiName" value="java:jboss/yourDataSourceReference"/>
                            <module-option name="principalsQuery" value="select pas_usr from USER where u.ide_usr=UPPER(?) and u.ind_act='YES'"/>
                            <module-option name="rolesQuery" value="select rol,'Roles' from USER where ide_usr=UPPER(?) and ind_act='YES'"/>
                            <module-option name="password-stacking" value="useFirstPass"/>
                            <module-option name="hashAlgorithm" value="MD5"/>
                            <module-option name="hashEncoding" value="base64"/>
                        </login-module>
                    </authentication>
                </security-domain>


来源:https://stackoverflow.com/questions/54075288/security-domain-not-found-in-wildfly-elytron

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!