cxf git commit: Recording .gitmergeinfo Changes

2015-04-16 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 41967da2f - 53c80072f


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/53c80072
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/53c80072
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/53c80072

Branch: refs/heads/2.7.x-fixes
Commit: 53c80072f62f5f35659a844e6897d59c727039c5
Parents: 41967da
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 11:14:03 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 11:14:03 2015 +0100

--
 .gitmergeinfo | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/53c80072/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 055edb7..6019602 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -395,6 +395,7 @@ B 318bd5fbeae474aaca1073a05ce784685a4c5b04
 B 3194eb13b90803f262dc53a241abaff6a7f5a6d7
 B 31c6342bef1eb5921c247002a60a37b925c1059a
 B 31cf9c76f6d1be4b901bf06514a9717d936da2fb
+B 32040bbec6c9efea62af093400b7c33b8aec33ec
 B 326fa2ae986b784a5de37e43c6ef1d6746be54c8
 B 329026ec4136d83316ab55c3c0030fe911a19d35
 B 32915d5b50cd6804c628ee3bcc1e2509e1aa8430
@@ -602,6 +603,7 @@ B 4b5ce65228ec89ac8a0391b8ea932942a8c10ac4
 B 4b788d337c0ee95934345271cbe3e7b3c4566d61
 B 4b7921c19294755dc47d73906530fb676a93b31c
 B 4b86b20c931e085a4e8e4a472c5aa33beb2e8b9d
+B 4bdd188b4b1caa5589afc639a0896dae307d277f
 B 4be5e1253845461f386119d2b5d644cbf4e08b15
 B 4bee0d1a83a08c82994ac6bcb22383728134d6b7
 B 4c343aa62ea777e6665de45dd950de343a3b5f85
@@ -634,6 +636,7 @@ B 5085661fa0b3d6723ffed72386c37d17e7eb75c0
 B 5093b5b3e04e0c67ff6ff14e7e7fa3947673a4e8
 B 50ac1ba3e518d9bd01aeca98ac4a142c9fed756c
 B 50c57d9bec5f088086548d00afb70796cd0a7e91
+B 5101c85e16223ca54ab8a55bd86b3231673b857e
 B 51053aa2fecbc9620b88f7d25e6f2319c7a4dc04
 B 5122b2d0111216d8fcc64dbdbcafd769413d2b5a
 B 5131e2d40592250829deb423815e2b385a082316
@@ -1507,6 +1510,7 @@ B c755e0a939a337679b2bc80b34a0dd4ef69c519e
 B c766f1069dec6b8682865390e0c6fed133ebbe5d
 B c79696bfc1aee1d1204cbd592f6bc5c83c0d9dae
 B c7a7e9978b7b9e392690d3e5e99c7e6f02f613fe
+B c7ba4fe2ee916c54b542e4b33466b4db0aef24be
 B c7bf868270c0cdf6f794d3e2227f16649ece82fa
 B c7f4ce23ac7454dc383eb5f0c5d3f6f55aee95e8
 B c86b32063506fe346c6b9c435647f6ced93bdc67



[2/3] cxf git commit: [CXF-6343] - EncryptedHeader not properly processed or generated. This closes #66

2015-04-16 Thread coheigea
[CXF-6343] - EncryptedHeader not properly processed or generated. This closes 
#66

Conflicts:

rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java

rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java


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

Branch: refs/heads/3.0.x-fixes
Commit: c7ba4fe2ee916c54b542e4b33466b4db0aef24be
Parents: c0698e5
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 10:08:38 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 10:50:34 2015 +0100

--
 .../wss4j/AbstractWSS4JInterceptor.java |  1 +
 .../wss4j/AbstractWSS4JStaxInterceptor.java |  6 ++
 .../policyhandlers/AbstractBindingBuilder.java  | 11 +++-
 .../wss4j/AbstractPolicySecurityTest.java   | 53 ++
 .../wss4j/CryptoCoverageCheckerTest.java| 10 
 .../wss4j/PolicyBasedWss4JInOutTest.java| 12 +++-
 ...ody_content_signed_with_encrypted_header.xml | 58 
 .../wss4j/wss-242-with-encryptedheader.xml  | 44 +++
 8 files changed, 179 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/c7ba4fe2/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java
index b7b05a6..db69159 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java
@@ -51,6 +51,7 @@ public abstract class AbstractWSS4JInterceptor extends 
WSHandler implements Soap
 HEADERS.add(new QName(WSConstants.WSSE_NS, Security));
 HEADERS.add(new QName(WSConstants.WSSE11_NS, Security));
 HEADERS.add(new QName(WSConstants.ENC_NS, EncryptedData));
+HEADERS.add(new QName(WSConstants.WSSE11_NS, EncryptedHeader));
 }
 
 private MapString, Object properties = new ConcurrentHashMapString, 
Object();

