[1/2] cxf git commit: Use the wrapped reader if available

2017-04-04 Thread dkulp
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 0e66c891d -> 2b56bf00a


Use the wrapped reader if available


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

Branch: refs/heads/3.0.x-fixes
Commit: efc45526d990744adc346956641f3264838c7cd5
Parents: 0e66c89
Author: Daniel Kulp 
Authored: Tue Apr 4 14:02:46 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 15:24:10 2017 -0400

--
 .../jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/efc45526/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
--
diff --git 
a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java 
b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
index 341d65e..8c9d88c 100644
--- 
a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
+++ 
b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
@@ -872,7 +872,7 @@ public final class JAXBEncoderDecoder {
 reader = findExtraNamespaces(reader);
 }
 obj = unmarshalWithClass ? u.unmarshal(reader, clazz) : u
-.unmarshal((XMLStreamReader)source);
+.unmarshal(reader);
 } else if (source instanceof XMLEventReader) {
 // allows the XML Event Reader to adjust it's behaviour based on 
the state of the unmarshaller
 if (source instanceof UnmarshallerAwareXMLReader) {



[2/2] cxf git commit: Recording .gitmergeinfo Changes

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

Branch: refs/heads/3.0.x-fixes
Commit: 2b56bf00a85b47845efd8a43770a8b0e76e06eb8
Parents: efc4552
Author: Daniel Kulp 
Authored: Tue Apr 4 15:24:13 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 15:24:13 2017 -0400

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/2b56bf00/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index c4f3bfd..d576a02 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -948,6 +948,7 @@ B 8f967643447ceec89e58b079d8d8fc00cf232a02
 B 8fc16041a43d53965bc0ed794cc8ac13580f429f
 B 8fd8c552f4c2a980a5138de19a2b74104776a4ba
 B 8ff4efc8e9d5743b2f18833f5ac826739ace0bfc
+B 902de7334b81bbc68c006e36d911a34f4a498bb9
 B 90312bc48f6e564bcafdaaebc3cd596c966ee674
 B 907fbb7b8b437ebfa902b2daeebf610aa5888bdd
 B 90c1207801de16e68d5d40fe78a0fbf6873c0414
@@ -1545,6 +1546,7 @@ B ea8ef138ab526c2d39c0597f7b256d845a7e9438
 B eacd93f72c78bd28e9a3222ddfd4f0c33af6b8ec
 B eadb92c9d8af84f8754efe7f08c69fc60b82c9c3
 B eb4ea1fc03b17b7283b427cd4616507f934ef423
+B eb98654ac5a5711ad772039df58dce3ebb010328
 B eba07e615684e475772a7a2d23d7e93a0b099485
 B ec33f44cc7d7846162b164c7701d9c07fc1ae121
 B ec3a49b094019544e525aa1b14f494ca3217f17b



[1/3] cxf git commit: Use the wrapped reader if available

2017-04-04 Thread dkulp
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes b6d71af8b -> eb98654ac


Use the wrapped reader if available


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

Branch: refs/heads/3.1.x-fixes
Commit: 149f1d583e89a84931fc9601965f22ca6cd451d3
Parents: b6d71af
Author: Daniel Kulp 
Authored: Tue Apr 4 14:02:46 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 15:23:49 2017 -0400

--
 .../jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/149f1d58/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
--
diff --git 
a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java 
b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
index 06252cb..05ca83c 100644
--- 
a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
+++ 
b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
@@ -869,7 +869,7 @@ public final class JAXBEncoderDecoder {
 reader = findExtraNamespaces(reader);
 }
 obj = unmarshalWithClass ? u.unmarshal(reader, clazz) : u
-.unmarshal((XMLStreamReader)source);
+.unmarshal(reader);
 } else if (source instanceof XMLEventReader) {
 // allows the XML Event Reader to adjust it's behaviour based on 
the state of the unmarshaller
 if (source instanceof UnmarshallerAwareXMLReader) {



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

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

Branch: refs/heads/3.1.x-fixes
Commit: eb98654ac5a5711ad772039df58dce3ebb010328
Parents: 902de73
Author: Daniel Kulp 
Authored: Tue Apr 4 15:23:52 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 15:23:52 2017 -0400

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/eb98654a/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 001925d..6fbafc1 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -152,6 +152,7 @@ B 702389744199001e6c35e602ffb197ebaaf84838
 B 707fa4f3c3f3aa40979e57468a9ac3eb3102a71f
 B 73d1f886ae5265131e8664ee952ffd1cdc82f71a
 B 741c9e349e7e48d3fe278ba8d8f17dd6bf4c4370
+B 7463f091dcf08fb4bbfe58c261dda6bd1900460c
 B 746cd3c0b850702e5b3601d18ce81652a1f3441f
 B 76d165c9f7d76de1e333eded6106fa0cc186131b
 B 76edf9350e7640860b66196ad40396d54bbcb2b2



[2/3] cxf git commit: [CXF-6666] Make sure headers parsed via a databinding can have the properties set

2017-04-04 Thread dkulp
[CXF-] Make sure headers parsed via a databinding can have the properties 
set


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

Branch: refs/heads/3.1.x-fixes
Commit: 902de7334b81bbc68c006e36d911a34f4a498bb9
Parents: 149f1d5
Author: Daniel Kulp 
Authored: Tue Apr 4 15:05:29 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 15:23:52 2017 -0400

--
 .../cxf/binding/soap/interceptor/ReadHeadersInterceptor.java  | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/902de733/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
--
diff --git 
a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
 
b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
index 16e3310..1abbefd 100644
--- 
a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
+++ 
b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
@@ -53,6 +53,7 @@ import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.databinding.DataBinding;
+import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.headers.HeaderManager;
 import org.apache.cxf.headers.HeaderProcessor;
 import org.apache.cxf.helpers.DOMUtils;
@@ -254,7 +255,11 @@ public class ReadHeadersInterceptor extends 
AbstractSoapInterceptor {
 obj = hel;
 } else {
 dataBinding = p.getDataBinding();
-obj = 
dataBinding.createReader(Node.class).read(hel);
+DataReader dataReader = 
dataBinding.createReader(Node.class);
+
dataReader.setAttachments(message.getAttachments());
+dataReader.setProperty(DataReader.ENDPOINT, 
message.getExchange().getEndpoint());
+
dataReader.setProperty(Message.class.getName(), message);
+obj = dataReader.read(hel);
 }
 // TODO - add the interceptors
 



cxf git commit: [CXF-6666] Make sure headers parsed via a databinding can have the properties set

2017-04-04 Thread dkulp
Repository: cxf
Updated Branches:
  refs/heads/master 4670bd247 -> 037b0ee94


[CXF-] Make sure headers parsed via a databinding can have the properties 
set


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

Branch: refs/heads/master
Commit: 037b0ee94078cbfad94ac42856985f77c450ea4a
Parents: 4670bd2
Author: Daniel Kulp 
Authored: Tue Apr 4 15:05:29 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 15:05:29 2017 -0400

--
 .../cxf/binding/soap/interceptor/ReadHeadersInterceptor.java  | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/037b0ee9/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
--
diff --git 
a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
 
b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
index d016ee9..bce0bf7 100644
--- 
a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
+++ 
b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
@@ -53,6 +53,7 @@ import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.databinding.DataBinding;
+import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.headers.HeaderManager;
 import org.apache.cxf.headers.HeaderProcessor;
 import org.apache.cxf.helpers.DOMUtils;
@@ -254,7 +255,11 @@ public class ReadHeadersInterceptor extends 
AbstractSoapInterceptor {
 obj = hel;
 } else {
 dataBinding = p.getDataBinding();
-obj = 
dataBinding.createReader(Node.class).read(hel);
+DataReader dataReader = 
dataBinding.createReader(Node.class);
+
dataReader.setAttachments(message.getAttachments());
+dataReader.setProperty(DataReader.ENDPOINT, 
message.getExchange().getEndpoint());
+
dataReader.setProperty(Message.class.getName(), message);
+obj = dataReader.read(hel);
 }
 // TODO - add the interceptors
 



[1/2] cxf git commit: [CXF-4698] Dig into the fault an extra level to try and find the real fault

2017-04-04 Thread dkulp
Repository: cxf
Updated Branches:
  refs/heads/master 10d34e1a8 -> 4670bd247


[CXF-4698] Dig into the fault an extra level to try and find the real fault


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

Branch: refs/heads/master
Commit: 7463f091dcf08fb4bbfe58c261dda6bd1900460c
Parents: 10d34e1
Author: Daniel Kulp 
Authored: Tue Apr 4 13:16:52 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 14:48:01 2017 -0400

--
 .../apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java  | 6 ++
 1 file changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/7463f091/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
--
diff --git 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
index 4af67a0..799683c 100644
--- 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
+++ 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
@@ -123,6 +123,12 @@ public class WebFaultOutInterceptor extends 
FaultOutInterceptor {
 WebFault fault = null;
 if (cause != null) {
 fault = getWebFaultAnnotation(cause.getClass());
+if (fault == null && cause.getCause() != null) {
+fault = getWebFaultAnnotation(cause.getCause().getClass());
+if (fault != null || cause instanceof RuntimeException) {
+cause = cause.getCause();
+}
+}
 }
 if (cause instanceof Exception && fault != null) {
 Exception ex = (Exception)cause;



[2/2] cxf git commit: Use the wrapped reader if available

2017-04-04 Thread dkulp
Use the wrapped reader if available


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

Branch: refs/heads/master
Commit: 4670bd247e10110e75a97bd3009f07b87e3d7d51
Parents: 7463f09
Author: Daniel Kulp 
Authored: Tue Apr 4 14:02:46 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 14:48:07 2017 -0400

--
 .../jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/4670bd24/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
--
diff --git 
a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java 
b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
index 9283ea1..7770526 100644
--- 
a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
+++ 
b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
@@ -869,7 +869,7 @@ public final class JAXBEncoderDecoder {
 reader = findExtraNamespaces(reader);
 }
 obj = unmarshalWithClass ? u.unmarshal(reader, clazz) : u
-.unmarshal((XMLStreamReader)source);
+.unmarshal(reader);
 } else if (source instanceof XMLEventReader) {
 // allows the XML Event Reader to adjust it's behaviour based on 
the state of the unmarshaller
 if (source instanceof UnmarshallerAwareXMLReader) {



[2/2] cxf git commit: Recording .gitmergeinfo Changes

2017-04-04 Thread dkulp
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/0e66c891
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0e66c891
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0e66c891

Branch: refs/heads/3.0.x-fixes
Commit: 0e66c891d2235a493f4e1ff2e452143c50d93452
Parents: 44a27da
Author: Daniel Kulp 
Authored: Tue Apr 4 14:26:44 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 14:26:44 2017 -0400

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/0e66c891/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 706d11a..c4f3bfd 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -134,6 +134,7 @@ B 15c7bcde4ff8a741a79af1444e7d67442c48fd7a
 B 15ce3e7fb4db8eafca9a263349bc94f1e9516f7f
 B 15e4db9688617af6764f82c234e5a9582692a6e2
 B 15ebdfafcd3c54406bcb7ca3405f8aa4fe13ae35
+B 15ed5d4f8d4e2443a668c29d96626debcd01a8db
 B 161e10bb2d87573974b8a1748f023c47ebbe5d49
 B 162bbb5ea63cfeb6c258d750627c77c9e694f928
 B 163e1d2361643251b31b6fdf7def0b52542577dd
@@ -1216,6 +1217,7 @@ B b7562ded6c0b54d02615298c975c54585aebf298
 B b75705c1510b13df2dd387e69d52da3efa50cfc9
 B b7657a47aca211d46df04998bf79a9e2ca76a545
 B b79272c09949cea80572fb86bc170cb344a9b731
+B b7cd8559dfd6a178af0945d0151f21c48f153522
 B b7ce0bf1e5106b7913269c1aa24c4ab3aa5631ee
 B b7d89466ab1c0ef68156cef6deb5a911fbf511f2
 B b7e9d2e0dc0c9f4248fbc8a8448c37b510c9a96c



[1/2] cxf git commit: [CXF-7303] Convert URI to a File object to determine path needed by jibx

2017-04-04 Thread dkulp
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 4d9dbe907 -> 0e66c891d


[CXF-7303] Convert URI to a File object to determine path needed by jibx


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

Branch: refs/heads/3.0.x-fixes
Commit: 44a27dacaae2c1dfac1788b9908083b3f946728a
Parents: 4d9dbe9
Author: Daniel Kulp 
Authored: Tue Apr 4 14:24:01 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 14:26:43 2017 -0400

--
 .../apache/cxf/jibx/tools/JibxToolingDataBinding.java   | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/44a27dac/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
--
diff --git 
a/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
 
b/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
index 561f2d5..8966cce 100644
--- 
a/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
+++ 
b/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
@@ -140,7 +140,17 @@ public class JibxToolingDataBinding implements 
DataBindingProfile {
 if (bindingFiles == null || bindingFiles.length == 0) {
 customRoot = defaultSchemasetCustom(schemaMap);
 } else {
-customRoot = 
SchemasetCustom.loadCustomizations(bindingFiles[0], handler);
+System.out.println();
+String path = bindingFiles[0];
+try {
+File file = new File(new java.net.URI(bindingFiles[0]));
+if (file.exists()) {
+path = file.getAbsolutePath();
+}
+} catch (Throwable t) {
+//ignore
+}
+customRoot = SchemasetCustom.loadCustomizations(path, handler);
 }
 // force to retrain types information in the generated binding 
model
 forceTypes(customRoot);



[2/2] cxf git commit: [CXF-7303] Convert URI to a File object to determine path needed by jibx

2017-04-04 Thread dkulp
[CXF-7303] Convert URI to a File object to determine path needed by jibx


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

Branch: refs/heads/3.1.x-fixes
Commit: b6d71af8b129aae13958e99d049873c8f726620a
Parents: b7cd855
Author: Daniel Kulp 
Authored: Tue Apr 4 14:24:01 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 14:24:01 2017 -0400

--
 .../apache/cxf/jibx/tools/JibxToolingDataBinding.java   | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/b6d71af8/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
--
diff --git 
a/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
 
b/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
index 561f2d5..8966cce 100644
--- 
a/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
+++ 
b/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
@@ -140,7 +140,17 @@ public class JibxToolingDataBinding implements 
DataBindingProfile {
 if (bindingFiles == null || bindingFiles.length == 0) {
 customRoot = defaultSchemasetCustom(schemaMap);
 } else {
-customRoot = 
SchemasetCustom.loadCustomizations(bindingFiles[0], handler);
+System.out.println();
+String path = bindingFiles[0];
+try {
+File file = new File(new java.net.URI(bindingFiles[0]));
+if (file.exists()) {
+path = file.getAbsolutePath();
+}
+} catch (Throwable t) {
+//ignore
+}
+customRoot = SchemasetCustom.loadCustomizations(path, handler);
 }
 // force to retrain types information in the generated binding 
model
 forceTypes(customRoot);



[1/2] cxf git commit: Fix checkstyle issues

2017-04-04 Thread dkulp
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 4406683df -> b6d71af8b


Fix checkstyle issues


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

Branch: refs/heads/3.1.x-fixes
Commit: b7cd8559dfd6a178af0945d0151f21c48f153522
Parents: 4406683
Author: Daniel Kulp 
Authored: Tue Apr 4 14:17:51 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 14:17:51 2017 -0400

--
 .../sample/rs/service/SampleRestApplicationTest.java |  8 +---
 .../sample/rs/service/SampleRestApplicationTest.java |  8 +---
 .../java/sample/ws/service/SampleWsApplicationTest.java  | 11 ++-
 3 files changed, 16 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/b7cd8559/distribution/src/main/release/samples/jax_rs/spring_boot/src/test/java/sample/rs/service/SampleRestApplicationTest.java
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/spring_boot/src/test/java/sample/rs/service/SampleRestApplicationTest.java
 
b/distribution/src/main/release/samples/jax_rs/spring_boot/src/test/java/sample/rs/service/SampleRestApplicationTest.java
index 70d5e1c..b783201 100644
--- 
a/distribution/src/main/release/samples/jax_rs/spring_boot/src/test/java/sample/rs/service/SampleRestApplicationTest.java
+++ 
b/distribution/src/main/release/samples/jax_rs/spring_boot/src/test/java/sample/rs/service/SampleRestApplicationTest.java
@@ -19,14 +19,16 @@
 package sample.rs.service;
 
 import org.apache.cxf.jaxrs.client.WebClient;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import org.springframework.boot.context.embedded.LocalServerPort;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
 import org.springframework.test.context.junit4.SpringRunner;
 
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
 
 
 @RunWith(SpringRunner.class)

http://git-wip-us.apache.org/repos/asf/cxf/blob/b7cd8559/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/test/java/sample/rs/service/SampleRestApplicationTest.java
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/test/java/sample/rs/service/SampleRestApplicationTest.java
 
b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/test/java/sample/rs/service/SampleRestApplicationTest.java
index 70d5e1c..b783201 100644
--- 
a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/test/java/sample/rs/service/SampleRestApplicationTest.java
+++ 
b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/test/java/sample/rs/service/SampleRestApplicationTest.java
@@ -19,14 +19,16 @@
 package sample.rs.service;
 
 import org.apache.cxf.jaxrs.client.WebClient;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import org.springframework.boot.context.embedded.LocalServerPort;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
 import org.springframework.test.context.junit4.SpringRunner;
 
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
 
 
 @RunWith(SpringRunner.class)

http://git-wip-us.apache.org/repos/asf/cxf/blob/b7cd8559/distribution/src/main/release/samples/jaxws_spring_boot/src/test/java/sample/ws/service/SampleWsApplicationTest.java
--
diff --git 
a/distribution/src/main/release/samples/jaxws_spring_boot/src/test/java/sample/ws/service/SampleWsApplicationTest.java
 
b/distribution/src/main/release/samples/jaxws_spring_boot/src/test/java/sample/ws/service/SampleWsApplicationTest.java
index 13e68eb..53f7277 100644
--- 
a/distribution/src/main/release/samples/jaxws_spring_boot/src/test/java/sample/ws/service/SampleWsApplicationTest.java
+++ 
b/distribution/src/main/release/samples/jaxws_spring_boot/src/test/java/sample/ws/service/SampleWsApplicationTest.java
@@ -18,13 +18,17 @@
  */
 package sample.ws.service;
 
-import static org.hamcrest.Matchers.containsString;
 
 import java.io.StringReader;
 
 import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.stream.StreamSource;
 
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import 

[2/2] cxf git commit: [CXF-7187] Check for the other soap fault action value to correlate response

2017-04-04 Thread dkulp
[CXF-7187] Check for the other soap fault action value to correlate response


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

Branch: refs/heads/3.0.x-fixes
Commit: 0bb262c26d40cad9d1136e4e6cc92a453385aec6
Parents: 896952e
Author: Daniel Kulp 
Authored: Tue Apr 4 12:31:36 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 12:54:31 2017 -0400

--
 core/src/main/java/org/apache/cxf/ws/addressing/Names.java  | 5 -
 .../main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java   | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/0bb262c2/core/src/main/java/org/apache/cxf/ws/addressing/Names.java
--
diff --git a/core/src/main/java/org/apache/cxf/ws/addressing/Names.java 
b/core/src/main/java/org/apache/cxf/ws/addressing/Names.java
index b80758e..51d2c80 100644
--- a/core/src/main/java/org/apache/cxf/ws/addressing/Names.java
+++ b/core/src/main/java/org/apache/cxf/ws/addressing/Names.java
@@ -109,7 +109,10 @@ public final class Names {
 "/fault";
 public static final String WSA_DEFAULT_FAULT_ACTION =
 WSA_NAMESPACE_NAME + WSA_FAULT_DELIMITER;
-
+
+public static final String WSA_DEFAULT_SOAP_FAULT_ACTION =
+WSA_NAMESPACE_NAME + "/soap" + WSA_FAULT_DELIMITER;
+
 public static final String WSAW_ACTION_NAME = "Action";
 public static final QName WSAW_ACTION_QNAME = 
 new QName(WSA_NAMESPACE_WSDL_NAME, WSAW_ACTION_NAME);

http://git-wip-us.apache.org/repos/asf/cxf/blob/0bb262c2/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
--
diff --git 
a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java 
b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
index c546edf..9cef853 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
@@ -855,7 +855,8 @@ public class MAPCodec extends AbstractSoapInterceptor {
 }
 } else if (maps.getRelatesTo() == null
 && maps.getAction() != null
-&& 
Names.WSA_DEFAULT_FAULT_ACTION.equals(maps.getAction().getValue())) {
+&& 
(Names.WSA_DEFAULT_FAULT_ACTION.equals(maps.getAction().getValue())
+|| 
Names.WSA_DEFAULT_SOAP_FAULT_ACTION.equals(maps.getAction().getValue( {
 //there is an Action header that points to a fault and no 
relatesTo.  Use the out map for the ID
 Message m = message.getExchange().getOutMessage();
 maps = ContextUtils.retrieveMAPs(m, false, true, false);



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

2017-04-04 Thread dkulp
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 896952e92 -> 4d9dbe907


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

Branch: refs/heads/3.0.x-fixes
Commit: 4d9dbe907e7aca17aca862f81e775cd5bc6d4b00
Parents: 0bb262c
Author: Daniel Kulp 
Authored: Tue Apr 4 12:54:31 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 12:54:31 2017 -0400

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/4d9dbe90/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 2277e9f..706d11a 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -449,6 +449,7 @@ B 43aa455461fb8a33b0e5844512b263a262c2420c
 B 43babb8fc1bfd034657eb44fe82fab960034c85d
 B 43c65b07658b8041f6689d16a34ff98132b8a424
 B 43f440bb4705eddaa29907239372205702f32853
+B 4406683dfcd824a2be8a9986e2d2f04b18a6f551
 B 441cd2cecdd8a88d42e41324643f06a2fccf5a25
 B 4463a7be5363bc38d9088c154d7a80a399acf4fa
 B 448fdcf01e27006fef31de39c7672cc251e07dbc



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

2017-04-04 Thread dkulp
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/4406683d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4406683d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4406683d

Branch: refs/heads/3.1.x-fixes
Commit: 4406683dfcd824a2be8a9986e2d2f04b18a6f551
Parents: cf5a6d6
Author: Daniel Kulp 
Authored: Tue Apr 4 12:53:29 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 12:53:47 2017 -0400

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/4406683d/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 162d40f..001925d 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -328,6 +328,7 @@ B f98785bd8490c4717353f1a9688cae3e7a823ec2
 B fb11380da6e5c157ffd311c2925eb533d134c8cb
 B fb30f8bffc85fcc3208fcc0e1eda4b54a89b5d37
 B fd77d3f3380f805db3547d37cbb2ff72bd033ad0
+M 00148006c5bc489794f2774134fcbebf1cd5f2f4
 M 01cd14ce923f1f2cd044746e272b2d525c46f9a6
 M 01d06cee06203b0ba616ca1924f1878aecc1a791
 M 01fdc40526185ee89202692088fd5367f0690af0
@@ -346,6 +347,7 @@ M 08c9194ce2c567ebfe59f59ee628b1197d90fd43
 M 090fa6100ae3a5aa8ae894b0e238acb793f705ec
 M 09fb22b25333c66514f06652ceaf7fc11bde51cc
 M 0e5fd5a54cb271ba494e7e30b45d4228b33364a9
+M 10d34e1a812ab2a709376f008c738de68c8720cf
 M 10ed38c6d1f74f75ae231e8b91b7198b4e162ab3
 M 11637433df089a638e173d1ef57441e7456cf2ea
 M 1184e08f0d1c40c754e39fd5d6340d1057fbdd17



[2/3] cxf git commit: [CXF-7187] Check for the other soap fault action value to correlate response

2017-04-04 Thread dkulp
[CXF-7187] Check for the other soap fault action value to correlate response


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

Branch: refs/heads/3.1.x-fixes
Commit: cf5a6d6e83c94f21b1f54d2c48d2be8cef4f972c
Parents: 15ed5d4
Author: Daniel Kulp 
Authored: Tue Apr 4 12:31:36 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 12:53:43 2017 -0400

--
 core/src/main/java/org/apache/cxf/ws/addressing/Names.java  | 5 -
 .../main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java   | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/cf5a6d6e/core/src/main/java/org/apache/cxf/ws/addressing/Names.java
--
diff --git a/core/src/main/java/org/apache/cxf/ws/addressing/Names.java 
b/core/src/main/java/org/apache/cxf/ws/addressing/Names.java
index b80758e..51d2c80 100644
--- a/core/src/main/java/org/apache/cxf/ws/addressing/Names.java
+++ b/core/src/main/java/org/apache/cxf/ws/addressing/Names.java
@@ -109,7 +109,10 @@ public final class Names {
 "/fault";
 public static final String WSA_DEFAULT_FAULT_ACTION =
 WSA_NAMESPACE_NAME + WSA_FAULT_DELIMITER;
-
+
+public static final String WSA_DEFAULT_SOAP_FAULT_ACTION =
+WSA_NAMESPACE_NAME + "/soap" + WSA_FAULT_DELIMITER;
+
 public static final String WSAW_ACTION_NAME = "Action";
 public static final QName WSAW_ACTION_QNAME = 
 new QName(WSA_NAMESPACE_WSDL_NAME, WSAW_ACTION_NAME);

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf5a6d6e/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
--
diff --git 
a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java 
b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
index c546edf..9cef853 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
@@ -855,7 +855,8 @@ public class MAPCodec extends AbstractSoapInterceptor {
 }
 } else if (maps.getRelatesTo() == null
 && maps.getAction() != null
-&& 
Names.WSA_DEFAULT_FAULT_ACTION.equals(maps.getAction().getValue())) {
+&& 
(Names.WSA_DEFAULT_FAULT_ACTION.equals(maps.getAction().getValue())
+|| 
Names.WSA_DEFAULT_SOAP_FAULT_ACTION.equals(maps.getAction().getValue( {
 //there is an Action header that points to a fault and no 
relatesTo.  Use the out map for the ID
 Message m = message.getExchange().getOutMessage();
 maps = ContextUtils.retrieveMAPs(m, false, true, false);



[1/3] cxf git commit: [CXF-7096] Make sure everything is cleaned up if the destination sequecne times out

2017-04-04 Thread dkulp
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 8d6b79f20 -> 4406683df


[CXF-7096] Make sure everything is cleaned up if the destination sequecne times 
out


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

Branch: refs/heads/3.1.x-fixes
Commit: 15ed5d4f8d4e2443a668c29d96626debcd01a8db
Parents: 8d6b79f
Author: Daniel Kulp 
Authored: Tue Apr 4 12:07:45 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 12:53:40 2017 -0400

--
 .../java/org/apache/cxf/ws/rm/Destination.java  |   5 +-
 .../apache/cxf/ws/rm/DestinationSequence.java   |  15 +-
 .../java/org/apache/cxf/ws/rm/RMManager.java|   8 +
 .../cxf/ws/rm/DestinationSequenceTest.java  |   4 +-
 .../cxf/systest/ws/rm/SequenceTimeoutTest.java  | 213 +++
 5 files changed, 237 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/15ed5d4f/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
--
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java 
b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
index 3d3489b..ef1ea1a 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
@@ -78,8 +78,11 @@ public class Destination extends AbstractEndpoint {
 
 // this method ensures to keep the sequence until all the messages are 
delivered
 public void terminateSequence(DestinationSequence seq) {
+terminateSequence(seq, false);
+}
+public void terminateSequence(DestinationSequence seq, boolean 
forceRemove) {
 seq.terminate();
-if (seq.allAcknowledgedMessagesDelivered()) {
+if (forceRemove || seq.allAcknowledgedMessagesDelivered()) {
 removeSequence(seq);
 }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/15ed5d4f/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
--
diff --git 
a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java 
b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
index 3442fc5..d186194 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
@@ -590,11 +590,16 @@ public class DestinationSequence extends AbstractSequence 
{
 
 // terminate regardless outstanding acknowledgments - as 
we assume that the client is
 // gone there is no point in sending a 
SequenceAcknowledgment
-
-LogUtils.log(LOG, Level.WARNING, 
"TERMINATING_INACTIVE_SEQ_MSG", 
+LogUtils.log(LOG, Level.WARNING, 
"TERMINATING_INACTIVE_SEQ_MSG",
  
DestinationSequence.this.getIdentifier().getValue());
-
DestinationSequence.this.destination.terminateSequence(DestinationSequence.this);
-
+
DestinationSequence.this.destination.terminateSequence(DestinationSequence.this,
 true);
+Source source = rme.getSource();
+if (source != null) {
+SourceSequence ss = 
source.getAssociatedSequence(DestinationSequence.this.getIdentifier());
+if (ss != null) {
+source.removeSequence(ss);
+}
+}
 } else {
// reschedule 
 SequenceTermination st = new SequenceTermination();
@@ -605,4 +610,4 @@ public class DestinationSequence extends AbstractSequence {
 }
 }
 }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/15ed5d4f/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
--
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java 
b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
index a29a6a7..603e8d6 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
@@ -404,6 +404,14 @@ public class RMManager {
 }
 return rme;
 }
+public RMEndpoint findReliableEndpoint(QName qn) {
+for (RMEndpoint rpe : reliableEndpoints.values()) {
+if 
(qn.equals(rpe.getApplicationEndpoint().getService().getName())) {
+

[1/2] cxf git commit: [CXF-7096] Make sure everything is cleaned up if the destination sequecne times out

2017-04-04 Thread dkulp
Repository: cxf
Updated Branches:
  refs/heads/master 048b46de4 -> 10d34e1a8


[CXF-7096] Make sure everything is cleaned up if the destination sequecne times 
out


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

Branch: refs/heads/master
Commit: 00148006c5bc489794f2774134fcbebf1cd5f2f4
Parents: 048b46d
Author: Daniel Kulp 
Authored: Tue Apr 4 12:07:45 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 12:18:38 2017 -0400

--
 .../java/org/apache/cxf/ws/rm/Destination.java  |   5 +-
 .../apache/cxf/ws/rm/DestinationSequence.java   |  11 +-
 .../java/org/apache/cxf/ws/rm/RMManager.java|   8 +
 .../cxf/ws/rm/DestinationSequenceTest.java  |   4 +-
 .../cxf/systest/ws/rm/SequenceTimeoutTest.java  | 213 +++
 5 files changed, 235 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/00148006/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
--
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java 
b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
index f8909bf..73edab8 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
@@ -78,8 +78,11 @@ public class Destination extends AbstractEndpoint {
 
 // this method ensures to keep the sequence until all the messages are 
delivered
 public void terminateSequence(DestinationSequence seq) {
+terminateSequence(seq, false);
+}
+public void terminateSequence(DestinationSequence seq, boolean 
forceRemove) {
 seq.terminate();
-if (seq.allAcknowledgedMessagesDelivered()) {
+if (forceRemove || seq.allAcknowledgedMessagesDelivered()) {
 removeSequence(seq);
 }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/00148006/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
--
diff --git 
a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java 
b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
index cbd01a0..324719c 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
@@ -590,11 +590,16 @@ public class DestinationSequence extends AbstractSequence 
{
 
 // terminate regardless outstanding acknowledgments - as 
we assume that the client is
 // gone there is no point in sending a 
SequenceAcknowledgment
-
 LogUtils.log(LOG, Level.WARNING, 
"TERMINATING_INACTIVE_SEQ_MSG",
  
DestinationSequence.this.getIdentifier().getValue());
-
DestinationSequence.this.destination.terminateSequence(DestinationSequence.this);
-
+
DestinationSequence.this.destination.terminateSequence(DestinationSequence.this,
 true);
+Source source = rme.getSource();
+if (source != null) {
+SourceSequence ss = 
source.getAssociatedSequence(DestinationSequence.this.getIdentifier());
+if (ss != null) {
+source.removeSequence(ss);
+}
+}
 } else {
// reschedule
 SequenceTermination st = new SequenceTermination();

http://git-wip-us.apache.org/repos/asf/cxf/blob/00148006/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
--
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java 
b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
index 0f1ac27..70590bd 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
@@ -404,6 +404,14 @@ public class RMManager {
 }
 return rme;
 }
+public RMEndpoint findReliableEndpoint(QName qn) {
+for (RMEndpoint rpe : reliableEndpoints.values()) {
+if 
(qn.equals(rpe.getApplicationEndpoint().getService().getName())) {
+return rpe;
+}
+}
+return null;
+}
 
 public Destination getDestination(Message message) throws RMException {
 RMEndpoint rme = getReliableEndpoint(message);


[2/2] cxf git commit: [CXF-7187] Check for the other soap fault action value to correlate response

2017-04-04 Thread dkulp
[CXF-7187] Check for the other soap fault action value to correlate response


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

Branch: refs/heads/master
Commit: 10d34e1a812ab2a709376f008c738de68c8720cf
Parents: 0014800
Author: Daniel Kulp 
Authored: Tue Apr 4 12:31:36 2017 -0400
Committer: Daniel Kulp 
Committed: Tue Apr 4 12:31:36 2017 -0400

--
 core/src/main/java/org/apache/cxf/ws/addressing/Names.java| 2 ++
 .../src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/10d34e1a/core/src/main/java/org/apache/cxf/ws/addressing/Names.java
--
diff --git a/core/src/main/java/org/apache/cxf/ws/addressing/Names.java 
b/core/src/main/java/org/apache/cxf/ws/addressing/Names.java
index 4f4a60c..ead6946 100644
--- a/core/src/main/java/org/apache/cxf/ws/addressing/Names.java
+++ b/core/src/main/java/org/apache/cxf/ws/addressing/Names.java
@@ -109,6 +109,8 @@ public final class Names {
 "/fault";
 public static final String WSA_DEFAULT_FAULT_ACTION =
 WSA_NAMESPACE_NAME + WSA_FAULT_DELIMITER;
+public static final String WSA_DEFAULT_SOAP_FAULT_ACTION =
+WSA_NAMESPACE_NAME + "/soap" + WSA_FAULT_DELIMITER;
 
 public static final String WSAW_ACTION_NAME = "Action";
 public static final QName WSAW_ACTION_QNAME =

http://git-wip-us.apache.org/repos/asf/cxf/blob/10d34e1a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
--
diff --git 
a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java 
b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
index f8848f9..0b10aba 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
@@ -855,7 +855,8 @@ public class MAPCodec extends AbstractSoapInterceptor {
 }
 } else if (maps.getRelatesTo() == null
 && maps.getAction() != null
-&& 
Names.WSA_DEFAULT_FAULT_ACTION.equals(maps.getAction().getValue())) {
+&& 
(Names.WSA_DEFAULT_FAULT_ACTION.equals(maps.getAction().getValue())
+|| 
Names.WSA_DEFAULT_SOAP_FAULT_ACTION.equals(maps.getAction().getValue( {
 //there is an Action header that points to a fault and no 
relatesTo.  Use the out map for the ID
 Message m = message.getExchange().getOutMessage();
 maps = ContextUtils.retrieveMAPs(m, false, true, false);



cxf git commit: Recording .gitmergeinfo Changes

2017-04-04 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 0ebc74465 -> 896952e92


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

Branch: refs/heads/3.0.x-fixes
Commit: 896952e922bc0ef384e387d8b8ffa989fc78dc23
Parents: 0ebc744
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 17:30:58 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 17:30:58 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/896952e9/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 1d7f6b1..2277e9f 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -508,6 +508,7 @@ B 4aabd534a4ada7a8a671ab85050e7203754c6201
 B 4b15b8a49c1ea75c346ea4a53e3110db7edbd127
 B 4b44512d8c3fe76620dbac37d220038435c75ba5
 B 4b4a5151c83113bb53d65e0304b8c9fee524d28a
+B 4b4bb8431520ac3571cce86a6557eb2480743815
 B 4b577dc98cc61e4aead2f0bdff6d017c8a7679df
 B 4b71edb65b4e24f390b222dbb0cad6f1b533ce66
 B 4b76cb4d35d175ec3ba98ea1286859503e055374
@@ -926,6 +927,7 @@ B 8c7a97734fd3db3423bf359d4fdb44305ef45cc4
 B 8c7e2493dc26e1df4a16168a5491ac96509549d6
 B 8ca341b806145f459a8cdae55d65d34f15579b17
 B 8cfbd97e0e394dca4f67b4d9bef92380f839f23b
+B 8d6b79f20374523a4dd72efc2877ee71cd7a3c01
 B 8d80096c51d86e7896faa6ad96091df1ba2efd3c
 B 8e028a617f026fca2499f850bb680ada0692d681
 B 8e8703d676cd19f238f9b4ba78ffde41fa316422
@@ -1349,6 +1351,7 @@ B cbc9a5f5e0374e04a84eff2bd22395523dee13a8
 B cbcdc107da88f28e772f3a943013743a033781de
 B cbe9047c693b25af5bf26dc9e99ab721fbae8c31
 B cc0eb7f8e1ac8bb9e62f757bba7aca3d10ceb7da
+B cc1f96b339d07db4e990423ca87c7d38a498d9b0
 B cc591f4a3b205a5dae58cadb79828d524a424513
 B cc79bc127d0a4ff4405f2ee3d368d9c6f18aecb8
 B cc9222b453b92f1115d5fc5df2cc11ccb3600940



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

2017-04-04 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes d3f908751 -> 8d6b79f20


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

Branch: refs/heads/3.1.x-fixes
Commit: cc1f96b339d07db4e990423ca87c7d38a498d9b0
Parents: 4b4bb84
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 16:50:16 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 16:50:16 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/cc1f96b3/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 9911a68..162d40f 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -337,6 +337,7 @@ M 02c11bb9191ce5712cb32e33bb5519362a9975d2
 M 0344b6bc0d1e61a3d3b5194f5ae3ebcdf62e8d56
 M 03987585902ef5db3c265a353e483f20e31b2c18
 M 04720d55a297aa4778a8194a766d9159ba662d33
+M 048b46de4b2973bbccbaacf5effe34b06faf3e68
 M 055f1d738016ae5caf3eba42e656782de8490890
 M 0578e16146527b0782530c40ba2db17531756d96
 M 07707cd522e63cd0574db378e08f2f820882b5ec



[2/3] cxf git commit: CXF-7315 - Abstract the STS client token caching behaviour to allow the user to plug in a custom implementation

2017-04-04 Thread coheigea
CXF-7315 - Abstract the STS client token caching behaviour to allow the user to 
plug in a custom implementation

# Conflicts:
#   
rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
#   
rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
#   
rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java
#   
rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenRetriever.java


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

Branch: refs/heads/3.1.x-fixes
Commit: 4b4bb8431520ac3571cce86a6557eb2480743815
Parents: d3f9087
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 15:59:33 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 16:50:16 2017 +0100

--
 .../cxf/rt/security/SecurityConstants.java  |  11 +-
 .../IssuedTokenInterceptorProvider.java |  15 +-
 .../interceptors/STSTokenOutInterceptor.java|  22 +-
 .../security/trust/DefaultSTSTokenCacher.java   | 180 ++
 .../cxf/ws/security/trust/STSTokenCacher.java   |  59 +
 .../ws/security/trust/STSTokenRetriever.java| 240 +++
 6 files changed, 315 insertions(+), 212 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/4b4bb843/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
--
diff --git 
a/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java 
b/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
index aa0106d..61d3966 100644
--- 
a/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
+++ 
b/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
@@ -343,7 +343,14 @@ public class SecurityConstants {
  */
 public static final String STS_TOKEN_IMMINENT_EXPIRY_VALUE =
 "security.sts.token.imminent-expiry-value";
-
+
+/**
+ * An implementation of the STSTokenCacher interface, if you want to plug 
in custom caching behaviour for
+ * STS clients. The default value is the DefaultSTSTokenCacher.
+ */
+public static final String STS_TOKEN_CACHER_IMPL =
+"security.sts.token.cacher.impl";
+
 public static final Set COMMON_PROPERTIES;
 
 static {
@@ -359,7 +366,7 @@ public class SecurityConstants {
 DISABLE_STS_CLIENT_WSMEX_CALL_USING_EPR_ADDRESS, STS_TOKEN_CRYPTO,
 STS_TOKEN_PROPERTIES, STS_TOKEN_USERNAME, STS_TOKEN_ACT_AS, 
STS_TOKEN_ON_BEHALF_OF,
 STS_CLIENT, STS_APPLIES_TO, CACHE_ISSUED_TOKEN_IN_ENDPOINT, 
PREFER_WSMEX_OVER_STS_CLIENT_CONFIG,
-STS_TOKEN_IMMINENT_EXPIRY_VALUE
+STS_TOKEN_IMMINENT_EXPIRY_VALUE, STS_TOKEN_CACHER_IMPL
 }));
 COMMON_PROPERTIES = Collections.unmodifiableSet(s);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4b4bb843/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
index 141ec94..47615fc 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
@@ -32,12 +32,15 @@ import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
 import org.apache.cxf.phase.Phase;
+import org.apache.cxf.rt.security.utils.SecurityUtils;
 import org.apache.cxf.ws.policy.AbstractPolicyInterceptorProvider;
 import org.apache.cxf.ws.policy.AssertionInfo;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
 import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.cxf.ws.security.policy.PolicyUtils;
 import org.apache.cxf.ws.security.tokenstore.SecurityToken;
+import org.apache.cxf.ws.security.trust.DefaultSTSTokenCacher;
+import org.apache.cxf.ws.security.trust.STSTokenCacher;
 import org.apache.cxf.ws.security.trust.STSTokenRetriever;
 import org.apache.cxf.ws.security.trust.STSTokenRetriever.TokenRequestParams;
 import org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JInInterceptor;
@@ -130,8 

[3/3] cxf git commit: Fixing build

2017-04-04 Thread coheigea
Fixing build


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

Branch: refs/heads/3.1.x-fixes
Commit: 8d6b79f20374523a4dd72efc2877ee71cd7a3c01
Parents: cc1f96b
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 17:03:33 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 17:03:33 2017 +0100

--
 .../ws/security/policy/interceptors/STSTokenOutInterceptor.java  | 4 
 .../java/org/apache/cxf/ws/security/trust/STSTokenRetriever.java | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/8d6b79f2/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java
index c49c364..ccf003b 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java
@@ -97,9 +97,6 @@ public class STSTokenOutInterceptor extends 
AbstractPhaseInterceptor {
 public STSClient getSTSClient() {
 return stsClient;
 }
-<<< HEAD
-
-===
 
 public STSTokenCacher getTokenCacher() {
 return tokenCacher;
@@ -114,7 +111,6 @@ public class STSTokenOutInterceptor extends 
AbstractPhaseInterceptor {
  * @deprecated use {@link 
org.apache.cxf.ws.security.trust.STSAuthParams.AuthMode}
  */
 @Deprecated
->>> 048b46d... CXF-7315 - Abstract the STS client token caching behaviour 
to allow the user to plug in a custom implementation
 public enum AuthMode {
 X509(X509_ENDPOINT, KEY_TYPE_X509), 
 TRANSPORT(TRANSPORT_ENDPOINT, null);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8d6b79f2/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenRetriever.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenRetriever.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenRetriever.java
index cf25b27..4662122 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenRetriever.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenRetriever.java
@@ -120,7 +120,7 @@ public final class STSTokenRetriever {
 // Check to see whether the delegated token needs to be 
renewed
 secToken = renewToken(message, secToken, params, 
tokenCacher);
 } else {
-secToken = getTokenFromSTS(message, client, maps, 
appliesTo, params);
+secToken = getTokenFromSTS(client, maps, appliesTo, 
params);
 }
 
 if (secToken != null) {



svn commit: r1009782 - in /websites/production/cxf/content: cache/docs.pageCache docs/security-configuration.html

2017-04-04 Thread buildbot
Author: buildbot
Date: Tue Apr  4 15:47:38 2017
New Revision: 1009782

Log:
Production update by buildbot for cxf

Modified:
websites/production/cxf/content/cache/docs.pageCache
websites/production/cxf/content/docs/security-configuration.html

Modified: websites/production/cxf/content/cache/docs.pageCache
==
Binary files - no diff available.

Modified: websites/production/cxf/content/docs/security-configuration.html
==
--- websites/production/cxf/content/docs/security-configuration.html (original)
+++ websites/production/cxf/content/docs/security-configuration.html Tue Apr  4 
15:47:38 2017
@@ -107,7 +107,7 @@ Apache CXF -- Security Configuration
  


-Background 
to common security configurationFrom Apache CXF 3.1.0, the WS-SecurityPolicy and the XML Security (JAX-RS) 
components in CXF share a common set of configuration tags. Previously, the 
configuration tags were all defined in the SecurityConstants class in the 
cxf-rt-ws-security module. The JAX-RS XML Security component then referenced 
these configuration tags directly, which meant that the XML Security component 
had to have a dependency on a SOAP module, which was not ideal.New 
configuration tags in Apache CXF 3.1.0From Apache CXF 3.1.0, the 
cxf-rt-security module is now shared between both the WS-Security and JAX-RS 
XML Security modules, and contains a SecurityConstants class that defines s
 ecurity constants used by both stacks. These configuration tags are exactly 
the same as a set of previous configuration tags found in the WS-Security 
SecurityConstants class in previous releases, except that the prefix is now 
"security" (was "ws-security"). Here are the new set of configuration 
tags:User propertiessecurity.usernameThe user's name. It is used differently by 
each of the Security functions, see http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#USERNAME;>here
 for more information.security.passwordThe user's password when "security.callback-handler" i
 s not defined. It is currently only used for the case of adding a password to 
a UsernameToken.security.signature.usernameThe user's name for signature. It is used 
as the alias name in the keystore to get the user's cert and private key for 
signature. See http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#SIGNATURE_USERNAME;>here
 for more information.security.encryption.usernameThe user's name for encryption. It is used 
as the alias name in the keystore to get the user's public key for encryption. 
See http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#ENCRYPT_USERNAME;>here
 for more information.<
 /tr>Callback Class and 
Crypto propertiessecurity.callback-handlerThe CallbackHandler http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#CALLBACK_HANDLER;>implementation
 class used to obtain passwords.security.saml-callback-handlerThe SAML CallbackHandler http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#SAML_CALLBACK_HANDLER;>implementation
 class used to construct SAML Assertions.security.signature
 .propertiesThe 
Crypto property http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#SIGNATURE_PROPERTIES;>configuration
 to use for signature, if "security.signature.crypto" is not set 
instead.security.encryption.propertiesThe Crypto property http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#ENCRYPT_PROPERTIES;>configuration
 to use for encryption, if "security.encryption.crypto" is not set 
instead.security.signature.cryptoA Crypto http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/components/cryp
 to/Crypto.html">object to be used for signature. If this is not defined 
then "security.signature.properties" is used instead.security.encryption.cryptoA Crypto http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/components/crypto/Crypto.html;>object
 to be used for encryption. If this is not defined then 
"security.encryption.properties" is used 
instead.Note: for 
Symmetric bindings that specify a protection token, the security-encryption 
properties are used.Boolean
 Security configuration tags, e.g. the value should be "true" or 
"false".constantdefaultdefinitionsecurity.enableRevocationfalseWhether to enable Certificate Revocation List (CRL) 
checking or not when verifying trust in a certificate.security.enable.unsigned-saml-assertion.principalfalseWhether to allow unsigned saml assertions as 
SecurityContext Principals. The default is false.Note that "unsigned" refers 
to an internal signature. Even if the token is signed by an external signature 
(as per the "sender-vouches" requirement), this boole
 an must still be configured if you 

cxf git commit: CXF-7315 - Abstract the STS client token caching behaviour to allow the user to plug in a custom implementation

2017-04-04 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master dd421381b -> 048b46de4


CXF-7315 - Abstract the STS client token caching behaviour to allow the user to 
plug in a custom implementation


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

Branch: refs/heads/master
Commit: 048b46de4b2973bbccbaacf5effe34b06faf3e68
Parents: dd42138
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 15:59:33 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 15:59:33 2017 +0100

--
 .../cxf/rt/security/SecurityConstants.java  |   9 +-
 .../IssuedTokenInterceptorProvider.java |  13 +-
 .../interceptors/STSTokenOutInterceptor.java|  13 +-
 .../security/trust/DefaultSTSTokenCacher.java   | 180 ++
 .../cxf/ws/security/trust/STSTokenCacher.java   |  59 +
 .../ws/security/trust/STSTokenRetriever.java| 236 +++
 6 files changed, 302 insertions(+), 208 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/048b46de/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
--
diff --git 
a/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java 
b/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
index 8405371..a3daaa8 100644
--- 
a/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
+++ 
b/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
@@ -344,6 +344,13 @@ public class SecurityConstants {
 public static final String STS_TOKEN_IMMINENT_EXPIRY_VALUE =
 "security.sts.token.imminent-expiry-value";
 
+/**
+ * An implementation of the STSTokenCacher interface, if you want to plug 
in custom caching behaviour for
+ * STS clients. The default value is the DefaultSTSTokenCacher.
+ */
+public static final String STS_TOKEN_CACHER_IMPL =
+"security.sts.token.cacher.impl";
+
 public static final Set COMMON_PROPERTIES;
 
 static {
@@ -359,7 +366,7 @@ public class SecurityConstants {
 DISABLE_STS_CLIENT_WSMEX_CALL_USING_EPR_ADDRESS, STS_TOKEN_CRYPTO,
 STS_TOKEN_PROPERTIES, STS_TOKEN_USERNAME, STS_TOKEN_ACT_AS, 
STS_TOKEN_ON_BEHALF_OF,
 STS_CLIENT, STS_APPLIES_TO, CACHE_ISSUED_TOKEN_IN_ENDPOINT, 
PREFER_WSMEX_OVER_STS_CLIENT_CONFIG,
-STS_TOKEN_IMMINENT_EXPIRY_VALUE
+STS_TOKEN_IMMINENT_EXPIRY_VALUE, STS_TOKEN_CACHER_IMPL
 }));
 COMMON_PROPERTIES = Collections.unmodifiableSet(s);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/048b46de/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
index a1c794e..b40e720 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
@@ -32,12 +32,15 @@ import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
 import org.apache.cxf.phase.Phase;
+import org.apache.cxf.rt.security.utils.SecurityUtils;
 import org.apache.cxf.ws.policy.AbstractPolicyInterceptorProvider;
 import org.apache.cxf.ws.policy.AssertionInfo;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
 import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.cxf.ws.security.policy.PolicyUtils;
 import org.apache.cxf.ws.security.tokenstore.SecurityToken;
+import org.apache.cxf.ws.security.trust.DefaultSTSTokenCacher;
+import org.apache.cxf.ws.security.trust.STSTokenCacher;
 import org.apache.cxf.ws.security.trust.STSTokenRetriever;
 import org.apache.cxf.ws.security.trust.STSTokenRetriever.TokenRequestParams;
 import org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JInInterceptor;
@@ -130,7 +133,15 @@ public class IssuedTokenInterceptorProvider extends 
AbstractPolicyInterceptorPro
 params.setTrust13(NegotiationUtils.getTrust13(aim));
 
params.setTokenTemplate(itok.getRequestSecurityTokenTemplate());
 
-SecurityToken tok = STSTokenRetriever.getToken(message, 
params);
+// Get a 

cxf git commit: Recording .gitmergeinfo Changes

2017-04-04 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes ece855fc6 -> 0ebc74465


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

Branch: refs/heads/3.0.x-fixes
Commit: 0ebc74465eb7bc28f354ab9d171ee8dda173270d
Parents: ece855f
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 14:04:06 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 14:04:06 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/0ebc7446/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 3060c4a..1d7f6b1 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -191,6 +191,7 @@ B 1db2bf9f485586d07db277dad62b7bae96fb97af
 B 1dea643baf6193e9a94abe8b1900c139bf273121
 B 1e009414b593c21651a05d47ff95cb7a22683154
 B 1e2b5fe5683887eb9ad99eda595d867d3d7115a0
+B 1e3093b07459e6d26fd9c0ebe5b4b7e4b575433d
 B 1e82efba0035a15afe84ada2d3fd0791733800a7
 B 1e927cdfaafb2efc8d29184cb5b7b05ce3c3ad7f
 B 1f02b3d4f2c9d341046ce35222c8f4d7674b10b2
@@ -1385,12 +1386,14 @@ B d3a97b35ace8c2510b2842180f92fe0196eb583b
 B d3baa23e3cbac2364498f81ab293aeb61902caa7
 B d3e9295d3acfe3c970a325bbbafdba83a0d6e83c
 B d3ea067659eb3f765df0bee6ce7b4abb55f76ab5
+B d3f9087516e7179a356bae8b8fb642ce6a89c3b6
 B d3fc22efa8153a1edc1880c05ede6d44208fa03a
 B d49f8c16877e54d6b0cbf383acd2953894e3325d
 B d4a25bbea9911b8c2debfab6724a3cc95532c4af
 B d4aa22c8dc000946ffb50e7e09156f1c22150e28
 B d4bfacb8cc5ed8247ff74eb52061070c0457cbf3
 B d4de0ced8b53599229a7a3e43ad3bb5cf70b401b
+B d4ef04940f4757593e54611da024458e883b2116
 B d4f3d88802137d285cc3290884c2683ba5e74d33
 B d4f9674baa811936429271cbf64c4a558282c764
 B d50ffd09c30e606524fb6ed92119d85ccfa13491



[2/3] cxf git commit: Adding custom parameter REST test for the STS

2017-04-04 Thread coheigea
Adding custom parameter REST test for the STS

# Conflicts:
#   services/sts/systests/advanced/pom.xml
#   
services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
#   
services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/custom/cxf-sts.xml


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

Branch: refs/heads/3.1.x-fixes
Commit: 1e3093b07459e6d26fd9c0ebe5b4b7e4b575433d
Parents: 9ee4e02
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 13:15:51 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 13:21:39 2017 +0100

--
 services/sts/systests/advanced/pom.xml  |   5 +
 .../systest/sts/custom/CustomParameterTest.java | 133 ++-
 .../cxf/systest/sts/custom/cxf-sts-common.xml   |   4 +
 .../apache/cxf/systest/sts/custom/cxf-sts.xml   |  20 ++-
 4 files changed, 159 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/1e3093b0/services/sts/systests/advanced/pom.xml
--
diff --git a/services/sts/systests/advanced/pom.xml 
b/services/sts/systests/advanced/pom.xml
index 7406c2a..ef96a4f 100644
--- a/services/sts/systests/advanced/pom.xml
+++ b/services/sts/systests/advanced/pom.xml
@@ -127,6 +127,11 @@
 hazelcast
 ${cxf.hazelcast.version}
 
+
+com.fasterxml.jackson.jaxrs
+jackson-jaxrs-json-provider
+test
+
 
 
 ${basedir}/src/test/java

http://git-wip-us.apache.org/repos/asf/cxf/blob/1e3093b0/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
--
diff --git 
a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
 
b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
index 1048a84..a4219fe 100644
--- 
a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
+++ 
b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
@@ -20,19 +20,40 @@ package org.apache.cxf.systest.sts.custom;
 
 import java.net.URL;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
+import javax.security.auth.callback.CallbackHandler;
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBElement;
 import javax.xml.namespace.QName;
+import javax.xml.transform.dom.DOMSource;
 import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Service;
 
+import org.w3c.dom.Element;
+
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.rt.security.SecurityConstants;
+import org.apache.cxf.staxutils.W3CDOMStreamWriter;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.systest.sts.common.TokenTestUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import 
org.apache.cxf.ws.security.sts.provider.model.RequestSecurityTokenResponseType;
+import 
org.apache.cxf.ws.security.sts.provider.model.RequestedSecurityTokenType;
 import org.apache.cxf.ws.security.trust.STSClient;
+import org.apache.cxf.ws.security.trust.STSUtils;
+import org.apache.wss4j.common.crypto.Crypto;
+import org.apache.wss4j.common.crypto.CryptoFactory;
+import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.common.util.DOM2Writer;
+import org.apache.wss4j.dom.WSDocInfo;
+import org.apache.wss4j.dom.engine.WSSecurityEngineResult;
+import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.processor.Processor;
+import org.apache.wss4j.dom.processor.SAMLTokenProcessor;
 import org.example.contract.doubleit.DoubleItPortType;
 import org.junit.BeforeClass;
 
@@ -48,7 +69,10 @@ public class CustomParameterTest extends 
AbstractBusClientServerTestBase {
 private static final QName SERVICE_QNAME = new QName(NAMESPACE, 
"DoubleItService");
 
 private static final String PORT = allocatePort(Server.class);
-
+
+private static final String SAML2_TOKEN_TYPE =
+
"http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0;;
+
 @BeforeClass
 public static void startServers() throws Exception {
 
@@ -261,7 +285,112 @@ public class CustomParameterTest extends 
AbstractBusClientServerTestBase {
 

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

2017-04-04 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 9ee4e026f -> d3f908751


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

Branch: refs/heads/3.1.x-fixes
Commit: d4ef04940f4757593e54611da024458e883b2116
Parents: 1e3093b
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 13:21:39 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 13:21:39 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/d4ef0494/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 544c1f5..9911a68 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -506,6 +506,7 @@ M d3bf494ef4987debad986cae87cfe5f095b79090
 M d46818bd3043d211774de9bc531849f54bb2989f
 M db1e5146e6312a4be35b0ca2644a691cb1d41a0f
 M dba09f00804cc05d943fd95d34882d6368c28edb
+M dd421381bcf61ead2a66311f1caf9ebdfcbf06c4
 M ded06c40ba057981e003903faa93beb94cbe11fa
 M df3854cefae5d2da71f8d222a86218e81df7bd05
 M e0ed46f9f99ac1ec3e0925b3e5666e0b7a69af53



[3/3] cxf git commit: Fixing merge

2017-04-04 Thread coheigea
Fixing merge


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

Branch: refs/heads/3.1.x-fixes
Commit: d3f9087516e7179a356bae8b8fb642ce6a89c3b6
Parents: d4ef049
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 14:01:19 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 14:01:19 2017 +0100

--
 .../org/apache/cxf/systest/sts/custom/CustomParameterTest.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/d3f90875/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
--
diff --git 
a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
 
b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
index a4219fe..a604507 100644
--- 
a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
+++ 
b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
@@ -385,10 +385,11 @@ public class CustomParameterTest extends 
AbstractBusClientServerTestBase {
 Crypto crypto = 
CryptoFactory.getInstance("serviceKeystore.properties");
 requestData.setDecCrypto(crypto);
 requestData.setSigVerCrypto(crypto);
-requestData.setWsDocInfo(new 
WSDocInfo(assertionElement.getOwnerDocument()));
 
 Processor processor = new SAMLTokenProcessor();
-return processor.handleToken(assertionElement, requestData);
+return processor.handleToken(
+assertionElement, requestData, new 
WSDocInfo(assertionElement.getOwnerDocument())
+);
 }
 
 private static void doubleIt(DoubleItPortType port, int numToDouble) {



cxf git commit: Adding custom parameter REST test for the STS

2017-04-04 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master d1b8ff637 -> dd421381b


Adding custom parameter REST test for the STS


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

Branch: refs/heads/master
Commit: dd421381bcf61ead2a66311f1caf9ebdfcbf06c4
Parents: d1b8ff6
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 13:15:51 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 13:15:51 2017 +0100

--
 services/sts/systests/advanced/pom.xml  |   5 +
 .../systest/sts/custom/CustomParameterTest.java | 129 +++
 .../cxf/systest/sts/custom/cxf-sts-common.xml   |   4 +
 .../apache/cxf/systest/sts/custom/cxf-sts.xml   |  20 ++-
 4 files changed, 157 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/dd421381/services/sts/systests/advanced/pom.xml
--
diff --git a/services/sts/systests/advanced/pom.xml 
b/services/sts/systests/advanced/pom.xml
index e2bb566..419f44c 100644
--- a/services/sts/systests/advanced/pom.xml
+++ b/services/sts/systests/advanced/pom.xml
@@ -138,6 +138,11 @@
 hazelcast-spring
 ${cxf.hazelcast.version}
 
+
+com.fasterxml.jackson.jaxrs
+jackson-jaxrs-json-provider
+test
+
 
 
 ${basedir}/src/test/java

http://git-wip-us.apache.org/repos/asf/cxf/blob/dd421381/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
--
diff --git 
a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
 
b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
index f6ff291..96122ba 100644
--- 
a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
+++ 
b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
@@ -20,19 +20,40 @@ package org.apache.cxf.systest.sts.custom;
 
 import java.net.URL;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
+import javax.security.auth.callback.CallbackHandler;
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBElement;
 import javax.xml.namespace.QName;
+import javax.xml.transform.dom.DOMSource;
 import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Service;
 
+import org.w3c.dom.Element;
+
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.rt.security.SecurityConstants;
+import org.apache.cxf.staxutils.W3CDOMStreamWriter;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.systest.sts.common.TokenTestUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import 
org.apache.cxf.ws.security.sts.provider.model.RequestSecurityTokenResponseType;
+import 
org.apache.cxf.ws.security.sts.provider.model.RequestedSecurityTokenType;
 import org.apache.cxf.ws.security.trust.STSClient;
+import org.apache.cxf.ws.security.trust.STSUtils;
+import org.apache.wss4j.common.crypto.Crypto;
+import org.apache.wss4j.common.crypto.CryptoFactory;
+import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.common.util.DOM2Writer;
+import org.apache.wss4j.dom.WSDocInfo;
+import org.apache.wss4j.dom.engine.WSSecurityEngineResult;
+import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.processor.Processor;
+import org.apache.wss4j.dom.processor.SAMLTokenProcessor;
 import org.example.contract.doubleit.DoubleItPortType;
 import org.junit.BeforeClass;
 
@@ -49,6 +70,9 @@ public class CustomParameterTest extends 
AbstractBusClientServerTestBase {
 
 private static final String PORT = allocatePort(Server.class);
 
+private static final String SAML2_TOKEN_TYPE =
+
"http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0;;
+
 @BeforeClass
 public static void startServers() throws Exception {
 
@@ -262,6 +286,111 @@ public class CustomParameterTest extends 
AbstractBusClientServerTestBase {
 bus.shutdown(true);
 }
 
+@org.junit.Test
+public void testCustomParameterToRESTInterface() throws Exception {
+
+SpringBusFactory bf = new SpringBusFactory();
+URL busFile = CustomParameterTest.class.getResource("cxf-client.xml");
+
+Bus bus = bf.createBus(busFile.toString());
+

cxf git commit: Recording .gitmergeinfo Changes

2017-04-04 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 76c0501d7 -> ece855fc6


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

Branch: refs/heads/3.0.x-fixes
Commit: ece855fc6ce6a0b27e68a5f0f92c55e0cd50aae0
Parents: 76c0501
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 12:07:03 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 12:07:03 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/ece855fc/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index de7e3dd..3060c4a 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -1028,6 +1028,7 @@ B 9dfb278c7739b9f4621f43b8146d057e21fafb64
 B 9e6761a4a94a13f7bcb019774936b05d9f95201b
 B 9e9dd3949c8720e7ba7493c815fca4aa1a4a5f63
 B 9ea935fcbf3869f5fa4fd1e75a0a2309cc780415
+B 9ee4e026f3a82cbec5ad9f0efca136a216d84956
 B 9ef24a17c0085974c129d1739934eaca84b05e88
 B 9f0d1b3236b6b7fdb67c812360c03bda19700cc5
 B 9f1421ae1d009c42ad2a85f5bb8cb3290a5658be
@@ -1315,6 +1316,7 @@ B c721accef06c5db698413e31c2efff01f8bb038f
 B c7234f41345c6e051213a83460ba210e677389da
 B c750e54452bfa4cb9b0db018dad135b298847095
 B c77ce1ad3415a6df49acbbf5159ad670cf481d74
+B c799670d4bca30c7a1b316b378c8bfce90a7eeb7
 B c79bb840febf402e498c9cec611ae7c3da27cd2f
 B c7ce403565c3e2bd1574efb34d9dc3ae52f89f1b
 B c8636c03666ce1d6bc101e5ae5f39a05375077bd
@@ -1377,6 +1379,7 @@ B d2179fbe499b8d32118b420c8f19bb3c348f1234
 B d2ed88ccb247d4105de34a5b675c0fc198795209
 B d2ee79c9371fa23ecd8e2a3a0d907c3256466f28
 B d2f8f79aee0fb7187a11025209879897ea856f6a
+B d370505e1e01cb1e364c59af6755849fa797494c
 B d391d9371d8505c7774308c4fbbb9bc57ffd34a6
 B d3a97b35ace8c2510b2842180f92fe0196eb583b
 B d3baa23e3cbac2364498f81ab293aeb61902caa7



[2/3] cxf git commit: CXF-7314 - Custom BinarySecurityTokens are not used to set up the security context

2017-04-04 Thread coheigea
CXF-7314 - Custom BinarySecurityTokens are not used to set up the security 
context

# Conflicts:
#   
rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java


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

Branch: refs/heads/3.1.x-fixes
Commit: c799670d4bca30c7a1b316b378c8bfce90a7eeb7
Parents: e2fd915
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 11:24:57 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 12:05:45 2017 +0100

--
 .../DefaultWSS4JSecurityContextCreator.java | 29 +++-
 1 file changed, 28 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/c799670d/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
index 7855d0e..2cbebd7 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
@@ -40,10 +40,11 @@ import org.apache.cxf.rt.security.utils.SecurityUtils;
 import org.apache.cxf.security.SecurityContext;
 import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.common.token.PKIPathSecurity;
+import org.apache.wss4j.common.token.X509Security;
 import org.apache.wss4j.dom.WSConstants;
 import org.apache.wss4j.dom.engine.WSSecurityEngineResult;
 import org.apache.wss4j.dom.handler.WSHandlerResult;
-import org.apache.wss4j.dom.message.token.KerberosSecurity;
 
 /**
  * The default implementation to create a SecurityContext from a set of WSS4J 
processing results.
@@ -93,6 +94,7 @@ public class DefaultWSS4JSecurityContextCreator implements 
WSS4JSecurityContextC
 List foundResults = 
actionResults.get(resultPriority);
 if (foundResults != null && !foundResults.isEmpty()) {
 for (WSSecurityEngineResult result : foundResults) {
+<<< HEAD
 final Object binarySecurity = 
result.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
 PublicKey publickey = 
 
(PublicKey)result.get(WSSecurityEngineResult.TAG_PUBLIC_KEY);
@@ -107,12 +109,37 @@ public class DefaultWSS4JSecurityContextCreator 
implements WSS4JSecurityContextC
 if (context != null) {
 msg.put(SecurityContext.class, context);
 return;
+===
+
+if (!skipResult(resultPriority, result)) {
+SecurityContext context = createSecurityContext(msg, 
useJAASSubject, result);
+if (context != null) {
+msg.put(SecurityContext.class, context);
+return;
+}
+>>> d1b8ff6... CXF-7314 - Custom BinarySecurityTokens are not used to set 
up the security context
 }
 }
 }
 }
 }
+<<< HEAD
 
+===
+
+private boolean skipResult(Integer resultPriority, WSSecurityEngineResult 
result) {
+Object binarySecurity = 
result.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
+PublicKey publickey =
+(PublicKey)result.get(WSSecurityEngineResult.TAG_PUBLIC_KEY);
+X509Certificate cert =
+
(X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
+
+return resultPriority == WSConstants.BST
+&& (binarySecurity instanceof X509Security || binarySecurity 
instanceof PKIPathSecurity)
+|| resultPriority == WSConstants.SIGN && publickey == null && cert 
== null;
+}
+
+>>> d1b8ff6... CXF-7314 - Custom BinarySecurityTokens are not used to set 
up the security context
 protected SecurityContext createSecurityContext(
 SoapMessage msg, boolean useJAASSubject, WSSecurityEngineResult 
wsResult
 ) {



[3/3] cxf git commit: Fixing merge

2017-04-04 Thread coheigea
Fixing merge


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

Branch: refs/heads/3.1.x-fixes
Commit: 9ee4e026f3a82cbec5ad9f0efca136a216d84956
Parents: d370505
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 12:06:41 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 12:06:41 2017 +0100

--
 .../DefaultWSS4JSecurityContextCreator.java | 22 
 1 file changed, 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/9ee4e026/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
index 2cbebd7..75fbc33 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
@@ -94,38 +94,17 @@ public class DefaultWSS4JSecurityContextCreator implements 
WSS4JSecurityContextC
 List foundResults = 
actionResults.get(resultPriority);
 if (foundResults != null && !foundResults.isEmpty()) {
 for (WSSecurityEngineResult result : foundResults) {
-<<< HEAD
-final Object binarySecurity = 
result.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
-PublicKey publickey = 
-
(PublicKey)result.get(WSSecurityEngineResult.TAG_PUBLIC_KEY);
-X509Certificate cert = 
-
(X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
-
-if ((resultPriority == WSConstants.BST && !(binarySecurity 
instanceof KerberosSecurity))
-|| (resultPriority == WSConstants.SIGN && publickey == 
null && cert == null)) {
-continue;
-}
-SecurityContext context = createSecurityContext(msg, 
useJAASSubject, result);
-if (context != null) {
-msg.put(SecurityContext.class, context);
-return;
-===
-
 if (!skipResult(resultPriority, result)) {
 SecurityContext context = createSecurityContext(msg, 
useJAASSubject, result);
 if (context != null) {
 msg.put(SecurityContext.class, context);
 return;
 }
->>> d1b8ff6... CXF-7314 - Custom BinarySecurityTokens are not used to set 
up the security context
 }
 }
 }
 }
 }
-<<< HEAD
-
-===
 
 private boolean skipResult(Integer resultPriority, WSSecurityEngineResult 
result) {
 Object binarySecurity = 
result.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
@@ -139,7 +118,6 @@ public class DefaultWSS4JSecurityContextCreator implements 
WSS4JSecurityContextC
 || resultPriority == WSConstants.SIGN && publickey == null && cert 
== null;
 }
 
->>> d1b8ff6... CXF-7314 - Custom BinarySecurityTokens are not used to set 
up the security context
 protected SecurityContext createSecurityContext(
 SoapMessage msg, boolean useJAASSubject, WSSecurityEngineResult 
wsResult
 ) {



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

2017-04-04 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes e2fd91591 -> 9ee4e026f


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

Branch: refs/heads/3.1.x-fixes
Commit: d370505e1e01cb1e364c59af6755849fa797494c
Parents: c799670
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 12:05:45 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 12:05:45 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/d370505e/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 986ccaf..544c1f5 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -501,6 +501,7 @@ M cf806d5cba74e47c6e5ba3231df4228cbaad3e90
 M cf8ac102e728b8745da265ec969f7b5160829fdb
 M d0821bce5faa119c882a9000dbe03a124df5b033
 M d187ef6f3906d867a8c30a991d9074d170bca487
+M d1b8ff6374a0729752948213b7a0cdb7427085d1
 M d3bf494ef4987debad986cae87cfe5f095b79090
 M d46818bd3043d211774de9bc531849f54bb2989f
 M db1e5146e6312a4be35b0ca2644a691cb1d41a0f



cxf git commit: CXF-7314 - Custom BinarySecurityTokens are not used to set up the security context

2017-04-04 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master b77e43f19 -> d1b8ff637


CXF-7314 - Custom BinarySecurityTokens are not used to set up the security 
context


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

Branch: refs/heads/master
Commit: d1b8ff6374a0729752948213b7a0cdb7427085d1
Parents: b77e43f
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 11:24:57 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 11:24:57 2017 +0100

--
 .../DefaultWSS4JSecurityContextCreator.java | 36 
 1 file changed, 21 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/d1b8ff63/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
index 77708f5..a6fa8ef 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
@@ -40,10 +40,11 @@ import org.apache.cxf.rt.security.utils.SecurityUtils;
 import org.apache.cxf.security.SecurityContext;
 import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.common.token.PKIPathSecurity;
+import org.apache.wss4j.common.token.X509Security;
 import org.apache.wss4j.dom.WSConstants;
 import org.apache.wss4j.dom.engine.WSSecurityEngineResult;
 import org.apache.wss4j.dom.handler.WSHandlerResult;
-import org.apache.wss4j.dom.message.token.KerberosSecurity;
 
 /**
  * The default implementation to create a SecurityContext from a set of WSS4J 
processing results.
@@ -94,26 +95,31 @@ public class DefaultWSS4JSecurityContextCreator implements 
WSS4JSecurityContextC
 List foundResults = 
actionResults.get(resultPriority);
 if (foundResults != null && !foundResults.isEmpty()) {
 for (WSSecurityEngineResult result : foundResults) {
-final Object binarySecurity = 
result.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
-PublicKey publickey =
-
(PublicKey)result.get(WSSecurityEngineResult.TAG_PUBLIC_KEY);
-X509Certificate cert =
-
(X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
-
-if ((resultPriority == WSConstants.BST && !(binarySecurity 
instanceof KerberosSecurity))
-|| (resultPriority == WSConstants.SIGN && publickey == 
null && cert == null)) {
-continue;
-}
-SecurityContext context = createSecurityContext(msg, 
useJAASSubject, result);
-if (context != null) {
-msg.put(SecurityContext.class, context);
-return;
+
+if (!skipResult(resultPriority, result)) {
+SecurityContext context = createSecurityContext(msg, 
useJAASSubject, result);
+if (context != null) {
+msg.put(SecurityContext.class, context);
+return;
+}
 }
 }
 }
 }
 }
 
+private boolean skipResult(Integer resultPriority, WSSecurityEngineResult 
result) {
+Object binarySecurity = 
result.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
+PublicKey publickey =
+(PublicKey)result.get(WSSecurityEngineResult.TAG_PUBLIC_KEY);
+X509Certificate cert =
+
(X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
+
+return resultPriority == WSConstants.BST
+&& (binarySecurity instanceof X509Security || binarySecurity 
instanceof PKIPathSecurity)
+|| resultPriority == WSConstants.SIGN && publickey == null && cert 
== null;
+}
+
 protected SecurityContext createSecurityContext(
 SoapMessage msg, boolean useJAASSubject, WSSecurityEngineResult 
wsResult
 ) {



cxf git commit: Recording .gitmergeinfo Changes

2017-04-04 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 59437cb51 -> 76c0501d7


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

Branch: refs/heads/3.0.x-fixes
Commit: 76c0501d71252fbd88d8d4e4b2a0d6874a6e3b46
Parents: 59437cb
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 10:16:33 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 10:16:33 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/76c0501d/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 57185a6..de7e3dd 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -549,6 +549,7 @@ B 504b427081cfc2213ce0a5c050b16af67ca7ff46
 B 5072be96989b8617cb4fcf88ecad69fa324349c7
 B 50c705a2c69589e2ecce6e93550aad687468ecff
 B 50daa4883dc8078a018ebc985e5c7bd58c6c5ff1
+B 50e08ec3ade636a5d66eee5c1c41d7fb57df1c5f
 B 51247539e60d3db67df2556674f810b936a972e2
 B 512e9e900f3c840e1b0ab4c2fb4c3950bffc84ad
 B 516f8cbe28b6fa73969bdcf96f447a675fafe023
@@ -794,6 +795,7 @@ B 77a31c5129db56782313a53895dd140c22d30bbc
 B 782a1cfcea1e6bbf821d327d5500ce9d598063c9
 B 7858c39791ac51b6cd62faaac6e4ffa10cee2dd4
 B 785955e8a26a891296908796abac0b1cf88c94ce
+B 786604cf247878b8625b51d62e749caaf1559006
 B 78a8593698fe382d72e3e2101e017dc1835c384b
 B 78fbd425ba4b49908e2b377a979a80ccf9cb29c5
 B 7923a6209a05d71cfeb752ed2d45c9e6e7116942
@@ -1475,6 +1477,7 @@ B e27ccedf71d44ca5b20296e8401eef302311ebff
 B e28d258049dc8501f6d2bc4d33ef21914d5a38bb
 B e2bc8d8f31f6e3c6c6103dcf22e26726756bb39c
 B e2ec3644381789e0cabf40262139940aa33bc7c1
+B e2fd915910e19bcc71d722e688e14a94ccae7d90
 B e313da07a973e3c88798c1b1adfcff5e7e922545
 B e32ce07bc632380664d70d5b4c44afafbc2bed33
 B e34c320e34ea4911c845b01917479c73edee223c



[3/3] cxf git commit: Fixing merge

2017-04-04 Thread coheigea
Fixing merge


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

Branch: refs/heads/3.1.x-fixes
Commit: e2fd915910e19bcc71d722e688e14a94ccae7d90
Parents: 50e08ec
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 09:30:43 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 09:30:43 2017 +0100

--
 .../org/apache/cxf/rt/security/SecurityConstants.java |  6 +-
 .../apache/cxf/rt/security/utils/SecurityUtils.java   |  8 
 .../wss4j/DefaultWSS4JSecurityContextCreator.java | 14 +-
 .../wss4j/StaxSecurityContextInInterceptor.java   | 12 +---
 4 files changed, 3 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/e2fd9159/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
--
diff --git 
a/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java 
b/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
index 80cf1bd..aa0106d 100644
--- 
a/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
+++ 
b/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
@@ -159,7 +159,7 @@ public class SecurityConstants {
 
 /**
  * Whether to allow UsernameTokens with no password to be used as 
SecurityContext Principals.
- * The default is false.
+ * The default is true.
  */
 public static final String ENABLE_UT_NOPASSWORD_PRINCIPAL =
 "security.enable.ut-no-password.principal";
@@ -352,12 +352,8 @@ public class SecurityConstants {
 CALLBACK_HANDLER, SAML_CALLBACK_HANDLER, SIGNATURE_PROPERTIES, 
 SIGNATURE_CRYPTO, ENCRYPT_PROPERTIES, ENCRYPT_CRYPTO, ENCRYPT_CERT,
 ENABLE_REVOCATION, SUBJECT_CERT_CONSTRAINTS, 
ENABLE_UNSIGNED_SAML_ASSERTION_PRINCIPAL,
-<<< HEAD
-AUDIENCE_RESTRICTION_VALIDATION, SAML_ROLE_ATTRIBUTENAME, 
-===
 ENABLE_UT_NOPASSWORD_PRINCIPAL,
 AUDIENCE_RESTRICTION_VALIDATION, SAML_ROLE_ATTRIBUTENAME,
->>> b77e43f... Disable taking a UsernameToken with no password as the 
security context principal
 ENABLE_UNSIGNED_SAML_ASSERTION_PRINCIPAL, SC_FROM_JAAS_SUBJECT,
 STS_TOKEN_USE_CERT_FOR_KEYINFO, STS_TOKEN_DO_CANCEL, 
CACHE_ISSUED_TOKEN_IN_ENDPOINT,
 DISABLE_STS_CLIENT_WSMEX_CALL_USING_EPR_ADDRESS, STS_TOKEN_CRYPTO,

http://git-wip-us.apache.org/repos/asf/cxf/blob/e2fd9159/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 a0419de..f14b14c 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
@@ -183,16 +183,8 @@ public final class SecurityUtils {
  * values. If none is configured, then the defaultValue parameter is 
returned.
  */
 public static boolean getSecurityPropertyBoolean(String property, Message 
message, boolean defaultValue) {
-<<< HEAD
-Object value = message.getContextualProperty(property);
-if (value == null) {
-value = message.getContextualProperty("ws-" + property);
-}
-
-===
 Object value = getSecurityPropertyValue(property, message);
 
->>> b77e43f... Disable taking a UsernameToken with no password as the 
security context principal
 if (value != null) {
 return PropertyUtils.isTrue(value);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/e2fd9159/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
index cd15d46..7855d0e 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
@@ -66,29 +66,17 @@ public class DefaultWSS4JSecurityContextCreator implements 
WSS4JSecurityContextC
  * Create a SecurityContext and store 

[2/3] cxf git commit: Disable taking a UsernameToken with no password as the security context principal

2017-04-04 Thread coheigea
Disable taking a UsernameToken with no password as the security context 
principal

# Conflicts:
#   
rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
#   
rt/security/src/main/java/org/apache/cxf/rt/security/utils/SecurityUtils.java
#   
rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
#   
rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSecurityContextInInterceptor.java


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

Branch: refs/heads/3.1.x-fixes
Commit: 786604cf247878b8625b51d62e749caaf1559006
Parents: 03f4a10
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 08:36:35 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 08:37:18 2017 +0100

--
 .../cxf/rt/security/SecurityConstants.java  | 12 ++
 .../cxf/rt/security/utils/SecurityUtils.java|  5 +++
 .../DefaultWSS4JSecurityContextCreator.java | 18 +++-
 .../wss4j/StaxSecurityContextInInterceptor.java | 44 +---
 .../cxf/systest/wssec/examples/ut/server.xml|  1 +
 .../systest/wssec/examples/ut/stax-server.xml   |  1 +
 .../apache/cxf/systest/ws/ut/server-derived.xml |  7 
 .../org/apache/cxf/systest/ws/ut/server.xml |  1 +
 .../apache/cxf/systest/ws/ut/stax-server.xml|  1 +
 9 files changed, 84 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/786604cf/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
--
diff --git 
a/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java 
b/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
index 5ee526b..80cf1bd 100644
--- 
a/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
+++ 
b/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
@@ -158,6 +158,13 @@ public class SecurityConstants {
 "security.enable.unsigned-saml-assertion.principal";
 
 /**
+ * Whether to allow UsernameTokens with no password to be used as 
SecurityContext Principals.
+ * The default is false.
+ */
+public static final String ENABLE_UT_NOPASSWORD_PRINCIPAL =
+"security.enable.ut-no-password.principal";
+
+/**
  * Whether to validate the SubjectConfirmation requirements of a received 
SAML Token
  * (sender-vouches or holder-of-key). The default is true.
  */
@@ -345,7 +352,12 @@ public class SecurityConstants {
 CALLBACK_HANDLER, SAML_CALLBACK_HANDLER, SIGNATURE_PROPERTIES, 
 SIGNATURE_CRYPTO, ENCRYPT_PROPERTIES, ENCRYPT_CRYPTO, ENCRYPT_CERT,
 ENABLE_REVOCATION, SUBJECT_CERT_CONSTRAINTS, 
ENABLE_UNSIGNED_SAML_ASSERTION_PRINCIPAL,
+<<< HEAD
 AUDIENCE_RESTRICTION_VALIDATION, SAML_ROLE_ATTRIBUTENAME, 
+===
+ENABLE_UT_NOPASSWORD_PRINCIPAL,
+AUDIENCE_RESTRICTION_VALIDATION, SAML_ROLE_ATTRIBUTENAME,
+>>> b77e43f... Disable taking a UsernameToken with no password as the 
security context principal
 ENABLE_UNSIGNED_SAML_ASSERTION_PRINCIPAL, SC_FROM_JAAS_SUBJECT,
 STS_TOKEN_USE_CERT_FOR_KEYINFO, STS_TOKEN_DO_CANCEL, 
CACHE_ISSUED_TOKEN_IN_ENDPOINT,
 DISABLE_STS_CLIENT_WSMEX_CALL_USING_EPR_ADDRESS, STS_TOKEN_CRYPTO,

http://git-wip-us.apache.org/repos/asf/cxf/blob/786604cf/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 b679edb..a0419de 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
@@ -183,11 +183,16 @@ public final class SecurityUtils {
  * values. If none is configured, then the defaultValue parameter is 
returned.
  */
 public static boolean getSecurityPropertyBoolean(String property, Message 
message, boolean defaultValue) {
+<<< HEAD
 Object value = message.getContextualProperty(property);
 if (value == null) {
 value = message.getContextualProperty("ws-" + property);
 }
 
+===
+Object value = getSecurityPropertyValue(property, message);
+
+>>> b77e43f... Disable taking a UsernameToken with no password as the 
security context 

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

2017-04-04 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 03f4a105f -> e2fd91591


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

Branch: refs/heads/3.1.x-fixes
Commit: 50e08ec3ade636a5d66eee5c1c41d7fb57df1c5f
Parents: 786604c
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 08:37:18 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 08:37:18 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/50e08ec3/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index d47a8e0..986ccaf 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -485,6 +485,7 @@ M b418fd7952dc36f1a3e577e457833588a2056104
 M b433c753d44350daff5a40ff8eb5a149cf557a68
 M b49075882641fcebbbdf1ed8d84247fcf80aa558
 M b624c034c5682b54b9faf3d3e90eb0c23cde1a5b
+M b77e43f19d631d94032740eff6e58f49e0532d29
 M be2bf8d644887fc1853210b9b82db897c4d73dd0
 M c01c68ddda10ec6db492b86d818498bec0bf4228
 M c212240f696e3387df19bbcf22d1851aff320078



cxf git commit: Disable taking a UsernameToken with no password as the security context principal

2017-04-04 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master 2323abc24 -> b77e43f19


Disable taking a UsernameToken with no password as the security context 
principal


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

Branch: refs/heads/master
Commit: b77e43f19d631d94032740eff6e58f49e0532d29
Parents: 2323abc
Author: Colm O hEigeartaigh 
Authored: Tue Apr 4 08:36:35 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Tue Apr 4 08:36:35 2017 +0100

--
 .../cxf/rt/security/SecurityConstants.java  |  8 +
 .../cxf/rt/security/utils/SecurityUtils.java|  5 +--
 .../DefaultWSS4JSecurityContextCreator.java | 15 +---
 .../wss4j/StaxSecurityContextInInterceptor.java | 36 
 .../cxf/systest/wssec/examples/ut/server.xml|  1 +
 .../systest/wssec/examples/ut/stax-server.xml   |  1 +
 .../apache/cxf/systest/ws/ut/server-derived.xml |  7 
 .../org/apache/cxf/systest/ws/ut/server.xml |  1 +
 .../apache/cxf/systest/ws/ut/stax-server.xml|  1 +
 9 files changed, 60 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/b77e43f1/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
--
diff --git 
a/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java 
b/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
index c5980c9..8405371 100644
--- 
a/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
+++ 
b/rt/security/src/main/java/org/apache/cxf/rt/security/SecurityConstants.java
@@ -158,6 +158,13 @@ public class SecurityConstants {
 "security.enable.unsigned-saml-assertion.principal";
 
 /**
+ * Whether to allow UsernameTokens with no password to be used as 
SecurityContext Principals.
+ * The default is false.
+ */
+public static final String ENABLE_UT_NOPASSWORD_PRINCIPAL =
+"security.enable.ut-no-password.principal";
+
+/**
  * Whether to validate the SubjectConfirmation requirements of a received 
SAML Token
  * (sender-vouches or holder-of-key). The default is true.
  */
@@ -345,6 +352,7 @@ public class SecurityConstants {
 CALLBACK_HANDLER, SAML_CALLBACK_HANDLER, SIGNATURE_PROPERTIES,
 SIGNATURE_CRYPTO, ENCRYPT_PROPERTIES, ENCRYPT_CRYPTO, ENCRYPT_CERT,
 ENABLE_REVOCATION, SUBJECT_CERT_CONSTRAINTS, 
ENABLE_UNSIGNED_SAML_ASSERTION_PRINCIPAL,
+ENABLE_UT_NOPASSWORD_PRINCIPAL,
 AUDIENCE_RESTRICTION_VALIDATION, SAML_ROLE_ATTRIBUTENAME,
 ENABLE_UNSIGNED_SAML_ASSERTION_PRINCIPAL, SC_FROM_JAAS_SUBJECT,
 STS_TOKEN_USE_CERT_FOR_KEYINFO, STS_TOKEN_DO_CANCEL, 
CACHE_ISSUED_TOKEN_IN_ENDPOINT,

http://git-wip-us.apache.org/repos/asf/cxf/blob/b77e43f1/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 b6c3d42..e5f5cd3 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
@@ -183,10 +183,7 @@ public final class SecurityUtils {
  * values. If none is configured, then the defaultValue parameter is 
returned.
  */
 public static boolean getSecurityPropertyBoolean(String property, Message 
message, boolean defaultValue) {
-Object value = message.getContextualProperty(property);
-if (value == null) {
-value = message.getContextualProperty("ws-" + property);
-}
+Object value = getSecurityPropertyValue(property, message);
 
 if (value != null) {
 return PropertyUtils.isTrue(value);

http://git-wip-us.apache.org/repos/asf/cxf/blob/b77e43f1/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
index 0c26338..77708f5 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/DefaultWSS4JSecurityContextCreator.java
+++