You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2010/02/11 10:46:01 UTC
svn commit: r908899 - in
/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test:
java/org/apache/servicemix/cxfbc/ws/security/
resources/org/apache/servicemix/cxfbc/ws/security/
Author: ffang
Date: Thu Feb 11 09:45:50 2010
New Revision: 908899
URL: http://svn.apache.org/viewvc?rev=908899&view=rev
Log:
[SMXCOMP-711]add missing file
Added:
servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/JAASServer.java
servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world-external.xml
servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/xbean-jaas-policy-bus-context.xml
Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/JAASServer.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/JAASServer.java?rev=908899&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/JAASServer.java (added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/JAASServer.java Thu Feb 11 09:45:50 2010
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.cxfbc.ws.security;
+
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.servicemix.jbi.container.SpringJBIContainer;
+import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+
+public class JAASServer extends AbstractBusTestServerBase {
+
+ protected AbstractXmlApplicationContext context;
+
+ protected SpringJBIContainer jbi;
+
+ public static void main(String[] args) {
+ new JAASServer().start();
+ }
+
+ protected AbstractXmlApplicationContext createBeanFactory() {
+ // load cxf se and bc from spring config file
+ return new ClassPathXmlApplicationContext(
+ "org/apache/servicemix/cxfbc/ws/security/xbean-jaas.xml");
+
+ }
+
+ @Override
+ protected void run() {
+ context = createBeanFactory();
+ jbi = (SpringJBIContainer) context.getBean("jbi");
+
+ }
+}
Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world-external.xml
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world-external.xml?rev=908899&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world-external.xml (added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world-external.xml Thu Feb 11 09:45:50 2010
@@ -0,0 +1,64 @@
+<?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.
+-->
+<attachments xmlns:wsp="http://www.w3.org/2006/07/ws-policy" xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <wsp:PolicyAttachment>
+ <wsp:AppliesTo>
+ <wsa:EndpointReference>
+ <wsa:Address>http://localhost:19000/SOAPServiceWSSecurity/TimestampSignEncryptPolicy</wsa:Address>
+ </wsa:EndpointReference>
+ </wsp:AppliesTo>
+ <wsp:Policy xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+ <wsp:All>
+ <sp:AsymmetricBinding>
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Always">
+ <wsp:Policy>
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Always">
+ <wsp:Policy>
+ <sp:WssX509V3Token10 />
+ <sp:RequireEmbeddedTokenReference />
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict />
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256 />
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ </wsp:All>
+ </wsp:Policy>
+ </wsp:PolicyAttachment>
+</attachments>
Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/xbean-jaas-policy-bus-context.xml
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/xbean-jaas-policy-bus-context.xml?rev=908899&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/xbean-jaas-policy-bus-context.xml (added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/xbean-jaas-policy-bus-context.xml Thu Feb 11 09:45:50 2010
@@ -0,0 +1,74 @@
+<?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.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:cxf="http://cxf.apache.org/core"
+ xmlns:sec="http://cxf.apache.org/configuration/security"
+ xmlns:http="http://cxf.apache.org/transports/http/configuration"
+ xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
+ http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+ http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
+ http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+ http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd">
+
+ <!-- Import the CXF core and optional components needed:
+ WS-Security, HTTP, and SOAP. -->
+ <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-policy.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-ws-security.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+
+ <cxf:bus>
+ <!-- We have to put these at the bus level because the CXF-BC Provider/Consumer
+ configuration does not allow one to specify them at the client level. -->
+ <cxf:properties>
+ <entry value="org.apache.servicemix.cxfbc.ws.security.KeystorePasswordCallback">
+ <key>
+ <util:constant
+ static-field="org.apache.cxf.ws.security.SecurityConstants.CALLBACK_HANDLER"/>
+ </key>
+ </entry>
+ <entry value="bob">
+ <key>
+ <util:constant
+ static-field="org.apache.cxf.ws.security.SecurityConstants.SIGNATURE_USERNAME"/>
+ </key>
+ </entry>
+ <entry value="org/apache/servicemix/cxfbc/ws/security/bob.properties">
+ <key>
+ <util:constant
+ static-field="org.apache.cxf.ws.security.SecurityConstants.SIGNATURE_PROPERTIES"/>
+ </key>
+ </entry>
+ </cxf:properties>
+ </cxf:bus>
+
+ <bean class="org.apache.cxf.ws.policy.attachment.external.ExternalAttachmentProvider">
+ <constructor-arg ref="cxf"/>
+ <property name="location" value="org/apache/servicemix/cxfbc/ws/security/hello_world-external.xml"/>
+ </bean>
+</beans>