为JBoss jmx-console增加验证
一、打开jmx-console安全控制
1.在deploy/jmx-console.war/WEB-INF/目录下,找到jboss-web.xml,解开对
<security-domain>java:/jaas/jmx-console</security-domain>
的注释。
2.在同一目录下,打开web.xml。取消对
<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.在server/xxx/conf/props目录下,修改里的jmx-console-roles.properties,jmx-console-users.properties,用户名密码。