[3/3] cxf git commit: Fixing backmerge

2017-02-20 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/3.1.x-fixes
Commit: b2bad7f9eba17cac427edbab18b4b6f9c8ef7556
Parents: 07fc13e
Author: Colm O hEigeartaigh 
Authored: Mon Feb 20 16:53:45 2017 +
Committer: Colm O hEigeartaigh 
Committed: Mon Feb 20 16:53:45 2017 +

--
 .../security/wss4j/policyhandlers/AbstractBindingBuilder.java  | 6 --
 1 file changed, 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/b2bad7f9/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index 2b53c20..499583e 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -803,13 +803,7 @@ public abstract class AbstractBindingBuilder extends 
AbstractCommonBindingHandle
 if (StringUtils.isEmpty(password)) {
 password = getPassword(userName, token, 
WSPasswordCallback.USERNAME_TOKEN);
 }
-<<< HEAD
-
-if (!StringUtils.isEmpty(password)) {
-===
-
 if (password != null) {
->>> f91541b... CXF-7255 - Allow empty ("") passwords when calling a service
 // If the password is available then build the token
 if (token.getPasswordType() == 
UsernameToken.PasswordType.HashPassword) {
 utBuilder.setPasswordType(WSConstants.PASSWORD_DIGEST);



[3/3] cxf git commit: Fixing backmerge

2016-10-20 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/3.0.x-fixes
Commit: dbc4b232b02f013a75ff19ded29de3c815b6e586
Parents: 2ab95c7
Author: Colm O hEigeartaigh 
Authored: Thu Oct 20 12:31:14 2016 +0100
Committer: Colm O hEigeartaigh 
Committed: Thu Oct 20 12:31:14 2016 +0100

--
 .../token/provider/SAMLProviderActAsTest.java   | 30 
 1 file changed, 5 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/dbc4b232/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderActAsTest.java
--
diff --git 
a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderActAsTest.java
 
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderActAsTest.java
index d749e9c..c2da503 100644
--- 
a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderActAsTest.java
+++ 
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderActAsTest.java
@@ -25,11 +25,8 @@ import java.util.Properties;
 import javax.xml.bind.JAXBElement;
 
 import org.w3c.dom.Element;
-<<< HEAD
 import org.apache.cxf.jaxws.context.WebServiceContextImpl;
-===
 
->>> 0529afb... Updating ActAs unit tests in the STS code
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.sts.QNameConstants;
@@ -53,7 +50,7 @@ import org.apache.wss4j.common.util.DOM2Writer;
 import org.apache.wss4j.dom.WSConstants;
 
 import org.junit.Assert;
-import org.opensaml.core.xml.XMLObject;
+import org.opensaml.xml.XMLObject;
 
 /**
  * Some unit tests for creating SAML Tokens with an ActAs element.
@@ -89,23 +86,15 @@ public class SAMLProviderActAsTest extends org.junit.Assert 
{
 assertTrue(providerResponse != null);
 assertTrue(providerResponse.getToken() != null && 
providerResponse.getTokenId() != null);
 
-<<< HEAD
-Element token = providerResponse.getToken();
-String tokenString = DOM2Writer.nodeToString(token);
-assertTrue(tokenString.contains(providerResponse.getTokenId()));
-assertTrue(tokenString.contains("AttributeStatement"));
-assertTrue(tokenString.contains("ActAs"));
-assertTrue(tokenString.contains("bob"));
-===
 // Verify the token
 Element token = (Element)providerResponse.getToken();
 SamlAssertionWrapper assertion = new SamlAssertionWrapper(token);
 Assert.assertEquals("technical-user", assertion.getSubjectName());
 
 boolean foundActAsAttribute = false;
-for (org.opensaml.saml.saml1.core.AttributeStatement 
attributeStatement 
+for (org.opensaml.saml1.core.AttributeStatement attributeStatement 
 : assertion.getSaml1().getAttributeStatements()) {
-for (org.opensaml.saml.saml1.core.Attribute attribute : 
attributeStatement.getAttributes()) {
+for (org.opensaml.saml1.core.Attribute attribute : 
attributeStatement.getAttributes()) {
 if ("ActAs".equals(attribute.getAttributeName())) {
 for (XMLObject attributeValue : 
attribute.getAttributeValues()) {
 Element attributeValueElement = 
attributeValue.getDOM();
@@ -120,7 +109,6 @@ public class SAMLProviderActAsTest extends org.junit.Assert 
{
 }
 
 Assert.assertTrue(foundActAsAttribute);
->>> 0529afb... Updating ActAs unit tests in the STS code
 }
 
 /**
@@ -146,22 +134,15 @@ public class SAMLProviderActAsTest extends 
org.junit.Assert {
 assertTrue(providerResponse != null);
 assertTrue(providerResponse.getToken() != null && 
providerResponse.getTokenId() != null);
 
-<<< HEAD
-Element token = providerResponse.getToken();
-String tokenString = DOM2Writer.nodeToString(token);
-assertTrue(tokenString.contains(providerResponse.getTokenId()));
-assertTrue(tokenString.contains("AttributeStatement"));
-assertTrue(tokenString.contains("ActAs"));
-===
 // Verify the token
 Element token = (Element)providerResponse.getToken();
 SamlAssertionWrapper assertion = new SamlAssertionWrapper(token);
 Assert.assertEquals("technical-user", assertion.getSubjectName());
 
 boolean foundActAsAttribute = false;
-for (org.opensaml.saml.saml2.core.AttributeStatement 
attributeStatement 
+for 

[3/3] cxf git commit: Fixing backmerge

2016-04-26 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/3.0.x-fixes
Commit: 82591273ff0988104cc5fc9646f34043a50283c7
Parents: 3b182af
Author: Colm O hEigeartaigh 
Authored: Tue Apr 26 15:46:42 2016 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 26 15:46:42 2016 +0100

--
 .../security/wss4j/policyhandlers/AbstractBindingBuilder.java  | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/82591273/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index 9fd781f..ab2aa94 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -298,14 +298,10 @@ public abstract class AbstractBindingBuilder extends 
AbstractCommonBindingHandle
 Map o = 
 CastUtils.cast((Map)message.getContextualProperty(CRYPTO_CACHE));
 if (o == null) {
-<<< HEAD
-o = new ConcurrentHashMap();
-===
 o = CastUtils.cast((Map)info.getProperty(CRYPTO_CACHE));
 }
 if (o == null) {
-o = new ConcurrentHashMap<>();
->>> ea1b593... [CXF-6883] - Crypto caching issues in the WS-Security code
+o = new ConcurrentHashMap();
 info.setProperty(CRYPTO_CACHE, o);
 }
 return o;



[3/3] cxf git commit: Fixing backmerge

2015-12-23 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/3.0.x-fixes
Commit: d704868a70819dd5f7375140f0a44b1c29dd6f39
Parents: 5f597d5
Author: Colm O hEigeartaigh 
Authored: Wed Dec 23 17:11:32 2015 +
Committer: Colm O hEigeartaigh 
Committed: Wed Dec 23 17:11:32 2015 +

--
 .../test/resources/org/apache/cxf/systest/ws/fault/client.xml  | 6 +++---
 .../test/resources/org/apache/cxf/systest/ws/fault/server.xml  | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/d704868a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client.xml
--
diff --git 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client.xml
 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client.xml
index 7b8fbe8..d80ac42 100644
--- 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client.xml
+++ 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client.xml
@@ -40,9 +40,9 @@
 
 http://www.example.org/contract/DoubleIt}DoubleItSoap12MtomPort; 
createdFromAPI="true">
 
-
-
-
+
+
+
 
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/d704868a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/server.xml
--
diff --git 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/server.xml
 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/server.xml
index e696e9b..eded603 100644
--- 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/server.xml
+++ 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/server.xml
@@ -45,8 +45,8 @@
 
 http://www.example.org/contract/DoubleIt; 
id="Soap12Mtom" 
address="http://localhost:${testutil.ports.fault.Server}/DoubleItSoap12Mtom; 
serviceName="s:DoubleItService" endpointName="s:DoubleItSoap12MtomPort" 
implementor="org.apache.cxf.systest.ws.fault.DoubleItPortTypeImpl" 
wsdlLocation="org/apache/cxf/systest/ws/fault/DoubleItFault.wsdl">
 
-
-
+
+
 
 
 



[3/3] cxf git commit: Fixing backmerge

2015-11-11 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/3.0.x-fixes
Commit: c3bb80b0c3f1ebd1a85c7826cf26a32c8c371690
Parents: 6b1987a
Author: Colm O hEigeartaigh 
Authored: Wed Nov 11 12:16:15 2015 +
Committer: Colm O hEigeartaigh 
Committed: Wed Nov 11 12:16:15 2015 +

--
 .../org/apache/cxf/systest/jms/security/JMSWSSecurityTest.java  | 5 -
 1 file changed, 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/c3bb80b0/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/security/JMSWSSecurityTest.java
--
diff --git 
a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/security/JMSWSSecurityTest.java
 
b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/security/JMSWSSecurityTest.java
index 6e18447..9273bd7 100644
--- 
a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/security/JMSWSSecurityTest.java
+++ 
b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/security/JMSWSSecurityTest.java
@@ -127,13 +127,8 @@ public class JMSWSSecurityTest extends 
AbstractBusClientServerTestBase {
 
 ConditionsBean conditions = new ConditionsBean();
 conditions.setTokenPeriodMinutes(5);
-<<< HEAD
 List audiences = new ArrayList();
-audiences.add("http://apache.org/one;);
-===
-List audiences = new ArrayList<>();
 audiences.add("jms:jndi:dynamicQueues/test.jmstransport.text");
->>> e7d7190... Fix SAML Audience Restriction problem with JMS
 AudienceRestrictionBean audienceRestrictionBean = new 
AudienceRestrictionBean();
 audienceRestrictionBean.setAudienceURIs(audiences);
 
conditions.setAudienceRestrictions(Collections.singletonList(audienceRestrictionBean));



[3/3] cxf git commit: Fixing backmerge

2015-08-04 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/3.0.x-fixes
Commit: 0479e4610d38cf7561ab594bbb6c61049df3dab2
Parents: 03e18fa
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Tue Aug 4 12:08:01 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Tue Aug 4 12:08:01 2015 +0100

--
 .../AsymmetricBindingHandler.java   | 48 +++-
 1 file changed, 7 insertions(+), 41 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/0479e461/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
index 7fa6873..c94c913 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
@@ -454,39 +454,7 @@ public class AsymmetricBindingHandler extends 
AbstractBindingBuilder {
 assertPolicy(encrToken);
 AlgorithmSuite algorithmSuite = abinding.getAlgorithmSuite();
 if (encrToken.getDerivedKeys() == DerivedKeys.RequireDerivedKeys) {
- HEAD
-try {
-WSSecDKEncrypt dkEncr = new WSSecDKEncrypt(wssConfig);
-dkEncr.setAttachmentCallbackHandler(new 
AttachmentCallbackHandler(message));
-dkEncr.setStoreBytesInAttachment(storeBytesInAttachment);
-if (recToken.getToken().getVersion() == 
SPConstants.SPVersion.SP11) {
-
dkEncr.setWscVersion(ConversationConstants.VERSION_05_02);
-}
-
-if (encrKey == null) {
-setupEncryptedKey(recToken, encrToken);
-}
-
-dkEncr.setExternalKey(this.encryptedKeyValue, 
this.encryptedKeyId);
-dkEncr.setParts(encrParts);
-dkEncr.setCustomValueType(WSConstants.SOAPMESSAGE_NS11 + 
#
-+ WSConstants.ENC_KEY_VALUE_TYPE);
-AlgorithmSuiteType algType = 
algorithmSuite.getAlgorithmSuiteType();
-dkEncr.setSymmetricEncAlgorithm(algType.getEncryption());
-
dkEncr.setDerivedKeyLength(algType.getEncryptionDerivedKeyLength() / 8);
-dkEncr.prepare(saaj.getSOAPPart());
-
-addDerivedKeyElement(dkEncr.getdktElement());
-Element refList = dkEncr.encryptForExternalRef(null, 
encrParts);
-insertBeforeBottomUp(refList);
-return dkEncr;
-} catch (Exception e) {
-LOG.log(Level.FINE, e.getMessage(), e);
-policyNotAsserted(recToken, e);
-}
-===
 return doEncryptionDerived(recToken, encrToken, encrParts, 
algorithmSuite);
- 5048d0b... Some refactoring due to WSS-549
 } else {
 try {
 WSSecEncrypt encr = new WSSecEncrypt(wssConfig);
@@ -585,28 +553,26 @@ public class AsymmetricBindingHandler extends 
AbstractBindingBuilder {
  ListWSEncryptionPart encrParts,
  AlgorithmSuite algorithmSuite) {
 try {
-WSSecDKEncrypt dkEncr = new WSSecDKEncrypt();
-dkEncr.setIdAllocator(wssConfig.getIdAllocator());
-dkEncr.setCallbackLookup(callbackLookup);
+WSSecDKEncrypt dkEncr = new WSSecDKEncrypt(wssConfig);
 dkEncr.setAttachmentCallbackHandler(new 
AttachmentCallbackHandler(message));
 dkEncr.setStoreBytesInAttachment(storeBytesInAttachment);
 if (recToken.getToken().getVersion() == 
SPConstants.SPVersion.SP11) {
 dkEncr.setWscVersion(ConversationConstants.VERSION_05_02);
 }
-
+
 if (encrKey == null) {
 setupEncryptedKey(recToken, encrToken);
 }
-
+
 dkEncr.setExternalKey(this.encryptedKeyValue, this.encryptedKeyId);
-dkEncr.getParts().addAll(encrParts);
+dkEncr.setParts(encrParts);
 

[3/3] cxf git commit: Fixing backmerge

2015-07-31 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/3.0.x-fixes
Commit: a4a6beac90ac6109eb2f6a2664e6376b0d1fb4f0
Parents: aa890da
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Fri Jul 31 12:06:16 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Fri Jul 31 12:06:16 2015 +0100

--
 .../saml/sso/CombinedValidatorTest.java | 38 ++--
 1 file changed, 18 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/a4a6beac/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java
--
diff --git 
a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java
 
b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java
index e42b7e1..3150a0e 100644
--- 
a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java
+++ 
b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java
@@ -46,21 +46,15 @@ import org.apache.wss4j.common.util.Loader;
 import org.apache.wss4j.dom.WSConstants;
 import org.apache.wss4j.dom.WSSConfig;
 import org.joda.time.DateTime;
- HEAD
+import org.opensaml.common.SignableSAMLObject;
 import org.opensaml.common.xml.SAMLConstants;
 import org.opensaml.saml2.core.Response;
 import org.opensaml.saml2.core.Status;
-===
-import org.opensaml.saml.common.SignableSAMLObject;
-import org.opensaml.saml.common.xml.SAMLConstants;
-import org.opensaml.saml.saml2.core.Response;
-import org.opensaml.saml.saml2.core.Status;
-import org.opensaml.security.x509.BasicX509Credential;
-import org.opensaml.xmlsec.keyinfo.impl.X509KeyInfoGeneratorFactory;
-import org.opensaml.xmlsec.signature.KeyInfo;
-import org.opensaml.xmlsec.signature.Signature;
-import org.opensaml.xmlsec.signature.support.SignatureConstants;
- 3228637... Adding more SAML SSO tests
+import org.opensaml.xml.security.x509.BasicX509Credential;
+import org.opensaml.xml.security.x509.X509KeyInfoGeneratorFactory;
+import org.opensaml.xml.signature.KeyInfo;
+import org.opensaml.xml.signature.Signature;
+import org.opensaml.xml.signature.SignatureConstants;
 
 /**
  * Some unit tests for the SAMLProtocolResponseValidator and the 
SAMLSSOResponseValidator
@@ -344,14 +338,15 @@ public class CombinedValidatorTest extends 
org.junit.Assert {
 //
 Signature signature = OpenSAMLUtil.buildSignature();
 
signature.setCanonicalizationAlgorithm(SignatureConstants.ALGO_ID_C14N_EXCL_OMIT_COMMENTS);
-
+
 // prepare to sign the SAML token
 CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
 cryptoType.setAlias(issuerKeyName);
 X509Certificate[] issuerCerts = 
issuerCrypto.getX509Certificates(cryptoType);
 if (issuerCerts == null) {
 throw new Exception(
-No issuer certs were found to sign the SAML Assertion using 
issuer name:  + issuerKeyName);
+No issuer certs were found to sign the SAML Assertion 
using issuer name: 
++ issuerKeyName);
 }
 
 String sigAlgo = SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA1;
@@ -360,24 +355,27 @@ public class CombinedValidatorTest extends 
org.junit.Assert {
 if (pubKeyAlgo.equalsIgnoreCase(DSA)) {
 sigAlgo = SignatureConstants.ALGO_ID_SIGNATURE_DSA;
 }
-
+
 PrivateKey privateKey = issuerCrypto.getPrivateKey(issuerKeyName, 
issuerKeyPassword);
 
 signature.setSignatureAlgorithm(sigAlgo);
 
-BasicX509Credential signingCredential = 
-new BasicX509Credential(issuerCerts[0], privateKey);
+BasicX509Credential signingCredential = new BasicX509Credential();
+signingCredential.setEntityCertificate(issuerCerts[0]);
+signingCredential.setPrivateKey(privateKey);
+
 signature.setSigningCredential(signingCredential);
 
 if (useKeyInfo) {
 X509KeyInfoGeneratorFactory kiFactory = new 
X509KeyInfoGeneratorFactory();
 kiFactory.setEmitEntityCertificate(true);
-
+
 try {
 KeyInfo keyInfo = 
kiFactory.newInstance().generate(signingCredential);
 signature.setKeyInfo(keyInfo);
-} catch (org.opensaml.security.SecurityException ex) {
-throw new Exception(Error generating KeyInfo from signing 
credential, ex);
+} catch 

[3/3] cxf git commit: Fixing backmerge

2015-07-17 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/3.0.x-fixes
Commit: c7b9638cf60cc38342828192f5ce80e4a81ce9a3
Parents: 17f221b
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Fri Jul 17 16:35:40 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Fri Jul 17 16:35:40 2015 +0100

--
 .../org/apache/cxf/io/CachedStreamTestBase.java | 49 ++--
 1 file changed, 15 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/c7b9638c/core/src/test/java/org/apache/cxf/io/CachedStreamTestBase.java
--
diff --git a/core/src/test/java/org/apache/cxf/io/CachedStreamTestBase.java 
b/core/src/test/java/org/apache/cxf/io/CachedStreamTestBase.java
index 222705c..211e928 100755
--- a/core/src/test/java/org/apache/cxf/io/CachedStreamTestBase.java
+++ b/core/src/test/java/org/apache/cxf/io/CachedStreamTestBase.java
@@ -251,61 +251,42 @@ public abstract class CachedStreamTestBase extends Assert 
{
 }
 
 protected static String readFromStream(InputStream is) throws IOException {
-try (ByteArrayOutputStream buf = new ByteArrayOutputStream()) {
+ByteArrayOutputStream buf = new ByteArrayOutputStream();
+try {
 IOUtils.copyAndCloseInput(is, buf);
 return new String(buf.toByteArray(), UTF-8);
+} finally {
+buf.close();
 }
 }
 
 protected static String readPartiallyFromStream(InputStream is, int len) 
throws IOException {
-try (ByteArrayOutputStream buf = new ByteArrayOutputStream()) {
+ByteArrayOutputStream buf = new ByteArrayOutputStream();
+try {
 IOUtils.copyAtLeast(is, buf, len);
 return new String(buf.toByteArray(), UTF-8);
+} finally {
+buf.close();
 }
 }
  
 protected static String readFromReader(Reader is) throws IOException {
- HEAD
-StringBuffer buf = new StringBuffer();
+StringWriter writer = new StringWriter();
 try {
-char[] b = new char[100];
-for (;;) {
-int n = is.read(b, 0, b.length);
-if (n  0) {
-break;
-}
-buf.append(b, 0, n);
-}
-} finally {
-is.close();
-===
-try (StringWriter writer = new StringWriter()) {
 IOUtils.copyAndCloseInput(is, writer);
 return writer.toString();
- 17f140e... Use IOUtils methods in CachedStreamTestBase to handle 
stream reading
+} finally {
+writer.close();
 }
 }
 
 protected static String readPartiallyFromReader(Reader is, int len) throws 
IOException {
- HEAD
-StringBuffer buf = new StringBuffer();
-char[] b = new char[len];
-int rn = 0;
-for (;;) {
-int n = is.read(b, 0, b.length);
-if (n  0) {
-break;
-}
-buf.append(b, 0, n);
-rn += n;
-if (len = rn) {
-break;
-}
-===
-try (StringWriter writer = new StringWriter()) {
+StringWriter writer = new StringWriter();
+try {
 IOUtils.copyAtLeast(is, writer, len);
 return writer.toString();
- 17f140e... Use IOUtils methods in CachedStreamTestBase to handle 
stream reading
+} finally {
+writer.close();
 }
 }
 



[3/3] cxf git commit: Fixing backmerge

2015-07-02 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/3.0.x-fixes
Commit: 6e721a5a3486df0c8990fdf2fafe09ebf88a4790
Parents: 8b16797
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Jul 2 16:09:09 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Jul 2 16:09:09 2015 +0100

--
 .../rs/security/saml/sso/MetadataWriter.java| 39 
 1 file changed, 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/6e721a5a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java
--
diff --git 
a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java
 
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java
index d413e72..303fa27 100644
--- 
a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java
+++ 
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java
@@ -19,14 +19,6 @@
 
 package org.apache.cxf.rs.security.saml.sso;
 
- HEAD
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-===
- fdab617... Switch to use W3CDOMStreamWriter for SAML SSO Metadata
 import java.net.MalformedURLException;
 import java.security.Key;
 import java.security.cert.CertificateEncodingException;
@@ -49,18 +41,13 @@ import javax.xml.crypto.dsig.keyinfo.KeyInfoFactory;
 import javax.xml.crypto.dsig.keyinfo.X509Data;
 import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec;
 import javax.xml.crypto.dsig.spec.TransformParameterSpec;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
 import org.w3c.dom.Document;
 
- HEAD
-===
 import org.apache.cxf.staxutils.W3CDOMStreamWriter;
 import org.apache.wss4j.common.util.DOM2Writer;
- fdab617... Switch to use W3CDOMStreamWriter for SAML SSO Metadata
 import org.apache.xml.security.stax.impl.util.IDGenerator;
 import org.apache.xml.security.utils.Base64;
 import org.slf4j.Logger;
@@ -70,14 +57,8 @@ public class MetadataWriter {
 
 private static final Logger LOG = 
LoggerFactory.getLogger(MetadataWriter.class);
 
-private static final XMLOutputFactory XML_OUTPUT_FACTORY = 
XMLOutputFactory.newInstance();
-private static final DocumentBuilderFactory DOC_BUILDER_FACTORY = 
DocumentBuilderFactory.newInstance();
 private static final XMLSignatureFactory XML_SIGNATURE_FACTORY = 
XMLSignatureFactory.getInstance(DOM);
 
-static {
-DOC_BUILDER_FACTORY.setNamespaceAware(true);
-}
-
 //CHECKSTYLE:OFF
 public Document getMetaData(
 String serviceURL,
@@ -88,13 +69,7 @@ public class MetadataWriter {
 boolean wantRequestsSigned
 ) throws Exception {
 
- HEAD
-ByteArrayOutputStream bout = new ByteArrayOutputStream(4096);
-Writer streamWriter = new OutputStreamWriter(bout, UTF-8);
-XMLStreamWriter writer = 
XML_OUTPUT_FACTORY.createXMLStreamWriter(streamWriter);
-===
 W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
- fdab617... Switch to use W3CDOMStreamWriter for SAML SSO Metadata
 
 writer.writeStartDocument(UTF-8, 1.0);
 
@@ -123,20 +98,12 @@ public class MetadataWriter {
 LOG.debug(* unsigned );
 }
 
- HEAD
-InputStream is = new ByteArrayInputStream(bout.toByteArray());
-===
 Document doc = writer.getDocument();
- fdab617... Switch to use W3CDOMStreamWriter for SAML SSO Metadata
 
 if (signingKey != null) {
 return signMetaInfo(signingCert, signingKey, doc, referenceID);
 }
- HEAD
-return DOC_BUILDER_FACTORY.newDocumentBuilder().parse(is);
-===
 return doc;
- fdab617... Switch to use W3CDOMStreamWriter for SAML SSO Metadata
 }
 
 private void writeSAMLMetadata(
@@ -266,12 +233,6 @@ public class MetadataWriter {
 X509Data xd = kif.newX509Data(x509Content);
 KeyInfo ki = kif.newKeyInfo(Collections.singletonList(xd));
 
- HEAD
-// Instantiate the document to be signed.
-Document doc = 
DOC_BUILDER_FACTORY.newDocumentBuilder().parse(metaInfo);
-
-===
- fdab617... Switch to use W3CDOMStreamWriter for SAML SSO Metadata
 // Create a DOMSignContext and specify the RSA PrivateKey and
  

[3/3] cxf git commit: Fixing backmerge

2015-06-24 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/2.7.x-fixes
Commit: 4d453da4553accfa64ad637bd4572ef0f8ef41db
Parents: 19f0b50
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Wed Jun 24 17:06:02 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Wed Jun 24 17:06:02 2015 +0100

--
 .../wss4j/policyhandlers/AsymmetricBindingHandler.java| 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/4d453da4/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
index 9f582c0..087b869 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
@@ -143,7 +143,7 @@ public class AsymmetricBindingHandler extends 
AbstractBindingBuilder {
 }
 addSupportingTokens(sigs);
 
-sigs.addAll(this.getSignedParts(null));
+sigs.addAll(this.getSignedParts());
 
 if (isRequestor()  initiatorWrapper != null) {
 doSignature(initiatorWrapper, sigs, attached);
@@ -504,12 +504,7 @@ public class AsymmetricBindingHandler extends 
AbstractBindingBuilder {
 assertUnusedTokens(abinding.getRecipientSignatureToken());
 }
 
- HEAD
 Token sigToken = wrapper.getToken();
-sigParts.addAll(this.getSignedParts());
-===
-AbstractToken sigToken = wrapper.getToken();
- 273351c... [CXF-6473] - Double signatures while using 
AsymmetricBindingHandle
 if (sigParts.isEmpty()) {
 // Add the BST to the security header if required
 if (!attached  includeToken(sigToken.getInclusion())) {



[3/3] cxf git commit: Fixing backmerge

2015-06-18 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/3.0.x-fixes
Commit: 38c2b41810a3c575edbc03f13a6a1f0e854a8809
Parents: ec57d78
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Jun 18 17:11:59 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Jun 18 17:11:59 2015 +0100

--
 .../apache/cxf/systest/ws/swa/policy-client.xml| 13 -
 .../apache/cxf/systest/ws/swa/policy-server.xml| 16 
 .../cxf/systest/ws/swa/stax-policy-server.xml  | 17 -
 3 files changed, 46 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/38c2b418/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-client.xml
--
diff --git 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-client.xml
 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-client.xml
index 6ccf037..91a20da 100644
--- 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-client.xml
+++ 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-client.xml
@@ -70,17 +70,4 @@
 /jaxws:properties
 /jaxws:client
 
- HEAD
-jaxws:client 
name={http://www.example.org/contract/DoubleIt}DoubleItSWACombinedAsymmetricDerivedPolicyPort;
 createdFromAPI=true
- jaxws:properties
-entry key=ws-security.encryption.properties 
value=bob.properties/
-entry key=ws-security.encryption.username value=bob/
-entry key=ws-security.signature.properties 
value=alice.properties/
-entry key=ws-security.signature.username value=alice/
-entry key=ws-security.callback-handler 
value=org.apache.cxf.systest.ws.common.KeystorePasswordCallback/
-/jaxws:properties
-/jaxws:client
-
-===
- 25d02a2... Removing test
 /beans

http://git-wip-us.apache.org/repos/asf/cxf/blob/38c2b418/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-server.xml
--
diff --git 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-server.xml
 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-server.xml
index 2e13ac7..12b7180 100644
--- 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-server.xml
+++ 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-server.xml
@@ -94,20 +94,4 @@
 /jaxws:properties
 /jaxws:endpoint
 
- HEAD
-jaxws:endpoint xmlns:s=http://www.example.org/contract/DoubleIt; 
id=CombinedAsymmetricDerivedPolicy 
-
address=http://localhost:${testutil.ports.swa.PolicyServer}/DoubleItSWACombinedAsymmetricDerivedPolicy;
 
-serviceName=s:DoubleItService 
endpointName=s:DoubleItSWACombinedAsymmetricDerivedPolicyPort 
-implementor=org.apache.cxf.systest.ws.swa.DoubleIt3Impl 
-wsdlLocation=org/apache/cxf/systest/ws/swa/DoubleItSwa.wsdl
-jaxws:properties
-entry key=ws-security.callback-handler 
value=org.apache.cxf.systest.ws.common.KeystorePasswordCallback/
-entry key=ws-security.signature.properties 
value=bob.properties/
-entry key=ws-security.encryption.properties 
value=alice.properties/
-entry key=ws-security.encryption.username value=alice/
-/jaxws:properties
-/jaxws:endpoint
-
-===
- 25d02a2... Removing test
 /beans

http://git-wip-us.apache.org/repos/asf/cxf/blob/38c2b418/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/stax-policy-server.xml
--
diff --git 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/stax-policy-server.xml
 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/stax-policy-server.xml
index 37a892a..b96a776 100644
--- 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/stax-policy-server.xml
+++ 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/stax-policy-server.xml
@@ -100,21 +100,4 @@
 /jaxws:properties
 /jaxws:endpoint
 
- HEAD
-jaxws:endpoint xmlns:s=http://www.example.org/contract/DoubleIt; 
id=CombinedAsymmetricDerivedPolicy 
-
address=http://localhost:${testutil.ports.swa.StaxPolicyServer}/DoubleItSWACombinedAsymmetricDerivedPolicy;
 
-serviceName=s:DoubleItService 

[3/3] cxf git commit: Fixing backmerge

2015-06-03 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/3.0.x-fixes
Commit: ef5751eef7c3ed7fcf962acf630974f46613ecb9
Parents: 7dabade
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Wed Jun 3 15:32:00 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Wed Jun 3 15:32:00 2015 +0100

--
 .../token/provider/DefaultSubjectProvider.java  | 28 +---
 1 file changed, 1 insertion(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/ef5751ee/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java
--
diff --git 
a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java
 
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java
index c4e54f8..f6f1846 100644
--- 
a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java
+++ 
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java
@@ -175,28 +175,6 @@ public class DefaultSubjectProvider implements 
SubjectProvider {
 }
 
 /**
- * Get the SubjectConfirmation method given a tokenType and keyType
- */
-protected String getSubjectConfirmationMethod(String tokenType, String 
keyType) {
-if (WSConstants.WSS_SAML_TOKEN_TYPE.equals(tokenType)
-|| WSConstants.SAML_NS.equals(tokenType)) {
-if (STSConstants.SYMMETRIC_KEY_KEYTYPE.equals(keyType) 
-|| STSConstants.PUBLIC_KEY_KEYTYPE.equals(keyType)) {
-return SAML1Constants.CONF_HOLDER_KEY;
-} else {
-return SAML1Constants.CONF_BEARER;
-}
-} else {
-if (STSConstants.SYMMETRIC_KEY_KEYTYPE.equals(keyType) 
-|| STSConstants.PUBLIC_KEY_KEYTYPE.equals(keyType)) {
-return SAML2Constants.CONF_HOLDER_KEY;
-} else {
-return SAML2Constants.CONF_BEARER;
-}
-}
-}
-
-/**
  * Create and return the KeyInfoBean to be inserted into the SubjectBean
  */
 protected KeyInfoBean createKeyInfo(
@@ -276,8 +254,7 @@ public class DefaultSubjectProvider implements 
SubjectProvider {
 return createPublicKeyKeyInfo(receivedKey.getX509Cert(), 
receivedKey.getPublicKey());
 }
 
- HEAD
-return subjectBean;
+return null;
 }
 
 /**
@@ -300,9 +277,6 @@ public class DefaultSubjectProvider implements 
SubjectProvider {
 return SAML1Constants.CONF_BEARER;
 }
 }
-===
-return null;
- 3348a29... Refactor DefaultSubjectProvider to make it easier to 
subclass bits of functionality
 }
 
 /**



[3/3] cxf git commit: Fixing backmerge

2015-04-16 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/3.0.x-fixes
Commit: 3ed21351911324398bd86120d24cb7e2a7b75bc3
Parents: 610f52c
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 14:12:17 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 14:12:17 2015 +0100

--
 systests/rs-security/pom.xml | 8 
 1 file changed, 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/3ed21351/systests/rs-security/pom.xml
--
diff --git a/systests/rs-security/pom.xml b/systests/rs-security/pom.xml
index 3f90915..e1d3b38 100644
--- a/systests/rs-security/pom.xml
+++ b/systests/rs-security/pom.xml
@@ -77,19 +77,11 @@
 version${project.version}/version
 /dependency
 dependency
- HEAD
-===
 groupIdorg.apache.cxf/groupId
 artifactIdcxf-rt-rs-security-sso-saml/artifactId
 version${project.version}/version
 /dependency
 dependency
-groupIdorg.apache.cxf/groupId
-artifactIdcxf-rt-rs-security-oauth2-jose/artifactId
-version${project.version}/version
-/dependency
-dependency
- da35252... Adding a SAML SSO Metadata test
  groupIdorg.bouncycastle/groupId
  artifactIdbcprov-ext-jdk15on/artifactId
  version${cxf.bcprov.version}/version



[3/3] cxf git commit: Fixing backmerge

2015-03-09 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/2.7.x-fixes
Commit: 4cf2123f3a3f2c86ced916a0bd4af76f122aa0b0
Parents: c05942e
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Mon Mar 9 15:46:56 2015 +
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Mon Mar 9 15:46:56 2015 +

--
 .../cxf/sts/token/delegation/SAMLDelegationHandler.java | 12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/4cf2123f/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/SAMLDelegationHandler.java
--
diff --git 
a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/SAMLDelegationHandler.java
 
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/SAMLDelegationHandler.java
index f078f8c..a7381b0 100644
--- 
a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/SAMLDelegationHandler.java
+++ 
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/SAMLDelegationHandler.java
@@ -26,20 +26,14 @@ import java.util.logging.Logger;
 import org.w3c.dom.Element;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.sts.request.ReceivedToken;
- HEAD
+import org.apache.cxf.sts.request.ReceivedToken.STATE;
+
 import org.apache.ws.security.WSConstants;
 import org.apache.ws.security.WSSecurityException;
 import org.apache.ws.security.saml.ext.AssertionWrapper;
 import org.apache.ws.security.saml.ext.builder.SAML1Constants;
 import org.apache.ws.security.saml.ext.builder.SAML2Constants;
-===
-import org.apache.cxf.sts.request.ReceivedToken.STATE;
-import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.common.saml.SamlAssertionWrapper;
-import org.apache.wss4j.common.saml.builder.SAML1Constants;
-import org.apache.wss4j.common.saml.builder.SAML2Constants;
-import org.apache.wss4j.dom.WSConstants;
- 57822c1... Make sure delegation is only allowed if the token is valid 
for the SAML case
+
 import org.opensaml.saml1.core.AudienceRestrictionCondition;
 
 /**



[3/3] cxf git commit: Fixing backmerge

2015-01-20 Thread coheigea
Fixing backmerge


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

Branch: refs/heads/2.7.x-fixes
Commit: b7b6b2d347a4317a69ef2158e6b4b99464dcb2e3
Parents: 5b9ea8d
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Tue Jan 20 15:56:55 2015 +
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Tue Jan 20 15:56:55 2015 +

--
 .../wss4j/PolicyBasedWSS4JInInterceptor.java|  19 -
 .../policyhandlers/AbstractBindingBuilder.java  |  63 +---
 .../policyhandlers/TransportBindingHandler.java |  19 +-
 .../apache/cxf/systest/ws/parts/PartsTest.java  |  18 +-
 .../cxf/systest/ws/parts/DoubleItParts.wsdl |   7 +-
 .../org/apache/cxf/systest/ws/parts/client.xml  | 348 ---
 .../cxf/systest/ws/parts/client/client.xml  |  22 ++
 .../org/apache/cxf/systest/ws/parts/server.xml  | 331 --
 .../cxf/systest/ws/parts/server/server.xml  |  26 ++
 9 files changed, 63 insertions(+), 790 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/b7b6b2d3/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
index d889fed..1394a0b 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
@@ -481,29 +481,10 @@ public class PolicyBasedWSS4JInInterceptor extends 
WSS4JInInterceptor {
 xpaths = p.getXPathExpressions();
 }
 
- HEAD
 if (xpaths != null) {
 if (namespaces != null) {
 xpath.setNamespaceContext(new 
MapNamespaceContext(namespaces));
 }
-===
-RequiredElements elements = 
(RequiredElements)ai.getAssertion();
-
-if (elements != null  elements.getXPaths() != null 
- !elements.getXPaths().isEmpty()) {
-ListString expressions = new ArrayListString();
-MapNamespaceContext namespaceContext = new 
MapNamespaceContext();
-
-for (org.apache.wss4j.policy.model.XPath xPath : 
elements.getXPaths()) {
-expressions.add(xPath.getXPath());
-MapString, String namespaceMap = 
xPath.getPrefixNamespaceMap();
-if (namespaceMap != null) {
-namespaceContext.addNamespaces(namespaceMap);
-}
-}
-
-xpath.setNamespaceContext(namespaceContext);
- 5c8f473... [CXF-6209][CXF-6210] - Bug in processing Signed/Encrypted 
Elements policies with multiple XPaths
 try {
 CryptoCoverageUtil.checkCoverage(soapEnvelope, refs,
 xpath, xpaths, type, scope);

http://git-wip-us.apache.org/repos/asf/cxf/blob/b7b6b2d3/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index c23d0d3..6137da6 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -1245,27 +1245,11 @@ public abstract class AbstractBindingBuilder {
 result.addAll(this.getParts(sign, includeBody, parts, found));
 
 // Handle sign/enc elements
- HEAD
-try {
-result.addAll(this.getElements(Element, xpaths, namespaces, 
found, sign));
-} catch (XPathExpressionException e) {
-LOG.log(Level.FINE, e.getMessage(), e);
-// REVISIT
-}
+result.addAll(this.getElements(Element, xpaths, namespaces, found, 
sign));
 
 // Handle content encrypted elements
-try {
-result.addAll(this.getElements(Content, contentXpaths, 
cnamespaces, found, sign));
-} catch