drools-guvnor默认的界面登录没有用户名和密码的验证,通过查阅资料,实验,下面的配置方法可行,相信能帮助使用BRMS的朋友。
详细步骤如下:
(1)关闭jboss server.找到$JBOSS_SERVER/conf/login-config.xml
(2)<application-policy name = "other">中添加module
<application-policy name = "other">
<authentication>
<login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required">
<module-option name="usersProperties">props/guvnor-users.properties</module-option>
<module-option name="rolesProperties">props/guvnor-roles.properties</module-option>
</login-module>
</authentication>
</application-policy>
(3)新建属性文件
$JBOSS_SERVER/conf/props/guvnor-users.properties
$JBOSS_SERVER/conf/props/guvnor-roles.properties
(4)在$JBOSS_SERVER/conf/props/guvnor-users.properties中添加
admin1=123456
在$JBOSS_SERVER/conf/props/guvnor-roles.properties中添加
admin1=admin
(5)drools-guvnor.war\WEB-INF\components.xml修改
注释掉 <security:identity authenticate-method="#{defaultAuthenticator.authenticate}"/>
启动 <security:identity authenticate-method="#{authenticator.authenticate}" jaas-config-name="other"/>
(6)启动JBOSS.