You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2017/03/28 16:10:13 UTC

[1/5] cxf git commit: Recording .gitmergeinfo Changes

Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 0b094e88f -> 794243e6c


Recording .gitmergeinfo Changes


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

Branch: refs/heads/3.1.x-fixes
Commit: 375c356a6cda9fed795173155eebc5d1c5b523f1
Parents: 3011999
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Mar 28 16:30:35 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Mar 28 16:30:35 2017 +0100

----------------------------------------------------------------------
 .gitmergeinfo | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/375c356a/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index d09c806..e21ad4a 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -376,6 +376,7 @@ M 3bbfc22e182ffea8c98ba8f84b4f55abfce353e7
 M 3be9aac26a003ef43995054da875ffd5fa5a2eb4
 M 3e30d8892a723adcf04268efd7d407e164607065
 M 417fb946eec38f403d915e90f405594675a7f7e0
+M 428f7700de80d4d6ea09158f42d057e9f24abe48
 M 437c7daa3345c8482deab4a4da9b164e68fd417a
 M 45d54d558625236b84752b0d7976f0cf85518c16
 M 4719a033d54fd9fcd173be273e6c320d8353b631


[4/5] cxf git commit: Fixing merge

Posted by co...@apache.org.
Fixing merge


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

Branch: refs/heads/3.1.x-fixes
Commit: 4586fe5b01c92a5353ff73bd0966d2a54329bb8b
Parents: 375c356
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Mar 28 16:31:44 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Mar 28 16:31:44 2017 +0100

----------------------------------------------------------------------
 .../ws/rm/sec/WSRMWithWSSecurityPolicyTest.java | 34 --------------
 .../ws/policy/handler/HelloServiceImpl.java     | 48 --------------------
 .../cxf/systest/ws/wssc/WSSCUnitTest.java       | 12 -----
 .../systest/ws/x509/DoubleItPropertiesImpl.java |  7 ---
 4 files changed, 101 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/4586fe5b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java
