[portal-commits] JBoss Portal SVN: r13005 - in modules/authorization/trunk: http-profile and 8 other directories.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Mon Mar 9 18:47:20 EDT 2009


Author: sohil.shah at jboss.com
Date: 2009-03-09 18:47:19 -0400 (Mon, 09 Mar 2009)
New Revision: 13005

Added:
   modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/enforcement/
   modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/enforcement/SecurityFilter.java
   modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/container/
   modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/container/TestHelloWorldHttpServlet.java
   modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/
   modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/WEB-INF/
   modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/WEB-INF/classes/
   modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/WEB-INF/http-policy.xml
   modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/WEB-INF/lib/
   modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/WEB-INF/web.xml
   modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/index.html
Modified:
   modules/authorization/trunk/.classpath
   modules/authorization/trunk/http-profile/pom.xml
   modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/Server.java
   modules/authorization/trunk/pom.xml
Log:
code backup

Modified: modules/authorization/trunk/.classpath
===================================================================
--- modules/authorization/trunk/.classpath	2009-03-09 14:37:28 UTC (rev 13004)
+++ modules/authorization/trunk/.classpath	2009-03-09 22:47:19 UTC (rev 13005)
@@ -38,5 +38,6 @@
 	<classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.2.GA/jboss-kernel-2.0.2.GA.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.2.GA/jboss-dependency-2.0.2.GA.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.9.GA/jboss-common-core-2.2.9.GA.jar"/>
+	<classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

Modified: modules/authorization/trunk/http-profile/pom.xml
===================================================================
--- modules/authorization/trunk/http-profile/pom.xml	2009-03-09 14:37:28 UTC (rev 13004)
+++ modules/authorization/trunk/http-profile/pom.xml	2009-03-09 22:47:19 UTC (rev 13005)
@@ -28,6 +28,10 @@
   		<groupId>org.jboss.security.authz</groupId>
   		<artifactId>policy-server</artifactId>
   		<version>${project.version}</version>
+  	</dependency>
+  	<dependency>
+  		<groupId>javax.servlet</groupId>
+  		<artifactId>servlet-api</artifactId>  		
   	</dependency>        
                         
     <!-- test dependencies -->
@@ -62,11 +66,255 @@
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-surefire-plugin</artifactId>
             <version>2.3.1</version>
-            <configuration>
-               <includes>                		                                                    		               
-               </includes>
+            <configuration>      
+            	<includes>
+               		<include>**/components/Test*.java</include>
+               		<include>**/provisioning/Test*.java</include>                		                                                    		               
+               	</includes>
             </configuration>
-         </plugin>         
+         </plugin>                           
       </plugins>
