[jboss-cvs] JBossAS SVN: r105422 - in branches/JBPAPP_5_1: console/src/resources/webconsole.war/WEB-INF and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon May 31 16:04:09 EDT 2010


Author: fnasser at redhat.com
Date: 2010-05-31 16:04:08 -0400 (Mon, 31 May 2010)
New Revision: 105422

Added:
   branches/JBPAPP_5_1/tomcat/src/main/org/jboss/net/ssl/JBossHttp11AprProtocol.java
   branches/JBPAPP_5_1/tomcat/src/webapps/ROOT.war/WEB-INF/jboss-web.xml
Modified:
   branches/JBPAPP_5_1/build/jbossas-5-disableauth.patch
   branches/JBPAPP_5_1/build/jbossas-5-enableauth.patch
   branches/JBPAPP_5_1/console/src/resources/webconsole.war/WEB-INF/web.xml
   branches/JBPAPP_5_1/tomcat/src/webapps/ROOT.war/WEB-INF/web.xml
   branches/JBPAPP_5_1/varia/src/resources/jmx/jmx-console-web.xml
Log:
merge -r104479:104776 ; CVE-2010-0738 - jmx-console fix ; JBPAPP-4181: adding encryption to SSLPassword attribute ; JBPAPP-3171 - tomcat status servlet secured with jmx-console security domain ; CVE-2010-0738 - web-console fix ; fixed enable and disable auth patches to compensate for removed lines for CVE-2010-0738

Modified: branches/JBPAPP_5_1/build/jbossas-5-disableauth.patch
===================================================================
--- branches/JBPAPP_5_1/build/jbossas-5-disableauth.patch	2010-05-31 19:53:46 UTC (rev 105421)
+++ branches/JBPAPP_5_1/build/jbossas-5-disableauth.patch	2010-05-31 20:04:08 UTC (rev 105422)
@@ -100,7 +100,7 @@
     <security-constraint>
       <web-resource-collection>
         <web-resource-name>HtmlAdaptor</web-resource-name>
-@@ -112,6 +111,7 @@
+@@ -110,6 +109,7 @@
         <role-name>JBossAdmin</role-name>
       </auth-constraint>
     </security-constraint>
@@ -147,7 +147,7 @@
  
     <security-constraint>
     <web-resource-collection>
-@@ -355,6 +354,7 @@
+@@ -353,6 +352,7 @@
     <role-name>JBossAdmin</role-name>
     </auth-constraint>
     </security-constraint>
@@ -277,7 +277,7 @@
     <security-constraint>
       <web-resource-collection>
         <web-resource-name>HtmlAdaptor</web-resource-name>
-@@ -112,6 +111,7 @@
+@@ -110,6 +109,7 @@
         <role-name>JBossAdmin</role-name>
       </auth-constraint>
     </security-constraint>
@@ -324,7 +324,7 @@
  
     <security-constraint>
     <web-resource-collection>
-@@ -355,6 +354,7 @@
+@@ -353,6 +352,7 @@
     <role-name>JBossAdmin</role-name>
     </auth-constraint>
     </security-constraint>
@@ -454,7 +454,7 @@
     <security-constraint>
       <web-resource-collection>
         <web-resource-name>HtmlAdaptor</web-resource-name>
-@@ -112,6 +111,7 @@
+@@ -110,6 +109,7 @@
         <role-name>JBossAdmin</role-name>
       </auth-constraint>
     </security-constraint>
@@ -501,7 +501,7 @@
  
     <security-constraint>
     <web-resource-collection>
-@@ -355,6 +354,7 @@
+@@ -353,6 +352,7 @@
     <role-name>JBossAdmin</role-name>
     </auth-constraint>
     </security-constraint>
@@ -618,7 +618,7 @@
     <security-constraint>
       <web-resource-collection>
         <web-resource-name>HtmlAdaptor</web-resource-name>
-@@ -112,6 +111,7 @@
+@@ -110,6 +109,7 @@
         <role-name>JBossAdmin</role-name>
       </auth-constraint>
     </security-constraint>
@@ -750,7 +750,7 @@
     <security-constraint>
       <web-resource-collection>
         <web-resource-name>HtmlAdaptor</web-resource-name>
-@@ -112,6 +111,7 @@
+@@ -110,6 +109,7 @@
         <role-name>JBossAdmin</role-name>
       </auth-constraint>
     </security-constraint>