index c70f57d..c944a4f 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java
@@ -96,39 +96,6 @@ public class WSRMWithWSSecurityPolicyTest extends AbstractBusClientServerTestBas
 
     @Test
     public void testContextProperty() throws Exception {
-<<<<<<< HEAD
-        ClassPathXmlApplicationContext context =
-                new ClassPathXmlApplicationContext("org/apache/cxf/systest/ws/rm/sec/client-policy.xml");
-        Bus bus = (Bus)context.getBean("bus");
-        BusFactory.setDefaultBus(bus);
-        BusFactory.setThreadDefaultBus(bus);
-        Greeter greeter = (Greeter)context.getBean("GreeterCombinedClientNoProperty");
-        Client client = ClientProxy.getClient(greeter);
-        QName operationQName = new QName("http://cxf.apache.org/greeter_control", "greetMe");
-        BindingOperationInfo boi = client.getEndpoint().getBinding().getBindingInfo().getOperation(operationQName);
-        Map<String, Object> invocationContext = new HashMap<String, Object>();
-        Map<String, Object> requestContext = new HashMap<String, Object>();
-        Map<String, Object> responseContext = new HashMap<String, Object>();
-        invocationContext.put(Client.REQUEST_CONTEXT, requestContext);
-        invocationContext.put(Client.RESPONSE_CONTEXT, responseContext);
-
-        requestContext.put("ws-security.username", "Alice");
-        requestContext.put("ws-security.callback-handler", "org.apache.cxf.systest.ws.rm.sec.UTPasswordCallback");
-        requestContext.put("ws-security.encryption.properties", "bob.properties");
-        requestContext.put("ws-security.encryption.username", "bob");
-        requestContext.put("ws-security.signature.properties", "alice.properties");
-        requestContext.put("ws-security.signature.username", "alice");
-        RMManager manager = bus.getExtension(RMManager.class);
-        boolean empty = manager.getRetransmissionQueue().isEmpty();
-        assertTrue("RetransmissionQueue is not empty", empty);
-        GreetMe param = new GreetMe();
-        param.setRequestType("testContextProperty");
-        Object[] answer = client.invoke(boi, new Object[]{param}, invocationContext);
-        Assert.assertEquals("TESTCONTEXTPROPERTY", answer[0].toString());
-        Thread.sleep(5000);
-        empty = manager.getRetransmissionQueue().isEmpty();
-        assertTrue("RetransmissionQueue not empty", empty);
-=======
         try (ClassPathXmlApplicationContext context =
                 new ClassPathXmlApplicationContext("org/apache/cxf/systest/ws/rm/sec/client-policy.xml")) {
             Bus bus = (Bus)context.getBean("bus");
@@ -162,7 +129,6 @@ public class WSRMWithWSSecurityPolicyTest extends AbstractBusClientServerTestBas
             empty = manager.getRetransmissionQueue().isEmpty();
             assertTrue("RetransmissionQueue not empty", empty);
         }
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4586fe5b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java
index f597037..38c8f13 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java
@@ -1,50 +1,3 @@
-<<<<<<< HEAD
-/**
- * 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.ws.policy.handler;
-
-import javax.jws.HandlerChain;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-
-import org.apache.cxf.annotations.EndpointProperties;
-import org.apache.cxf.annotations.EndpointProperty;
-
-@WebService(name = "HelloPolicyService", serviceName = "HelloPolicyService")
-@EndpointProperties(value = {
-        @EndpointProperty(key = "security.callback-handler", 
-        value = "org.apache.cxf.systest.ws.policy.handler.CommonPasswordCallback"),
-        @EndpointProperty(key = "ws-security.is-bsp-compliant", value = "false"),
-        @EndpointProperty(key = "security.signature.properties", value = "alice.properties"),
-        @EndpointProperty(key = "security.signature.username", value = "alice")
-        })
-@HandlerChain(file = "handlers.xml")
-public class HelloServiceImpl implements HelloService {
-    @Override
-    @WebResult(name = "result")
-    public boolean checkHello(@WebParam(name = "input") String input) throws MyFault {
-        throw new MyFault("myMessage", "myFaultInfo");
-    }
-
-}
-=======
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements. See the NOTICE file
@@ -91,4 +44,3 @@ public class HelloServiceImpl implements HelloService {
     }
 
 }
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings

http://git-wip-us.apache.org/repos/asf/cxf/blob/4586fe5b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
index 0a8812f..75142a4 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
@@ -205,15 +205,9 @@ public class WSSCUnitTest extends AbstractBusClientServerTestBase {
         stsClient.setLocation("http://localhost:" + PORT2 + "/" + "DoubleItSymmetric");
         
         stsClient.setPolicy(createSymmetricBindingPolicy());
-<<<<<<< HEAD
-        
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.encryption.username", "bob");
-=======
 
         Map<String, Object> properties = new HashMap<>();
         properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
         TokenCallbackHandler callbackHandler = new TokenCallbackHandler();
         properties.put(SecurityConstants.CALLBACK_HANDLER, callbackHandler);
         properties.put(SecurityConstants.SIGNATURE_PROPERTIES, "alice.properties");
@@ -246,15 +240,9 @@ public class WSSCUnitTest extends AbstractBusClientServerTestBase {
         stsClient.setLocation("http://localhost:" + PORT2 + "/" + "DoubleItSymmetric");
         
         stsClient.setPolicy(createSymmetricBindingPolicy());
-<<<<<<< HEAD
-        
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.encryption.username", "bob");
-=======
 
         Map<String, Object> properties = new HashMap<>();
         properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
         TokenCallbackHandler callbackHandler = new TokenCallbackHandler();
         properties.put(SecurityConstants.CALLBACK_HANDLER, callbackHandler);
         properties.put(SecurityConstants.SIGNATURE_PROPERTIES, "alice.properties");

http://git-wip-us.apache.org/repos/asf/cxf/blob/4586fe5b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java
index b4a37a0..9575dca 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java
@@ -34,17 +34,10 @@ import org.example.contract.doubleit.DoubleItPortType;
 @Features(features = "org.apache.cxf.feature.LoggingFeature")    
 
 @EndpointProperties({
-<<<<<<< HEAD
-    @EndpointProperty(key = "security.encryption.username", value = "alice"),
-    @EndpointProperty(key = "security.encryption.properties", value = "alice.properties"),
-    @EndpointProperty(key = "security.signature.properties", value = "bob.properties"),
-    @EndpointProperty(key = "security.callback-handler", 
-=======
     @EndpointProperty(key = SecurityConstants.ENCRYPT_USERNAME, value = "alice"),
     @EndpointProperty(key = SecurityConstants.ENCRYPT_PROPERTIES, value = "alice.properties"),
     @EndpointProperty(key = SecurityConstants.SIGNATURE_PROPERTIES, value = "bob.properties"),
     @EndpointProperty(key = SecurityConstants.CALLBACK_HANDLER,
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                       value = "org.apache.cxf.systest.ws.common.KeystorePasswordCallback")
 })
 public class DoubleItPropertiesImpl implements DoubleItPortType {


[5/5] cxf git commit: Fixing merge

Posted by co...@apache.org.
Fixing merge


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

Branch: refs/heads/3.1.x-fixes
Commit: 794243e6c9ed943a78cde259f40d984514c03559
Parents: 4586fe5
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Mar 28 17:10:04 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Mar 28 17:10:04 2017 +0100

----------------------------------------------------------------------
 .../jaxrs/security/xml/JAXRSXmlSecTest.java     | 113 +------------------
 1 file changed, 1 insertion(+), 112 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/794243e6/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
index 83584e5..7eff132 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
@@ -98,7 +98,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         Bus springBus = bf.createBus(busFile.toString());
         bean.setBus(springBus);
 
-        Map<String, Object> newProperties = new HashMap<>();
+        Map<String, Object> newProperties = new HashMap<String, Object>();
         newProperties.put(SecurityConstants.CALLBACK_HANDLER,
             "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
         newProperties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
@@ -143,13 +143,8 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         String address = "https://localhost:" + test.port + "/xmlsigconstraints";
         
         // Successful test with "bob"
-<<<<<<< HEAD
-        Map<String, Object> newProperties = new HashMap<String, Object>();
-        newProperties.put("security.callback-handler", 
-=======
         Map<String, Object> newProperties = new HashMap<>();
         newProperties.put(SecurityConstants.CALLBACK_HANDLER,
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
             "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
         newProperties.put(SecurityConstants.SIGNATURE_USERNAME, "bob");
 
@@ -159,11 +154,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         
         // Constraint validation fails with "alice"
         newProperties.clear();
-<<<<<<< HEAD
-        newProperties.put("security.callback-handler", 
-=======
         newProperties.put(SecurityConstants.CALLBACK_HANDLER,
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
             "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
         newProperties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
 
@@ -196,17 +187,10 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
 
         Map<String, Object> newProperties = new HashMap<String, Object>(properties);
         if (newProperties.isEmpty()) {
-<<<<<<< HEAD
-            newProperties.put("security.callback-handler", 
-                           "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-            newProperties.put("security.signature.username", "alice");
-            
-=======
             newProperties.put(SecurityConstants.CALLBACK_HANDLER,
                            "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
             newProperties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
 
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
             String cryptoUrl = "org/apache/cxf/systest/jaxrs/security/alice.properties";
             if (cryptoUrlPrefix != null) {
                 cryptoUrl = cryptoUrlPrefix + this.getClass().getResource("/" + cryptoUrl).toURI().getPath();
@@ -278,19 +262,11 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         Bus springBus = bf.createBus(busFile.toString());
         bean.setBus(springBus);
 
-<<<<<<< HEAD
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.callback-handler", 
-                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        properties.put("security.signature.username", "alice");
-        properties.put("security.signature.properties", 
-=======
         Map<String, Object> properties = new HashMap<>();
         properties.put(SecurityConstants.CALLBACK_HANDLER,
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
         properties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
         properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/alice.properties");
         bean.setProperties(properties);
         if (streaming) {
@@ -422,19 +398,11 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
     @Test
     public void testPostEncryptedBook() throws Exception {
         String address = "https://localhost:" + test.port + "/xmlenc/bookstore/books";
-<<<<<<< HEAD
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.callback-handler", 
-                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        properties.put("security.encryption.username", "bob");
-        properties.put("security.encryption.properties", 
-=======
         Map<String, Object> properties = new HashMap<>();
         properties.put(SecurityConstants.CALLBACK_HANDLER,
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
         properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
         properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         doTestPostEncryptedBook(address, false, properties, test.streaming);
     }
@@ -454,19 +422,11 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         }
         
         String address = "https://localhost:" + test.port + "/xmlenc/bookstore/books";
-<<<<<<< HEAD
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.callback-handler", 
-                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        properties.put("security.encryption.username", "bob");
-        properties.put("security.encryption.properties", 
-=======
         Map<String, Object> properties = new HashMap<>();
         properties.put(SecurityConstants.CALLBACK_HANDLER,
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
         properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
         properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         
         EncryptionProperties encryptionProperties = new EncryptionProperties();
@@ -480,19 +440,11 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
     @Test
     public void testPostEncryptedBookSHA256() throws Exception {
         String address = "https://localhost:" + test.port + "/xmlenc/bookstore/books";
-<<<<<<< HEAD
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.callback-handler", 
-                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        properties.put("security.encryption.username", "bob");
-        properties.put("security.encryption.properties", 
-=======
         Map<String, Object> properties = new HashMap<>();
         properties.put(SecurityConstants.CALLBACK_HANDLER,
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
         properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
         properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         
         EncryptionProperties encryptionProperties = new EncryptionProperties();
@@ -508,19 +460,11 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
     @Test
     public void testPostEncryptedBookIssuerSerial() throws Exception {
         String address = "https://localhost:" + test.port + "/xmlenc/bookstore/books";
-<<<<<<< HEAD
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.callback-handler", 
-                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        properties.put("security.encryption.username", "bob");
-        properties.put("security.encryption.properties", 
-=======
         Map<String, Object> properties = new HashMap<>();
         properties.put(SecurityConstants.CALLBACK_HANDLER,
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
         properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
         properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         
         EncryptionProperties encryptionProperties = new EncryptionProperties();
@@ -535,16 +479,6 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
     @Test
     public void testPostEncryptedSignedBook() throws Exception {
         String address = "https://localhost:" + test.port + "/xmlsec-validate/bookstore/books";
-<<<<<<< HEAD
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.callback-handler", 
-                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        properties.put("security.encryption.username", "bob");
-        properties.put("security.encryption.properties", 
-                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
-        properties.put("security.signature.username", "alice");
-        properties.put("security.signature.properties", 
-=======
         Map<String, Object> properties = new HashMap<>();
         properties.put(SecurityConstants.CALLBACK_HANDLER,
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
@@ -553,7 +487,6 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         properties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
         properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/alice.properties");
         doTestPostEncryptedBook(address, true, properties, test.streaming);
         
@@ -562,16 +495,6 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
     @Test
     public void testPostEncryptedSignedBookInvalid() throws Exception {
         String address = "https://localhost:" + test.port + "/xmlsec-validate/bookstore/books";
-<<<<<<< HEAD
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.callback-handler", 
-                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        properties.put("security.encryption.username", "bob");
-        properties.put("security.encryption.properties", 
-                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
-        properties.put("security.signature.username", "alice");
-        properties.put("security.signature.properties", 
-=======
         Map<String, Object> properties = new HashMap<>();
         properties.put(SecurityConstants.CALLBACK_HANDLER,
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
@@ -580,7 +503,6 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         properties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
         properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/alice.properties");
         
         EncryptionProperties encryptionProperties = new EncryptionProperties();
@@ -599,16 +521,6 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
     @Test
     public void testPostEncryptedSignedBookUseReqSigCert() throws Exception {
         String address = "https://localhost:" + test.port + "/xmlsec-useReqSigCert/bookstore/books";
-<<<<<<< HEAD
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.callback-handler", 
-                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        properties.put("security.encryption.username", "bob");
-        properties.put("security.encryption.properties", 
-                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
-        properties.put("security.signature.username", "alice");
-        properties.put("security.signature.properties", 
-=======
         Map<String, Object> properties = new HashMap<>();
         properties.put(SecurityConstants.CALLBACK_HANDLER,
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
@@ -617,7 +529,6 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         properties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
         properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/alice.properties");
         doTestPostEncryptedBook(address, true, properties, test.streaming);
     }
@@ -738,16 +649,6 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         URL busFile = JAXRSXmlSecTest.class.getResource("client.xml");
         Bus springBus = bf.createBus(busFile.toString());
         bean.setBus(springBus);
-<<<<<<< HEAD
-        
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.callback-handler", 
-                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        properties.put("security.encryption.username", "bob");
-        properties.put("security.encryption.properties", 
-                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
-        properties.put("security.signature.properties", 
-=======
 
         Map<String, Object> properties = new HashMap<>();
         properties.put(SecurityConstants.CALLBACK_HANDLER,
@@ -756,7 +657,6 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/alice.properties");
         bean.setProperties(properties);
         
@@ -793,16 +693,6 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         URL busFile = JAXRSXmlSecTest.class.getResource("client.xml");
         Bus springBus = bf.createBus(busFile.toString());
         bean.setBus(springBus);
-<<<<<<< HEAD
-        
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.callback-handler", 
-                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        properties.put("security.encryption.username", "bob");
-        properties.put("security.encryption.properties", 
-                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
-        properties.put("security.signature.properties", 
-=======
 
         Map<String, Object> properties = new HashMap<>();
         properties.put(SecurityConstants.CALLBACK_HANDLER,
@@ -811,7 +701,6 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
->>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/alice.properties");
         bean.setProperties(properties);
         


[2/5] cxf git commit: Switching to use security constants in the tests instead of strings

Posted by co...@apache.org.
http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/SamlTokenTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/SamlTokenTest.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/SamlTokenTest.java
index 188d05c..64219eb 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/SamlTokenTest.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/SamlTokenTest.java
@@ -138,7 +138,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         }
         
         ((BindingProvider)saml1Port).getRequestContext().put(
-            "security.saml-callback-handler", new SamlCallbackHandler()
+            SecurityConstants.SAML_CALLBACK_HANDLER, new SamlCallbackHandler()
         );
         try {
             saml1Port.doubleIt(25);
@@ -149,7 +149,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         }
 
         ((BindingProvider)saml1Port).getRequestContext().put(
-            "security.saml-callback-handler", new SamlCallbackHandler(false)
+            SecurityConstants.SAML_CALLBACK_HANDLER, new SamlCallbackHandler(false)
         );
         int result = saml1Port.doubleIt(25);
         assertTrue(result == 50);
@@ -160,7 +160,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         updateAddressPort(saml1Port, PORT2);
         
         ((BindingProvider)saml1Port).getRequestContext().put(
-            "security.saml-callback-handler", new SamlCallbackHandler(false)
+            SecurityConstants.SAML_CALLBACK_HANDLER, new SamlCallbackHandler(false)
         );
         
         try {
@@ -203,7 +203,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         SamlCallbackHandler samlCallbackHandler = new SamlCallbackHandler(false, true);
         samlCallbackHandler.setConfirmationMethod(SAML1Constants.CONF_BEARER);
         ((BindingProvider)saml1Port).getRequestContext().put(
-            "security.saml-callback-handler", samlCallbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, samlCallbackHandler
         );
         
         int result = saml1Port.doubleIt(25);
@@ -242,7 +242,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         SamlCallbackHandler callbackHandler = new SamlCallbackHandler(false, true);
         callbackHandler.setConfirmationMethod(SAML1Constants.CONF_BEARER);
         ((BindingProvider)saml1Port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         
         ((BindingProvider)saml1Port).getRequestContext().put(
@@ -296,7 +296,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         }
         
         ((BindingProvider)saml1Port).getRequestContext().put(
-            "security.saml-callback-handler", new SamlElementCallbackHandler(false)
+            SecurityConstants.SAML_CALLBACK_HANDLER, new SamlElementCallbackHandler(false)
         );
         int result = saml1Port.doubleIt(25);
         assertTrue(result == 50);
@@ -334,7 +334,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         }
         
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", new SamlCallbackHandler(false)
+            SecurityConstants.SAML_CALLBACK_HANDLER, new SamlCallbackHandler(false)
         );
         try {
             saml2Port.doubleIt(25);
@@ -347,7 +347,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         SamlCallbackHandler samlCallbackHandler = new SamlCallbackHandler();
         samlCallbackHandler.setSignAssertion(true);
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", samlCallbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, samlCallbackHandler
         );
         int result = saml2Port.doubleIt(25);
         assertTrue(result == 50);
@@ -381,7 +381,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         }
 
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", new SamlCallbackHandler()
+            SecurityConstants.SAML_CALLBACK_HANDLER, new SamlCallbackHandler()
         );
         
         try {
@@ -425,7 +425,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         }
         
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", new SamlCallbackHandler(false)
+            SecurityConstants.SAML_CALLBACK_HANDLER, new SamlCallbackHandler(false)
         );
         try {
             saml2Port.doubleIt(25);
@@ -436,7 +436,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         }
         
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", new SamlCallbackHandler()
+            SecurityConstants.SAML_CALLBACK_HANDLER, new SamlCallbackHandler()
         );
         int result = saml2Port.doubleIt(25);
         assertTrue(result == 50);
@@ -447,7 +447,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         updateAddressPort(saml2Port, PORT);
         
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", new SamlCallbackHandler()
+            SecurityConstants.SAML_CALLBACK_HANDLER, new SamlCallbackHandler()
         );
         
         try {
@@ -488,7 +488,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         }
         
         ((BindingProvider)saml1Port).getRequestContext().put(
-            "security.saml-callback-handler", new SamlCallbackHandler(false, true)
+            SecurityConstants.SAML_CALLBACK_HANDLER, new SamlCallbackHandler(false, true)
         );
         int result = saml1Port.doubleIt(25);
         assertTrue(result == 50);
@@ -523,7 +523,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         }
         
         ((BindingProvider)saml1Port).getRequestContext().put(
-            "security.saml-callback-handler", new SamlCallbackHandler(false, true)
+            SecurityConstants.SAML_CALLBACK_HANDLER, new SamlCallbackHandler(false, true)
         );
         int result = saml1Port.doubleIt(25);
         assertTrue(result == 50);
@@ -556,7 +556,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         SamlCallbackHandler callbackHandler = new SamlCallbackHandler(true, true);
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         int result = saml2Port.doubleIt(25);
         assertTrue(result == 50);
@@ -590,7 +590,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         if (!test.isStreaming() && PORT.equals(test.getPort())) {
             SamlCallbackHandler samlCallbackHandler = new SamlCallbackHandler();
             ((BindingProvider)saml2Port).getRequestContext().put(
-                "security.saml-callback-handler", samlCallbackHandler
+                SecurityConstants.SAML_CALLBACK_HANDLER, samlCallbackHandler
             );
             int result = saml2Port.doubleIt(25);
             assertTrue(result == 50);
@@ -628,7 +628,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         SamlCallbackHandler callbackHandler = new SamlCallbackHandler(true, true);
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
 
         int result = saml2Port.doubleIt(25);
@@ -667,7 +667,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
         callbackHandler.setKeyInfoIdentifier(CERT_IDENTIFIER.KEY_VALUE);
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
 
         int result = saml2Port.doubleIt(25);
@@ -705,7 +705,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         SamlCallbackHandler callbackHandler = new SamlCallbackHandler(true, true);
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
 
         int result = saml2Port.doubleIt(25);
@@ -737,7 +737,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         }
         
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", new SamlCallbackHandler()
+            SecurityConstants.SAML_CALLBACK_HANDLER, new SamlCallbackHandler()
         );
         int result = saml2Port.doubleIt(25);
         assertTrue(result == 50);
@@ -771,7 +771,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         // TODO Only working for DOM client + server atm
         if (!test.isStreaming() && PORT.equals(test.getPort())) {
             ((BindingProvider)saml2Port).getRequestContext().put(
-                "security.saml-callback-handler", new SamlCallbackHandler()
+                SecurityConstants.SAML_CALLBACK_HANDLER, new SamlCallbackHandler()
             );
             int result = saml2Port.doubleIt(25);
             assertTrue(result == 50);
@@ -805,7 +805,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         SamlCallbackHandler callbackHandler = new SamlCallbackHandler(true, true);
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_BEARER);
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         int result = saml2Port.doubleIt(25);
         assertTrue(result == 50);
@@ -842,7 +842,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         SamlCallbackHandler callbackHandler = new SamlCallbackHandler(true, true);
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
 
         int result = saml2Port.doubleIt(25);
@@ -921,7 +921,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         roleCallbackHandler.setSignAssertion(true);
         roleCallbackHandler.setRoleName("manager");
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", roleCallbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, roleCallbackHandler
         );
         
         int result = saml2Port.doubleIt(25);
@@ -963,7 +963,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
 
         // Create a SAML Token with no "OneTimeUse" Condition
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", new SamlCallbackHandler()
+            SecurityConstants.SAML_CALLBACK_HANDLER, new SamlCallbackHandler()
         );
         
         Client cxfClient = ClientProxy.getClient(saml2Port);
@@ -984,7 +984,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         callbackHandler.setConditions(conditions);
         
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         
         cxfClient.getOutInterceptors().remove(cacheInterceptor);
@@ -1038,7 +1038,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         SamlCallbackHandler callbackHandler = new SamlCallbackHandler();
         callbackHandler.setConditions(conditions);
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         
         saml2Port.doubleIt(25);
@@ -1093,7 +1093,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         SamlCallbackHandler callbackHandler = new SamlCallbackHandler();
         callbackHandler.setConditions(conditions);
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         
         saml2Port.doubleIt(25);
@@ -1132,7 +1132,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         SamlCallbackHandler callbackHandler = new SamlCallbackHandler();
         callbackHandler.setConditions(conditions);
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         
         // It should fail with validation enabled
@@ -1149,7 +1149,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         updateAddressPort(saml2Port, portNumber);
         
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         saml2Port.doubleIt(25);
     }
@@ -1184,7 +1184,7 @@ public class SamlTokenTest extends AbstractBusClientServerTestBase {
         callbackHandler.setDigestAlgorithm(WSConstants.SHA256);
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
         ((BindingProvider)saml2Port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
 
         int result = saml2Port.doubleIt(25);

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/subjectconf/SamlSubjectConfTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/subjectconf/SamlSubjectConfTest.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/subjectconf/SamlSubjectConfTest.java
index fbdfbff..5c14d7a 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/subjectconf/SamlSubjectConfTest.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/subjectconf/SamlSubjectConfTest.java
@@ -29,6 +29,7 @@ import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.rt.security.SecurityConstants;
 import org.apache.cxf.systest.ws.common.SecurityTestUtil;
 import org.apache.cxf.systest.ws.common.TestParam;
 import org.apache.cxf.systest.ws.saml.client.SamlCallbackHandler;
@@ -117,7 +118,7 @@ public class SamlSubjectConfTest extends AbstractBusClientServerTestBase {
         callbackHandler.setCryptoPropertiesFile("morpit.properties");
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         int result = port.doubleIt(25);
         assertTrue(result == 50);
@@ -131,7 +132,7 @@ public class SamlSubjectConfTest extends AbstractBusClientServerTestBase {
         callbackHandler.setCryptoPropertiesFile("morpit.properties");
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         try {
             port.doubleIt(25);
@@ -165,7 +166,7 @@ public class SamlSubjectConfTest extends AbstractBusClientServerTestBase {
         SamlCallbackHandler callbackHandler = new SamlCallbackHandler(true, true);
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
         ((BindingProvider)port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         
         try {
@@ -205,7 +206,7 @@ public class SamlSubjectConfTest extends AbstractBusClientServerTestBase {
         callbackHandler.setCryptoPropertiesFile("morpit.properties");
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         try {
             port.doubleIt(25);
@@ -244,7 +245,7 @@ public class SamlSubjectConfTest extends AbstractBusClientServerTestBase {
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_SENDER_VOUCHES);
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         int result = port.doubleIt(25);
         assertTrue(result == 50);
@@ -275,7 +276,7 @@ public class SamlSubjectConfTest extends AbstractBusClientServerTestBase {
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_SENDER_VOUCHES);
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         try {
             port.doubleIt(25);
@@ -318,7 +319,7 @@ public class SamlSubjectConfTest extends AbstractBusClientServerTestBase {
         callbackHandler.setCryptoPropertiesFile("morpit.properties");
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         int result = port.doubleIt(25);
         assertTrue(result == 50);
@@ -349,7 +350,7 @@ public class SamlSubjectConfTest extends AbstractBusClientServerTestBase {
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_BEARER);
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         
         try {
@@ -385,7 +386,7 @@ public class SamlSubjectConfTest extends AbstractBusClientServerTestBase {
         callbackHandler.setConfirmationMethod("urn:oasis:names:tc:SAML:2.0:cm:custom");
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         
         try {

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
index 3d52467..0a8812f 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
@@ -36,6 +36,7 @@ import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.rt.security.SecurityConstants;
 import org.apache.cxf.systest.ws.common.SecurityTestUtil;
 import org.apache.cxf.systest.ws.common.TestParam;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -204,13 +205,19 @@ public class WSSCUnitTest extends AbstractBusClientServerTestBase {
         stsClient.setLocation("http://localhost:" + PORT2 + "/" + "DoubleItSymmetric");
         
         stsClient.setPolicy(createSymmetricBindingPolicy());
+<<<<<<< HEAD
         
         Map<String, Object> properties = new HashMap<String, Object>();
         properties.put("security.encryption.username", "bob");
+=======
+
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
         TokenCallbackHandler callbackHandler = new TokenCallbackHandler();
-        properties.put("security.callback-handler", callbackHandler);
-        properties.put("security.signature.properties", "alice.properties");
-        properties.put("security.encryption.properties", "bob.properties");
+        properties.put(SecurityConstants.CALLBACK_HANDLER, callbackHandler);
+        properties.put(SecurityConstants.SIGNATURE_PROPERTIES, "alice.properties");
+        properties.put(SecurityConstants.ENCRYPT_PROPERTIES, "bob.properties");
         stsClient.setProperties(properties);
         
         SecurityToken securityToken = 
@@ -239,13 +246,19 @@ public class WSSCUnitTest extends AbstractBusClientServerTestBase {
         stsClient.setLocation("http://localhost:" + PORT2 + "/" + "DoubleItSymmetric");
         
         stsClient.setPolicy(createSymmetricBindingPolicy());
+<<<<<<< HEAD
         
         Map<String, Object> properties = new HashMap<String, Object>();
         properties.put("security.encryption.username", "bob");
+=======
+
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
         TokenCallbackHandler callbackHandler = new TokenCallbackHandler();
-        properties.put("security.callback-handler", callbackHandler);
-        properties.put("security.signature.properties", "alice.properties");
-        properties.put("security.encryption.properties", "bob.properties");
+        properties.put(SecurityConstants.CALLBACK_HANDLER, callbackHandler);
+        properties.put(SecurityConstants.SIGNATURE_PROPERTIES, "alice.properties");
+        properties.put(SecurityConstants.ENCRYPT_PROPERTIES, "bob.properties");
         stsClient.setProperties(properties);
         
         SecurityToken securityToken = 

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java
index 7b37a1d..b4a37a0 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java
@@ -23,6 +23,7 @@ import javax.jws.WebService;
 import org.apache.cxf.annotations.EndpointProperties;
 import org.apache.cxf.annotations.EndpointProperty;
 import org.apache.cxf.feature.Features;
+import org.apache.cxf.rt.security.SecurityConstants;
 
 import org.example.contract.doubleit.DoubleItFault;
 import org.example.contract.doubleit.DoubleItPortType;
@@ -33,10 +34,17 @@ import org.example.contract.doubleit.DoubleItPortType;
 @Features(features = "org.apache.cxf.feature.LoggingFeature")    
 
 @EndpointProperties({
+<<<<<<< HEAD
     @EndpointProperty(key = "security.encryption.username", value = "alice"),
     @EndpointProperty(key = "security.encryption.properties", value = "alice.properties"),
     @EndpointProperty(key = "security.signature.properties", value = "bob.properties"),
     @EndpointProperty(key = "security.callback-handler", 
+=======
+    @EndpointProperty(key = SecurityConstants.ENCRYPT_USERNAME, value = "alice"),
+    @EndpointProperty(key = SecurityConstants.ENCRYPT_PROPERTIES, value = "alice.properties"),
+    @EndpointProperty(key = SecurityConstants.SIGNATURE_PROPERTIES, value = "bob.properties"),
+    @EndpointProperty(key = SecurityConstants.CALLBACK_HANDLER,
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                       value = "org.apache.cxf.systest.ws.common.KeystorePasswordCallback")
 })
 public class DoubleItPropertiesImpl implements DoubleItPortType {


[3/5] cxf git commit: Switching to use security constants in the tests instead of strings

Posted by co...@apache.org.
Switching to use security constants in the tests instead of strings

# Conflicts:
#	rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
#	services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.java
#	services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.java
#	services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
#	services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java
#	services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java
#	services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java
#	services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
#	services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java
#	services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
#	systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/grants/JAXRSOAuth2Test.java
#	systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlAuthorizationTest.java
#	systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
#	systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java
#	systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
#	systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java
#	systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
#	systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java


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

Branch: refs/heads/3.1.x-fixes
Commit: 30119990866f5da50d5261653a1843c618cd6459
Parents: 0b094e8
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Mar 28 16:27:09 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Mar 28 16:30:35 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/ws/rm/RMManager.java    |   4 +-
 .../systest/sts/custom/CustomParameterTest.java |  16 +--
 .../custom_onbehalfof/CustomOnBehalfOfTest.java |   5 +-
 .../cxf/systest/sts/renew/SAMLRenewTest.java    |   2 +-
 .../SecurityContextTokenCancelTest.java         |   2 +-
 .../sts/sendervouches/DoubleItPortTypeImpl.java |   3 +-
 .../sts/symmetric/SymmetricBindingTest.java     |  10 +-
 .../cxf/systest/sts/template/TemplateTest.java  |   8 +-
 .../sts/transport/TransportBindingTest.java     |   8 +-
 .../UsernameActAsCachingTest.java               |  34 ++---
 .../sts/username_actas/UsernameActAsTest.java   |   7 +-
 .../UsernameOnBehalfOfCachingTest.java          |  36 ++---
 .../UsernameOnBehalfOfTest.java                 |   9 +-
 .../security/oauth2/grants/JAXRSOAuth2Test.java |  13 +-
 .../saml/JAXRSSamlAuthorizationTest.java        |   5 +-
 .../jaxrs/security/xml/JAXRSXmlSecTest.java     | 140 +++++++++++++++++--
 .../ws/rm/sec/WSRMWithWSSecurityPolicyTest.java |  39 +++++-
 .../apache/cxf/systest/ws/fault/FaultTest.java  |  31 ++--
 .../ws/policy/handler/HelloServiceImpl.java     |  49 +++++++
 .../cxf/systest/ws/saml/SamlTokenTest.java      |  62 ++++----
 .../saml/subjectconf/SamlSubjectConfTest.java   |  19 +--
 .../cxf/systest/ws/wssc/WSSCUnitTest.java       |  25 +++-
 .../systest/ws/x509/DoubleItPropertiesImpl.java |   8 ++
 23 files changed, 381 insertions(+), 154 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
index 6a0839e..a29a6a7 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
@@ -475,8 +475,8 @@ public class RMManager {
             Map<String, Object> context = new HashMap<String, Object>(16);
             for (String key : message.getContextualPropertyKeys()) {
                 //copy other properties?
-                if (key.startsWith("ws-security")) {
-                    context.put(key, message.getContextualProperty(key));                  
+                if (key.startsWith("ws-security") || key.startsWith("security.")) {
+                    context.put(key, message.getContextualProperty(key));
                 }
             }
             

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
index 9100f56..1048a84 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
@@ -98,8 +98,8 @@ public class CustomParameterTest extends AbstractBusClientServerTestBase {
         stsClient.setEndpointName("{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}UT_Port");
         
         Map<String, Object> properties = new HashMap<>();
-        properties.put("security.username", "alice");
-        properties.put("security.callback-handler", "org.apache.cxf.systest.sts.common.CommonCallbackHandler");
+        properties.put(SecurityConstants.USERNAME, "alice");
+        properties.put(SecurityConstants.CALLBACK_HANDLER, "org.apache.cxf.systest.sts.common.CommonCallbackHandler");
         properties.put("security.sts.token.username", "myclientkey");
         properties.put("security.sts.token.properties", "clientKeystore.properties");
         properties.put("security.sts.token.usecert", "true");
@@ -143,8 +143,8 @@ public class CustomParameterTest extends AbstractBusClientServerTestBase {
         stsClient.setEndpointName("{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}UT_Port");
         
         Map<String, Object> properties = new HashMap<>();
-        properties.put("security.username", "alice");
-        properties.put("security.callback-handler", "org.apache.cxf.systest.sts.common.CommonCallbackHandler");
+        properties.put(SecurityConstants.USERNAME, "alice");
+        properties.put(SecurityConstants.CALLBACK_HANDLER, "org.apache.cxf.systest.sts.common.CommonCallbackHandler");
         properties.put("security.sts.token.username", "myclientkey");
         properties.put("security.sts.token.properties", "clientKeystore.properties");
         properties.put("security.sts.token.usecert", "true");
@@ -193,8 +193,8 @@ public class CustomParameterTest extends AbstractBusClientServerTestBase {
         stsClient.setEndpointName("{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Transport_Port");
         
         Map<String, Object> properties = new HashMap<>();
-        properties.put("security.username", "alice");
-        properties.put("security.callback-handler", "org.apache.cxf.systest.sts.common.CommonCallbackHandler");
+        properties.put(SecurityConstants.USERNAME, "alice");
+        properties.put(SecurityConstants.CALLBACK_HANDLER, "org.apache.cxf.systest.sts.common.CommonCallbackHandler");
         properties.put("security.sts.token.username", "myclientkey");
         properties.put("security.sts.token.properties", "clientKeystore.properties");
         properties.put("security.sts.token.usecert", "true");
@@ -238,8 +238,8 @@ public class CustomParameterTest extends AbstractBusClientServerTestBase {
         stsClient.setEndpointName("{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Transport_Port");
         
         Map<String, Object> properties = new HashMap<>();
-        properties.put("security.username", "alice");
-        properties.put("security.callback-handler", "org.apache.cxf.systest.sts.common.CommonCallbackHandler");
+        properties.put(SecurityConstants.USERNAME, "alice");
+        properties.put(SecurityConstants.CALLBACK_HANDLER, "org.apache.cxf.systest.sts.common.CommonCallbackHandler");
         properties.put("security.sts.token.username", "myclientkey");
         properties.put("security.sts.token.properties", "clientKeystore.properties");
         properties.put("security.sts.token.usecert", "true");

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.java
index fea7af8..7844e83 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.java
@@ -26,6 +26,7 @@ import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.rt.security.SecurityConstants;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 
@@ -35,7 +36,7 @@ import org.junit.BeforeClass;
 /**
  * In this test case, a CXF client requests a Security Token from an STS, passing a username that
  * it has obtained from an unknown client as an "OnBehalfOf" element. This username is obtained
- * by parsing the "security.username" property. The client then invokes on the service 
+ * by parsing the SecurityConstants.USERNAME property. The client then invokes on the service
  * provider using the returned (custom BinarySecurityToken) token from the STS. The service
  * provider dispatches the received BinarySecurityToken to the STS for validation, and receives
  * a transformed SAML Token in response.
@@ -89,7 +90,7 @@ public class CustomOnBehalfOfTest extends AbstractBusClientServerTestBase {
 
         // Transport port
         ((BindingProvider)transportPort).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         doubleIt(transportPort, 25);
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewTest.java
index 3c7a8a7..004c25c 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewTest.java
@@ -111,7 +111,7 @@ public class SAMLRenewTest extends AbstractBusClientServerTestBase {
         updateAddressPort(saml2IntermediaryPort, PORT);
         
         ((BindingProvider)saml2IntermediaryPort).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         
         // Make initial successful invocation(s)

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.java
index 7e73b53..7098d63 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.java
@@ -97,7 +97,7 @@ public class SecurityContextTokenCancelTest extends AbstractBusClientServerTestB
         Map<String, Object> properties = new HashMap<String, Object>();
         properties.put(SecurityConstants.USERNAME, "alice");
         properties.put(
-            "security.callback-handler", 
+            SecurityConstants.CALLBACK_HANDLER,
             "org.apache.cxf.systest.sts.common.CommonCallbackHandler"
         );
         properties.put("ws-security.sts.token.properties", "serviceKeystore.properties");

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/DoubleItPortTypeImpl.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/DoubleItPortTypeImpl.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/DoubleItPortTypeImpl.java
index 6e37b53..77f816f 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/DoubleItPortTypeImpl.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/DoubleItPortTypeImpl.java
@@ -28,6 +28,7 @@ import javax.xml.ws.Service;
 import javax.xml.ws.WebServiceContext;
 
 import org.apache.cxf.feature.Features;
+import org.apache.cxf.rt.security.SecurityConstants;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.example.contract.doubleit.DoubleItPortType;
 
@@ -63,7 +64,7 @@ public class DoubleItPortTypeImpl extends AbstractBusClientServerTestBase implem
         //
         Saml2CallbackHandler callbackHandler = new Saml2CallbackHandler(wsc.getUserPrincipal());
         ((BindingProvider)transportSAML2SupportingPort).getRequestContext().put(
-            "security.saml-callback-handler", callbackHandler
+            SecurityConstants.SAML_CALLBACK_HANDLER, callbackHandler
         );
         
         return transportSAML2SupportingPort.doubleIt(numberToDouble);

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
index 05681fc..7b06206 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
@@ -352,12 +352,12 @@ public class SymmetricBindingTest extends AbstractBusClientServerTestBase {
         stsClient.setServiceName("{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService");
         stsClient.setEndpointName("{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}UT_Port");
         
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.username", "alice");
-        properties.put("security.callback-handler",
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.USERNAME, "alice");
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
                        "org.apache.cxf.systest.sts.common.CommonCallbackHandler");
-        properties.put("security.encryption.username", "mystskey");
-        properties.put("security.encryption.properties", "clientKeystore.properties");
+        properties.put(SecurityConstants.ENCRYPT_USERNAME, "mystskey");
+        properties.put(SecurityConstants.ENCRYPT_PROPERTIES, "clientKeystore.properties");
         properties.put("ws-security.is-bsp-compliant", "false");
         stsClient.setProperties(properties);
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java
index 39a59f3..f8c6d8d 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java
@@ -346,10 +346,10 @@ public class TemplateTest extends AbstractBusClientServerTestBase {
         STSClient stsClient = new STSClient(bus);
         stsClient.setServiceName("{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService");
         stsClient.setEndpointName("{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Transport_Port");
-        
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.username", "alice");
-        properties.put("security.callback-handler",
+
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.USERNAME, "alice");
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
                        "org.apache.cxf.systest.sts.common.CommonCallbackHandler");
         properties.put("ws-security.sts.token.username", "myclientkey");
         properties.put("ws-security.sts.token.properties", "clientKeystore.properties");

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java
index 4ea89ce..7e14507 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java
@@ -435,10 +435,10 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
         STSClient stsClient = new STSClient(bus);
         stsClient.setServiceName("{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService");
         stsClient.setEndpointName("{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Transport_Port");
-        
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.username", "alice");
-        properties.put("security.callback-handler",
+
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.USERNAME, "alice");
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
                        "org.apache.cxf.systest.sts.common.CommonCallbackHandler");
         properties.put("ws-security.sts.token.username", "myclientkey");
         properties.put("ws-security.sts.token.properties", "clientKeystore.properties");

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java
index c8d2f1c..9cef3f7 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java
@@ -44,7 +44,7 @@ import org.junit.BeforeClass;
 /**
  * In this test case, a CXF client requests a Security Token from an STS, passing a username that
  * it has obtained from an unknown client as an "ActAs" element. This username is obtained
- * by parsing the "security.username" property. The client then invokes on the service 
+ * by parsing the SecurityConstants.USERNAME property. The client then invokes on the service
  * provider using the returned token from the STS.
  */
 public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
@@ -109,7 +109,7 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
 
         // Make a successful invocation
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         doubleIt(port, 25);
         
@@ -145,7 +145,7 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
         p.getRequestContext().put(TokenStore.class.getName(), tokenStore);
         
         // Make another invocation - this should succeed as the token is cached
-        p.getRequestContext().put("security.username", "alice");
+        p.getRequestContext().put(SecurityConstants.USERNAME, "alice");
         doubleIt(port2, 40);
         
         // Reset the cache - this invocation should fail
@@ -192,17 +192,17 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
         
         // Make a successful invocation
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         doubleIt(port, 25);
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "bob"
+            SecurityConstants.USERNAME, "bob"
         );
         doubleIt(port, 30);
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "eve"
+            SecurityConstants.USERNAME, "eve"
         );
         try {
             doubleIt(port, 30);
@@ -217,17 +217,17 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
         
         // Make a successful invocation
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         doubleIt(port, 25);
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "bob"
+            SecurityConstants.USERNAME, "bob"
         );
         doubleIt(port, 30);
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "eve2"
+            SecurityConstants.USERNAME, "eve2"
         );
         try {
             doubleIt(port, 30);
@@ -239,7 +239,7 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
         // Reset the cache - this invocation should fail
         p.getRequestContext().put(TokenStore.class.getName(), new MemoryTokenStore());
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         try {
             doubleIt(port, 30);
@@ -282,7 +282,7 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
         
         // Make a successful invocation
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         BindingProvider p = (BindingProvider)port;
         p.getRequestContext().put(
@@ -293,7 +293,7 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
         
         // Make a successful invocation
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "bob"
+            SecurityConstants.USERNAME, "bob"
         );
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
@@ -306,7 +306,7 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
         
         // Make a successful invocation - should work as token is cached
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
@@ -316,7 +316,7 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
         
         // Make a successful invocation - should work as token is cached
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "bob"
+            SecurityConstants.USERNAME, "bob"
         );
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
@@ -326,7 +326,7 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
         
         // Change appliesTo - should fail
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
@@ -373,7 +373,7 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
         
         // Make a successful invocation
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         // Disable appliesTo
         BindingProvider p = (BindingProvider)port;
@@ -392,7 +392,7 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
         
         // Bob should fail
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "bob"
+            SecurityConstants.USERNAME, "bob"
         );
         try {
             doubleIt(port, 30);

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
index 705b63c..7857b4f 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
@@ -28,6 +28,7 @@ import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.rt.security.SecurityConstants;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.systest.sts.common.TestParam;
 import org.apache.cxf.systest.sts.common.TokenTestUtils;
@@ -43,7 +44,7 @@ import org.junit.runners.Parameterized.Parameters;
 /**
  * In this test case, a CXF client requests a Security Token from an STS, passing a username that
  * it has obtained from an unknown client as an "ActAs" element. This username is obtained
- * by parsing the "security.username" property. The client then invokes on the service 
+ * by parsing the SecurityConstants.USERNAME property. The client then invokes on the service
  * provider using the returned token from the STS.
  */
 @RunWith(value = org.junit.runners.Parameterized.class)
@@ -126,7 +127,7 @@ public class UsernameActAsTest extends AbstractBusClientServerTestBase {
         
         // Transport port
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         doubleIt(port, 25);
         
@@ -144,7 +145,7 @@ public class UsernameActAsTest extends AbstractBusClientServerTestBase {
         }
         
         ((BindingProvider)port2).getRequestContext().put(
-            "security.username", "eve"
+            SecurityConstants.USERNAME, "eve"
         );
         // This time we expect a failure as the server validator doesn't accept "eve".
         try {

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java
index 1f6dda2..4ae1568 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java
@@ -43,8 +43,8 @@ import org.junit.BeforeClass;
 /**
  * In this test case, a CXF client requests a Security Token from an STS, passing a username that
  * it has obtained from an unknown client as an "OnBehalfOf" element. This username is obtained
- * by parsing the "security.username" property. The client then invokes on the service 
- * provider using the returned token from the STS. 
+ * by parsing the SecurityConstants.USERNAME property. The client then invokes on the service
+ * provider using the returned token from the STS.
  */
 public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBase {
     
@@ -108,7 +108,7 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
 
         // Make a successful invocation
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         doubleIt(port, 25);
         
@@ -145,7 +145,7 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
         p.getRequestContext().put(TokenStore.class.getName(), tokenStore);
         
         // Make another invocation - this should succeed as the token is cached
-        p.getRequestContext().put("security.username", "alice");
+        p.getRequestContext().put(SecurityConstants.USERNAME, "alice");
         doubleIt(port2, 40);
         
         // Reset the cache - this invocation should fail
@@ -192,17 +192,17 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
         
         // Make a successful invocation
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         doubleIt(port, 25);
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "bob"
+            SecurityConstants.USERNAME, "bob"
         );
         doubleIt(port, 30);
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "eve"
+            SecurityConstants.USERNAME, "eve"
         );
         try {
             doubleIt(port, 30);
@@ -217,17 +217,17 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
         
         // Make a successful invocation
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         doubleIt(port, 25);
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "bob"
+            SecurityConstants.USERNAME, "bob"
         );
         doubleIt(port, 30);
         
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "eve2"
+            SecurityConstants.USERNAME, "eve2"
         );
         try {
             doubleIt(port, 30);
@@ -239,7 +239,7 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
         // Reset the cache - this invocation should fail
         p.getRequestContext().put(TokenStore.class.getName(), new MemoryTokenStore());
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         try {
             doubleIt(port, 30);
@@ -282,7 +282,7 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
         
         // Make a successful invocation
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         BindingProvider p = (BindingProvider)port;
         p.getRequestContext().put(
@@ -293,7 +293,7 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
         
         // Make a successful invocation
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "bob"
+            SecurityConstants.USERNAME, "bob"
         );
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
@@ -306,7 +306,7 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
         
         // Make a successful invocation - should work as token is cached
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
@@ -316,7 +316,7 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
         
         // Make a successful invocation - should work as token is cached
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "bob"
+            SecurityConstants.USERNAME, "bob"
         );
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
@@ -326,7 +326,7 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
         
         // Change appliesTo - should fail
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
@@ -373,7 +373,7 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
         
         // Make a successful invocation
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         // Disable appliesTo
         BindingProvider p = (BindingProvider)port;
@@ -392,7 +392,7 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
         
         // Bob should fail
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "bob"
+            SecurityConstants.USERNAME, "bob"
         );
         try {
             doubleIt(port, 30);

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
index 04b11b0..b72a830 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
@@ -28,6 +28,7 @@ import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.rt.security.SecurityConstants;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.systest.sts.common.TestParam;
 import org.apache.cxf.systest.sts.common.TokenTestUtils;
@@ -42,8 +43,8 @@ import org.junit.runners.Parameterized.Parameters;
 /**
  * In this test case, a CXF client requests a Security Token from an STS, passing a username that
  * it has obtained from an unknown client as an "OnBehalfOf" element. This username is obtained
- * by parsing the "security.username" property. The client then invokes on the service 
- * provider using the returned token from the STS. 
+ * by parsing the SecurityConstants.USERNAME property. The client then invokes on the service
+ * provider using the returned token from the STS.
  */
 @RunWith(value = org.junit.runners.Parameterized.class)
 public class UsernameOnBehalfOfTest extends AbstractBusClientServerTestBase {
@@ -124,7 +125,7 @@ public class UsernameOnBehalfOfTest extends AbstractBusClientServerTestBase {
 
         // Transport port
         ((BindingProvider)port).getRequestContext().put(
-            "security.username", "alice"
+            SecurityConstants.USERNAME, "alice"
         );
         doubleIt(port, 25);
         
@@ -142,7 +143,7 @@ public class UsernameOnBehalfOfTest extends AbstractBusClientServerTestBase {
         }
         
         ((BindingProvider)port2).getRequestContext().put(
-            "security.username", "eve"
+            SecurityConstants.USERNAME, "eve"
         );
         // This time we expect a failure as the server validator doesn't accept "eve".
         try {

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/grants/JAXRSOAuth2Test.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/grants/JAXRSOAuth2Test.java b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/grants/JAXRSOAuth2Test.java
index 7adb545..d05d3bb 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/grants/JAXRSOAuth2Test.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/grants/JAXRSOAuth2Test.java
@@ -50,6 +50,7 @@ import org.apache.cxf.rs.security.oauth2.saml.Constants;
 import org.apache.cxf.rs.security.oauth2.utils.OAuthConstants;
 import org.apache.cxf.rs.security.saml.SAMLUtils;
 import org.apache.cxf.rs.security.saml.SAMLUtils.SelfSignInfo;
+import org.apache.cxf.rt.security.SecurityConstants;
 import org.apache.cxf.systest.jaxrs.security.oauth2.common.OAuth2TestUtils;
 import org.apache.cxf.systest.jaxrs.security.oauth2.common.SamlCallbackHandler;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -481,18 +482,18 @@ public class JAXRSOAuth2Test extends AbstractBusClientServerTestBase {
         Bus springBus = bf.createBus(busFile.toString());
         bean.setBus(springBus);
 
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.callback-handler", 
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
         
         SamlCallbackHandler samlCallbackHandler = new SamlCallbackHandler(true);
         samlCallbackHandler.setIssuer("alice");
         String audienceURI = "https://localhost:" + PORT + "/oauth2-auth/token";
         samlCallbackHandler.setAudience(audienceURI);
-        properties.put("security.saml-callback-handler", samlCallbackHandler);
-        
-        properties.put("security.signature.username", "alice");
-        properties.put("security.signature.properties", CRYPTO_RESOURCE_PROPERTIES);
+        properties.put(SecurityConstants.SAML_CALLBACK_HANDLER, samlCallbackHandler);
+
+        properties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
+        properties.put(SecurityConstants.SIGNATURE_PROPERTIES, CRYPTO_RESOURCE_PROPERTIES);
         bean.setProperties(properties);
         
         bean.getOutInterceptors().add(new Saml2BearerAuthOutInterceptor());

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlAuthorizationTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlAuthorizationTest.java b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlAuthorizationTest.java
index 0ce5f11..91c5d06 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlAuthorizationTest.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlAuthorizationTest.java
@@ -32,6 +32,7 @@ import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.rs.security.saml.SamlEnvelopedOutInterceptor;
+import org.apache.cxf.rt.security.SecurityConstants;
 import org.apache.cxf.systest.jaxrs.security.Book;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 
@@ -153,8 +154,8 @@ public class JAXRSSamlAuthorizationTest extends AbstractBusClientServerTestBase
         Bus springBus = bf.createBus(busFile.toString());
         bean.setBus(springBus);
 
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("security.saml-callback-handler", 
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.SAML_CALLBACK_HANDLER,
                        "org.apache.cxf.systest.jaxrs.security.saml.SamlCallbackHandler");
         if (extraProperties != null) {
             properties.putAll(extraProperties);

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
index 3d55f31..83584e5 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
@@ -41,6 +41,7 @@ import org.apache.cxf.rs.security.xml.XmlSecInInterceptor;
 import org.apache.cxf.rs.security.xml.XmlSecOutInterceptor;
 import org.apache.cxf.rs.security.xml.XmlSigInInterceptor;
 import org.apache.cxf.rs.security.xml.XmlSigOutInterceptor;
+import org.apache.cxf.rt.security.SecurityConstants;
 import org.apache.cxf.systest.jaxrs.security.Book;
 import org.apache.cxf.systest.jaxrs.security.BookStore;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -98,12 +99,12 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         bean.setBus(springBus);
 
         Map<String, Object> newProperties = new HashMap<>();
-        newProperties.put("ws-security.callback-handler", 
+        newProperties.put(SecurityConstants.CALLBACK_HANDLER,
             "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        newProperties.put("ws-security.signature.username", "alice");
+        newProperties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
 
         String cryptoUrl = "org/apache/cxf/systest/jaxrs/security/alice.properties";
-        newProperties.put("ws-security.signature.properties", cryptoUrl);
+        newProperties.put(SecurityConstants.SIGNATURE_PROPERTIES, cryptoUrl);
         bean.setProperties(newProperties);
         
         if (test.streaming) {
@@ -142,23 +143,32 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         String address = "https://localhost:" + test.port + "/xmlsigconstraints";
         
         // Successful test with "bob"
+<<<<<<< HEAD
         Map<String, Object> newProperties = new HashMap<String, Object>();
         newProperties.put("security.callback-handler", 
+=======
+        Map<String, Object> newProperties = new HashMap<>();
+        newProperties.put(SecurityConstants.CALLBACK_HANDLER,
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
             "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        newProperties.put("security.signature.username", "bob");
+        newProperties.put(SecurityConstants.SIGNATURE_USERNAME, "bob");
 
         String cryptoUrl = "org/apache/cxf/systest/jaxrs/security/bob.properties";
-        newProperties.put("security.signature.properties", cryptoUrl);
+        newProperties.put(SecurityConstants.SIGNATURE_PROPERTIES, cryptoUrl);
         doTestSignatureProxy(address, false, null, test.streaming, newProperties);
         
         // Constraint validation fails with "alice"
         newProperties.clear();
+<<<<<<< HEAD
         newProperties.put("security.callback-handler", 
+=======
+        newProperties.put(SecurityConstants.CALLBACK_HANDLER,
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
             "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        newProperties.put("security.signature.username", "alice");
+        newProperties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
 
         cryptoUrl = "org/apache/cxf/systest/jaxrs/security/alice.properties";
-        newProperties.put("security.signature.properties", cryptoUrl);
+        newProperties.put(SecurityConstants.SIGNATURE_PROPERTIES, cryptoUrl);
         try {
             doTestSignatureProxy(address, false, null, test.streaming, newProperties);
             fail("Failure expected on a failing cert constraint");
@@ -186,15 +196,22 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
 
         Map<String, Object> newProperties = new HashMap<String, Object>(properties);
         if (newProperties.isEmpty()) {
+<<<<<<< HEAD
             newProperties.put("security.callback-handler", 
                            "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
             newProperties.put("security.signature.username", "alice");
             
+=======
+            newProperties.put(SecurityConstants.CALLBACK_HANDLER,
+                           "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
+            newProperties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
+
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
             String cryptoUrl = "org/apache/cxf/systest/jaxrs/security/alice.properties";
             if (cryptoUrlPrefix != null) {
                 cryptoUrl = cryptoUrlPrefix + this.getClass().getResource("/" + cryptoUrl).toURI().getPath();
             }
-            newProperties.put("security.signature.properties", cryptoUrl);
+            newProperties.put(SecurityConstants.SIGNATURE_PROPERTIES, cryptoUrl);
         }
         bean.setProperties(newProperties);
         
@@ -261,11 +278,19 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         Bus springBus = bf.createBus(busFile.toString());
         bean.setBus(springBus);
 
+<<<<<<< HEAD
         Map<String, Object> properties = new HashMap<String, Object>();
         properties.put("security.callback-handler", 
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
         properties.put("security.signature.username", "alice");
         properties.put("security.signature.properties", 
+=======
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
+                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
+        properties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
+        properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/alice.properties");
         bean.setProperties(properties);
         if (streaming) {
@@ -317,10 +342,10 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         bean.setBus(springBus);
 
         Map<String, Object> properties = new HashMap<>();
-        properties.put("security.callback-handler",
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        properties.put("security.signature.username", "bethal");
-        properties.put("security.signature.properties",
+        properties.put(SecurityConstants.SIGNATURE_USERNAME, "bethal");
+        properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
                        "org/apache/cxf/systest/jaxrs/security/bethal.properties");
         bean.setProperties(properties);
         if (test.streaming) {
@@ -362,10 +387,10 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         bean.setBus(springBus);
 
         Map<String, Object> properties = new HashMap<>();
-        properties.put("security.callback-handler",
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        properties.put("security.signature.username", "bethal");
-        properties.put("security.signature.properties",
+        properties.put(SecurityConstants.SIGNATURE_USERNAME, "bethal");
+        properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
                        "org/apache/cxf/systest/jaxrs/security/bethal.properties");
         bean.setProperties(properties);
         if (test.streaming) {
@@ -397,11 +422,19 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
     @Test
     public void testPostEncryptedBook() throws Exception {
         String address = "https://localhost:" + test.port + "/xmlenc/bookstore/books";
+<<<<<<< HEAD
         Map<String, Object> properties = new HashMap<String, Object>();
         properties.put("security.callback-handler", 
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
         properties.put("security.encryption.username", "bob");
         properties.put("security.encryption.properties", 
+=======
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
+                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
+        properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+        properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         doTestPostEncryptedBook(address, false, properties, test.streaming);
     }
@@ -421,11 +454,19 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         }
         
         String address = "https://localhost:" + test.port + "/xmlenc/bookstore/books";
+<<<<<<< HEAD
         Map<String, Object> properties = new HashMap<String, Object>();
         properties.put("security.callback-handler", 
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
         properties.put("security.encryption.username", "bob");
         properties.put("security.encryption.properties", 
+=======
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
+                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
+        properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+        properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         
         EncryptionProperties encryptionProperties = new EncryptionProperties();
@@ -439,11 +480,19 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
     @Test
     public void testPostEncryptedBookSHA256() throws Exception {
         String address = "https://localhost:" + test.port + "/xmlenc/bookstore/books";
+<<<<<<< HEAD
         Map<String, Object> properties = new HashMap<String, Object>();
         properties.put("security.callback-handler", 
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
         properties.put("security.encryption.username", "bob");
         properties.put("security.encryption.properties", 
+=======
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
+                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
+        properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+        properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         
         EncryptionProperties encryptionProperties = new EncryptionProperties();
@@ -459,11 +508,19 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
     @Test
     public void testPostEncryptedBookIssuerSerial() throws Exception {
         String address = "https://localhost:" + test.port + "/xmlenc/bookstore/books";
+<<<<<<< HEAD
         Map<String, Object> properties = new HashMap<String, Object>();
         properties.put("security.callback-handler", 
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
         properties.put("security.encryption.username", "bob");
         properties.put("security.encryption.properties", 
+=======
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
+                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
+        properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+        properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         
         EncryptionProperties encryptionProperties = new EncryptionProperties();
@@ -478,6 +535,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
     @Test
     public void testPostEncryptedSignedBook() throws Exception {
         String address = "https://localhost:" + test.port + "/xmlsec-validate/bookstore/books";
+<<<<<<< HEAD
         Map<String, Object> properties = new HashMap<String, Object>();
         properties.put("security.callback-handler", 
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
@@ -486,6 +544,16 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         properties.put("security.signature.username", "alice");
         properties.put("security.signature.properties", 
+=======
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
+                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
+        properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+        properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
+                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
+        properties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
+        properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/alice.properties");
         doTestPostEncryptedBook(address, true, properties, test.streaming);
         
@@ -494,6 +562,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
     @Test
     public void testPostEncryptedSignedBookInvalid() throws Exception {
         String address = "https://localhost:" + test.port + "/xmlsec-validate/bookstore/books";
+<<<<<<< HEAD
         Map<String, Object> properties = new HashMap<String, Object>();
         properties.put("security.callback-handler", 
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
@@ -502,6 +571,16 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         properties.put("security.signature.username", "alice");
         properties.put("security.signature.properties", 
+=======
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
+                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
+        properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+        properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
+                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
+        properties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
+        properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/alice.properties");
         
         EncryptionProperties encryptionProperties = new EncryptionProperties();
@@ -520,6 +599,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
     @Test
     public void testPostEncryptedSignedBookUseReqSigCert() throws Exception {
         String address = "https://localhost:" + test.port + "/xmlsec-useReqSigCert/bookstore/books";
+<<<<<<< HEAD
         Map<String, Object> properties = new HashMap<String, Object>();
         properties.put("security.callback-handler", 
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
@@ -528,6 +608,16 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         properties.put("security.signature.username", "alice");
         properties.put("security.signature.properties", 
+=======
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
+                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
+        properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+        properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
+                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
+        properties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
+        properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/alice.properties");
         doTestPostEncryptedBook(address, true, properties, test.streaming);
     }
@@ -648,6 +738,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         URL busFile = JAXRSXmlSecTest.class.getResource("client.xml");
         Bus springBus = bf.createBus(busFile.toString());
         bean.setBus(springBus);
+<<<<<<< HEAD
         
         Map<String, Object> properties = new HashMap<String, Object>();
         properties.put("security.callback-handler", 
@@ -656,6 +747,16 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         properties.put("security.encryption.properties", 
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         properties.put("security.signature.properties", 
+=======
+
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
+                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
+        properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+        properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
+                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
+        properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/alice.properties");
         bean.setProperties(properties);
         
@@ -692,6 +793,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         URL busFile = JAXRSXmlSecTest.class.getResource("client.xml");
         Bus springBus = bf.createBus(busFile.toString());
         bean.setBus(springBus);
+<<<<<<< HEAD
         
         Map<String, Object> properties = new HashMap<String, Object>();
         properties.put("security.callback-handler", 
@@ -700,6 +802,16 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         properties.put("security.encryption.properties", 
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         properties.put("security.signature.properties", 
+=======
+
+        Map<String, Object> properties = new HashMap<>();
+        properties.put(SecurityConstants.CALLBACK_HANDLER,
+                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
+        properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+        properties.put(SecurityConstants.ENCRYPT_PROPERTIES,
+                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
+        properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
                        "org/apache/cxf/systest/jaxrs/security/alice.properties");
         bean.setProperties(properties);
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java
index f3d2c19..c70f57d 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java
@@ -33,6 +33,7 @@ import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.greeter_control.Greeter;
 import org.apache.cxf.greeter_control.types.GreetMe;
+import org.apache.cxf.rt.security.SecurityConstants;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
@@ -45,7 +46,7 @@ import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 /**
- * Tests the correct interaction of ws-rm calls with ws-security when policy validator verifies the calls.
+ * Tests the correct interaction of ws-rm calls with security.when policy validator verifies the calls.
  */
 public class WSRMWithWSSecurityPolicyTest extends AbstractBusClientServerTestBase {
     public static final String PORT = allocatePort(Server.class); 
@@ -95,6 +96,7 @@ public class WSRMWithWSSecurityPolicyTest extends AbstractBusClientServerTestBas
 
     @Test
     public void testContextProperty() throws Exception {
+<<<<<<< HEAD
         ClassPathXmlApplicationContext context =
                 new ClassPathXmlApplicationContext("org/apache/cxf/systest/ws/rm/sec/client-policy.xml");
         Bus bus = (Bus)context.getBean("bus");
@@ -126,6 +128,41 @@ public class WSRMWithWSSecurityPolicyTest extends AbstractBusClientServerTestBas
         Thread.sleep(5000);
         empty = manager.getRetransmissionQueue().isEmpty();
         assertTrue("RetransmissionQueue not empty", empty);
+=======
+        try (ClassPathXmlApplicationContext context =
+                new ClassPathXmlApplicationContext("org/apache/cxf/systest/ws/rm/sec/client-policy.xml")) {
+            Bus bus = (Bus)context.getBean("bus");
+            BusFactory.setDefaultBus(bus);
+            BusFactory.setThreadDefaultBus(bus);
+            Greeter greeter = (Greeter)context.getBean("GreeterCombinedClientNoProperty");
+            Client client = ClientProxy.getClient(greeter);
+            QName operationQName = new QName("http://cxf.apache.org/greeter_control", "greetMe");
+            BindingOperationInfo boi = client.getEndpoint().getBinding().getBindingInfo().getOperation(operationQName);
+            Map<String, Object> invocationContext = new HashMap<>();
+            Map<String, Object> requestContext = new HashMap<>();
+            Map<String, Object> responseContext = new HashMap<>();
+            invocationContext.put(Client.REQUEST_CONTEXT, requestContext);
+            invocationContext.put(Client.RESPONSE_CONTEXT, responseContext);
+
+            requestContext.put(SecurityConstants.USERNAME, "Alice");
+            requestContext.put(SecurityConstants.CALLBACK_HANDLER,
+                "org.apache.cxf.systest.ws.rm.sec.UTPasswordCallback");
+            requestContext.put(SecurityConstants.ENCRYPT_PROPERTIES, "bob.properties");
+            requestContext.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+            requestContext.put(SecurityConstants.SIGNATURE_PROPERTIES, "alice.properties");
+            requestContext.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
+            RMManager manager = bus.getExtension(RMManager.class);
+            boolean empty = manager.getRetransmissionQueue().isEmpty();
+            assertTrue("RetransmissionQueue is not empty", empty);
+            GreetMe param = new GreetMe();
+            param.setRequestType("testContextProperty");
+            Object[] answer = client.invoke(boi, new Object[]{param}, invocationContext);
+            Assert.assertEquals("TESTCONTEXTPROPERTY", answer[0].toString());
+            Thread.sleep(5000);
+            empty = manager.getRetransmissionQueue().isEmpty();
+            assertTrue("RetransmissionQueue not empty", empty);
+        }
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
index 471f07c..614b82c 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
@@ -37,6 +37,7 @@ import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.jaxws.DispatchImpl;
+import org.apache.cxf.rt.security.SecurityConstants;
 import org.apache.cxf.systest.ws.common.SecurityTestUtil;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.wss4j.dom.WSConstants;
@@ -86,11 +87,11 @@ public class FaultTest extends AbstractBusClientServerTestBase {
         updateAddressPort(utPort, PORT);
         
         // Make a successful invocation
-        ((BindingProvider)utPort).getRequestContext().put("security.username", "alice");
+        ((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, "alice");
         utPort.doubleIt(25);
         
         // Now make an invocation using another username
-        ((BindingProvider)utPort).getRequestContext().put("security.username", "bob");
+        ((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, "bob");
         ((BindingProvider)utPort).getRequestContext().put("security.password", "password");
         try {
             utPort.doubleIt(25);
@@ -119,11 +120,11 @@ public class FaultTest extends AbstractBusClientServerTestBase {
         updateAddressPort(utPort, PORT);
         
         // Make a successful invocation
-        ((BindingProvider)utPort).getRequestContext().put("security.username", "alice");
+        ((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, "alice");
         utPort.doubleIt(25);
         
         // Now make an invocation using another username
-        ((BindingProvider)utPort).getRequestContext().put("security.username", "bob");
+        ((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, "bob");
         ((BindingProvider)utPort).getRequestContext().put("security.password", "password");
         try {
             utPort.doubleIt(25);
@@ -152,11 +153,11 @@ public class FaultTest extends AbstractBusClientServerTestBase {
         updateAddressPort(utPort, PORT);
         
         // Make a successful invocation
-        ((BindingProvider)utPort).getRequestContext().put("security.username", "alice");
+        ((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, "alice");
         utPort.doubleIt(25);
         
         // Now make an invocation using another username
-        ((BindingProvider)utPort).getRequestContext().put("security.username", "bob");
+        ((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, "bob");
         ((BindingProvider)utPort).getRequestContext().put("security.password", "password");
         try {
             utPort.doubleIt(25);
@@ -195,24 +196,24 @@ public class FaultTest extends AbstractBusClientServerTestBase {
         // Add WS-Security configuration
         Client client = ((DispatchImpl<DOMSource>) dispatch).getClient();
         client.getRequestContext().put(
-            "security.callback-handler",
+            SecurityConstants.CALLBACK_HANDLER,
             "org.apache.cxf.systest.ws.common.KeystorePasswordCallback"
         );
         client.getRequestContext().put(
-            "security.encryption.properties", 
+            SecurityConstants.ENCRYPT_PROPERTIES,
             "bob.properties"
         );
-        client.getRequestContext().put("security.encryption.username", "bob");
+        client.getRequestContext().put(SecurityConstants.ENCRYPT_USERNAME, "bob");
 
         updateAddressPort(dispatch, PORT);
         
         // Make a successful request
-        client.getRequestContext().put("security.username", "alice");
+        client.getRequestContext().put(SecurityConstants.USERNAME, "alice");
         DOMSource response = dispatch.invoke(request);
         assertNotNull(response);
         
         // Now make an invocation using another username
-        client.getRequestContext().put("security.username", "bob");
+        client.getRequestContext().put(SecurityConstants.USERNAME, "bob");
         client.getRequestContext().put("security.password", "password");
         try {
             dispatch.invoke(request);
@@ -242,11 +243,11 @@ public class FaultTest extends AbstractBusClientServerTestBase {
         updateAddressPort(utPort, PORT);
         
         // Make a successful invocation
-        ((BindingProvider)utPort).getRequestContext().put("security.username", "alice");
+        ((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, "alice");
         utPort.doubleIt(25);
         
         // Now make an invocation using another username
-        ((BindingProvider)utPort).getRequestContext().put("security.username", "bob");
+        ((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, "bob");
         ((BindingProvider)utPort).getRequestContext().put("security.password", "password");
         try {
             utPort.doubleIt(25);
@@ -278,11 +279,11 @@ public class FaultTest extends AbstractBusClientServerTestBase {
         updateAddressPort(utPort, PORT);
         
         // Make a successful invocation
-        ((BindingProvider)utPort).getRequestContext().put("security.username", "alice");
+        ((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, "alice");
         utPort.doubleIt(25);
         
         // Now make an invocation using another username
-        ((BindingProvider)utPort).getRequestContext().put("security.username", "bob");
+        ((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, "bob");
         ((BindingProvider)utPort).getRequestContext().put("security.password", "password");
         try {
             utPort.doubleIt(25);

http://git-wip-us.apache.org/repos/asf/cxf/blob/30119990/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java
index 9094ddb..f597037 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements. See the NOTICE file
@@ -43,3 +44,51 @@ public class HelloServiceImpl implements HelloService {
     }
 
 }
+=======
+/**
+ * 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.ws.policy.handler;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+
+import org.apache.cxf.annotations.EndpointProperties;
+import org.apache.cxf.annotations.EndpointProperty;
+import org.apache.cxf.rt.security.SecurityConstants;
+
+@WebService(name = "HelloPolicyService", serviceName = "HelloPolicyService")
+@EndpointProperties(value = {
+        @EndpointProperty(key = SecurityConstants.CALLBACK_HANDLER,
+        value = "org.apache.cxf.systest.ws.policy.handler.CommonPasswordCallback"),
+        @EndpointProperty(key = "ws-security.is-bsp-compliant", value = "false"),
+        @EndpointProperty(key = SecurityConstants.SIGNATURE_PROPERTIES, value = "alice.properties"),
+        @EndpointProperty(key = SecurityConstants.SIGNATURE_USERNAME, value = "alice")
+        })
+@HandlerChain(file = "handlers.xml")
+public class HelloServiceImpl implements HelloService {
+    @Override
+    @WebResult(name = "result")
+    public boolean checkHello(@WebParam(name = "input") String input) throws MyFault {
+        throw new MyFault("myMessage", "myFaultInfo");
+    }
+
+}
+>>>>>>> 428f770... Switching to use security constants in the tests instead of strings