-   </build> 
+  </build> 
+  
+  <profiles>
+  	<profile>
+  		<id>container-testsuite</id>
+  		<build>  		    
+        	<plugins>
+        		<!--
+        			Generate test artifacts to be deployed for testing into the container 
+        		-->
+        		<plugin>
+        			<groupId>org.apache.maven.plugins</groupId>
+        			<artifactId>maven-antrun-plugin</artifactId>
+        			<version>1.3</version>
+        			<executions>
+    					<execution>
+      						<id>generate-test-artifacts</id>
+      						<phase>test-compile</phase>
+      						<goals>
+        						<goal>run</goal>
+      						</goals>
+    					</execution>    					
+  					</executions>
+  					<configuration>
+  						<tasks>
+  							<echo>Generating Test Artifacts...</echo>
+  							<copy todir="target/test-classes/httpprofile-testsuite.war/WEB-INF/classes" overwrite="true">
+  								<fileset dir="target/classes"/>
+  							</copy>  							  							  							  							
+  						</tasks>
+  					</configuration>
+      			</plugin>
+      			<plugin>
+        			<groupId>org.apache.maven.plugins</groupId>
+        			<artifactId>maven-dependency-plugin</artifactId>
+        			<executions>
+          				<execution>
+            				<id>dependency-copying</id>
+            				<phase>test-compile</phase>
+            				<goals>
+              					<goal>copy</goal>
+            				</goals>
+            				<configuration>
+              					<artifactItems>
+                					<artifactItem>
+                  						<groupId>org.jboss.security.authz</groupId>
+                  						<artifactId>common-api</artifactId>
+                  						<version>${project.version}</version>
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>common-api.jar</destFileName>
+                					</artifactItem>
+                					<artifactItem>
+                  						<groupId>org.jboss.security.authz</groupId>
+                  						<artifactId>core-components-api</artifactId>
+                  						<version>${project.version}</version>
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>core-components.jar</destFileName>
+                					</artifactItem>
+                					<artifactItem>
+                  						<groupId>org.jboss.security.authz</groupId>
+                  						<artifactId>policy-server</artifactId>
+                  						<version>${project.version}</version>
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>policy-server.jar</destFileName>
+                					</artifactItem>
+                					<artifactItem>
+                  						<groupId>org.jboss.security.authz</groupId>
+                  						<artifactId>enforcement</artifactId>
+                  						<version>${project.version}</version>
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>enforcement.jar</destFileName>
+                					</artifactItem>
+                					<artifactItem>
+                  						<groupId>org.jboss.security</groupId>
+                  						<artifactId>jboss-xacml</artifactId>                  						
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>jboss-xacml.jar</destFileName>
+                					</artifactItem>
+                					<artifactItem>
+                  						<groupId>org.jboss.security</groupId>
+                  						<artifactId>jboss-sunxacml</artifactId>                  						
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>jboss-sunxacml.jar</destFileName>
+                					</artifactItem>
+                					<artifactItem>
+                  						<groupId>org.drools</groupId>
+                  						<artifactId>drools-core</artifactId>                  						
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>drools-core.jar</destFileName>
+                					</artifactItem>
+                					<artifactItem>
+                  						<groupId>org.drools</groupId>
+                  						<artifactId>drools-compiler</artifactId>                  						
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>drools-compiler.jar</destFileName>
+                					</artifactItem>
+                					<artifactItem>
+                  						<groupId>org.mvel</groupId>
+                  						<artifactId>mvel</artifactId>                  						
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>mvel.jar</destFileName>
+                					</artifactItem>
+                					<artifactItem>
+                  						<groupId>org.antlr</groupId>
+                  						<artifactId>antlr-runtime</artifactId>                  						
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>antlr-runtime.jar</destFileName>
+                					</artifactItem> 
+                					
+                					<!--
+                					Not needed for testing on JBoss5x               					
+                					<artifactItem>                					
+                  						<groupId>org.jboss.microcontainer</groupId>
+                  						<artifactId>jboss-kernel</artifactId>                  						
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>jboss-kernel.jar</destFileName>
+                					</artifactItem>
+                					<artifactItem>
+                  						<groupId>org.jboss.microcontainer</groupId>
+                  						<artifactId>jboss-dependency</artifactId>                  						
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>jboss-dependency.jar</destFileName>
+                					</artifactItem>
+                					<artifactItem>
+                  						<groupId>org.jboss</groupId>
+                  						<artifactId>jboss-reflect</artifactId>                  						
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>jboss-reflect.jar</destFileName>
+                					</artifactItem>
+                					<artifactItem>
+                  						<groupId>org.jboss</groupId>
+                  						<artifactId>jboss-common-core</artifactId>                  						
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>jboss-common-core.jar</destFileName>
+                					</artifactItem>
+                					<artifactItem>
+                  						<groupId>org.jboss</groupId>
+                  						<artifactId>jboss-mdr</artifactId>                  						
+                  						<type>jar</type>
+                  						<overWrite>true</overWrite>
+                  						<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
+                  						<destFileName>jboss-mdr.jar</destFileName>
+                					</artifactItem>
+                					-->                					
+              					</artifactItems>                 					           				
+            				</configuration>
+          				</execution>
+        			</executions>
+      			</plugin>
+      			
+        	 
+        	    <!--
+        	    	Loads the container and all test artifacts before the container-testsuite is executed
+        	    -->      	          	          		
+         		<plugin>
+        			<groupId>org.codehaus.cargo</groupId>
+        			<artifactId>cargo-maven2-plugin</artifactId>
+        			<version>1.0-SNAPSHOT</version>  
+        			<executions>        			    
+    					<execution>
+      						<id>start-container</id>
+      						<phase>process-test-classes</phase>
+      						<goals>
+        						<goal>start</goal>
+      						</goals>
+    					</execution>    					
+    					<execution>
+      						<id>stop-container</id>
+      						<phase>test</phase>
+      						<goals>
+        						<goal>stop</goal>
+      						</goals>
+    					</execution>
+  					</executions>        			    	 		   
+      	 			<configuration>
+      	 			    <wait>false</wait>
+      	 			    
+      	 		    	<container>
+      	 					<containerId>jboss5x</containerId>
+      	 					<home>${jboss.home}</home>      	 					
+      	 				</container>
+      	 				
+      	 				<configuration>
+      	 					<properties>
+      	 						<cargo.jboss.configuration>cargo</cargo.jboss.configuration>      	 						
+      	 					</properties>
+      	 					      	 					      	 					      	 					      	 					      	 					
+      	 					<deployables>
+      	 						<deployable>
+      	 							<location>target/test-classes/httpprofile-testsuite.war</location>
+          							<pingURL>http://localhost:8080/httpprofile-testsuite/index.html</pingURL> 
+          							<type>war</type>     	 							
+      	 						</deployable>
+      	 					</deployables>
+      	 				</configuration>
+      	 			</configuration>               
+      	 		</plugin>
+      	 		
+      	 		<!--
+      	 			Consists of all tests that should be run as part of the container-testsuite
+      	 		-->
+      	 		<plugin>
+            		<groupId>org.apache.maven.plugins</groupId>
+            		<artifactId>maven-surefire-plugin</artifactId>            		
+            		<version>2.3.1</version>
+            		<configuration>
+               			<includes>
+               				<include>**/container/Test*.java</include>                		                                                    		               
+               			</includes>
+            		</configuration>
+         		</plugin>         		
+      		</plugins>
+  	 	</build>
+  	</profile>
+  </profiles>    
 </project>