@@ -793,3 +793,163 @@
              </list>
          </property>
          <depends>ConnectorMBean</depends>
+diff -Naur ./server/production/deploy/ROOT.war/WEB-INF/jboss-web.xml ./server/production/deploy/ROOT.war/WEB-INF/jboss-web.xml
+--- ./server/production/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 15:39:33.000000000 -0400
++++ ./server/production/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 16:09:03.000000000 -0400
+@@ -6,6 +6,7 @@
+    <!-- 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>
+    -->
+-   <security-domain>java:/jaas/jmx-console</security-domain>
++
+ </jboss-web>
+diff -Naur ./server/production/deploy/ROOT.war/WEB-INF/web.xml ./server/production/deploy/ROOT.war/WEB-INF/web.xml
+--- ./server/production/deploy/ROOT.war/WEB-INF/web.xml     2010-05-11 16:04:10.000000000 -0400
++++ ./server/production/deploy/ROOT.war/WEB-INF/web.xml     2010-05-11 16:07:20.000000000 -0400
+@@ -22,7 +22,7 @@
+    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>
+@@ -35,6 +35,7 @@
+        <role-name>JBossAdmin</role-name>
+      </auth-constraint>
+    </security-constraint>
++   -->
+
+    <login-config>
+       <auth-method>BASIC</auth-method>
+diff -Naur ./server/all/deploy/ROOT.war/WEB-INF/jboss-web.xml ./server/all/deploy/ROOT.war/WEB-INF/jboss-web.xml
+--- ./server/all/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 15:39:33.000000000 -0400
++++ ./server/all/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 16:09:03.000000000 -0400
+@@ -6,6 +6,7 @@
+    <!-- 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>
+    -->
+-   <security-domain>java:/jaas/jmx-console</security-domain>
++
+ </jboss-web>
+diff -Naur ./server/all/deploy/ROOT.war/WEB-INF/web.xml ./server/all/deploy/ROOT.war/WEB-INF/web.xml
+--- ./server/all/deploy/ROOT.war/WEB-INF/web.xml     2010-05-11 16:04:10.000000000 -0400
++++ ./server/all/deploy/ROOT.war/WEB-INF/web.xml     2010-05-11 16:07:20.000000000 -0400
+@@ -22,7 +22,7 @@
+    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>
+@@ -35,6 +35,7 @@
+        <role-name>JBossAdmin</role-name>
+      </auth-constraint>
+    </security-constraint>
++   -->
+
+    <login-config>
+       <auth-method>BASIC</auth-method>
+diff -Naur ./server/default/deploy/ROOT.war/WEB-INF/jboss-web.xml ./server/default/deploy/ROOT.war/WEB-INF/jboss-web.xml
+--- ./server/default/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 15:39:33.000000000 -0400
++++ ./server/default/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 16:09:03.000000000 -0400
+@@ -6,6 +6,7 @@
+    <!-- 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>
+    -->
+-   <security-domain>java:/jaas/jmx-console</security-domain>
++
+ </jboss-web>
+diff -Naur ./server/default/deploy/ROOT.war/WEB-INF/web.xml ./server/default/deploy/ROOT.war/WEB-INF/web.xml
+--- ./server/default/deploy/ROOT.war/WEB-INF/web.xml     2010-05-11 16:04:10.000000000 -0400
++++ ./server/default/deploy/ROOT.war/WEB-INF/web.xml     2010-05-11 16:07:20.000000000 -0400
+@@ -22,7 +22,7 @@
+    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>
+@@ -35,6 +35,7 @@
+        <role-name>JBossAdmin</role-name>
+      </auth-constraint>
+    </security-constraint>
++   -->
+
+    <login-config>
+       <auth-method>BASIC</auth-method>
+diff -Naur ./server/standard/deploy/ROOT.war/WEB-INF/jboss-web.xml ./server/standard/deploy/ROOT.war/WEB-INF/jboss-web.xml
+--- ./server/standard/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 15:39:33.000000000 -0400
++++ ./server/standard/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 16:09:03.000000000 -0400
+@@ -6,6 +6,7 @@
+    <!-- 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>
+    -->
+-   <security-domain>java:/jaas/jmx-console</security-domain>
++
+ </jboss-web>
+diff -Naur ./server/standard/deploy/ROOT.war/WEB-INF/web.xml ./server/standard/deploy/ROOT.war/WEB-INF/web.xml
+--- ./server/standard/deploy/ROOT.war/WEB-INF/web.xml     2010-05-11 16:04:10.000000000 -0400
++++ ./server/standard/deploy/ROOT.war/WEB-INF/web.xml     2010-05-11 16:07:20.000000000 -0400
+@@ -22,7 +22,7 @@
+    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>
+@@ -35,6 +35,7 @@
+        <role-name>JBossAdmin</role-name>
+      </auth-constraint>
+    </security-constraint>
++   -->
+
+    <login-config>
+       <auth-method>BASIC</auth-method>
+diff -Naur ./server/web/deploy/ROOT.war/WEB-INF/jboss-web.xml ./server/web/deploy/ROOT.war/WEB-INF/jboss-web.xml
+--- ./server/web/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 15:39:33.000000000 -0400
++++ ./server/web/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 16:09:03.000000000 -0400
+@@ -6,6 +6,7 @@
+    <!-- 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>
+    -->
+-   <security-domain>java:/jaas/jmx-console</security-domain>
++
+ </jboss-web>
+diff -Naur ./server/web/deploy/ROOT.war/WEB-INF/web.xml ./server/web/deploy/ROOT.war/WEB-INF/web.xml
+--- ./server/web/deploy/ROOT.war/WEB-INF/web.xml     2010-05-11 16:04:10.000000000 -0400
++++ ./server/web/deploy/ROOT.war/WEB-INF/web.xml     2010-05-11 16:07:20.000000000 -0400
+@@ -22,7 +22,7 @@
+    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>
+@@ -35,6 +35,7 @@
+        <role-name>JBossAdmin</role-name>
+      </auth-constraint>
+    </security-constraint>
++   -->
+
+    <login-config>
+       <auth-method>BASIC</auth-method>

