Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9FB419CBC for ; Sat, 26 Nov 2011 14:39:27 +0000 (UTC) Received: (qmail 71805 invoked by uid 500); 26 Nov 2011 14:39:26 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 71745 invoked by uid 500); 26 Nov 2011 14:39:26 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 71738 invoked by uid 99); 26 Nov 2011 14:39:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Nov 2011 14:39:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Nov 2011 14:39:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id AA7CA238897F for ; Sat, 26 Nov 2011 14:39:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1206444 - in /cxf/trunk/distribution/src/main/release: etc/ samples/java_first_spring_support/ samples/java_first_spring_support/webapp/WEB-INF/ samples/jax_rs/spring_security/ samples/jax_rs/spring_security/webapp/WEB-INF/ Date: Sat, 26 Nov 2011 14:39:03 -0000 To: commits@cxf.apache.org From: gmazza@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111126143903.AA7CA238897F@eris.apache.org> Author: gmazza Date: Sat Nov 26 14:38:59 2011 New Revision: 1206444 URL: http://svn.apache.org/viewvc?rev=1206444&view=rev Log: Switched to Ver 2.5 web.xml for remaining CXF samples having this file Modified: cxf/trunk/distribution/src/main/release/etc/web.xml cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/README.txt cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/webapp/WEB-INF/web.xml cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/README.txt cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/web.xml Modified: cxf/trunk/distribution/src/main/release/etc/web.xml URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/etc/web.xml?rev=1206444&r1=1206443&r2=1206444&view=diff ============================================================================== --- cxf/trunk/distribution/src/main/release/etc/web.xml (original) +++ cxf/trunk/distribution/src/main/release/etc/web.xml Sat Nov 26 14:38:59 2011 @@ -17,11 +17,12 @@ specific language governing permissions and limitations under the License. --> - - - + cxf - cxf + cxf cxf @@ -29,11 +30,15 @@ org.apache.cxf.transport.servlet.CXFServlet 1 + cxf /services/* + 60 + + Modified: cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/README.txt URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/README.txt?rev=1206444&r1=1206443&r2=1206444&view=diff ============================================================================== --- cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/README.txt (original) +++ cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/README.txt Sat Nov 26 14:38:59 2011 @@ -8,34 +8,19 @@ Spring. You'll learn how to: * Set up the HTTP servlet transport * Use CXF's Spring beans -For more information see the documentation for this example in the -user's guide. - - -Prerequisite ------------- - -If your environment already includes cxf-manifest.jar on the -CLASSPATH, and the JDK and ant bin directories on the PATH -it is not necessary to set the environment as described in -the samples directory README. If your environment is not -properly configured, or if you are planning on using wsdl2java, -javac, and java to build and run the demos, you must set the -environment. - Building and running the demo using Maven ---------------------------------------- +----------------------------------------- From the base directory of this sample (i.e., where this README file is located), the pom.xml file is used to build and run the demo. Using either UNIX or Windows: - mvn install (builds the demo) + mvn clean install (builds the demo) mvn -Pserver (from one command line window) mvn -Pclient (from a second command line window) - To remove the code generated from the WSDL file and the .class files, run "mvn clean". + Modified: cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/webapp/WEB-INF/web.xml?rev=1206444&r1=1206443&r2=1206444&view=diff ============================================================================== --- cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/webapp/WEB-INF/web.xml (original) +++ cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/webapp/WEB-INF/web.xml Sat Nov 26 14:38:59 2011 @@ -1,9 +1,4 @@ - - - - - + + contextConfigLocation WEB-INF/beans.xml @@ -49,4 +47,4 @@ /* - \ No newline at end of file + Modified: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/README.txt URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/README.txt?rev=1206444&r1=1206443&r2=1206444&view=diff ============================================================================== --- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/README.txt (original) +++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/README.txt Sat Nov 26 14:38:59 2011 @@ -1,63 +1,65 @@ -JAX-RS Spring Security Demo -=========================== - -The demo shows how to use Spring Security to secure a JAXRS-based RESTful service. - -Two approaches toward securing a service are shown : -- using Spring Security @Secured annotations -- using AspectJ pointcut expressions - -Additionally, the JAXRS annotations inheritance is demonstrated, from interface and abstract class -definitions. - - - - -Building and running the demo using maven ---------------------------------------- - -From the base directory of this sample (i.e., where this README file is -located), the maven pom.xml file can be used to build and run the demo. - - -Using either UNIX or Windows: - - mvn install - mvn -Pserver (from one command line window) - mvn -Pclient (from a second command line window) - - -To remove the target dir, run "mvn clean". - - - -What happens when a demo is run -------------------------------- - -The demo web application located in a webapp folder is configured for two users, fred and bob, be able to -access various methods of a customer service bean. - -Fred is in both ROLE_CUSTOMER and ROLE_ADMIN roles, while Bob is in the ROLE_CUSTOMER role only. -After the server starts, the client is run and it's shown that Fred can access all the methods -while Bob can access only those which ROLE_CUSTOMER users are permitted to. - -By default, the demo is configured to use AspectJ pointcut expressions to apply ACL rules to a service bean. -Please see webapp/WEB-INF/beans.xml as well as src/demo/jaxrs/service. - -demo.jaxrs.service.CustomerServiceImpl bean implements CustomerService interface. AspectJ expressions are applied to interface methods. Note, neither CustomerService interface nor its CustomerServiceImpl implementation have security-specific annotations. CustomerService interface does have JAXRS annotations which are inherited by the service bean. - -To see the @Secured annotations in action, please uncomment - - - -and comment the one used by default : - - - -Note this time @Secured annotations are coming from a CustomerServiceSecured interface, while -JAXRS annotations are inherited from AbstractCustomerServiceSecured class. Also the secure annotations have to be explictly enabled in the configuration : - - - -Basic authentication is used to provide user credentials to a service. -No HTTPS protocol is used in this demo for simplicity only. +JAX-RS Spring Security Demo +=========================== + +The demo shows how to use Spring Security to secure a JAXRS-based RESTful service. + +Two approaches toward securing a service are shown : +- using Spring Security @Secured annotations +- using AspectJ pointcut expressions + +Additionally, JAXRS annotations inheritance is demonstrated, from both interface +and abstract class definitions. + + +Building and running the demo using Maven +----------------------------------------- + +From the base directory of this sample (i.e., where this README file is +located), the maven pom.xml file can be used to build and run the demo. + +Using either UNIX or Windows: + + mvn clean install + mvn -Pserver (from one command line window) + mvn -Pclient (from a second command line window) + +To remove the target directory, run "mvn clean". + + +What happens when the demo is run +--------------------------------- + +The demo web application located in a webapp folder is configured for two users, Fred and Bob, +to be able to access various methods of a customer service bean. + +Fred is in both ROLE_CUSTOMER and ROLE_ADMIN roles, while Bob is in the ROLE_CUSTOMER role only. +After the server starts, the client is run and it's shown that Fred can access all the methods +while Bob can access only those which ROLE_CUSTOMER users are permitted to. + +By default, the demo is configured to use AspectJ pointcut expressions to apply ACL rules to a service bean. +Please see src/main/webapp/WEB-INF/beans.xml as well as src/demo/jaxrs/service. + +demo.jaxrs.service.CustomerServiceImpl bean implements the CustomerService interface. AspectJ +expressions are applied to interface methods. Note neither CustomerService interface nor +its CustomerServiceImpl implementation have security-specific annotations. CustomerService +interface does have JAXRS annotations which are inherited by the service bean. + +To see the @Secured annotations in action, please uncomment + + + +and comment the one used by default: + + + +Note this time @Secured annotations are coming from a CustomerServiceSecured interface, +while JAXRS annotations are inherited from AbstractCustomerServiceSecured class. Also +the secure annotations have to be explictly enabled in the configuration: + + + +Basic authentication is used to provide user credentials to a service. +For simplicity, the HTTPS protocol is avoided in this sample but should be used +in production. + + Modified: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/web.xml?rev=1206444&r1=1206443&r2=1206444&view=diff ============================================================================== --- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/web.xml (original) +++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/web.xml Sat Nov 26 14:38:59 2011 @@ -1,63 +1,61 @@ - - - - - - - - - contextConfigLocation - WEB-INF/beans.xml - - - - - org.springframework.web.context.ContextLoaderListener - - - - - springSecurityFilterChain - org.springframework.web.filter.DelegatingFilterProxy - - - - springSecurityFilterChain - /* - - - - - CXFServlet - CXF Servlet - - org.apache.cxf.transport.servlet.CXFServlet - - 1 - - - - CXFServlet - /* - - - \ No newline at end of file + + + + + + contextConfigLocation + WEB-INF/beans.xml + + + + + org.springframework.web.context.ContextLoaderListener + + + + + springSecurityFilterChain + org.springframework.web.filter.DelegatingFilterProxy + + + + springSecurityFilterChain + /* + + + + + CXFServlet + CXF Servlet + + org.apache.cxf.transport.servlet.CXFServlet + + 1 + + + + CXFServlet + /* + + +