\ No newline at end of file

Added: modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/enforcement/SecurityFilter.java
===================================================================
--- modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/enforcement/SecurityFilter.java	                        (rev 0)
+++ modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/enforcement/SecurityFilter.java	2009-03-09 22:47:19 UTC (rev 13005)
@@ -0,0 +1,119 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.security.authz.http.enforcement;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.UnavailableException;
+
+import org.apache.log4j.Logger;
+
+import org.jboss.security.authz.http.configuration.HttpPolicyConfig;
+import org.jboss.security.authz.model.Policy;
+import org.jboss.security.authz.policy.server.Server;
+import org.jboss.security.authz.policy.server.PolicyServer;
+import org.jboss.security.authz.policy.server.spi.PolicyConfig;
+import org.jboss.security.authz.tools.GeneralTool;
+
+/**
+ * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
+ */
+public class SecurityFilter implements Filter
+{
+	private static Logger log = Logger.getLogger(SecurityFilter.class);
+	
+	private PolicyServer policyServer;
+	
+	public SecurityFilter()
+	{
+		
+	}
+	//-Filter implementation-------------------------------------------------------------------------------------------------------------------------------------------------------------------
+	public void init(FilterConfig config) throws ServletException 
+	{
+		InputStream is = null;
+		try
+		{
+			//Start the Policy Server
+			Server.bootstrap();
+			this.policyServer = (PolicyServer)Server.lookup("/policy-server/PolicyServer");
+			
+			if(this.policyServer == null)
+			{
+				throw new RuntimeException("Policy Server is unavailable...");
+			}
+			
+			//Parse the specified Policy and update the Policy Server
+			PolicyConfig policyConfig = new HttpPolicyConfig();
+			
+	        is = config.getServletContext().getResourceAsStream("/WEB-INF/http-policy.xml");
+	      
+	        Policy[] policies = policyConfig.configure(GeneralTool.readStream(is));
+	             
+	        log.debug("----------------------------------------------------------");
+	        for(Policy policy: policies)
+	        {
+	        	log.debug(policy.generateXACMLPolicy());
+	        	this.policyServer.newPolicy(policy.getMetaData());
+	        }
+	        log.debug("----------------------------------------------------------");
+	        
+	        log.info("----------------------------------------------------------");
+	        log.info("Security Filter successfully initialized...................");
+	        log.info("----------------------------------------------------------");
+		}
+		catch(Exception e)
+		{
+			log.error(this, e);
+			throw new UnavailableException("Error occured while processing the Http Policy: "+e.getMessage());
+		}
+		finally
+		{
+			if(is != null)
+			{
+				try
+				{
+					is.close();
+				}catch(IOException ioe){}
+			}
+		}
+	}
+	
+	public void destroy() 
+	{	
+	}
+
+	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException 
+	{
+		log.info("--------------------------------------------------------");
+		log.info("Security Filter successfully called.....................");
+		
+		chain.doFilter(request, response);
+	}		
+}

