选择应用服务:default
1、进入 default\deploy\management\console-mgr.sar\web-console.war\WEB-INF 目录下
路径:default\deploy\management\console-mgr.sar\web-console.war\WEB-INF\jboss-web.xml
查看 jboss-web.xml 如下(默认无需更改)
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE jboss-web
PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
<jboss-web>
<!-- Uncomment the security-domain to enable security. You will
need to edit the htmladaptor login configuration to setup the
login modules used to authentication users.-->
<security-domain>java:/jaas/web-console</security-domain>
<!-- The war depends on the -->
<depends>jboss.admin:service=PluginManager</depends>
</jboss-web>
2、修改jboss-web.xml 同级目录下web.xml
路径:default\deploy\management\console-mgr.sar\web-console.war\WEB-INF\web.xml
找到<security-constraint>节点
增加子节点:
<http-method>GET</http-method>
<http-method>POST</http-method>
具体修改如下:
<security-constraint>
<web-resource-collection>
<web-resource-name>HtmlAdaptor</web-resource-name>
<description>An example security config that only allows users with the
role JBossAdmin to access the HTML JMX console web application
</description>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>JBossAdmin</role-name>
</auth-constraint>
</security-constraint>
3、进入/jboss-eap-4.3/jboss-as/server/default/conf 目录下
路径:default\config\login-config.xml
查看 login-config.xml
如下:
<application-policy name = "jmx-console">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required">
<module-option name="usersProperties">jmx-console-users.properties</module-option>
<module-option name="rolesProperties">jmx-console-roles.properties</module-option>
</login-module>
</authentication>
</application-policy>
4、进入 login-config.xml 同级的props目录下
路径:default\config\props
4.1 创建 web-console-roles.properties文件
增加内容:
admin=admin
4.2 创建 web-console-users.properties文件
增加内容:
admin=JBossAdmin,HttpInvoker
5、回到login-config.xml,修改其内容如下:
路径:default\config\login-config.xml
<application-policy name="JBossWS">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag="required">
<module-option name="usersProperties">props/jbossws-users.properties</module-option>
<module-option name="rolesProperties">props/jbossws-roles.properties</module-option>
<module-option name="unauthenticatedIdentity">anonymous</module-option>
</login-module>
</authentication>
</application-policy>
分享到:
相关推荐
NULL 博文链接:https://iffiffj.iteye.com/blog/1404148
JBOSS4设置控制台jmx-console登录密码
JBOSS jBPM4.3源码(jBPM是公开源代码项目,它使用要遵循 Apache License。)
最近项目需要使用jboss-eap-4.3,因此下载了一个安装试试。 安装完运行run.bat启动,然后登陆http://localhost:8080/web-console/,弹出登录对话框,奇怪的是,无论输入什么用户名和密码,admin=admin也好,空也好...
JBossTools-ALL-win32-3.0.0.CR2-
Jboss控制台jmx-console的安全设置
概述JBOSS4.3企业级程序运用平台,演示其特征.....
JBOSS 7 热部署文件
atmosphere-compat-jbossweb-1.0.14-2-sources.jar
atmosphere-compat-jbossweb-1.0.14-2.jar
atmosphere-compat-jbossweb-2.0.0-sources.jar
atmosphere-compat-jbossweb-1.0.15-sources.jar
atmosphere-compat-jbossweb-1.0.14-sources.jar
atmosphere-compat-jbossweb-1.0.13-sources.jar
atmosphere-compat-jbossweb-1.0.12-sources.jar
atmosphere-compat-jbossweb-1.0.9-sources.jar
atmosphere-compat-jbossweb-1.0.8-sources.jar
atmosphere-compat-jbossweb-1.0.7-sources.jar
atmosphere-compat-jbossweb-1.0.6-sources.jar
atmosphere-compat-jbossweb-1.0.5-sources.jar