Modified: branches/JBPAPP_5_1/build/jbossas-5-enableauth.patch
===================================================================
--- branches/JBPAPP_5_1/build/jbossas-5-enableauth.patch	2010-05-31 19:53:46 UTC (rev 105421)
+++ branches/JBPAPP_5_1/build/jbossas-5-enableauth.patch	2010-05-31 20:04:08 UTC (rev 105422)
@@ -40,7 +40,7 @@
     <security-constraint>
       <web-resource-collection>
         <web-resource-name>HtmlAdaptor</web-resource-name>
-@@ -111,7 +112,6 @@
+@@ -109,7 +110,6 @@
         <role-name>JBossAdmin</role-name>
       </auth-constraint>
     </security-constraint>
@@ -87,7 +87,7 @@
  
     <security-constraint>
     <web-resource-collection>
-@@ -354,7 +355,6 @@
+@@ -352,7 +353,6 @@
     <role-name>JBossAdmin</role-name>
     </auth-constraint>
     </security-constraint>
@@ -138,7 +138,7 @@
     <security-constraint>
       <web-resource-collection>
         <web-resource-name>HtmlAdaptor</web-resource-name>
-@@ -111,7 +112,6 @@
+@@ -109,7 +110,6 @@
         <role-name>JBossAdmin</role-name>
       </auth-constraint>
     </security-constraint>
@@ -185,7 +185,7 @@
  
     <security-constraint>
     <web-resource-collection>
-@@ -354,7 +355,6 @@
+@@ -352,7 +353,6 @@
     <role-name>JBossAdmin</role-name>
     </auth-constraint>
     </security-constraint>
@@ -223,7 +223,7 @@
     <security-constraint>
       <web-resource-collection>
         <web-resource-name>HtmlAdaptor</web-resource-name>
-@@ -111,7 +112,6 @@
+@@ -109,7 +110,6 @@
         <role-name>JBossAdmin</role-name>
       </auth-constraint>
     </security-constraint>
@@ -270,7 +270,7 @@
  
     <security-constraint>
     <web-resource-collection>
-@@ -354,7 +355,6 @@
+@@ -352,7 +353,6 @@
     <role-name>JBossAdmin</role-name>
     </auth-constraint>
     </security-constraint>
@@ -301,7 +301,7 @@
     <security-constraint>
       <web-resource-collection>
         <web-resource-name>HtmlAdaptor</web-resource-name>
-@@ -111,7 +112,6 @@
+@@ -109,7 +110,6 @@
         <role-name>JBossAdmin</role-name>
       </auth-constraint>
     </security-constraint>