Added: modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/container/TestHelloWorldHttpServlet.java
===================================================================
--- modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/container/TestHelloWorldHttpServlet.java	                        (rev 0)
+++ modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/container/TestHelloWorldHttpServlet.java	2009-03-09 22:47:19 UTC (rev 13005)
@@ -0,0 +1,54 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt 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.security.authz.http.container;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.Logger;
+
+/**
+ * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
+ *
+ */
+public class TestHelloWorldHttpServlet extends TestCase
+{  
+   /**
+    * 
+    */
+   private static Logger log = Logger.getLogger(TestHelloWorldHttpServlet.class);
+      
+         
+   /**
+    * 
+    */
+   protected void setUp() throws Exception
+   {      
+	   
+   }
+   //------------------------------------------------------------------------------------------------------------------------------------------------------
+   public void testHelloWorld() throws Exception
+   {	   
+	   String url = "/httpprofile-testsuite/index.html";
+	   Thread.currentThread().sleep(20000);
+   }   
+}

Added: modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/WEB-INF/http-policy.xml
===================================================================
--- modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/WEB-INF/http-policy.xml	                        (rev 0)
+++ modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/WEB-INF/http-policy.xml	2009-03-09 22:47:19 UTC (rev 13005)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-security>
+	<security-constraint>
+		<web-resource-collection>
+			<web-resource>
+				<web-resource-name>Executive Files</web-resource-name>
+				<url-pattern>/private/executives/*</url-pattern>
+				<parameters>
+					<parameter name="id">1234</parameter>
+				</parameters>
+			</web-resource>
+			<web-resource>
+				<web-resource-name>Board/Investor Files</web-resource-name>
+				<url-pattern>/private/board/*</url-pattern>
+				<parameters>
+					<parameter name="id">5678</parameter>
+				</parameters>
+			</web-resource>
+		</web-resource-collection>
+		<auth-constraint>
+		    <!--  constaints based on user roles -->
+		    <roles allow="true">
+				<role-name>Admin</role-name>
+				<role-name>Executive</role-name>
+			</roles>
+			<roles allow="false">
+				<role-name>Manager</role-name>
+				<role-name>Developer</role-name>
+			</roles>
+			
+			<!--  constants based on ip address of the connecting machine -->
+			<!--
+			Still need to implement this functionality  
+			<ip-address allow="true">
+				<ip-range>
+					<address-from></address-from>
+					<address-to></address-to>
+				</ip-range>
+			</ip-address>
+			<ip-address allow="false">
+				<ip-range>
+					<address-from></address-from>
+					<address-to></address-to>
+				</ip-range>
+			</ip-address>
+			-->			
+			<!--  constraints based on data and/or time -->		
+		</auth-constraint>
+	</security-constraint>
+</web-security>
\ No newline at end of file

Added: modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/WEB-INF/web.xml
===================================================================
--- modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/WEB-INF/web.xml	                        (rev 0)
+++ modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/WEB-INF/web.xml	2009-03-09 22:47:19 UTC (rev 13005)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+    "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+  <display-name>Http Profile Container TestSuite</display-name>
+  <description>Http Profile Container TestSuite</description>
+  
+  <filter>
+  	<filter-name>securityFilter</filter-name>
+  	<filter-class>org.jboss.security.authz.http.enforcement.SecurityFilter</filter-class>
+  </filter>
+  
+  <filter-mapping>  	
+  	<filter-name>securityFilter</filter-name>
+  	<url-pattern>/*</url-pattern>
+  </filter-mapping>  
+</web-app>

Added: modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/index.html
===================================================================
--- modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/index.html	                        (rev 0)
+++ modules/authorization/trunk/http-profile/src/test/resources/httpprofile-testsuite.war/index.html	2009-03-09 22:47:19 UTC (rev 13005)
@@ -0,0 +1,8 @@
+<html>
+	<head>
+		<title>Http Profile Container TestSuite</title>
+	</head>
+	<body>
+		<h1>Http Profile Container TestSuite</h1>
+	</body>
+</html>
\ No newline at end of file

Modified: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/Server.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/Server.java	2009-03-09 14:37:28 UTC (rev 13004)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/Server.java	2009-03-09 22:47:19 UTC (rev 13005)
@@ -24,6 +24,8 @@
 
 import java.net.URL;
 
+import org.apache.log4j.Logger;
+
 import org.jboss.kernel.Kernel;
 import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.dependency.spi.ControllerContext;
@@ -34,6 +36,8 @@
  */
 public final class Server
 {
+   private static Logger log = Logger.getLogger(Server.class);
+   
    private static Kernel kernel;
    
    public Server()
@@ -49,12 +53,14 @@
          bootstrap.run();
          
          URL url = Thread.currentThread().getContextClassLoader().getResource("META-INF/jboss-beans.xml");
+         
          bootstrap.deploy(url);
          
          kernel = bootstrap.getKernel();
       }
       catch(Exception e)
       {
+    	 log.error("org.jboss.security.authz.policy.server.Server", e);
          throw new RuntimeException(e);
       }
    }

