---
title: "为JBoss jmx-console增加验证"
author: "java-boy"
date: "2009-11-30T11:07:37Z"
tags: []
categories: ["企业架构"]
slug: "jboss-jmx-console"
draft: false
lastmod: "2010-03-03T11:43:50Z"
id: 537058
url: "https://java-boy.iteye.com/blog/537058"
---

一、打开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，用户名密码。