@@ -346,7 +346,7 @@
     <security-constraint>
       <web-resource-collection>
         <web-resource-name>HtmlAdaptor</web-resource-name>
-@@ -111,7 +112,6 @@
+@@ -109,7 +110,6 @@
         <role-name>JBossAdmin</role-name>
       </auth-constraint>
     </security-constraint>
@@ -934,3 +934,163 @@
     </security-role>
    
    <!-- 
+diff -Naur ./server/production/deploy/ROOT.war/WEB-INF/jboss-web.xml ./server/production/deploy/ROOT.war/WEB-INF/jboss-web.xml
+--- ./server/production/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 13:57:48.000000000 -0400
++++ ./server/production/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 13:58:25.000000000 -0400
+@@ -6,7 +6,6 @@
+    <!-- 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>
+    -->
+-   
++   <security-domain>java:/jaas/jmx-console</security-domain>
+ </jboss-web>
+diff -Naur ./server/production/deploy/ROOT.war/WEB-INF/web.xml ./server/production/deploy/ROOT.war/WEB-INF/web.xml
+--- ./server/production/deploy/ROOT.war/WEB-INF/web.xml       2010-05-11 13:57:48.000000000 -0400
++++ ./server/production/deploy/ROOT.war/WEB-INF/web.xml       2010-05-11 13:58:25.000000000 -0400
+@@ -22,7 +22,7 @@
+    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>
+@@ -35,7 +35,6 @@
+        <role-name>JBossAdmin</role-name>
+      </auth-constraint>
+    </security-constraint>
+-   -->
+
+    <login-config>
+       <auth-method>BASIC</auth-method>
+diff -Naur ./server/all/deploy/ROOT.war/WEB-INF/jboss-web.xml ./server/all/deploy/ROOT.war/WEB-INF/jboss-web.xml
+--- ./server/all/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 13:57:48.000000000 -0400
++++ ./server/all/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 13:58:25.000000000 -0400
+@@ -6,7 +6,6 @@
+    <!-- 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>
+    -->
+-   
++   <security-domain>java:/jaas/jmx-console</security-domain>
+ </jboss-web>
+diff -Naur ./server/all/deploy/ROOT.war/WEB-INF/web.xml ./server/all/deploy/ROOT.war/WEB-INF/web.xml
+--- ./server/all/deploy/ROOT.war/WEB-INF/web.xml       2010-05-11 13:57:48.000000000 -0400
++++ ./server/all/deploy/ROOT.war/WEB-INF/web.xml       2010-05-11 13:58:25.000000000 -0400
+@@ -22,7 +22,7 @@
+    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>
+@@ -35,7 +35,6 @@
+        <role-name>JBossAdmin</role-name>
+      </auth-constraint>
+    </security-constraint>
+-   -->
+
+    <login-config>
+       <auth-method>BASIC</auth-method>
+diff -Naur ./server/default/deploy/ROOT.war/WEB-INF/jboss-web.xml ./server/default/deploy/ROOT.war/WEB-INF/jboss-web.xml
+--- ./server/default/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 13:57:48.000000000 -0400
++++ ./server/default/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 13:58:25.000000000 -0400
+@@ -6,7 +6,6 @@
+    <!-- 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>
+    -->
+-   
++   <security-domain>java:/jaas/jmx-console</security-domain>
+ </jboss-web>
+diff -Naur ./server/default/deploy/ROOT.war/WEB-INF/web.xml ./server/default/deploy/ROOT.war/WEB-INF/web.xml
+--- ./server/default/deploy/ROOT.war/WEB-INF/web.xml       2010-05-11 13:57:48.000000000 -0400
++++ ./server/default/deploy/ROOT.war/WEB-INF/web.xml       2010-05-11 13:58:25.000000000 -0400
+@@ -22,7 +22,7 @@
+    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>
+@@ -35,7 +35,6 @@
+        <role-name>JBossAdmin</role-name>
+      </auth-constraint>
+    </security-constraint>
+-   -->
+
+    <login-config>
+       <auth-method>BASIC</auth-method>
+diff -Naur ./server/standard/deploy/ROOT.war/WEB-INF/jboss-web.xml ./server/standard/deploy/ROOT.war/WEB-INF/jboss-web.xml
+--- ./server/standard/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 13:57:48.000000000 -0400
++++ ./server/standard/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 13:58:25.000000000 -0400
+@@ -6,7 +6,6 @@
+    <!-- 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>
+    -->
+-   
++   <security-domain>java:/jaas/jmx-console</security-domain>
+ </jboss-web>
+diff -Naur ./server/standard/deploy/ROOT.war/WEB-INF/web.xml ./server/standard/deploy/ROOT.war/WEB-INF/web.xml
+--- ./server/standard/deploy/ROOT.war/WEB-INF/web.xml       2010-05-11 13:57:48.000000000 -0400
++++ ./server/standard/deploy/ROOT.war/WEB-INF/web.xml       2010-05-11 13:58:25.000000000 -0400
+@@ -22,7 +22,7 @@
+    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>
+@@ -35,7 +35,6 @@
+        <role-name>JBossAdmin</role-name>
+      </auth-constraint>
+    </security-constraint>
+-   -->
+
+    <login-config>
+       <auth-method>BASIC</auth-method>
+diff -Naur ./server/web/deploy/ROOT.war/WEB-INF/jboss-web.xml ./server/web/deploy/ROOT.war/WEB-INF/jboss-web.xml
+--- ./server/web/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 13:57:48.000000000 -0400
++++ ./server/web/deploy/ROOT.war/WEB-INF/jboss-web.xml       2010-05-11 13:58:25.000000000 -0400
+@@ -6,7 +6,6 @@
+    <!-- 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>
+    -->
+-   
++   <security-domain>java:/jaas/jmx-console</security-domain>
+ </jboss-web>
+diff -Naur ./server/web/deploy/ROOT.war/WEB-INF/web.xml ./server/web/deploy/ROOT.war/WEB-INF/web.xml
+--- ./server/web/deploy/ROOT.war/WEB-INF/web.xml       2010-05-11 13:57:48.000000000 -0400
++++ ./server/web/deploy/ROOT.war/WEB-INF/web.xml       2010-05-11 13:58:25.000000000 -0400
+@@ -22,7 +22,7 @@
+    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>
+@@ -35,7 +35,6 @@
+        <role-name>JBossAdmin</role-name>
+      </auth-constraint>
+    </security-constraint>
+-   -->
+
+    <login-config>
+       <auth-method>BASIC</auth-method>

