cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r724785 - in /cxf/trunk/systests/src/test/resources: jaxrs_security/WEB-INF/ jaxrs_security_cglib/WEB-INF/ jaxrs_security_no_annotations/WEB-INF/
Date Tue, 09 Dec 2008 17:21:56 GMT
Author: sergeyb
Date: Tue Dec  9 09:21:54 2008
New Revision: 724785

URL: http://svn.apache.org/viewvc?rev=724785&view=rev
Log:
JAXRS : missed test resources

Added:
    cxf/trunk/systests/src/test/resources/jaxrs_security/WEB-INF/
    cxf/trunk/systests/src/test/resources/jaxrs_security/WEB-INF/beans.xml
    cxf/trunk/systests/src/test/resources/jaxrs_security/WEB-INF/web.xml
    cxf/trunk/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/
    cxf/trunk/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml
    cxf/trunk/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/web.xml
    cxf/trunk/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/
    cxf/trunk/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/beans.xml
    cxf/trunk/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/web.xml

Added: cxf/trunk/systests/src/test/resources/jaxrs_security/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/resources/jaxrs_security/WEB-INF/beans.xml?rev=724785&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/resources/jaxrs_security/WEB-INF/beans.xml (added)
+++ cxf/trunk/systests/src/test/resources/jaxrs_security/WEB-INF/beans.xml Tue Dec  9 09:21:54
2008
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<!-- START SNIPPET: beans -->
+<!--beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:simple="http://cxf.apache.org/simple"
+  xsi:schemaLocation="
+  http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.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-2.0.4.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-extension-jaxrs-binding.xml" />
+  <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
+
+  <jaxrs:server id="bookservice"
+		        address="/">
+    <jaxrs:serviceBeans>
+      <ref bean="bookstore"/>
+    </jaxrs:serviceBeans>
+    <jaxrs:providers>
+        <bean class="org.apache.cxf.systest.jaxrs.security.SecurityExceptionMapper"/>
+    </jaxrs:providers>		   
+  </jaxrs:server>
+
+  <bean id="bookstore" class="org.apache.cxf.systest.jaxrs.security.SecureBookStore"/>
+
+  <security:global-method-security secured-annotations="enabled"/>
+  
+  <security:http auto-config='true'>
+    <security:http-basic />
+  </security:http>
+  
+  <security:authentication-provider>
+    <security:user-service>
+      <security:user name="bob" password="bobspassword" authorities="ROLE_USER" />
+      <security:user name="foo" password="bar" authorities="ROLE_USER, ROLE_ADMIN" />
+    </security:user-service>
+  </security:authentication-provider> 
+</beans>
+<!-- END SNIPPET: beans -->
+

