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 D57FB18828 for ; Wed, 4 Nov 2015 17:52:49 +0000 (UTC) Received: (qmail 74193 invoked by uid 500); 4 Nov 2015 17:52:15 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 73983 invoked by uid 500); 4 Nov 2015 17:52:15 -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 73825 invoked by uid 99); 4 Nov 2015 17:52:15 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2015 17:52:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6C440E05DB; Wed, 4 Nov 2015 17:52:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: coheigea@apache.org To: commits@cxf.apache.org Date: Wed, 04 Nov 2015 17:52:17 -0000 Message-Id: In-Reply-To: <5a1f295d18c24a23af73ad9c2902b5e1@git.apache.org> References: <5a1f295d18c24a23af73ad9c2902b5e1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/7] cxf git commit: Separate test classes + resources http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsReferenceTest.java ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsReferenceTest.java b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsReferenceTest.java deleted file mode 100644 index 39cec16..0000000 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsReferenceTest.java +++ /dev/null @@ -1,370 +0,0 @@ -/** - * 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.cxf.systest.jaxrs.security.jwt; - -import java.net.URL; -import java.security.Security; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.ws.rs.core.Response; - -import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; - -import org.apache.cxf.jaxrs.client.WebClient; -import org.apache.cxf.rs.security.jose.jaxrs.JweWriterInterceptor; -import org.apache.cxf.rs.security.jose.jaxrs.JwsWriterInterceptor; -import org.apache.cxf.systest.jaxrs.security.Book; -import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase; -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.junit.AfterClass; -import org.junit.BeforeClass; - -/** - * Some encryption or signature tests, focus on how keys and certs are referenced and included. - */ -public class JweJwsReferenceTest extends AbstractBusClientServerTestBase { - public static final String PORT = BookServerReference.PORT; - - @BeforeClass - public static void startServers() throws Exception { - assertTrue("server did not launch correctly", - launchServer(BookServerReference.class, true)); - registerBouncyCastleIfNeeded(); - } - - private static void registerBouncyCastleIfNeeded() throws Exception { - // Still need it for Oracle Java 7 and Java 8 - Security.addProvider(new BouncyCastleProvider()); - } - - @AfterClass - public static void unregisterBouncyCastleIfNeeded() throws Exception { - Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME); - } - - // - // Encryption tests - // - // TODO - @org.junit.Test - @org.junit.Ignore - public void testEncryptionIncludePublicKey() throws Exception { - - URL busFile = JweJwsReferenceTest.class.getResource("client.xml"); - - List providers = new ArrayList(); - providers.add(new JacksonJsonProvider()); - providers.add(new JweWriterInterceptor()); - - String address = "http://localhost:" + PORT + "/jweincludekey/bookstore/books"; - WebClient client = - WebClient.create(address, providers, busFile.toString()); - client.type("application/json").accept("application/json"); - - Map properties = new HashMap(); - properties.put("rs.security.keystore.type", "jwk"); - properties.put("rs.security.keystore.alias", "2011-04-29"); - properties.put("rs.security.keystore.file", "org/apache/cxf/systest/jaxrs/security/certs/jwkPublicSet.txt"); - properties.put("rs.security.encryption.content.algorithm", "A128GCM"); - properties.put("rs.security.encryption.key.algorithm", "RSA-OAEP"); - properties.put("rs.security.encryption.include.public.key", "true"); - WebClient.getConfig(client).getRequestContext().putAll(properties); - - Response response = client.post(new Book("book", 123L)); - assertEquals(response.getStatus(), 200); - } - - @org.junit.Test - public void testEncryptionIncludeCert() throws Exception { - - URL busFile = JweJwsReferenceTest.class.getResource("client.xml"); - - List providers = new ArrayList(); - providers.add(new JacksonJsonProvider()); - providers.add(new JweWriterInterceptor()); - - String address = "http://localhost:" + PORT + "/jweincludecert/bookstore/books"; - WebClient client = - WebClient.create(address, providers, busFile.toString()); - client.type("application/json").accept("application/json"); - - Map properties = new HashMap(); - properties.put("rs.security.keystore.type", "jks"); - properties.put("rs.security.keystore.alias", "bob"); - properties.put("rs.security.keystore.password", "password"); - properties.put("rs.security.key.password", "password"); - properties.put("rs.security.keystore.file", - "org/apache/cxf/systest/jaxrs/security/certs/bob.jks"); - properties.put("rs.security.encryption.content.algorithm", "A128GCM"); - properties.put("rs.security.encryption.key.algorithm", "RSA-OAEP"); - WebClient.getConfig(client).getRequestContext().putAll(properties); - - // First test that it fails without adding a cert (reference). This is because - // the service side does not have an alias configured - - Response response = client.post(new Book("book", 123L)); - assertNotEquals(response.getStatus(), 200); - - // Now it should work - properties.put("rs.security.encryption.include.cert", "true"); - WebClient.getConfig(client).getRequestContext().putAll(properties); - response = client.post(new Book("book", 123L)); - assertEquals(response.getStatus(), 200); - } - - @org.junit.Test - public void testEncryptionIncludeCertNegativeTest() throws Exception { - - URL busFile = JweJwsReferenceTest.class.getResource("client.xml"); - - List providers = new ArrayList(); - providers.add(new JacksonJsonProvider()); - providers.add(new JweWriterInterceptor()); - - String address = "http://localhost:" + PORT + "/jweincludecert/bookstore/books"; - WebClient client = - WebClient.create(address, providers, busFile.toString()); - client.type("application/json").accept("application/json"); - - Map properties = new HashMap(); - properties.put("rs.security.keystore.type", "jks"); - properties.put("rs.security.keystore.alias", "alice"); - properties.put("rs.security.keystore.password", "password"); - properties.put("rs.security.key.password", "password"); - properties.put("rs.security.keystore.file", - "org/apache/cxf/systest/jaxrs/security/certs/alice.jks"); - properties.put("rs.security.encryption.content.algorithm", "A128GCM"); - properties.put("rs.security.encryption.key.algorithm", "RSA-OAEP"); - properties.put("rs.security.encryption.include.cert", "true"); - WebClient.getConfig(client).getRequestContext().putAll(properties); - - // Failure expected as we are encrypting to "alice" instead of "bob" - Response response = client.post(new Book("book", 123L)); - assertNotEquals(response.getStatus(), 200); - } - - @org.junit.Test - public void testEncryptionIncludeCertSha1() throws Exception { - - URL busFile = JweJwsReferenceTest.class.getResource("client.xml"); - - List providers = new ArrayList(); - providers.add(new JacksonJsonProvider()); - providers.add(new JweWriterInterceptor()); - - String address = "http://localhost:" + PORT + "/jweincludecert/bookstore/books"; - WebClient client = - WebClient.create(address, providers, busFile.toString()); - client.type("application/json").accept("application/json"); - - Map properties = new HashMap(); - properties.put("rs.security.keystore.type", "jks"); - properties.put("rs.security.keystore.alias", "bob"); - properties.put("rs.security.keystore.password", "password"); - properties.put("rs.security.key.password", "password"); - properties.put("rs.security.keystore.file", - "org/apache/cxf/systest/jaxrs/security/certs/bob.jks"); - properties.put("rs.security.encryption.content.algorithm", "A128GCM"); - properties.put("rs.security.encryption.key.algorithm", "RSA-OAEP"); - WebClient.getConfig(client).getRequestContext().putAll(properties); - - // First test that it fails without adding a cert (reference). This is because - // the service side does not have an alias configured - - Response response = client.post(new Book("book", 123L)); - assertNotEquals(response.getStatus(), 200); - - // Now it should work - properties.put("rs.security.encryption.include.cert.sha1", "true"); - WebClient.getConfig(client).getRequestContext().putAll(properties); - response = client.post(new Book("book", 123L)); - assertEquals(response.getStatus(), 200); - } - - @org.junit.Test - public void testEncryptionIncludeCertSha1NegativeTest() throws Exception { - - URL busFile = JweJwsReferenceTest.class.getResource("client.xml"); - - List providers = new ArrayList(); - providers.add(new JacksonJsonProvider()); - providers.add(new JweWriterInterceptor()); - - String address = "http://localhost:" + PORT + "/jweincludecert/bookstore/books"; - WebClient client = - WebClient.create(address, providers, busFile.toString()); - client.type("application/json").accept("application/json"); - - Map properties = new HashMap(); - properties.put("rs.security.keystore.type", "jks"); - properties.put("rs.security.keystore.alias", "alice"); - properties.put("rs.security.keystore.password", "password"); - properties.put("rs.security.key.password", "password"); - properties.put("rs.security.keystore.file", - "org/apache/cxf/systest/jaxrs/security/certs/alice.jks"); - properties.put("rs.security.encryption.content.algorithm", "A128GCM"); - properties.put("rs.security.encryption.key.algorithm", "RSA-OAEP"); - properties.put("rs.security.encryption.include.cert.sha1", "true"); - WebClient.getConfig(client).getRequestContext().putAll(properties); - - // Failure expected as we are encrypting to "alice" instead of "bob" - Response response = client.post(new Book("book", 123L)); - assertNotEquals(response.getStatus(), 200); - } - - // - // Signature tests - // - - @org.junit.Test - public void testSignatureIncludeCert() throws Exception { - - URL busFile = JweJwsReferenceTest.class.getResource("client.xml"); - - List providers = new ArrayList(); - providers.add(new JacksonJsonProvider()); - providers.add(new JwsWriterInterceptor()); - - String address = "http://localhost:" + PORT + "/jwsincludecert/bookstore/books"; - WebClient client = - WebClient.create(address, providers, busFile.toString()); - client.type("application/json").accept("application/json"); - - Map properties = new HashMap(); - properties.put("rs.security.keystore.type", "jks"); - properties.put("rs.security.keystore.alias", "alice"); - properties.put("rs.security.keystore.password", "password"); - properties.put("rs.security.key.password", "password"); - properties.put("rs.security.keystore.file", - "org/apache/cxf/systest/jaxrs/security/certs/alice.jks"); - WebClient.getConfig(client).getRequestContext().putAll(properties); - - // First test that it fails without adding a cert (reference). This is because - // the service side does not have an alias configured - - Response response = client.post(new Book("book", 123L)); - assertNotEquals(response.getStatus(), 200); - - // Now it should work - properties.put("rs.security.signature.include.cert", "true"); - WebClient.getConfig(client).getRequestContext().putAll(properties); - response = client.post(new Book("book", 123L)); - assertEquals(response.getStatus(), 200); - } - - @org.junit.Test - public void testSignatureIncludeCertNegativeTest() throws Exception { - - URL busFile = JweJwsReferenceTest.class.getResource("client.xml"); - - List providers = new ArrayList(); - providers.add(new JacksonJsonProvider()); - providers.add(new JwsWriterInterceptor()); - - String address = "http://localhost:" + PORT + "/jwsincludecert/bookstore/books"; - WebClient client = - WebClient.create(address, providers, busFile.toString()); - client.type("application/json").accept("application/json"); - - Map properties = new HashMap(); - properties.put("rs.security.keystore.type", "jks"); - properties.put("rs.security.keystore.alias", "morpit"); - properties.put("rs.security.keystore.password", "password"); - properties.put("rs.security.key.password", "password"); - properties.put("rs.security.keystore.file", - "org/apache/cxf/systest/jaxrs/security/certs/Morpit.jks"); - properties.put("rs.security.signature.include.cert", "true"); - WebClient.getConfig(client).getRequestContext().putAll(properties); - - // Failure expected as we are signing using a cert not trusted by cxfca.jks - Response response = client.post(new Book("book", 123L)); - assertNotEquals(response.getStatus(), 200); - } - - @org.junit.Test - public void testSignatureIncludeCertSha1() throws Exception { - - URL busFile = JweJwsReferenceTest.class.getResource("client.xml"); - - List providers = new ArrayList(); - providers.add(new JacksonJsonProvider()); - providers.add(new JwsWriterInterceptor()); - - String address = "http://localhost:" + PORT + "/jwsincludecertsha1/bookstore/books"; - WebClient client = - WebClient.create(address, providers, busFile.toString()); - client.type("application/json").accept("application/json"); - - Map properties = new HashMap(); - properties.put("rs.security.keystore.type", "jks"); - properties.put("rs.security.keystore.alias", "alice"); - properties.put("rs.security.keystore.password", "password"); - properties.put("rs.security.key.password", "password"); - properties.put("rs.security.keystore.file", - "org/apache/cxf/systest/jaxrs/security/certs/alice.jks"); - WebClient.getConfig(client).getRequestContext().putAll(properties); - - // First test that it fails without adding a cert (reference). This is because - // the service side does not have an alias configured - - Response response = client.post(new Book("book", 123L)); - assertNotEquals(response.getStatus(), 200); - - // Now it should work - properties.put("rs.security.signature.include.cert.sha1", "true"); - WebClient.getConfig(client).getRequestContext().putAll(properties); - response = client.post(new Book("book", 123L)); - assertEquals(response.getStatus(), 200); - } - - - @org.junit.Test - public void testSignatureIncludeCertSha1NegativeTest() throws Exception { - - URL busFile = JweJwsReferenceTest.class.getResource("client.xml"); - - List providers = new ArrayList(); - providers.add(new JacksonJsonProvider()); - providers.add(new JwsWriterInterceptor()); - - String address = "http://localhost:" + PORT + "/jwsincludecertsha1/bookstore/books"; - WebClient client = - WebClient.create(address, providers, busFile.toString()); - client.type("application/json").accept("application/json"); - - Map properties = new HashMap(); - properties.put("rs.security.keystore.type", "jks"); - properties.put("rs.security.keystore.alias", "morpit"); - properties.put("rs.security.keystore.password", "password"); - properties.put("rs.security.key.password", "password"); - properties.put("rs.security.keystore.file", - "org/apache/cxf/systest/jaxrs/security/certs/Morpit.jks"); - properties.put("rs.security.signature.include.cert.sha1", "true"); - WebClient.getConfig(client).getRequestContext().putAll(properties); - - // Failure expected as we are signing using a cert not trusted by cxfca.jks - Response response = client.post(new Book("book", 123L)); - assertNotEquals(response.getStatus(), 200); - } - -} http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/PrivateKeyPasswordProviderImpl.java ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/PrivateKeyPasswordProviderImpl.java b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/PrivateKeyPasswordProviderImpl.java deleted file mode 100644 index d9d7153..0000000 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/PrivateKeyPasswordProviderImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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.cxf.systest.jaxrs.security.jwt; - -import java.util.Properties; - -import org.apache.cxf.rs.security.jose.common.PrivateKeyPasswordProvider; - -public class PrivateKeyPasswordProviderImpl implements PrivateKeyPasswordProvider { - - private String password = "password"; - public PrivateKeyPasswordProviderImpl() { - - } - public PrivateKeyPasswordProviderImpl(String password) { - this.password = password; - } - @Override - public char[] getPassword(Properties storeProperties) { - return password.toCharArray(); - } - -} - http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/algorithms-server.xml ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/algorithms-server.xml b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/algorithms-server.xml deleted file mode 100644 index faa2e35..0000000 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/algorithms-server.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/client.xml ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/client.xml b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/client.xml deleted file mode 100644 index 13eaea1..0000000 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/client.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/reference-server.xml ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/reference-server.xml b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/reference-server.xml deleted file mode 100644 index a488f4e..0000000 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/reference-server.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/server.xml ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/server.xml b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/server.xml deleted file mode 100644 index 9923948..0000000 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/server.xml +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/serverJwsJson.xml ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/serverJwsJson.xml b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/serverJwsJson.xml deleted file mode 100644 index 1d2dd37..0000000 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/serverJwsJson.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/BookServerOAuth2.java ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/BookServerOAuth2.java b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/BookServerOAuth2.java index 9f2565d..a658e35 100644 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/BookServerOAuth2.java +++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/BookServerOAuth2.java @@ -19,6 +19,8 @@ package org.apache.cxf.systest.jaxrs.security.oauth2; +import java.net.URL; + import org.apache.cxf.Bus; import org.apache.cxf.BusFactory; import org.apache.cxf.bus.spring.SpringBusFactory; @@ -27,8 +29,8 @@ import org.apache.cxf.testutil.common.TestUtil; public class BookServerOAuth2 extends AbstractBusTestServerBase { public static final String PORT = TestUtil.getPortNumber("jaxrs-oauth2"); - private static final String SERVER_CONFIG_FILE = - "org/apache/cxf/systest/jaxrs/security/oauth2/server.xml"; + private static final URL SERVER_CONFIG_FILE = + BookServerOAuth2.class.getResource("server.xml"); protected void run() { SpringBusFactory bf = new SpringBusFactory(); http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/client.xml ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/client.xml b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/client.xml deleted file mode 100644 index 13eaea1..0000000 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/client.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/server.xml ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/server.xml b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/server.xml deleted file mode 100644 index 260f4ba..0000000 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/server.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/BookServerSaml.java ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/BookServerSaml.java b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/BookServerSaml.java index 6354e6c..eda4bf7 100644 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/BookServerSaml.java +++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/BookServerSaml.java @@ -19,6 +19,8 @@ package org.apache.cxf.systest.jaxrs.security.saml; +import java.net.URL; + import org.apache.cxf.Bus; import org.apache.cxf.BusFactory; import org.apache.cxf.bus.spring.SpringBusFactory; @@ -27,8 +29,8 @@ import org.apache.cxf.testutil.common.TestUtil; public class BookServerSaml extends AbstractBusTestServerBase { public static final String PORT = TestUtil.getPortNumber("jaxrs-saml"); - private static final String SERVER_CONFIG_FILE = - "org/apache/cxf/systest/jaxrs/security/saml/server.xml"; + private static final URL SERVER_CONFIG_FILE = + BookServerSaml.class.getResource("server.xml"); protected void run() { SpringBusFactory bf = new SpringBusFactory(); http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/client.xml ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/client.xml b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/client.xml deleted file mode 100644 index 13eaea1..0000000 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/client.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/secureServer.xml ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/secureServer.xml b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/secureServer.xml deleted file mode 100644 index 1ee3d3d..0000000 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/secureServer.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/server.xml ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/server.xml b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/server.xml deleted file mode 100644 index 1fe5f58..0000000 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/server.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cxf/blob/ecf6a384/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/MetadataServer.java ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/MetadataServer.java b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/MetadataServer.java index 83cc84a..da7209a 100644 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/MetadataServer.java +++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/MetadataServer.java @@ -19,6 +19,8 @@ package org.apache.cxf.systest.jaxrs.security.samlsso; +import java.net.URL; + import org.apache.cxf.Bus; import org.apache.cxf.BusFactory; import org.apache.cxf.bus.spring.SpringBusFactory; @@ -27,8 +29,8 @@ import org.apache.cxf.testutil.common.TestUtil; public class MetadataServer extends AbstractBusTestServerBase { public static final String PORT = TestUtil.getPortNumber("jaxrs-saml"); - private static final String SERVER_CONFIG_FILE = - "org/apache/cxf/systest/jaxrs/security/samlsso/metadata-server.xml"; + private static final URL SERVER_CONFIG_FILE = + MetadataServer.class.getResource("metadata-server.xml"); protected void run() { SpringBusFactory bf = new SpringBusFactory();