Modified: branches/JBPAPP_5_1/console/src/resources/webconsole.war/WEB-INF/web.xml
===================================================================
--- branches/JBPAPP_5_1/console/src/resources/webconsole.war/WEB-INF/web.xml	2010-05-31 19:53:46 UTC (rev 105421)
+++ branches/JBPAPP_5_1/console/src/resources/webconsole.war/WEB-INF/web.xml	2010-05-31 20:04:08 UTC (rev 105422)
@@ -347,8 +347,6 @@
    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>

Copied: branches/JBPAPP_5_1/tomcat/src/main/org/jboss/net/ssl/JBossHttp11AprProtocol.java (from rev 104776, branches/JBPAPP_5_0/tomcat/src/main/org/jboss/net/ssl/JBossHttp11AprProtocol.java)
===================================================================
--- branches/JBPAPP_5_1/tomcat/src/main/org/jboss/net/ssl/JBossHttp11AprProtocol.java	                        (rev 0)
+++ branches/JBPAPP_5_1/tomcat/src/main/org/jboss/net/ssl/JBossHttp11AprProtocol.java	2010-05-31 20:04:08 UTC (rev 105422)
@@ -0,0 +1,125 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.net.ssl;
+
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
+import javax.naming.InitialContext;
+
+import org.apache.coyote.http11.Http11AprProtocol;
+import org.jboss.logging.Logger;
+import org.jboss.security.SecurityConstants;
+import org.jboss.security.SecurityUtil;
+import org.jboss.security.plugins.JaasSecurityDomain;
+
+/**
+ * <p>
+ * Extend {@link Http11AprProtocol} to allow encryption of the SSLPassword attribute.
+ * The connector must have a securityDomain attribute with the JNDI name of the
+ * {@link JaasSecurityDomain} that will decode the password.
+ * 
+ * @author <a href="mmoyses at redhat.com">Marcus Moyses</a>
+ * @version $Revision: 1 $
+ */
+public class JBossHttp11AprProtocol extends Http11AprProtocol
+{
+   private String securityDomain;
+   
+   private String SSLPassword;
+   
+   private static final Logger log = Logger.getLogger(JBossHttp11AprProtocol.class);
+
+   public void setSSLPassword(String SSLPassword)
+   {
+      this.SSLPassword = SSLPassword;
+      if (this.securityDomain != null)
+      {
+         char[] password;
+         try
+         {
+            if(log.isTraceEnabled())
+               log.trace("Decoding password with security domain: " + this.securityDomain);
+            password = DecodeAction.decode(this.SSLPassword, this.securityDomain);
+         }
+         catch (Exception e)
+         {
+            log.error("Error decoding password", e);
+            throw new IllegalArgumentException("Error decoding password", e);
+         }
+         super.setSSLPassword(new String(password));
+         password = null;
+      }
+   }
+
+   public String getSecurityDomain()
+   {
+      return this.securityDomain;
+   }
+
+   public void setSecurityDomain(String securityDomain)
+   {
+      this.securityDomain = SecurityUtil.unprefixSecurityDomain(securityDomain);
+      if (this.SSLPassword != null)
+         setSSLPassword(this.SSLPassword);
+   }
+
+   @SuppressWarnings("unchecked")
+   private static class DecodeAction implements PrivilegedExceptionAction
+   {
+      String password;
+
+      String jaasSecurityDomain;
+
+      DecodeAction(String password, String jaasSecurityDomain)
+      {
+         this.password = password;
+         this.jaasSecurityDomain = SecurityConstants.JAAS_CONTEXT_ROOT + "/" + jaasSecurityDomain;
+      }
+
+      public Object run() throws Exception
+      {
+         // Invoke the JaasSecurityDomain.decodeb64 operation
+         InitialContext ctx = new InitialContext();
+         JaasSecurityDomain securityDomain = (JaasSecurityDomain) ctx.lookup(jaasSecurityDomain);
+         byte[] secret = securityDomain.decode64(password);
+         // Convert to UTF-8 base char array
+         String secretPassword = new String(secret, "UTF-8");
+         return secretPassword.toCharArray();
+      }
+
+      static char[] decode(String password, String jaasSecurityDomain) throws Exception
+      {
+         DecodeAction action = new DecodeAction(password, jaasSecurityDomain);
+         try
+         {
+            char[] decode = (char[]) AccessController.doPrivileged(action);
+            return decode;
+         }
+         catch (PrivilegedActionException e)
+         {
+            throw e.getException();
+         }
+      }
+   }
+}
\ No newline at end of file

