2008年3月31日

JBoss jmx-console security


cd ${JBOSS_HOME}/server/default/deploy/jmx-console.war/WEB-INF
edit web.xml
find security-constraint tag
remove comment

<!-- A security constraint that restricts access to the HTML JMX console
to users with the role JBossAdmin. Edit the roles to what you want and
uncomment the WEB-INF/jboss-web.xml/security-domain element to enable
secured access to the HTML JMX console.
-->
<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>

save web.xml

edit jboss-web.xml
remove comment

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

save jboss-web.xml

edit cd ${JBOSS_HOME}/server/default/conf/props/jmx-console-users.properties
change password

admin=${password}

save jmx-console-users.properties

run JBoss
${JBOSS_HOME}/bin/run.sh -b 0.0.0.0
http://localhost:8080/jmx-console/

沒有留言:

網誌存檔