[jboss-cvs] JBossAS SVN: r101737 - in branches/JBPAPP_4_2_0_GA_CP: tomcat/src/webapps/ROOT.war/WEB-INF and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Mar 2 16:07:31 EST 2010
Author: bshim
Date: 2010-03-02 16:07:29 -0500 (Tue, 02 Mar 2010)
New Revision: 101737
Added:
branches/JBPAPP_4_2_0_GA_CP/tomcat/src/webapps/ROOT.war/WEB-INF/jboss-web.xml
Modified:
branches/JBPAPP_4_2_0_GA_CP/build/build.xml
branches/JBPAPP_4_2_0_GA_CP/tomcat/src/webapps/ROOT.war/WEB-INF/web.xml
Log:
JBPAPP-3633 added security constraints for ROOT.war status servlet
Modified: branches/JBPAPP_4_2_0_GA_CP/build/build.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/build/build.xml 2010-03-02 20:06:10 UTC (rev 101736)
+++ branches/JBPAPP_4_2_0_GA_CP/build/build.xml 2010-03-02 21:07:29 UTC (rev 101737)
@@ -1177,6 +1177,14 @@
<ant antfile="build.xml" target="updateSecurity">
<property name="config.file" value="deploy/jmx-console.war/WEB-INF/jboss-web.xml" />
</ant>
+
+ <ant antfile="build.xml" target="updateSecurity">
+ <property name="config.file" value="deploy/jboss-web.deployer/ROOT.war/WEB-INF/jboss-web.xml" />
+ </ant>
+
+ <ant antfile="build.xml" target="updateSecurity">
+ <property name="config.file" value="deploy/jboss-web.deployer/ROOT.war/WEB-INF/web.xml" />
+ </ant>
<ant antfile="build.xml" target="updateSecurity">
<property name="config.file" value="deploy/jmx-console.war/WEB-INF/web.xml" />
@@ -1277,6 +1285,8 @@
<fixcrlf srcdir="../console/src/resources/webconsole.war/WEB-INF" includes="jboss-web.xml" eol="crlf"/>
<fixcrlf srcdir="../console/src/resources/webconsole.war/WEB-INF" includes="web.xml" eol="crlf"/>
<fixcrlf srcdir="../console/src/resources/webconsole.war/WEB-INF/classes" includes="web-console-users.properties" eol="crlf"/>
+ <fixcrlf srcdir="../tomcat/src/webapps/ROOT.war/WEB-INF/" includes="jboss-web.xml" eol="crlf"/>
+ <fixcrlf srcdir="../tomcat/src/webapps/ROOT.war/WEB-INF/" includes="web.xml" eol="crlf"/>
</target>
<!-- set proxy settings -->
Added: branches/JBPAPP_4_2_0_GA_CP/tomcat/src/webapps/ROOT.war/WEB-INF/jboss-web.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/tomcat/src/webapps/ROOT.war/WEB-INF/jboss-web.xml (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/tomcat/src/webapps/ROOT.war/WEB-INF/jboss-web.xml 2010-03-02 21:07:29 UTC (rev 101737)
@@ -0,0 +1,22 @@
+<?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
+ at SECURECONF
+ login modules used to authentication users. -->
+ at ENDSECURECONF
+ at UNSECCONF
+ login modules used to authentication users.
+ at ENDUNSECCONF
+ <security-domain>java:/jaas/web-console</security-domain>
+ at UNSECCONF
+ -->
+ at ENDUNSECCONF
+
+</jboss-web>
Modified: branches/JBPAPP_4_2_0_GA_CP/tomcat/src/webapps/ROOT.war/WEB-INF/web.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/tomcat/src/webapps/ROOT.war/WEB-INF/web.xml 2010-03-02 20:06:10 UTC (rev 101736)
+++ branches/JBPAPP_4_2_0_GA_CP/tomcat/src/webapps/ROOT.war/WEB-INF/web.xml 2010-03-02 21:07:29 UTC (rev 101737)
@@ -17,4 +17,41 @@
<servlet-name>Status Servlet</servlet-name>
<url-pattern>/status</url-pattern>
</servlet-mapping>
+
+ <!-- A security constraint that restricts access to the status servlet
+ 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
+ at SECURECONF
+ secured access to the HTML JMX console. -->
+ at ENDSECURECONF
+ at UNSECCONF
+ secured access to the HTML JMX console.
+ at ENDUNSECCONF
+
+ <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>/status/*</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>
+ at UNSECCONF
+ -->
+ at ENDUNSECCONF
+
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>Tomcat STATUS</realm-name>
+ </login-config>
+
+ <security-role>
+ <role-name>JBossAdmin</role-name>
+ </security-role>
</web-app>
More information about the jboss-cvs-commits
mailing list