Copied: branches/JBPAPP_5_1/tomcat/src/webapps/ROOT.war/WEB-INF/jboss-web.xml (from rev 104776, branches/JBPAPP_5_0/tomcat/src/webapps/ROOT.war/WEB-INF/jboss-web.xml)
===================================================================
--- branches/JBPAPP_5_1/tomcat/src/webapps/ROOT.war/WEB-INF/jboss-web.xml	                        (rev 0)
+++ branches/JBPAPP_5_1/tomcat/src/webapps/ROOT.war/WEB-INF/jboss-web.xml	2010-05-31 20:04:08 UTC (rev 105422)
@@ -0,0 +1,12 @@
+<!DOCTYPE jboss-web PUBLIC
+   "-//JBoss//DTD Web Application 5.0//EN"
+   "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
+   
+<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>

Modified: branches/JBPAPP_5_1/tomcat/src/webapps/ROOT.war/WEB-INF/web.xml
===================================================================
--- branches/JBPAPP_5_1/tomcat/src/webapps/ROOT.war/WEB-INF/web.xml	2010-05-31 19:53:46 UTC (rev 105421)
+++ branches/JBPAPP_5_1/tomcat/src/webapps/ROOT.war/WEB-INF/web.xml	2010-05-31 20:04:08 UTC (rev 105422)
@@ -17,4 +17,32 @@
     <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
+   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>/status/*</url-pattern>
+     </web-resource-collection>
+     <auth-constraint>
+       <role-name>JBossAdmin</role-name>
+     </auth-constraint>
+   </security-constraint>
+   -->
+
+   <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>

Modified: branches/JBPAPP_5_1/varia/src/resources/jmx/jmx-console-web.xml
===================================================================
--- branches/JBPAPP_5_1/varia/src/resources/jmx/jmx-console-web.xml	2010-05-31 19:53:46 UTC (rev 105421)
+++ branches/JBPAPP_5_1/varia/src/resources/jmx/jmx-console-web.xml	2010-05-31 20:04:08 UTC (rev 105422)
@@ -104,8 +104,6 @@
          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>




More information about the jboss-cvs-commits mailing list