Modified: modules/authorization/trunk/pom.xml
===================================================================
--- modules/authorization/trunk/pom.xml	2009-03-09 14:37:28 UTC (rev 13004)
+++ modules/authorization/trunk/pom.xml	2009-03-09 22:47:19 UTC (rev 13005)
@@ -14,11 +14,12 @@
       <module>core-components-api</module> 
       <module>enforcement</module>  
       <module>policy-server</module>
-      <module>http-profile</module>
-      <module>documentation</module>            
+      <module>http-profile</module>          
    </modules>
    
    <properties>
+    <!--
+    Not needed for nows
   	<version.jboss.seam>2.0.2.SP1</version.jboss.seam>
   	<version.facelets>1.1.14</version.facelets>
   	<version.ajax4jsf>1.1.1</version.ajax4jsf>
@@ -26,25 +27,30 @@
   	<version.hibernate>3.0.0.GA</version.hibernate>
   	<version.javax.persistence>1.0</version.javax.persistence>
   	<version.javax.ejb>3.0</version.javax.ejb>
-  	<version.javax.faces>1.2_04-p02</version.javax.faces>
+  	<version.javax.faces>1.2_04-p02</version.javax.faces>  	
   	<version.commons-beanutils>1.6</version.commons-beanutils>
   	<version.commons-digester>1.6</version.commons-digester>
+  	-->
+  	
   	<version.junit>3.8.2</version.junit>
   	<version.sun.jaxb>2.1.4</version.sun.jaxb>
   	<version.sun.jaf>1.1</version.sun.jaf>
   	<version.jboss.xacml>2.0.3-SNAPSHOT</version.jboss.xacml>
   	<version.apache.log4j>1.2.14</version.apache.log4j>
   	<version.org.drools>4.0.7</version.org.drools>
+  	<version.org.mvel.mvel>1.3.1-java1.4</version.org.mvel.mvel>
+  	<version.org.antlr>3.0</version.org.antlr>
+  	<version.javax.servlet.servlet-api>2.4</version.javax.servlet.servlet-api>
   	<version.org.jboss.microcontainer>2.0.2.GA</version.org.jboss.microcontainer>
-  	
-  	<!-- local environment properties -->
-  	<jboss.home>/home/soshah/appServers/jboss-4.2.2.GA</jboss.home>
-  	<server.name>security</server.name>
+  	<version.org.jboss.jboss-reflect>2.0.2.GA</version.org.jboss.jboss-reflect>
+  	<version.org.jboss.jboss-common-core>2.2.9.GA</version.org.jboss.jboss-common-core>
+  	<version.org.jboss.jboss-mdr>2.0.1.GA</version.org.jboss.jboss-mdr>    		  
   </properties>
 
   <dependencyManagement>
 	  <dependencies>            
 	    <!-- seam dependencies -->
+	    <!--
 	    <dependency>
 	      <groupId>org.jboss.seam</groupId>
 	      <artifactId>jboss-seam</artifactId>
