JAAS 和 Wildfly10

JAAS and Wildfly10

我一直在尝试使用实现 javax.security.auth.spi.LoginModule 的自定义 class(CustomLoginModule) 并将其部署在 wildfly 10 中。我已将配置放在 standalone.xml如下所述。我无法弄清楚 CustomLoginModule 从未被调用的原因。我启用了跟踪并能够找出 class 从 Wildfly10.

的模块目录加载

独立配置:

 <security-domain name="xxxx">
                    <authentication>
<login-module code="com.test.CustomLoginModule" flag="required">    
<module-option name="userQuery" value="select USER_ID from FH_USER_TE where USER_ID=? and PASSWORD=?"/>

<module-option name="roleQuery" value="select ROLE from FH_USER_TE where USER_ID=?"/>                       
</login-module>
</authentication>

如果我能在这里得到一些advice/suggestions来推动它前进就太好了。

同样在 TOMCAT 8

中完美运行

谢谢, 德瓦帕延

I am able to invoke my CustomLoginModule Successfully by removing the jar from the modules directory of Wildfly 10. The .war bundles the CustomLoginModule class . I am not sure if this is the right way but it works. The options in CustomLoginModule although comes as "jboss.security.security_domain=fusionHiringLoginModule".

the sql queries have to be a part of module-option as below

<security-domain name="xxxxx" cache-type="default">
 <authentication>
 <login-module code="com.test.CustomLoginModule" flag="required">
<module-option name="userQuery" value="select userId from tableName where USER_ID=? and PASSWORD=?" />
<module-option name="roleQuery" value="select role from table where USER_ID=?"  />
</login-module>
</authentication>
</security-domain>

Thanks 

Dwaipayan