cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6170] Applying a patch from Guopu Wu to fix a jaxrs spring_security demo in 3.0.x; This closes #48
Date Mon, 22 Dec 2014 17:03:00 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 2b1f61d28 -> 0b09918a2


[CXF-6170] Applying a patch from Guopu Wu to fix a jaxrs spring_security demo in 3.0.x; This
closes #48


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0b09918a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0b09918a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0b09918a

Branch: refs/heads/3.0.x-fixes
Commit: 0b09918a2a3b5165e8d2a05f1f30736defd5e6e1
Parents: 2b1f61d
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Mon Dec 22 17:02:34 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Mon Dec 22 17:02:34 2014 +0000

----------------------------------------------------------------------
 .../samples/jax_rs/spring_security/pom.xml      | 10 +++++++++-
 .../jaxrs/service/CustomerServiceSecured.java   |  3 +--
 .../src/main/webapp/WEB-INF/beans.xml           | 20 +++++++++++---------
 3 files changed, 21 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/0b09918a/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml b/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml
index c732ec9..06461db 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml
@@ -131,7 +131,15 @@
         </dependency>
         <dependency>
             <groupId>org.springframework.security</groupId>
-            <artifactId>spring-security-core-tiger</artifactId>
+            <artifactId>spring-security-config</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.security</groupId>
+            <artifactId>spring-security-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.security</groupId>
+            <artifactId>spring-security-core</artifactId>
         </dependency>
         <dependency>
             <groupId>org.aspectj</groupId>

http://git-wip-us.apache.org/repos/asf/cxf/blob/0b09918a/distribution/src/main/release/samples/jax_rs/spring_security/src/main/java/demo/jaxrs/service/CustomerServiceSecured.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_security/src/main/java/demo/jaxrs/service/CustomerServiceSecured.java
b/distribution/src/main/release/samples/jax_rs/spring_security/src/main/java/demo/jaxrs/service/CustomerServiceSecured.java
index 56bab23..f7e4212 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_security/src/main/java/demo/jaxrs/service/CustomerServiceSecured.java
+++ b/distribution/src/main/release/samples/jax_rs/spring_security/src/main/java/demo/jaxrs/service/CustomerServiceSecured.java
@@ -19,8 +19,7 @@
 package demo.jaxrs.service;
 
 import javax.ws.rs.core.Response;
-import org.springframework.security.annotation.Secured;
-
+import org.springframework.security.access.annotation.Secured;
 
 public interface CustomerServiceSecured {
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/0b09918a/distribution/src/main/release/samples/jax_rs/spring_security/src/main/webapp/WEB-INF/beans.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_security/src/main/webapp/WEB-INF/beans.xml
b/distribution/src/main/release/samples/jax_rs/spring_security/src/main/webapp/WEB-INF/beans.xml
index 0b7afa6..3a62cef 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_security/src/main/webapp/WEB-INF/beans.xml
+++ b/distribution/src/main/release/samples/jax_rs/spring_security/src/main/webapp/WEB-INF/beans.xml
@@ -17,7 +17,7 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:security="http://www.springframework.org/schema/security" xsi:schemaLocation=" http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop
 http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/security
 http://www.springframework.org/schema/security/spring-security-2.0.4.xsd http://cxf.apache.org/jaxrs
http://cxf.apache.org/schemas/jaxrs.xsd">
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:security="http://www.springframework.org/schema/security" xsi:schemaLocation=" http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop
 http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/security
 http://www.springframework.org/schema/security/spring-security.xsd http://cxf.apache.org/jaxrs
http://cxf.apache.org/schemas/jaxrs.xsd">
     <import resource="classpath:META-INF/cxf/cxf.xml"/>
     <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
     <jaxrs:server id="bookservice" address="/">
@@ -33,19 +33,21 @@
   <bean id="customerservice" class="demo.jaxrs.service.CustomerServiceSecuredImpl"/>
 -->
     <security:global-method-security secured-annotations="enabled">
-        <security:protect-pointcut expression="execution(* demo.jaxrs.service.CustomerService.getCustomer(*))"
access="ROLE_CUSTOMER, ROLE_ADMIN"/>
+        <security:protect-pointcut expression="execution(* demo.jaxrs.service.CustomerService.getCustomer(*))"
access="ROLE_CUSTOMER,ROLE_ADMIN"/>
         <security:protect-pointcut expression="execution(* demo.jaxrs.service.CustomerService.addCustomer(*))"
access="ROLE_ADMIN"/>
         <security:protect-pointcut expression="execution(* demo.jaxrs.service.CustomerService.updateCustomer(Long,demo.jaxrs.service.Customer))"
access="ROLE_ADMIN"/>
         <security:protect-pointcut expression="execution(* demo.jaxrs.service.CustomerService.deleteCustomer(*))"
access="ROLE_ADMIN"/>
-        <security:protect-pointcut expression="execution(* demo.jaxrs.service.CustomerService.getOrder(*))"
access="ROLE_CUSTOMER, ROLE_ADMIN"/>
+        <security:protect-pointcut expression="execution(* demo.jaxrs.service.CustomerService.getOrder(*))"
access="ROLE_CUSTOMER,ROLE_ADMIN"/>
     </security:global-method-security>
     <security:http auto-config="true">
         <security:http-basic/>
     </security:http>
-    <security:authentication-provider>
-        <security:user-service>
-            <security:user name="bob" password="bobspassword" authorities="ROLE_CUSTOMER"/>
-            <security:user name="fred" password="fredspassword" authorities="ROLE_CUSTOMER,
ROLE_ADMIN"/>
-        </security:user-service>
-    </security:authentication-provider>
+    <security:authentication-manager>
+        <security:authentication-provider>
+            <security:user-service>
+                <security:user name="bob" password="bobspassword" authorities="ROLE_CUSTOMER"/>
+                <security:user name="fred" password="fredspassword" authorities="ROLE_CUSTOMER,ROLE_ADMIN"/>
+            </security:user-service>
+        </security:authentication-provider>
+    </security:authentication-manager>
 </beans>


Mime
View raw message