@@ -75,8 +81,10 @@
 	      <version>${version.commons-digester}</version>      
 	      <scope>provided</scope>
 	    </dependency>
+	    -->
 	    
 	    <!-- richfaces dependencies -->
+	    <!--
 	    <dependency>
 	      <groupId>org.ajax4jsf</groupId>
 	      <artifactId>ajax4jsf</artifactId>
@@ -88,10 +96,12 @@
 	      <artifactId>richfaces</artifactId>
 	      <version>${version.richfaces}</version>
 	      <scope>provided</scope>           
-	    </dependency>    
+	    </dependency>
+	    -->    
 	    
 	    
 	    <!-- dependencies provided by the runtime -->
+	    <!--
 	    <dependency>
 	      <groupId>org.hibernate</groupId>
 	      <artifactId>hibernate-validator</artifactId>
@@ -116,6 +126,7 @@
 	      <version>${version.javax.faces}</version>
 	      <scope>provided</scope>
 	    </dependency>
+	    -->
 	    
 	    <!-- sun jaxb -->
 	    <dependency>
@@ -198,6 +209,18 @@
            			<artifactId>xercesImpl</artifactId>
          		</exclusion>
          	</exclusions>    
+         </dependency>
+         <dependency>
+            <groupId>org.mvel</groupId>
+            <artifactId>mvel</artifactId>
+            <version>${version.org.mvel.mvel}</version>
+            <scope>provided</scope>                
+         </dependency>
+         <dependency>
+            <groupId>org.antlr</groupId>
+            <artifactId>antlr-runtime</artifactId>
+            <version>${version.org.antlr}</version>
+            <scope>provided</scope>                
          </dependency>  
          
          <!-- JBoss Microcontainer -->
@@ -207,6 +230,38 @@
             <version>${version.org.jboss.microcontainer}</version>
             <scope>provided</scope>
          </dependency>
+         <dependency>
+            <groupId>org.jboss.microcontainer</groupId>
+            <artifactId>jboss-dependency</artifactId>
+            <version>${version.org.jboss.microcontainer}</version>
+            <scope>provided</scope>
+         </dependency>
+         <dependency>
+            <groupId>org.jboss</groupId>
+            <artifactId>jboss-reflect</artifactId>
+            <version>${version.org.jboss.jboss-reflect}</version>
+            <scope>provided</scope>
+         </dependency>
+         <dependency>
+            <groupId>org.jboss</groupId>
+            <artifactId>jboss-common-core</artifactId>
+            <version>${version.org.jboss.jboss-common-core}</version>
+            <scope>provided</scope>
+         </dependency>
+         <dependency>
+            <groupId>org.jboss</groupId>
+            <artifactId>jboss-mdr</artifactId>
+            <version>${version.org.jboss.jboss-mdr}</version>
+            <scope>provided</scope>
+         </dependency>
+         
+         <!-- Servlet -->
+         <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>${version.javax.servlet.servlet-api}</version>
+            <scope>provided</scope>
+         </dependency>
 	  </dependencies>
   </dependencyManagement> 
   
@@ -297,6 +352,13 @@
             <enabled>true</enabled>
          </snapshots>
       </pluginRepository>
+      <pluginRepository>
+    	<id>codehaus snapshot repository</id>
+    	<url>http://snapshots.repository.codehaus.org/</url>
+    	<releases>
+      		<enabled>true</enabled>
+    	</releases>
+  	  </pluginRepository>      
    </pluginRepositories>
 
    <distributionManagement>
@@ -312,5 +374,18 @@
          <url>dav:https://snapshots.jboss.org/maven2</url>
          <uniqueVersion>true</uniqueVersion>
       </snapshotRepository>
-   </distributionManagement>   
+   </distributionManagement>  
+   
+   <!-- Build Profiles -->
+   <profiles>
+		<profile>
+			<id>container-testsuite</id>
+			<properties>
+			    <!--
+				<jboss.home>/home/soshah/projects/jboss-portal/jboss-4.2.3.GA</jboss.home>
+				-->
+				<jboss.home>/home/soshah/projects/jboss-portal/jboss-5.0.1.GA</jboss.home>
+			</properties>
+		</profile>
+	</profiles> 
 </project>




More information about the portal-commits mailing list