http://git-wip-us.apache.org/repos/asf/cxf/blob/c7ba4fe2/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java
index 583de26..8ab2a82 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java
@@ -72,9 +72,15 @@ public abstract class AbstractWSS4JStaxInterceptor 
implements SoapInterceptor,
 
 private static final SetQName HEADERS = new HashSetQName();
 static {
+ HEAD
 HEADERS.add(new QName(WSSConstants.NS_WSSE10, Security));
 HEADERS.add(new QName(WSSConstants.NS_WSSE11, Security));
 HEADERS.add(new QName(WSSConstants.NS_XMLENC, EncryptedData));
+===
+HEADERS.add(new QName(WSConstants.WSSE_NS, Security));
+HEADERS.add(new QName(WSConstants.ENC_NS, EncryptedData));
+HEADERS.add(new QName(WSConstants.WSSE11_NS, EncryptedHeader));
+ 5b20a3c... [CXF-6343] - EncryptedHeader not properly processed or 
generated. This closes #66
 }
 
 private static final Logger LOG = 
LogUtils.getL7dLogger(AbstractWSS4JStaxInterceptor.class);

http://git-wip-us.apache.org/repos/asf/cxf/blob/c7ba4fe2/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 8f7c118..191de5f 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
@@ -1055,8 +1055,13 @@ public abstract class AbstractBindingBuilder extends 
AbstractCommonBindingHandle
 for (Header 

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

2015-04-16 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes c0698e5ef - 4bdd188b4


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/5101c85e
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5101c85e
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5101c85e

Branch: refs/heads/3.0.x-fixes
Commit: 5101c85e16223ca54ab8a55bd86b3231673b857e
Parents: c7ba4fe
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 10:50:34 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 10:50:34 2015 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/5101c85e/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index d8ebe9b..be979fc 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -330,6 +330,7 @@ M 56c0db05126292a61a782f05848321b9b8b8b80c
 M 58e6563da54fd3237a9a1d21a2cf7115740795a2
 M 590313298b7a4d79c80b130357c5036adb6102c2
 M 5a9a2a09887c69cdfeff5eac22996ab35fbfc0cf
+M 5b20a3c909440bab1f0080a0b4b414fef6a6d4b9
 M 5e919271e2e92f9845d6454b37ab0b86cfc66591
 M 5e97d1e29e85d80f0679748cc4df0d8e0647ee16
 M 6129ec5f6735a986660a2d05c6b3b0c9230610d9



cxf git commit: Recording .gitmergeinfo Changes

2015-04-16 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 4bdd188b4 - 32040bbec


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/32040bbe
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/32040bbe
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/32040bbe

Branch: refs/heads/3.0.x-fixes
Commit: 32040bbec6c9efea62af093400b7c33b8aec33ec
Parents: 4bdd188
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 11:13:34 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 11:13:34 2015 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/32040bbe/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index be979fc..b4bef05 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -192,6 +192,7 @@ B a5f8a4dd4d9ecbfc1f8a1a8e5bcb4af17f561cc5
 B a79bb058aaf71e85dcb5c90e7b2f6e4ab8e63cba
 B a7b79ea692add4f9da0f1232e3bfb338099f4147
 B a7c6e78b491c4feb6797a632a6249189a552
+B a892678e5e2976d0c46ccdc44acb303e855aad9a
 B ab4eaac0be87291b7f053d144dc8fbf9d98634c3
 B ad5763ef8ea1ff3c8ddea2c3a6fabdaae6acddd6
 B ad700a5f6471f55680821f6d04b182f5d3a6054e



cxf git commit: Removing some DOM dependencies from stax code

2015-04-16 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master 5b20a3c90 - a892678e5


Removing some DOM dependencies from stax code


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

Branch: refs/heads/master
Commit: a892678e5e2976d0c46ccdc44acb303e855aad9a
Parents: 5b20a3c
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 11:11:28 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 11:11:28 2015 +0100

--
 .../cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java  | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/a892678e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java
index 75189f6..9180104 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java
@@ -57,8 +57,8 @@ import org.apache.wss4j.common.crypto.PasswordEncryptor;
 import org.apache.wss4j.common.ext.WSPasswordCallback;
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.common.util.Loader;
-import org.apache.wss4j.dom.WSConstants;
 import org.apache.wss4j.stax.ConfigurationConverter;
+import org.apache.wss4j.stax.ext.WSSConstants;
 import org.apache.wss4j.stax.ext.WSSSecurityProperties;
 
 public abstract class AbstractWSS4JStaxInterceptor implements SoapInterceptor, 
@@ -68,9 +68,9 @@ public abstract class AbstractWSS4JStaxInterceptor implements 
SoapInterceptor,
 private static final SetQName HEADERS = new HashSet();
 
 static {
-HEADERS.add(new QName(WSConstants.WSSE_NS, Security));
-HEADERS.add(new QName(WSConstants.ENC_NS, EncryptedData));
-HEADERS.add(new QName(WSConstants.WSSE11_NS, EncryptedHeader));
+HEADERS.add(new QName(WSSConstants.NS_WSSE10, Security));
+HEADERS.add(new QName(WSSConstants.NS_XMLENC, EncryptedData));
+HEADERS.add(new QName(WSSConstants.NS_WSSE11, EncryptedHeader));
 }
 
 private final MapString, Object properties;



cxf git commit: More work on using shared security constants in cxf-rt-rs-xml-security

2015-04-16 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master a892678e5 - 42b3ae5ec


More work on using shared security constants in cxf-rt-rs-xml-security


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

Branch: refs/heads/master
Commit: 42b3ae5ec3ae398082e892d6c37acb0809876894
Parents: a892678
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 13:36:22 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 13:36:22 2015 +0100

--
 .../rs/security/saml/AbstractSamlInHandler.java | 27 ++--
 .../SecurityContextProviderImpl.java| 17 
 .../security/xml/AbstractXmlSigInHandler.java   | 24 ++---
 .../rs/security/xml/XmlEncOutInterceptor.java   |  5 
 .../rs/security/xml/XmlSecInInterceptor.java| 21 ++-
 .../cxf/rt/security/SecurityConstants.java  |  7 ++---
 .../cxf/ws/security/SecurityConstants.java  | 20 +--
 .../jaxrs/security/saml/secureServer.xml|  9 +++
 8 files changed, 102 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/42b3ae5e/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlInHandler.java
--
diff --git 
a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlInHandler.java
 
b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlInHandler.java
index 7fbe571..02e3835 100644
--- 
a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlInHandler.java
+++ 
b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlInHandler.java
@@ -47,6 +47,7 @@ import 
org.apache.cxf.rs.security.saml.authorization.SecurityContextProvider;
 import 
org.apache.cxf.rs.security.saml.authorization.SecurityContextProviderImpl;
 import org.apache.cxf.rs.security.xml.AbstractXmlSecInHandler;
 import org.apache.cxf.rt.security.SecurityConstants;
+import org.apache.cxf.rt.security.utils.SecurityUtils;
 import org.apache.cxf.security.SecurityContext;
 import org.apache.cxf.security.transport.TLSSessionInfo;
 import org.apache.cxf.staxutils.StaxUtils;
@@ -221,15 +222,25 @@ public abstract class AbstractSamlInHandler implements 
ContainerRequestFilter {
 }
 
 protected void checkSubjectConfirmationData(Message message, 
SamlAssertionWrapper assertion) {
-Certificate[] tlsCerts = getTLSCertificates(message);
-if (!checkHolderOfKey(message, assertion, tlsCerts)) {
-throwFault(Holder Of Key claim fails, null);
+String valSAMLSubjectConf = 
+
(String)SecurityUtils.getSecurityPropertyValue(SecurityConstants.VALIDATE_SAML_SUBJECT_CONFIRMATION,
+   message);
+boolean validateSAMLSubjectConf = true;
+if (valSAMLSubjectConf != null) {
+validateSAMLSubjectConf = Boolean.parseBoolean(valSAMLSubjectConf);
 }
-if (!checkSenderVouches(message, assertion, tlsCerts)) {
-throwFault(Sender vouchers claim fails, null);
-}
-if (!checkBearer(assertion, tlsCerts)) {
-throwFault(Bearer claim fails, null);
+
+if (validateSAMLSubjectConf) {
+Certificate[] tlsCerts = getTLSCertificates(message);
+if (!checkHolderOfKey(message, assertion, tlsCerts)) {
+throwFault(Holder Of Key claim fails, null);
+}
+if (!checkSenderVouches(message, assertion, tlsCerts)) {
+throwFault(Sender vouchers claim fails, null);
+}
+if (!checkBearer(assertion, tlsCerts)) {
+throwFault(Bearer claim fails, null);
+}
 }
 }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/42b3ae5e/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/authorization/SecurityContextProviderImpl.java
--
diff --git 
a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/authorization/SecurityContextProviderImpl.java
 
b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/authorization/SecurityContextProviderImpl.java
index 9899085..9c71bfa 100644
--- 
a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/authorization/SecurityContextProviderImpl.java
+++ 
b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/authorization/SecurityContextProviderImpl.java
@@ -24,10 +24,12 @@ import java.util.Set;
 import org.w3c.dom.Element;
 

[2/2] cxf git commit: Adding a SAML SSO Metadata test

2015-04-16 Thread coheigea
Adding a SAML SSO Metadata test


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

Branch: refs/heads/master
Commit: da352523c42bf69ab743f75a5216a03e26a20bef
Parents: 4bc0c5e
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 14:08:19 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 14:08:19 2015 +0100

--
 systests/rs-security/pom.xml|  5 ++
 .../samlsso/KeystorePasswordCallback.java   | 56 +++
 .../jaxrs/security/samlsso/MetadataServer.java  | 57 
 .../jaxrs/security/samlsso/MetadataTest.java| 72 
 .../systest/jaxrs/security/samlsso/client.xml   | 38 +++
 .../jaxrs/security/samlsso/metadata-server.xml  | 60 
 6 files changed, 288 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/da352523/systests/rs-security/pom.xml
--
diff --git a/systests/rs-security/pom.xml b/systests/rs-security/pom.xml
index 21fdf6b..7eaadbc 100644
--- a/systests/rs-security/pom.xml
+++ b/systests/rs-security/pom.xml
@@ -73,6 +73,11 @@
 /dependency
 dependency
 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

http://git-wip-us.apache.org/repos/asf/cxf/blob/da352523/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/KeystorePasswordCallback.java
--
diff --git 
a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/KeystorePasswordCallback.java
 
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/KeystorePasswordCallback.java
new file mode 100644
index 000..e90554c
--- /dev/null
+++ 
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/KeystorePasswordCallback.java
@@ -0,0 +1,56 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.jaxrs.security.samlsso;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
+/**
+ */
+
+public class KeystorePasswordCallback implements CallbackHandler {
+
+public KeystorePasswordCallback() {
+}
+
+/**
+ * It attempts to get the password from the private 
+ * alias/passwords map.
+ */
+public void handle(Callback[] callbacks) throws IOException, 
UnsupportedCallbackException {
+for (int i = 0; i  callbacks.length; i++) {
+WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+if (alice.equals(pc.getIdentifier())) {
+pc.setPassword(password);
+} else if (bob.equals(pc.getIdentifier())) {
+pc.setPassword(password);
+} else {
+pc.setPassword(abcd!1234);
+}
+}
+}
+
+
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/da352523/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/MetadataServer.java
--
diff --git 
a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/MetadataServer.java
 
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/MetadataServer.java
new file mode 100644
index 000..83cc84a
--- /dev/null

[1/2] cxf git commit: Fixing bug

2015-04-16 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master 42b3ae5ec - da352523c


Fixing bug


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

Branch: refs/heads/master
Commit: 4bc0c5e52615dac9db94b6fdcd73065a48eb1411
Parents: 42b3ae5
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 14:00:51 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 14:00:51 2015 +0100

--
 .../main/java/org/apache/cxf/rt/security/utils/SecurityUtils.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/4bc0c5e5/rt/security/src/main/java/org/apache/cxf/rt/security/utils/SecurityUtils.java
--
diff --git 
a/rt/security/src/main/java/org/apache/cxf/rt/security/utils/SecurityUtils.java 
b/rt/security/src/main/java/org/apache/cxf/rt/security/utils/SecurityUtils.java
index 2c040fc..a7a7148 100644
--- 
a/rt/security/src/main/java/org/apache/cxf/rt/security/utils/SecurityUtils.java
+++ 
b/rt/security/src/main/java/org/apache/cxf/rt/security/utils/SecurityUtils.java
@@ -149,7 +149,7 @@ public final class SecurityUtils {
 if (url != null) {
 Properties properties = new Properties();
 try {
-InputStream ins = ((URL)o).openStream();
+InputStream ins = url.openStream();
 properties.load(ins);
 ins.close();
 } catch (IOException e) {



cxf git commit: Recording .gitmergeinfo Changes

2015-04-16 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 53c80072f - b7c140dae


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/b7c140da
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b7c140da
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b7c140da

Branch: refs/heads/2.7.x-fixes
Commit: b7c140daef75cbe707797ee1d334ed66a82153d2
Parents: 53c8007
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 14:13:54 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 14:13:54 2015 +0100

--
 .gitmergeinfo | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/b7c140da/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 6019602..93b3bae 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -500,6 +500,7 @@ B 3dd409f04e96c293827468730e636e09bdcee904
 B 3e2caed4098cc81fbf26c873a9c765c37db5dea0
 B 3e585af936b8366e0aa3a5701711d0d9b7007402
 B 3ebbda1e94eb0e09b15c75226c32b5f5e6f1641b
+B 3ed21351911324398bd86120d24cb7e2a7b75bc3
 B 3ef21c829aa2c8272f87c2d9564011b95a976587
 B 3f1542f09664fc185546e24ffb4699233da0eec2
 B 3f4fd1c96ed389a7153df630ab01033ad3b350f5
@@ -573,6 +574,7 @@ B 467d320553527adb9208bc22ff3938c9830378c4
 B 4681cb3b58270c4ce5a58a196afffd5fe3d14321
 B 46dd6627e2a5c7d0fef9f7426739a8025d28ca4e
 B 46fbc9688904322de1b2d5a46cdfe24d19f42b4a
+B 473572b60df957d3cb9aa2fd28dfd91e175624af
 B 475500b009afbdb7901f50c18891e14b6a234f42
 B 475f9b6b1da810a781dc7d773d143ca9ce600513
 B 4765a07b3df5b94859d5be42410957f5231c805d
@@ -748,6 +750,7 @@ B 60ced92f740f2f88dd75457e22e8775de88d1a09
 B 60d7bf2ef1d46516c1b1b921dc1a07de05856124
 B 60e756d2dc7507716d8b8fa2bfd9b99fc3e2ce73
 B 60fec6d7fddaa8324fc9652c6b7cbc100fa31822
+B 610f52c510f0ad1fb2c2a416337dc0ef583b26d3
 B 61125f0665fff8d0d93ba99b85ce9bf7dc8557d2
 B 61145ca9fe23be1c9a88570926308e30b276c5c1
 B 6116296208e00b7444c835e59072d2cb1580d3cd



cxf git commit: Allow setting a relative path for the metadata services

2015-04-16 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master da352523c - f76371ed2


Allow setting a relative path for the metadata services


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

Branch: refs/heads/master
Commit: f76371ed2b975b6c7151fae9cdbd5674e1431c6c
Parents: da35252
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 16:27:21 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 16:27:21 2015 +0100

--
 .../rs/security/saml/sso/MetadataService.java   | 21 +---
 1 file changed, 18 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/f76371ed/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
--
diff --git 
a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
 
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
index fc7a424..266518b 100644
--- 
a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
+++ 
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
@@ -18,6 +18,7 @@
  */
 package org.apache.cxf.rs.security.saml.sso;
 
+import java.net.URI;
 import java.security.PrivateKey;
 import java.security.cert.X509Certificate;
 import java.util.ResourceBundle;
@@ -30,10 +31,11 @@ import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 
 import org.w3c.dom.Document;
-
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.jaxrs.utils.ExceptionUtils;
+import org.apache.cxf.jaxrs.utils.JAXRSUtils;
+import org.apache.cxf.message.Message;
 import org.apache.wss4j.common.crypto.Crypto;
 import org.apache.wss4j.common.crypto.CryptoType;
 import org.apache.wss4j.common.ext.WSPasswordCallback;
@@ -45,6 +47,7 @@ public class MetadataService extends AbstractSSOSpHandler {
 
 private String serviceAddress;
 private String logoutServiceAddress;
+private boolean addEndpointAddressToContext;
 
 @GET
 @Produces(text/xml)
@@ -85,8 +88,18 @@ public class MetadataService extends AbstractSSOSpHandler {
 // Get the private key
 PrivateKey privateKey = crypto.getPrivateKey(signatureUser, 
password);
 
-return metadataWriter.getMetaData(serviceAddress, 
logoutServiceAddress, privateKey, issuerCerts[0], 
+if (addEndpointAddressToContext) {
+Message message = JAXRSUtils.getCurrentMessage();
+String httpBasePath = (String)message.get(http.base.path);
+String rawPath = URI.create(httpBasePath).getRawPath();
+return metadataWriter.getMetaData(rawPath + serviceAddress, 
+  rawPath + 
logoutServiceAddress, 
+  privateKey, issuerCerts[0], 
+  true);
+} else {
+return metadataWriter.getMetaData(serviceAddress, 
logoutServiceAddress, privateKey, issuerCerts[0], 
   true);
+}
 } catch (Exception ex) {
 LOG.log(Level.FINE, ex.getMessage(), ex);
 throw ExceptionUtils.toInternalServerErrorException(ex, null);
@@ -116,5 +129,7 @@ public class MetadataService extends AbstractSSOSpHandler {
 this.logoutServiceAddress = logoutServiceAddress;
 }
 
-
+public void setAddEndpointAddressToContext(boolean add) {
+addEndpointAddressToContext = add;
+}
 }



cxf git commit: Allow setting a relative path for the metadata services

2015-04-16 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 3ed213519 - 4146fe4d8


Allow setting a relative path for the metadata services


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

Branch: refs/heads/3.0.x-fixes
Commit: 4146fe4d811506f7d6d09832ccdbefc765b28902
Parents: 3ed2135
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 16:27:21 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 16:28:22 2015 +0100

--
 .../rs/security/saml/sso/MetadataService.java   | 21 +---
 1 file changed, 18 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/4146fe4d/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
--
diff --git 
a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
 
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
index fc7a424..266518b 100644
--- 
a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
+++ 
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
@@ -18,6 +18,7 @@
  */
 package org.apache.cxf.rs.security.saml.sso;
 
+import java.net.URI;
 import java.security.PrivateKey;
 import java.security.cert.X509Certificate;
 import java.util.ResourceBundle;
@@ -30,10 +31,11 @@ import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 
 import org.w3c.dom.Document;
-
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.jaxrs.utils.ExceptionUtils;
+import org.apache.cxf.jaxrs.utils.JAXRSUtils;
+import org.apache.cxf.message.Message;
 import org.apache.wss4j.common.crypto.Crypto;
 import org.apache.wss4j.common.crypto.CryptoType;
 import org.apache.wss4j.common.ext.WSPasswordCallback;
@@ -45,6 +47,7 @@ public class MetadataService extends AbstractSSOSpHandler {
 
 private String serviceAddress;
 private String logoutServiceAddress;
+private boolean addEndpointAddressToContext;
 
 @GET
 @Produces(text/xml)
@@ -85,8 +88,18 @@ public class MetadataService extends AbstractSSOSpHandler {
 // Get the private key
 PrivateKey privateKey = crypto.getPrivateKey(signatureUser, 
password);
 
-return metadataWriter.getMetaData(serviceAddress, 
logoutServiceAddress, privateKey, issuerCerts[0], 
+if (addEndpointAddressToContext) {
+Message message = JAXRSUtils.getCurrentMessage();
+String httpBasePath = (String)message.get(http.base.path);
+String rawPath = URI.create(httpBasePath).getRawPath();
+return metadataWriter.getMetaData(rawPath + serviceAddress, 
+  rawPath + 
logoutServiceAddress, 
+  privateKey, issuerCerts[0], 
+  true);
+} else {
+return metadataWriter.getMetaData(serviceAddress, 
logoutServiceAddress, privateKey, issuerCerts[0], 
   true);
+}
 } catch (Exception ex) {
 LOG.log(Level.FINE, ex.getMessage(), ex);
 throw ExceptionUtils.toInternalServerErrorException(ex, null);
@@ -116,5 +129,7 @@ public class MetadataService extends AbstractSSOSpHandler {
 this.logoutServiceAddress = logoutServiceAddress;
 }
 
-
+public void setAddEndpointAddressToContext(boolean add) {
+addEndpointAddressToContext = add;
+}
 }



cxf git commit: Add a separate way of configuring the RACS

2015-04-16 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master f76371ed2 - 6da8e6298


Add a separate way of configuring the RACS


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

Branch: refs/heads/master
Commit: 6da8e62985666f0063e6c2057a3fbcf07aa70552
Parents: f76371e
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 17:34:01 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 17:34:01 2015 +0100

--
 .../rs/security/saml/sso/MetadataService.java   | 22 +++-
 .../rs/security/saml/sso/MetadataWriter.java|  9 
 .../jaxrs/security/samlsso/metadata-server.xml  |  2 ++
 3 files changed, 24 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/6da8e629/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
--
diff --git 
a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
 
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
index 266518b..63619c3 100644
--- 
a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
+++ 
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
@@ -18,7 +18,6 @@
  */
 package org.apache.cxf.rs.security.saml.sso;
 
-import java.net.URI;
 import java.security.PrivateKey;
 import java.security.cert.X509Certificate;
 import java.util.ResourceBundle;
@@ -46,6 +45,7 @@ public class MetadataService extends AbstractSSOSpHandler {
 protected static final ResourceBundle BUNDLE = 
BundleUtils.getBundle(MetadataService.class);
 
 private String serviceAddress;
+private String assertionConsumerServiceAddress;
 private String logoutServiceAddress;
 private boolean addEndpointAddressToContext;
 
@@ -90,15 +90,17 @@ public class MetadataService extends AbstractSSOSpHandler {
 
 if (addEndpointAddressToContext) {
 Message message = JAXRSUtils.getCurrentMessage();
-String httpBasePath = (String)message.get(http.base.path);
-String rawPath = URI.create(httpBasePath).getRawPath();
+String rawPath = (String)message.get(http.base.path);
 return metadataWriter.getMetaData(rawPath + serviceAddress, 
+  rawPath + 
assertionConsumerServiceAddress, 
   rawPath + 
logoutServiceAddress, 
   privateKey, issuerCerts[0], 
   true);
 } else {
-return metadataWriter.getMetaData(serviceAddress, 
logoutServiceAddress, privateKey, issuerCerts[0], 
-  true);
+return metadataWriter.getMetaData(serviceAddress, 
assertionConsumerServiceAddress,
+  logoutServiceAddress, 
+  privateKey, issuerCerts[0], 
+  true);
 }
 } catch (Exception ex) {
 LOG.log(Level.FINE, ex.getMessage(), ex);
@@ -132,4 +134,14 @@ public class MetadataService extends AbstractSSOSpHandler {
 public void setAddEndpointAddressToContext(boolean add) {
 addEndpointAddressToContext = add;
 }
+
+
+public String getAssertionConsumerServiceAddress() {
+return assertionConsumerServiceAddress;
+}
+
+
+public void setAssertionConsumerServiceAddress(String 
assertionConsumerServiceAddress) {
+this.assertionConsumerServiceAddress = assertionConsumerServiceAddress;
+}
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/6da8e629/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 27c8d10..9bb1f16 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
@@ -73,6 +73,7 @@ public class MetadataWriter {
 //CHECKSTYLE:OFF
 public Document getMetaData(
 

cxf git commit: Add a separate way of configuring the RACS

2015-04-16 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 4146fe4d8 - a3fc169cf


Add a separate way of configuring the RACS


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

Branch: refs/heads/3.0.x-fixes
Commit: a3fc169cf49ed90069cc995e1729ab1a6de5c017
Parents: 4146fe4
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 17:34:01 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 17:34:38 2015 +0100

--
 .../rs/security/saml/sso/MetadataService.java   | 22 +++-
 .../rs/security/saml/sso/MetadataWriter.java|  9 
 .../jaxrs/security/samlsso/metadata-server.xml  |  2 ++
 3 files changed, 24 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/a3fc169c/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
--
diff --git 
a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
 
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
index 266518b..63619c3 100644
--- 
a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
+++ 
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataService.java
@@ -18,7 +18,6 @@
  */
 package org.apache.cxf.rs.security.saml.sso;
 
-import java.net.URI;
 import java.security.PrivateKey;
 import java.security.cert.X509Certificate;
 import java.util.ResourceBundle;
@@ -46,6 +45,7 @@ public class MetadataService extends AbstractSSOSpHandler {
 protected static final ResourceBundle BUNDLE = 
BundleUtils.getBundle(MetadataService.class);
 
 private String serviceAddress;
+private String assertionConsumerServiceAddress;
 private String logoutServiceAddress;
 private boolean addEndpointAddressToContext;
 
@@ -90,15 +90,17 @@ public class MetadataService extends AbstractSSOSpHandler {
 
 if (addEndpointAddressToContext) {
 Message message = JAXRSUtils.getCurrentMessage();
-String httpBasePath = (String)message.get(http.base.path);
-String rawPath = URI.create(httpBasePath).getRawPath();
+String rawPath = (String)message.get(http.base.path);
 return metadataWriter.getMetaData(rawPath + serviceAddress, 
+  rawPath + 
assertionConsumerServiceAddress, 
   rawPath + 
logoutServiceAddress, 
   privateKey, issuerCerts[0], 
   true);
 } else {
-return metadataWriter.getMetaData(serviceAddress, 
logoutServiceAddress, privateKey, issuerCerts[0], 
-  true);
+return metadataWriter.getMetaData(serviceAddress, 
assertionConsumerServiceAddress,
+  logoutServiceAddress, 
+  privateKey, issuerCerts[0], 
+  true);
 }
 } catch (Exception ex) {
 LOG.log(Level.FINE, ex.getMessage(), ex);
@@ -132,4 +134,14 @@ public class MetadataService extends AbstractSSOSpHandler {
 public void setAddEndpointAddressToContext(boolean add) {
 addEndpointAddressToContext = add;
 }
+
+
+public String getAssertionConsumerServiceAddress() {
+return assertionConsumerServiceAddress;
+}
+
+
+public void setAssertionConsumerServiceAddress(String 
assertionConsumerServiceAddress) {
+this.assertionConsumerServiceAddress = assertionConsumerServiceAddress;
+}
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/a3fc169c/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 27c8d10..9bb1f16 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
@@ -73,6 +73,7 @@ public class MetadataWriter {
 //CHECKSTYLE:OFF
 public Document getMetaData(

cxf git commit: Recording .gitmergeinfo Changes

2015-04-16 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes b7c140dae - 2dc6d1e79


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/2dc6d1e7
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2dc6d1e7
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2dc6d1e7

Branch: refs/heads/2.7.x-fixes
Commit: 2dc6d1e793322af24434a299b2ce34c9363b7b90
Parents: b7c140d
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 17:36:55 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 17:36:55 2015 +0100

--
 .gitmergeinfo | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/2dc6d1e7/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 93b3bae..3e445e3 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -520,6 +520,7 @@ B 40c2449428409e01188948206fdf7a1a78ce63a1
 B 40e0f9319b575932d5f07081eb1a6d1bf8318e32
 B 4110c8eae0c6cb404697df1972e0aa368eeaefe3
 B 41267161bff1dcec36c2978fe863efdcf5947ebc
+B 4146fe4d811506f7d6d09832ccdbefc765b28902
 B 414dcf6b4e208f647f28f79ee4639f53fe1e9ed2
 B 416b117b24c294390bcbde240575a4e7e87d1308
 B 417a1813062b78c64be3c397061020e1cefcedf0
@@ -1265,6 +1266,7 @@ B a39eda50574dfc986e30a217e5b172ed107bedd2
 B a3d605568fb31fd5edf5de844a3aa503f3a91558
 B a3e071687de318c17e7543a56c773849b5fa1442
 B a3f3df042f158b67426700c95a7be09bb764f3a7
+B a3fc169cf49ed90069cc995e1729ab1a6de5c017
 B a45ef8e3fc44ceeb92068dca3d4b70d87c0a19ff
 B a465a179aef282b716693843898b466150b643cb
 B a46de68efc1b722140a85ae0a012f7ce4ef34c57



[2/3] cxf git commit: Adding a SAML SSO Metadata test

2015-04-16 Thread coheigea
Adding a SAML SSO Metadata test

Conflicts:
systests/rs-security/pom.xml


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

Branch: refs/heads/3.0.x-fixes
Commit: 473572b60df957d3cb9aa2fd28dfd91e175624af
Parents: 32040bb
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 14:08:19 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 14:09:46 2015 +0100

--
 systests/rs-security/pom.xml| 13 
 .../samlsso/KeystorePasswordCallback.java   | 56 +++
 .../jaxrs/security/samlsso/MetadataServer.java  | 57 
 .../jaxrs/security/samlsso/MetadataTest.java| 72 
 .../systest/jaxrs/security/samlsso/client.xml   | 38 +++
 .../jaxrs/security/samlsso/metadata-server.xml  | 60 
 6 files changed, 296 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/473572b6/systests/rs-security/pom.xml
--
diff --git a/systests/rs-security/pom.xml b/systests/rs-security/pom.xml
index 0e3d1ad..3f90915 100644
--- a/systests/rs-security/pom.xml
+++ b/systests/rs-security/pom.xml
@@ -77,6 +77,19 @@
 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

http://git-wip-us.apache.org/repos/asf/cxf/blob/473572b6/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/KeystorePasswordCallback.java
--
diff --git 
a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/KeystorePasswordCallback.java
 
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/KeystorePasswordCallback.java
new file mode 100644
index 000..e90554c
--- /dev/null
+++ 
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/KeystorePasswordCallback.java
@@ -0,0 +1,56 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.jaxrs.security.samlsso;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
+/**
+ */
+
+public class KeystorePasswordCallback implements CallbackHandler {
+
+public KeystorePasswordCallback() {
+}
+
+/**
+ * It attempts to get the password from the private 
+ * alias/passwords map.
+ */
+public void handle(Callback[] callbacks) throws IOException, 
UnsupportedCallbackException {
+for (int i = 0; i  callbacks.length; i++) {
+WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+if (alice.equals(pc.getIdentifier())) {
+pc.setPassword(password);
+} else if (bob.equals(pc.getIdentifier())) {
+pc.setPassword(password);
+} else {
+pc.setPassword(abcd!1234);
+}
+}
+}
+
+
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/473572b6/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/samlsso/MetadataServer.java

[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



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

2015-04-16 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 32040bbec - 3ed213519


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/610f52c5
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/610f52c5
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/610f52c5

Branch: refs/heads/3.0.x-fixes
Commit: 610f52c510f0ad1fb2c2a416337dc0ef583b26d3
Parents: 473572b
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Thu Apr 16 14:09:46 2015 +0100
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Thu Apr 16 14:09:46 2015 +0100

--
 .gitmergeinfo | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/610f52c5/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index b4bef05..fb94faa 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -68,6 +68,7 @@ B 3a080015474d27075b0b03aa9ec74ab443504ebd
 B 3aec3e286e4732918589c239ea1b8f7e1d3a9836
 B 3b1a8cc3a8c1b213a8f6728ae9154cf14c9c1300
 B 40c9bfd5ee0ba7cccd7abc7e7d19db531e212c97
+B 42b3ae5ec3ae398082e892d6c37acb0809876894
 B 42eba2f948a967d62dc0257a920715ae47ae4310
 B 431db5275e3a056d6cedf4608533197580cb6073
 B 43aa455461fb8a33b0e5844512b263a262c2420c
@@ -87,6 +88,7 @@ B 494ff7640d78b1667547c8aacfc1d517fff00ef8
 B 49c35937c3a0813ed4ccf34dd03fd5fa2f41b86c
 B 4b44512d8c3fe76620dbac37d220038435c75ba5
 B 4b4a5151c83113bb53d65e0304b8c9fee524d28a
+B 4bc0c5e52615dac9db94b6fdcd73065a48eb1411
 B 4c9cc32f7bba136b3970c91f15a7f24c94c94c89
 B 4d49814ba85310599ee76e41742208383f3f6450
 B 4eec754b1bbd46e0142412cd37dbaf189c47f905
@@ -387,6 +389,7 @@ M d4a35c40d53fde17fec3d08c25215c7533dcb667
 M d5315e072b8dd5222ede6f8e47c1e3e645209f59
 M d7945c77da4f438cd7f52b1a512e65c62409d0ef
 M d9f4142e87bc8a4f31c1bd1560a01a18b5c66407
+M da352523c42bf69ab743f75a5216a03e26a20bef
 M daac77b18e2693ef4ad424937aedc764229a63ee
 M dbc4a26cd47c2609c601dc3640b655ea0a2b60b9
 M e2225709c37cb289b99db015b3d8ba5b9b317615