Added: cxf/trunk/systests/src/test/resources/jaxrs_security/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/resources/jaxrs_security/WEB-INF/web.xml?rev=724785&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/resources/jaxrs_security/WEB-INF/web.xml (added)
+++ cxf/trunk/systests/src/test/resources/jaxrs_security/WEB-INF/web.xml Tue Dec  9 09:21:54
2008
@@ -0,0 +1,60 @@
+<?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">
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements. See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership. The ASF licenses this file
+	to you under the Apache License, Version 2.0 (the
+	"License"); you may not use this file except in compliance
+	with the License. You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing,
+	software distributed under the License is distributed on an
+	"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+	KIND, either express or implied. See the License for the
+	specific language governing permissions and limitations
+	under the License.
+-->
+<!-- START SNIPPET: webxml -->
+<web-app>
+	<context-param>
+		<param-name>contextConfigLocation</param-name>
+		<param-value>WEB-INF/beans.xml</param-value>
+	</context-param>
+
+	<listener>
+		<listener-class>
+			org.springframework.web.context.ContextLoaderListener
+		</listener-class>
+	</listener>
+
+    <filter>
+      <filter-name>springSecurityFilterChain</filter-name>
+      <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+    </filter>
+  
+    <filter-mapping>
+      <filter-name>springSecurityFilterChain</filter-name>
+      <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+	<servlet>
+		<servlet-name>CXFServlet</servlet-name>
+		<display-name>CXF Servlet</display-name>
+		<servlet-class>
+			org.apache.cxf.transport.servlet.CXFServlet
+		</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>CXFServlet</servlet-name>
+		<url-pattern>/*</url-pattern>
+	</servlet-mapping>
+</web-app>
+<!-- END SNIPPET: webxml -->

Added: cxf/trunk/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml?rev=724785&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml (added)
+++ cxf/trunk/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml Tue Dec 
9 09:21:54 2008
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<!-- START SNIPPET: beans -->
+<!--beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:simple="http://cxf.apache.org/simple"
+  xsi:schemaLocation="
+  http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.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-2.0.4.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-extension-jaxrs-binding.xml" />
+  <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
+
+  <jaxrs:server id="bookservice"
+		        address="/">
+    <jaxrs:serviceBeans>
+      <ref bean="bookstore"/>
+    </jaxrs:serviceBeans>		   
+    <jaxrs:providers>
+        <bean class="org.apache.cxf.systest.jaxrs.security.SecurityExceptionMapper"/>
+    </jaxrs:providers>
+  </jaxrs:server>
+
+  <bean id="bookstore" class="org.apache.cxf.systest.jaxrs.security.SecureBookStoreNoInterface"/>
+  <aop:config proxy-target-class="true"/>
+  
+  <security:global-method-security secured-annotations="enabled"/>
+  
+  <security:http auto-config='true'>
+    <security:http-basic />
+  </security:http>
+  
+  <security:authentication-provider>
+    <security:user-service>
+      <security:user name="bob" password="bobspassword" authorities="ROLE_USER" />
+      <security:user name="foo" password="bar" authorities="ROLE_USER, ROLE_ADMIN" />
+    </security:user-service>
+  </security:authentication-provider> 
+</beans>
+<!-- END SNIPPET: beans -->
+

Added: cxf/trunk/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/web.xml?rev=724785&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/web.xml (added)
+++ cxf/trunk/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/web.xml Tue Dec  9
09:21:54 2008
@@ -0,0 +1,60 @@
+<?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">
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements. See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership. The ASF licenses this file
+	to you under the Apache License, Version 2.0 (the
+	"License"); you may not use this file except in compliance
+	with the License. You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing,
+	software distributed under the License is distributed on an
+	"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+	KIND, either express or implied. See the License for the
+	specific language governing permissions and limitations
+	under the License.
+-->
+<!-- START SNIPPET: webxml -->
+<web-app>
+	<context-param>
+		<param-name>contextConfigLocation</param-name>
+		<param-value>WEB-INF/beans.xml</param-value>
+	</context-param>
+
+	<listener>
+		<listener-class>
+			org.springframework.web.context.ContextLoaderListener
+		</listener-class>
+	</listener>
+
+    <filter>
+      <filter-name>springSecurityFilterChain</filter-name>
+      <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+    </filter>
+  
+    <filter-mapping>
+      <filter-name>springSecurityFilterChain</filter-name>
+      <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+	<servlet>
+		<servlet-name>CXFServlet</servlet-name>
+		<display-name>CXF Servlet</display-name>
+		<servlet-class>
+			org.apache.cxf.transport.servlet.CXFServlet
+		</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>CXFServlet</servlet-name>
+		<url-pattern>/*</url-pattern>
+	</servlet-mapping>
+</web-app>
+<!-- END SNIPPET: webxml -->

Added: cxf/trunk/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/beans.xml?rev=724785&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/beans.xml
(added)
+++ cxf/trunk/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/beans.xml
Tue Dec  9 09:21:54 2008
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<!-- START SNIPPET: beans -->
+<!--beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:simple="http://cxf.apache.org/simple"
+  xsi:schemaLocation="
+  http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.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-2.0.4.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-extension-jaxrs-binding.xml" />
+  <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
+
+  <jaxrs:server id="bookservice"
+		        address="/">
+    <jaxrs:serviceBeans>
+      <ref bean="bookstore"/>
+    </jaxrs:serviceBeans>		   
+    <jaxrs:providers>
+        <bean class="org.apache.cxf.systest.jaxrs.security.SecurityExceptionMapper"/>
+    </jaxrs:providers>
+  </jaxrs:server>
+
+  <bean id="bookstore" class="org.apache.cxf.systest.jaxrs.security.SecureBookStoreNoAnnotations"/>
+  <aop:config proxy-target-class="true"/>
+  
+  <security:global-method-security>
+      <security:protect-pointcut 
+        expression="execution(* org.apache.cxf.systest.jaxrs.BookInterface.getThatBook())"

+        access="ROLE_ADMIN"/>
+      <security:protect-pointcut 
+        expression="execution(* org.apache.cxf.systest.jaxrs.BookInterface.getThatBook(Long))"

+        access="ROLE_USER, ROLE_ADMIN"/>
+      <security:protect-pointcut 
+        expression="execution(* org.apache.cxf.systest.jaxrs.BookInterface.getThatBook(Long,
String))" 
+        access="ROLE_USER"/>    
+  </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_USER" />
+      <security:user name="foo" password="bar" authorities="ROLE_USER, ROLE_ADMIN" />
+    </security:user-service>
+  </security:authentication-provider> 
+</beans>
+<!-- END SNIPPET: beans -->
+

Added: cxf/trunk/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/web.xml?rev=724785&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/web.xml (added)
+++ cxf/trunk/systests/src/test/resources/jaxrs_security_no_annotations/WEB-INF/web.xml Tue
Dec  9 09:21:54 2008
@@ -0,0 +1,60 @@
+<?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">
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements. See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership. The ASF licenses this file
+	to you under the Apache License, Version 2.0 (the
+	"License"); you may not use this file except in compliance
+	with the License. You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing,
+	software distributed under the License is distributed on an
+	"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+	KIND, either express or implied. See the License for the
+	specific language governing permissions and limitations
+	under the License.
+-->
+<!-- START SNIPPET: webxml -->
+<web-app>
+	<context-param>
+		<param-name>contextConfigLocation</param-name>
+		<param-value>WEB-INF/beans.xml</param-value>
+	</context-param>
+
+	<listener>
+		<listener-class>
+			org.springframework.web.context.ContextLoaderListener
+		</listener-class>
+	</listener>
+
+    <filter>
+      <filter-name>springSecurityFilterChain</filter-name>
+      <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+    </filter>
+  
+    <filter-mapping>
+      <filter-name>springSecurityFilterChain</filter-name>
+      <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+	<servlet>
+		<servlet-name>CXFServlet</servlet-name>
+		<display-name>CXF Servlet</display-name>
+		<servlet-class>
+			org.apache.cxf.transport.servlet.CXFServlet
+		</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>CXFServlet</servlet-name>
+		<url-pattern>/*</url-pattern>
+	</servlet-mapping>
+</web-app>
+<!-- END SNIPPET: webxml -->



Mime
View raw message