首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

JBoss 远程控制保险,远程控制认证

2012-07-24 
JBoss 远程控制安全,远程控制认证1. 为jms-console加上认证??? (1) 修改jboss4\server\default\deploy\jmx

JBoss 远程控制安全,远程控制认证

1. 为jms-console加上认证

??? (1) 修改jboss4\server\default\deploy\jmx-console.war\WEB-INF下的web.xml和jboss-web.xml

????????? 在web.xml中把<security-constraint>的注释去掉

<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>
?

?

?????????? 在jboss-web.xml中把<security-domain>注释去掉

?

<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/jmx-console</security-domain></jboss-web>

?

???? (2) 修改jboss4\server\default\conf\props下的两个配置文件jmx-console-roles.properties和jmx-console-users.properties,添加或修改用户和密码

?

?

2. 为web-console加上认证

??? (1)? 修改jboss4\server\default\deploy\management\console-mgr.sar\web-console.war\WEB-INF下的web.xml和jboss-web.xml

?????????????? 在web.xml中把<security-constraint>的注释去掉

?

<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>

?

?? 在jboss-web.xml中把<security-domain>注释去掉

?

<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></jboss-web>

?

(2) 修改jboss4\server\default\deploy\management\console-mgr.sar\web-console.war\WEB-INF\classes

下的两个配置文件web-console-roles.properties和web-console-users.properties,添加或修改用户和密码

?

注:修改了用户名后,jmx-console-roles.properties和web-console-roles.properties 里面Role 对应的用户名也要修改;如果不对应进行修改是登录不了的。

?

热点排行