[7/8] cxf git commit: add several tests back

2017-04-20 Thread ffang
add several tests back


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

Branch: refs/heads/master
Commit: 9cffee539adc2abd5eaf198e16fde082ca4b3e92
Parents: ebd1c24
Author: Freeman Fang 
Authored: Wed Apr 19 14:35:53 2017 +0800
Committer: Freeman Fang 
Committed: Wed Apr 19 14:35:53 2017 +0800

--
 .../systest/ws/rm/WSRMPolicyResolveTest.java|  52 ++
 .../systest/ws/policy/RM10PolicyWsdlTest.java   | 148 +++
 .../tools/wadlto/jaxrs/JAXRSContainerTest.java  | 921 +++
 3 files changed, 1121 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/9cffee53/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/WSRMPolicyResolveTest.java
--
diff --git 
a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/WSRMPolicyResolveTest.java
 
b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/WSRMPolicyResolveTest.java
new file mode 100644
index 000..6907c67
--- /dev/null
+++ 
b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/WSRMPolicyResolveTest.java
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.ws.rm;
+
+
+import org.apache.cxf.test.AbstractCXFSpringTest;
+import org.apache.cxf.testutil.common.TestUtil;
+
+import org.junit.Test;
+
+import org.springframework.context.support.GenericApplicationContext;
+
+
+
+//CXF-4875
+public class WSRMPolicyResolveTest extends AbstractCXFSpringTest {
+public static final String PORT = 
TestUtil.getPortNumber(WSRMPolicyResolveTest.class);
+/** {@inheritDoc}*/
+@Override
+protected void additionalSpringConfiguration(GenericApplicationContext 
context) throws Exception {
+}
+
+@Test
+public void testHello() throws Exception {
+BasicDocEndpoint port = getApplicationContext().getBean("TestClient",
+  BasicDocEndpoint.class);
+Object retObj = port.echo("Hello");
+assertEquals("Hello", retObj);
+}
+
+/** {@inheritDoc}*/
+@Override
+protected String[] getConfigLocations() {
+return new String[] 
{"classpath:/org/apache/cxf/systest/ws/rm/wsrm-policy-resolve.xml" };
+}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cxf/blob/9cffee53/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RM10PolicyWsdlTest.java
--
diff --git 
a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RM10PolicyWsdlTest.java
 
b/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RM10PolicyWsdlTest.java
new file mode 100644
index 000..b19536f
--- /dev/null
+++ 
b/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RM10PolicyWsdlTest.java
@@ -0,0 +1,148 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.ws.policy;
+
+import java.io.Closeable;
+import java.util.logging.Logger;
+
+import org.apache.cxf.common.logging.LogUtils;
+import 

[5/8] cxf git commit: add UndertowWebSocketDestination when Atmosphere isn't available with more tests

2017-04-20 Thread ffang
http://git-wip-us.apache.org/repos/asf/cxf/blob/ebd1c24d/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
--
diff --git 
a/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
 
b/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
deleted file mode 100644
index 21d7dbb..000
--- 
a/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
+++ /dev/null
@@ -1,921 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.tools.wadlto.jaxrs;
-
-import java.io.File;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.List;
-
-import javax.validation.Valid;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-
-import org.apache.cxf.helpers.FileUtils;
-import org.apache.cxf.jaxrs.ext.multipart.Multipart;
-import org.apache.cxf.tools.common.ProcessorTestBase;
-import org.apache.cxf.tools.common.ToolContext;
-import org.apache.cxf.tools.wadlto.WadlToolConstants;
-
-import org.junit.Test;
-
-public class JAXRSContainerTest extends ProcessorTestBase {
-
-@Test
-public void testNoTargetNamespace() {
-try {
-JAXRSContainer container = new JAXRSContainer(null);
-
-ToolContext context = new ToolContext();
-context.put(WadlToolConstants.CFG_OUTPUTDIR, 
output.getCanonicalPath());
-context.put(WadlToolConstants.CFG_WADLURL, 
getLocation("/wadl/resourceSchemaNoTargetNamespace.xml"));
-context.put(WadlToolConstants.CFG_SCHEMA_PACKAGENAME, "=custom");
-context.put(WadlToolConstants.CFG_COMPILE, "true");
-
-container.setContext(context);
-container.execute();
-
-assertNotNull(output.list());
-List files = FileUtils.getFilesRecurse(output, ".+\\.class" 
+ "$");
-assertEquals(3, files.size());
-assertTrue(checkContains(files, "application" + 
".Resource.class"));
-assertTrue(checkContains(files, "custom" + 
".TestCompositeObject.class"));
-assertTrue(checkContains(files, "custom" + 
".ObjectFactory.class"));
-} catch (Exception e) {
-e.printStackTrace();
-fail();
-}
-}
-
-@Test
-public void testCodeGenInterfaces() {
-try {
-JAXRSContainer container = new JAXRSContainer(null);
-
-ToolContext context = new ToolContext();
-context.put(WadlToolConstants.CFG_OUTPUTDIR, 
output.getCanonicalPath());
-context.put(WadlToolConstants.CFG_WADLURL, 
getLocation("/wadl/bookstore.xml"));
-context.put(WadlToolConstants.CFG_MEDIA_TYPE_MAP,
-"application/xml=javax.xml.transform.Source");
-context.put(WadlToolConstants.CFG_MEDIA_TYPE_MAP,
-
"multipart/form-data=org.apache.cxf.jaxrs.ext.multipart.MultipartBody");
-context.put(WadlToolConstants.CFG_NO_VOID_FOR_EMPTY_RESPONSES, 
"true");
-
context.put(WadlToolConstants.CFG_GENERATE_RESPONSE_IF_HEADERS_SET, "true");
-context.put(WadlToolConstants.CFG_GENERATE_RESPONSE_FOR_METHODS, 
"getName");
-context.put(WadlToolConstants.CFG_COMPILE, "true");
-
-container.setContext(context);
-container.execute();
-
-assertNotNull(output.list());
-
-verifyFiles("java", true, false, "superbooks", 
"org.apache.cxf.jaxrs.model.wadl", 11, true);
-verifyFiles("class", true, false, "superbooks", 
"org.apache.cxf.jaxrs.model.wadl", 11, true);
-
-} catch (Exception e) {
-e.printStackTrace();
-fail();
-}
-}
-
-@Test
-public void testInheritParameters() {
-try {
-JAXRSContainer container = new 

[2/8] cxf git commit: add websocket undertow transport

2017-04-20 Thread ffang
add websocket undertow transport


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

Branch: refs/heads/master
Commit: 6755b06ca3eede0132d17633783800f3e3f07484
Parents: 156fd30
Author: Freeman Fang 
Authored: Thu Apr 13 14:04:55 2017 +0800
Committer: Freeman Fang 
Committed: Thu Apr 13 14:04:55 2017 +0800

--
 .../http_undertow/UndertowHTTPDestination.java  |   7 +-
 .../http_undertow/UndertowHTTPHandler.java  |   6 +
 rt/transports/websocket/pom.xml |   6 +
 .../websocket/WebSocketDestinationFactory.java  |  87 ++-
 .../AtmosphereWebSocketUndertowDestination.java | 302 ++
 .../undertow/ByteBufferInputStream.java |  51 ++
 .../WebSocketUndertowServletRequest.java| 589 +++
 .../WebSocketUndertowServletResponse.java   | 392 
 systests/transport-undertow/pom.xml |  61 ++
 .../systest/http_undertow/websocket/Book.java   | 123 
 .../websocket/BookNotFoundDetails.java  |  36 ++
 .../websocket/BookNotFoundFault.java|  41 ++
 .../websocket/BookServerWebSocket.java  |  83 +++
 .../websocket/BookStorePerRequest.java  | 129 
 .../websocket/BookStoreWebSocket.java   | 186 ++
 .../http_undertow/websocket/Chapter.java| 106 
 .../JAXRSClientServerWebSocketTest.java | 482 +++
 .../JAXRSClientServerWebSocketTest.java.bak | 438 ++
 .../http_undertow/websocket/SuperBook.java  |  45 ++
 .../websocket/SuperBookInterface.java   |  23 +
 .../websocket/WebSocketTestClient.java  | 329 +++
 21 files changed, 3498 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/6755b06c/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestination.java
--
diff --git 
a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestination.java
 
b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestination.java
index 81a4e59..b96c1b9 100644
--- 
a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestination.java
+++ 
b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestination.java
@@ -80,9 +80,6 @@ public class UndertowHTTPDestination extends 
ServletDestination {
 //Add the default port if the address is missing it
 super(bus, registry, ei, getAddressValue(ei, true).getAddress(), true);
 this.serverEngineFactory = serverEngineFactory;
-if (serverEngineFactory != null) {
-nurl = new URL(getAddress(endpointInfo));
-}
 loader = bus.getExtension(ClassLoader.class);
 }
 
@@ -101,6 +98,8 @@ public class UndertowHTTPDestination extends 
ServletDestination {
IOException {
 if (serverEngineFactory == null) {
 return;
+} else { 
+nurl = new URL(getAddress(endpointInfo));
 }
 engine =
 
serverEngineFactory.retrieveUndertowHTTPServerEngine(nurl.getPort());
@@ -239,7 +238,7 @@ public class UndertowHTTPDestination extends 
ServletDestination {
 }
 
 
-protected final String getAddress(EndpointInfo endpointInfo) {
+protected String getAddress(EndpointInfo endpointInfo) {
 return endpointInfo.getAddress();
 }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/6755b06c/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPHandler.java
--
diff --git 
a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPHandler.java
 
b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPHandler.java
index 2c1914a..ff05c97 100644
--- 
a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPHandler.java
+++ 
b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPHandler.java
@@ -66,6 +66,10 @@ public class UndertowHTTPHandler implements HttpHandler {
 }
 }
 
+public ServletContext getServletContext() {
+return this.servletContext;
+}
+
 public void setName(String name) {
 urlName = name;
 }
@@ -87,6 +91,8 @@ public class UndertowHTTPHandler implements HttpHandler {
 

[4/8] cxf git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf

2017-04-20 Thread ffang
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf


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

Branch: refs/heads/master
Commit: a07135b12c37a406d29a8398330214ef8cc4b7d9
Parents: a6e8702 5e17bc0
Author: Freeman Fang 
Authored: Wed Apr 19 12:58:23 2017 +0800
Committer: Freeman Fang 
Committed: Wed Apr 19 12:58:23 2017 +0800

--
 integration/spring-boot/autoconfigure/pom.xml   | 37 +
 .../boot/autoconfigure/CxfProperties.java   |  6 +-
 .../boot/autoconfigure/CxfPropertiesTest.java   | 86 
 parent/pom.xml  |  2 +-
 pom.xml |  4 +-
 .../apache/cxf/jaxrs/impl/ResourceInfoImpl.java |  2 +-
 .../apache/cxf/jaxrs/utils/InjectionUtils.java  |  4 +-
 7 files changed, 133 insertions(+), 8 deletions(-)
--




[6/8] cxf git commit: add UndertowWebSocketDestination when Atmosphere isn't available with more tests

2017-04-20 Thread ffang
add UndertowWebSocketDestination when Atmosphere isn't available with more tests


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

Branch: refs/heads/master
Commit: ebd1c24df1b405bf0478f191ba055d96e8ccea41
Parents: a07135b
Author: Freeman Fang 
Authored: Wed Apr 19 14:28:37 2017 +0800
Committer: Freeman Fang 
Committed: Wed Apr 19 14:28:37 2017 +0800

--
 .../websocket/WebSocketDestinationFactory.java  |  19 +-
 .../AtmosphereWebSocketUndertowDestination.java |  22 +-
 .../undertow/UndertowWebSocketDestination.java  | 232 +
 .../WebSocketUndertowServletRequest.java|   6 +-
 ...RSClientServerWebSocketNoAtmosphereTest.java |  51 +
 ...ntServerWebSocketSpringNoAtmosphereTest.java |  52 ++
 .../JAXRSClientServerWebSocketSpringTest.java   |  48 +
 .../resources/jaxrs_websocket/WEB-INF/beans.xml |  54 ++
 .../resources/jaxrs_websocket/WEB-INF/web.xml   |  41 +
 .../jaxrs_websocket/beans-embedded.xml  |  48 +
 .../jaxrs_websocket/beans-embedded2.xml |  48 +
 .../systest/ws/rm/WSRMPolicyResolveTest.java|  52 --
 .../systest/ws/policy/RM10PolicyWsdlTest.java   | 148 ---
 .../tools/wadlto/jaxrs/JAXRSContainerTest.java  | 921 ---
 14 files changed, 601 insertions(+), 1141 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/ebd1c24d/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/WebSocketDestinationFactory.java
--
diff --git 
a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/WebSocketDestinationFactory.java
 
b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/WebSocketDestinationFactory.java
index bbd6f5a..40fd02e 100644
--- 
a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/WebSocketDestinationFactory.java
+++ 
b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/WebSocketDestinationFactory.java
@@ -43,6 +43,8 @@ public class WebSocketDestinationFactory implements 
HttpDestinationFactory {
 private static final boolean UNDERTOW_AVAILABLE = 
probeClass("io.undertow.websockets.core.WebSockets");
 private static final Constructor JETTY9_WEBSOCKET_DESTINATION_CTR = 
 
probeConstructor("org.apache.cxf.transport.websocket.jetty9.Jetty9WebSocketDestination");
+private static final Constructor UNDERTOW_WEBSOCKET_DESTINATION_CTR = 
+
probeUndertowConstructor("org.apache.cxf.transport.websocket.undertow.UndertowWebSocketDestination");
 private static final Constructor 
ATMOSPHERE_WEBSOCKET_JETTY_DESTINATION_CTR = 
 
probeConstructor("org.apache.cxf.transport.websocket.atmosphere.AtmosphereWebSocketJettyDestination");
 private static final Constructor 
ATMOSPHERE_WEBSOCKET_UNDERTOW_DESTINATION_CTR = 
@@ -102,11 +104,20 @@ public class WebSocketDestinationFactory implements 
HttpDestinationFactory {
 }
 return null;
 } else {
-// for the embedded mode, we stick to jetty
-JettyHTTPServerEngineFactory serverEngineFactory = bus
-.getExtension(JettyHTTPServerEngineFactory.class);
-return 
createJettyHTTPDestination(JETTY9_WEBSOCKET_DESTINATION_CTR, bus, registry,
+if (JETTY_AVAILABLE) {
+// for the embedded mode, we stick to jetty if jetty is 
available
+JettyHTTPServerEngineFactory serverEngineFactory = bus
+.getExtension(JettyHTTPServerEngineFactory.class);
+return 
createJettyHTTPDestination(JETTY9_WEBSOCKET_DESTINATION_CTR, bus, registry,
   endpointInfo, 
serverEngineFactory);
+} else if (UNDERTOW_AVAILABLE) {
+// use UndertowWebSocketDestination
+UndertowHTTPServerEngineFactory 
undertowServerEngineFactory = bus
+.getExtension(UndertowHTTPServerEngineFactory.class);
+return 
createUndertowHTTPDestination(UNDERTOW_WEBSOCKET_DESTINATION_CTR, bus,
+ registry, 
endpointInfo, undertowServerEngineFactory);
+}
+return null;
 }
 } else {
 // REVISIT other way of getting the registry of http so that the 
plain cxf servlet finds the


[8/8] cxf git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf

2017-04-20 Thread ffang
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf


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

Branch: refs/heads/master
Commit: 1f430d4c717ade779a23489e3d07d4311bbc21a2
Parents: 9cffee5 9a19f69
Author: Freeman Fang 
Authored: Fri Apr 21 09:50:25 2017 +0800
Committer: Freeman Fang 
Committed: Fri Apr 21 09:50:25 2017 +0800

--
 .../oauth2/filters/OAuthRequestFilter.java  | 15 +
 .../provider/AbstractOAuthDataProvider.java | 15 ++---
 .../services/DynamicRegistrationService.java| 38 ++---
 .../rs/security/oauth2/utils/OAuthUtils.java| 17 +-
 .../rs/security/xml/SignatureProperties.java|  8 +++
 .../rs/security/xml/XmlSecOutInterceptor.java   |  4 ++
 .../apache/cxf/transport/jms/JMSConduit.java| 23 
 .../cxf/transport/jms/JMSConfiguration.java | 27 +
 .../cxf/transport/jms/JMSDestination.java   |  4 +-
 .../apache/cxf/transport/jms/JMSFactory.java|  2 +-
 .../ws/security/wss4j/WSS4JInInterceptor.java   | 10 ++--
 .../oidc/OIDCDynamicRegistrationTest.java   | 58 ++--
 12 files changed, 152 insertions(+), 69 deletions(-)
--




[3/8] cxf git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf

2017-04-20 Thread ffang
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf


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

Branch: refs/heads/master
Commit: a6e8702a05fc642231abaaa6ac131360bb030fda
Parents: 6755b06 ba0573f
Author: Freeman Fang 
Authored: Mon Apr 17 12:16:29 2017 +0800
Committer: Freeman Fang 
Committed: Mon Apr 17 12:16:29 2017 +0800

--
 .../samples/jax_rs/sse_cdi/src/main/resources/META-INF/beans.xml   | 2 +-
 .../jax_rs/sse_spring/src/main/resources/META-INF/beans.xml| 2 +-
 integration/cdi/src/main/resources/META-INF/beans.xml  | 2 +-
 rt/rs/sse/src/main/resources/META-INF/beans.xml| 2 +-
 systests/cdi/base/src/main/resources/META-INF/beans.xml| 2 +-
 .../cdi-multiple-apps-owb/src/test/resources/META-INF/beans.xml| 2 +-
 .../cdi-owb/cdi-no-apps-owb/src/test/resources/META-INF/beans.xml  | 2 +-
 .../cdi-multiple-apps-weld/src/test/resources/META-INF/beans.xml   | 2 +-
 .../cdi-no-apps-weld/src/test/resources/META-INF/beans.xml | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
--




cxf git commit: Fixing a typo

2017-04-20 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes f8eec3e29 -> 73dcc6d88


Fixing a typo


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

Branch: refs/heads/3.1.x-fixes
Commit: 73dcc6d8894757341151414dae981ce23b034945
Parents: f8eec3e
Author: Sergey Beryozkin 
Authored: Thu Apr 20 16:57:45 2017 +0100
Committer: Sergey Beryozkin 
Committed: Thu Apr 20 17:02:20 2017 +0100

--
 .../cxf/rs/security/oauth2/filters/OAuthRequestFilter.java   | 2 +-
 .../java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/73dcc6d8/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
index 1a85f46..e432193 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
@@ -163,7 +163,7 @@ public class OAuthRequestFilter extends 
AbstractAccessTokenValidator
 if (certThumbprint != null) {
 TLSSessionInfo tlsInfo = getTlsSessionInfo();
 X509Certificate cert = tlsInfo == null ? null : 
OAuthUtils.getRootTLSCertificate(tlsInfo);
-if (!OAuthUtils.compareCertificateThumbprints(cert, 
certThumbprint)) { 
+if (cert == null || 
!OAuthUtils.compareCertificateThumbprints(cert, certThumbprint)) { 
 throw ExceptionUtils.toForbiddenException(null, null);
 }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/73dcc6d8/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
index 6913f31..ffe0180 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
@@ -92,8 +92,8 @@ public final class OAuthUtils {
 public static boolean compareCertificateThumbprints(X509Certificate cert, 
String encodedThumbprint) {
 try {
 byte[] thumbprint = createCertificateThumbprint(cert);
-byte[] currentThumbrint = 
Base64UrlUtility.decode(encodedThumbprint);
-return MessageDigest.isEqual(thumbprint, currentThumbrint);
+byte[] currentThumbprint = 
Base64UrlUtility.decode(encodedThumbprint);
+return MessageDigest.isEqual(thumbprint, currentThumbprint);
 } catch (Exception ex) {
 return false;
 }



cxf git commit: Prototyping the X509 client cert token binding validation cvode, tests to follow next

2017-04-20 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes d7478d6ce -> f8eec3e29


Prototyping the X509 client cert token binding validation cvode, tests to 
follow next


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

Branch: refs/heads/3.1.x-fixes
Commit: f8eec3e2912fb8103e9278f3bea8504520482171
Parents: d7478d6
Author: Sergey Beryozkin 
Authored: Thu Apr 20 16:52:54 2017 +0100
Committer: Sergey Beryozkin 
Committed: Thu Apr 20 17:01:42 2017 +0100

--
 .../oauth2/filters/OAuthRequestFilter.java  | 20 ++--
 .../provider/AbstractOAuthDataProvider.java | 15 +--
 .../rs/security/oauth2/utils/OAuthUtils.java| 17 +++--
 3 files changed, 38 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/f8eec3e2/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
index 5cc3e6c..1a85f46 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
@@ -19,6 +19,7 @@
 package org.apache.cxf.rs.security.oauth2.filters;
 
 import java.security.Principal;
+import java.security.cert.X509Certificate;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -46,6 +47,7 @@ import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.phase.PhaseInterceptorChain;
+import org.apache.cxf.rs.security.jose.common.JoseConstants;
 import org.apache.cxf.rs.security.oauth2.common.AccessTokenValidation;
 import org.apache.cxf.rs.security.oauth2.common.AuthenticationMethod;
 import org.apache.cxf.rs.security.oauth2.common.OAuthContext;
@@ -56,6 +58,7 @@ import 
org.apache.cxf.rs.security.oauth2.utils.AuthorizationUtils;
 import org.apache.cxf.rs.security.oauth2.utils.OAuthConstants;
 import org.apache.cxf.rs.security.oauth2.utils.OAuthUtils;
 import org.apache.cxf.security.SecurityContext;
+import org.apache.cxf.security.transport.TLSSessionInfo;
 
 /**
  * JAX-RS OAuth2 filter which can be used to protect the end-user endpoints
@@ -154,7 +157,17 @@ public class OAuthRequestFilter extends 
AbstractAccessTokenValidator
 throw ExceptionUtils.toForbiddenException(null, null);
 
 }
-
+
+// Check Client Certificate Binding if any
+String certThumbprint = 
accessTokenV.getExtraProps().get(JoseConstants.HEADER_X509_THUMBPRINT_SHA256);
+if (certThumbprint != null) {
+TLSSessionInfo tlsInfo = getTlsSessionInfo();
+X509Certificate cert = tlsInfo == null ? null : 
OAuthUtils.getRootTLSCertificate(tlsInfo);
+if (!OAuthUtils.compareCertificateThumbprints(cert, 
certThumbprint)) { 
+throw ExceptionUtils.toForbiddenException(null, null);
+}
+}
+
 // Create the security context and make it available on the message
 SecurityContext sc = createSecurityContext(req, accessTokenV);
 m.put(SecurityContext.class, sc);
@@ -345,5 +358,8 @@ public class OAuthRequestFilter extends 
AbstractAccessTokenValidator
 public void setIssuer(String issuer) {
 this.issuer = issuer;
 }
-
+
+private TLSSessionInfo getTlsSessionInfo() {
+return 
(TLSSessionInfo)getMessageContext().get(TLSSessionInfo.class.getName());
+}
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/f8eec3e2/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
index 8c509d7..8e44e48 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
+++ 

cxf git commit: Fixing a typo

2017-04-20 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/master cbb8261fc -> 9a19f69aa


Fixing a typo


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

Branch: refs/heads/master
Commit: 9a19f69aab463eae96eaf0e5beba877da84d857d
Parents: cbb8261
Author: Sergey Beryozkin 
Authored: Thu Apr 20 16:57:45 2017 +0100
Committer: Sergey Beryozkin 
Committed: Thu Apr 20 16:57:45 2017 +0100

--
 .../cxf/rs/security/oauth2/filters/OAuthRequestFilter.java   | 2 +-
 .../java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/9a19f69a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
index a485c1e..ec1e8fa 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
@@ -162,7 +162,7 @@ public class OAuthRequestFilter extends 
AbstractAccessTokenValidator
 if (certThumbprint != null) {
 TLSSessionInfo tlsInfo = getTlsSessionInfo();
 X509Certificate cert = tlsInfo == null ? null : 
OAuthUtils.getRootTLSCertificate(tlsInfo);
-if (!OAuthUtils.compareCertificateThumbprints(cert, 
certThumbprint)) { 
+if (cert == null || 
!OAuthUtils.compareCertificateThumbprints(cert, certThumbprint)) { 
 throw ExceptionUtils.toForbiddenException(null, null);
 }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/9a19f69a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
index 6e38944..06bf7de 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
@@ -92,8 +92,8 @@ public final class OAuthUtils {
 public static boolean compareCertificateThumbprints(X509Certificate cert, 
String encodedThumbprint) {
 try {
 byte[] thumbprint = createCertificateThumbprint(cert);
-byte[] currentThumbrint = 
Base64UrlUtility.decode(encodedThumbprint);
-return MessageDigest.isEqual(thumbprint, currentThumbrint);
+byte[] currentThumbprint = 
Base64UrlUtility.decode(encodedThumbprint);
+return MessageDigest.isEqual(thumbprint, currentThumbprint);
 } catch (Exception ex) {
 return false;
 }



cxf git commit: Prototyping the X509 client cert token binding validation cvode, tests to follow next

2017-04-20 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/master ba9fa0e7c -> cbb8261fc


Prototyping the X509 client cert token binding validation cvode, tests to 
follow next


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

Branch: refs/heads/master
Commit: cbb8261fc8f7261b8ef91a5931a2b343a7177d33
Parents: ba9fa0e
Author: Sergey Beryozkin 
Authored: Thu Apr 20 16:52:54 2017 +0100
Committer: Sergey Beryozkin 
Committed: Thu Apr 20 16:52:54 2017 +0100

--
 .../oauth2/filters/OAuthRequestFilter.java | 15 +++
 .../oauth2/provider/AbstractOAuthDataProvider.java | 15 +--
 .../cxf/rs/security/oauth2/utils/OAuthUtils.java   | 17 +++--
 3 files changed, 35 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/cbb8261f/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
index 02d238f..a485c1e 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
@@ -19,6 +19,7 @@
 package org.apache.cxf.rs.security.oauth2.filters;
 
 import java.security.Principal;
+import java.security.cert.X509Certificate;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -46,6 +47,7 @@ import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.phase.PhaseInterceptorChain;
+import org.apache.cxf.rs.security.jose.common.JoseConstants;
 import org.apache.cxf.rs.security.oauth2.common.AccessTokenValidation;
 import org.apache.cxf.rs.security.oauth2.common.AuthenticationMethod;
 import org.apache.cxf.rs.security.oauth2.common.OAuthContext;
@@ -56,6 +58,7 @@ import 
org.apache.cxf.rs.security.oauth2.utils.AuthorizationUtils;
 import org.apache.cxf.rs.security.oauth2.utils.OAuthConstants;
 import org.apache.cxf.rs.security.oauth2.utils.OAuthUtils;
 import org.apache.cxf.security.SecurityContext;
+import org.apache.cxf.security.transport.TLSSessionInfo;
 
 /**
  * JAX-RS OAuth2 filter which can be used to protect the end-user endpoints
@@ -154,6 +157,15 @@ public class OAuthRequestFilter extends 
AbstractAccessTokenValidator
 throw ExceptionUtils.toForbiddenException(null, null);
 
 }
+// Check Client Certificate Binding if any
+String certThumbprint = 
accessTokenV.getExtraProps().get(JoseConstants.HEADER_X509_THUMBPRINT_SHA256);
+if (certThumbprint != null) {
+TLSSessionInfo tlsInfo = getTlsSessionInfo();
+X509Certificate cert = tlsInfo == null ? null : 
OAuthUtils.getRootTLSCertificate(tlsInfo);
+if (!OAuthUtils.compareCertificateThumbprints(cert, 
certThumbprint)) { 
+throw ExceptionUtils.toForbiddenException(null, null);
+}
+}
 
 // Create the security context and make it available on the message
 SecurityContext sc = createSecurityContext(req, accessTokenV);
@@ -346,4 +358,7 @@ public class OAuthRequestFilter extends 
AbstractAccessTokenValidator
 this.issuer = issuer;
 }
 
+private TLSSessionInfo getTlsSessionInfo() {
+return 
(TLSSessionInfo)getMessageContext().get(TLSSessionInfo.class.getName());
+}
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/cbb8261f/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
index 22568cb..75e24d4 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.MultivaluedMap;
 

cxf git commit: [CXF-6778] Reset correct variable

2017-04-20 Thread cschneider
Repository: cxf
Updated Branches:
  refs/heads/master c0efcafea -> ba9fa0e7c


[CXF-6778] Reset correct variable


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

Branch: refs/heads/master
Commit: ba9fa0e7c7067b5e6536307c0cfdcf5154912647
Parents: c0efcaf
Author: Christian Schneider 
Authored: Thu Apr 20 16:56:20 2017 +0200
Committer: Christian Schneider 
Committed: Thu Apr 20 16:56:48 2017 +0200

--
 .../main/java/org/apache/cxf/transport/jms/JMSConfiguration.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/ba9fa0e7/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
--
diff --git 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
index 8498a65..ec01a39 100644
--- 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
+++ 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
@@ -481,7 +481,7 @@ public class JMSConfiguration {
 
 public void resetCachedReplyDestination() {
 synchronized (this) {
-this.replyDestination = null;
+this.replyDestinationDest = null;
 }
 }
 



cxf git commit: Blocking anonymous dynamic client reg even though it is allowed by the spec, generating client sec for other grants which require it

2017-04-20 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 4774cc470 -> d7478d6ce


Blocking anonymous dynamic client reg even though it is allowed by the spec, 
generating client sec for other grants which require it


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

Branch: refs/heads/3.1.x-fixes
Commit: d7478d6ce217c4843d10291ac32b586b72bceadf
Parents: 4774cc4
Author: Sergey Beryozkin 
Authored: Thu Apr 20 15:24:42 2017 +0100
Committer: Sergey Beryozkin 
Committed: Thu Apr 20 15:36:19 2017 +0100

--
 .../services/DynamicRegistrationService.java| 49 +++-
 .../oidc/OIDCDynamicRegistrationTest.java   | 62 ++--
 2 files changed, 66 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/d7478d6c/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
index 3a6ed16..fab1886 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
@@ -56,28 +56,42 @@ public class DynamicRegistrationService {
 private int clientIdSizeInBytes = DEFAULT_CLIENT_ID_SIZE;
 private MessageContext mc;
 private boolean supportRegistrationAccessTokens = true;
-
+private String userRole;
+
 @POST
 @Consumes("application/json")
 @Produces("application/json")
 public Response register(ClientRegistration request) {
-checkInitialAccessToken();
+checkInitialAuthentication();
 Client client = createNewClient(request);
 createRegAccessToken(client);
 clientProvider.setClient(client);
 
 return 
Response.status(201).entity(fromClientToRegistrationResponse(client)).build();
 }
-
-protected void checkInitialAccessToken() {
+
+protected void checkInitialAuthentication() {
 if (initialAccessToken != null) {
 String accessToken = getRequestAccessToken();
 if (!initialAccessToken.equals(accessToken)) {
 throw ExceptionUtils.toNotAuthorizedException(null, null);
 }
+} else {
+checkSecurityContext();
 }
 
 }
+
+
+protected void checkSecurityContext() {
+SecurityContext sc = mc.getSecurityContext();
+if (sc.getUserPrincipal() == null) {
+throw ExceptionUtils.toNotAuthorizedException(null, null);
+}  
+if (userRole != null && !sc.isUserInRole(userRole)) {
+throw ExceptionUtils.toForbiddenException(null, null);
+}
+}
 
 protected String createRegAccessToken(Client client) {
 String regAccessToken = OAuthUtils.generateRandomTokenKey();
@@ -87,8 +101,7 @@ public class DynamicRegistrationService {
 }
 protected void checkRegistrationAccessToken(Client c, String accessToken) {
 String regAccessToken = 
c.getProperties().get(ClientRegistrationResponse.REG_ACCESS_TOKEN);
-
-if (!regAccessToken.equals(accessToken)) {
+if (regAccessToken == null || !regAccessToken.equals(accessToken)) {
 throw ExceptionUtils.toNotAuthorizedException(null, null);
 }
 }
@@ -206,21 +219,24 @@ public class DynamicRegistrationService {
 grantTypes = Collections.singletonList("authorization_code");
 }
 
-// Client Type
+boolean passwordRequired = 
grantTypes.contains(OAuthConstants.AUTHORIZATION_CODE_GRANT)
+   || grantTypes.contains(OAuthConstants.RESOURCE_OWNER_GRANT)
+   || grantTypes.contains(OAuthConstants.CLIENT_CREDENTIALS_GRANT);
+
+// Application Type
 // https://tools.ietf.org/html/rfc7591 has no this property but
 // but 
http://openid.net/specs/openid-connect-registration-1_0.html#ClientMetadata does
 String appType = request.getApplicationType();
 if (appType == null) {
 appType = DEFAULT_APPLICATION_TYPE;
 }
-boolean isConfidential = DEFAULT_APPLICATION_TYPE.equals(appType) 
-&& 

[2/2] cxf git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf

2017-04-20 Thread sergeyb
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf


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

Branch: refs/heads/master
Commit: c0efcafeaccad55ef3c2326e7147468edf9dbdd8
Parents: ae18422 a983459
Author: Sergey Beryozkin 
Authored: Thu Apr 20 15:25:08 2017 +0100
Committer: Sergey Beryozkin 
Committed: Thu Apr 20 15:25:08 2017 +0100

--
 .../apache/cxf/transport/jms/JMSConduit.java| 22 
 .../cxf/transport/jms/JMSDestination.java   |  4 +---
 2 files changed, 23 insertions(+), 3 deletions(-)
--




[1/2] cxf git commit: Blocking anonymous dynamic client reg even though it is allowed by the spec, generating client sec for other grants which require it

2017-04-20 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/master a98345918 -> c0efcafea


Blocking anonymous dynamic client reg even though it is allowed by the spec, 
generating client sec for other grants which require it


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

Branch: refs/heads/master
Commit: ae1842229fbc354e57ca3ca6797e8c9462dfc2ce
Parents: 0b7b183
Author: Sergey Beryozkin 
Authored: Thu Apr 20 15:24:42 2017 +0100
Committer: Sergey Beryozkin 
Committed: Thu Apr 20 15:24:42 2017 +0100

--
 .../services/DynamicRegistrationService.java| 38 ++---
 .../oidc/OIDCDynamicRegistrationTest.java   | 58 ++--
 2 files changed, 59 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/ae184222/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
index 7af9993..7f914ec 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
@@ -56,12 +56,13 @@ public class DynamicRegistrationService {
 private int clientIdSizeInBytes = DEFAULT_CLIENT_ID_SIZE;
 private MessageContext mc;
 private boolean supportRegistrationAccessTokens = true;
+private String userRole;
 
 @POST
 @Consumes("application/json")
 @Produces("application/json")
 public Response register(ClientRegistration request) {
-checkInitialAccessToken();
+checkInitialAuthentication();
 Client client = createNewClient(request);
 createRegAccessToken(client);
 clientProvider.setClient(client);
@@ -69,15 +70,28 @@ public class DynamicRegistrationService {
 return 
Response.status(201).entity(fromClientToRegistrationResponse(client)).build();
 }
 
-protected void checkInitialAccessToken() {
+protected void checkInitialAuthentication() {
 if (initialAccessToken != null) {
 String accessToken = getRequestAccessToken();
 if (!initialAccessToken.equals(accessToken)) {
 throw ExceptionUtils.toNotAuthorizedException(null, null);
 }
+} else {
+checkSecurityContext();
 }
 
 }
+
+
+protected void checkSecurityContext() {
+SecurityContext sc = mc.getSecurityContext();
+if (sc.getUserPrincipal() == null) {
+throw ExceptionUtils.toNotAuthorizedException(null, null);
+}  
+if (userRole != null && !sc.isUserInRole(userRole)) {
+throw ExceptionUtils.toForbiddenException(null, null);
+}
+}
 
 protected String createRegAccessToken(Client client) {
 String regAccessToken = OAuthUtils.generateRandomTokenKey();
@@ -88,7 +102,7 @@ public class DynamicRegistrationService {
 protected void checkRegistrationAccessToken(Client c, String accessToken) {
 String regAccessToken = 
c.getProperties().get(ClientRegistrationResponse.REG_ACCESS_TOKEN);
 
-if (!regAccessToken.equals(accessToken)) {
+if (regAccessToken == null || !regAccessToken.equals(accessToken)) {
 throw ExceptionUtils.toNotAuthorizedException(null, null);
 }
 }
@@ -205,8 +219,12 @@ public class DynamicRegistrationService {
 if (grantTypes == null) {
 grantTypes = Collections.singletonList("authorization_code");
 }
+
+boolean passwordRequired = 
grantTypes.contains(OAuthConstants.AUTHORIZATION_CODE_GRANT)
+   || grantTypes.contains(OAuthConstants.RESOURCE_OWNER_GRANT)
+   || grantTypes.contains(OAuthConstants.CLIENT_CREDENTIALS_GRANT);
 
-// Client Type
+// Application Type
 // https://tools.ietf.org/html/rfc7591 has no this property but
 // but 
http://openid.net/specs/openid-connect-registration-1_0.html#ClientMetadata does
 String appType = request.getApplicationType();
@@ -214,13 +232,12 @@ public class DynamicRegistrationService {
 appType = DEFAULT_APPLICATION_TYPE;
 }
 boolean isConfidential = DEFAULT_APPLICATION_TYPE.equals(appType)

cxf git commit: [CXF-6441] Set pubSubNoLocal in JMSDestination

2017-04-20 Thread cschneider
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 672c32c80 -> 6e8b87f15


[CXF-6441] Set pubSubNoLocal in JMSDestination


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

Branch: refs/heads/3.0.x-fixes
Commit: 6e8b87f158c7b8091c93aa9ba1f0df474653cbba
Parents: 672c32c
Author: Christian Schneider 
Authored: Thu Apr 20 15:15:00 2017 +0200
Committer: Christian Schneider 
Committed: Thu Apr 20 15:18:44 2017 +0200

--
 .../src/main/java/org/apache/cxf/transport/jms/JMSDestination.java  | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/6e8b87f1/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
--
diff --git 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
index 9f0fcbc..2dfba30 100644
--- 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
+++ 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
@@ -139,6 +139,7 @@ public class JMSDestination extends 
AbstractMultiplexDestination implements Mess
 container.setMessageSelector(jmsConfig.getMessageSelector());
 container.setTransacted(jmsConfig.isSessionTransacted());
 
container.setDurableSubscriptionName(jmsConfig.getDurableSubscriptionName());
+container.setPubSubNoLocal(jmsConfig.isPubSubNoLocal());
 
 Executor executor = JMSFactory.createExecutor(bus, 
"jms-destination");
 container.setExecutor(executor);



cxf git commit: [CXF-6441] Set pubSubNoLocal in JMSDestination

2017-04-20 Thread cschneider
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes b9b356546 -> 4774cc470


[CXF-6441] Set pubSubNoLocal in JMSDestination


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

Branch: refs/heads/3.1.x-fixes
Commit: 4774cc4704bafb00c464b64f64745dcd94ade798
Parents: b9b3565
Author: Christian Schneider 
Authored: Thu Apr 20 15:15:00 2017 +0200
Committer: Christian Schneider 
Committed: Thu Apr 20 15:18:22 2017 +0200

--
 .../src/main/java/org/apache/cxf/transport/jms/JMSDestination.java  | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/4774cc47/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
--
diff --git 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
index 9f0fcbc..2dfba30 100644
--- 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
+++ 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
@@ -139,6 +139,7 @@ public class JMSDestination extends 
AbstractMultiplexDestination implements Mess
 container.setMessageSelector(jmsConfig.getMessageSelector());
 container.setTransacted(jmsConfig.isSessionTransacted());
 
container.setDurableSubscriptionName(jmsConfig.getDurableSubscriptionName());
+container.setPubSubNoLocal(jmsConfig.isPubSubNoLocal());
 
 Executor executor = JMSFactory.createExecutor(bus, 
"jms-destination");
 container.setExecutor(executor);



cxf git commit: [CXF-6441] Set pubSubNoLocal in JMSDestination

2017-04-20 Thread cschneider
Repository: cxf
Updated Branches:
  refs/heads/master b43dfb972 -> 1f9cbe367


[CXF-6441] Set pubSubNoLocal in JMSDestination


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

Branch: refs/heads/master
Commit: 1f9cbe3678c1984fd2fd57e26fdd5626841c32e9
Parents: b43dfb9
Author: Christian Schneider 
Authored: Thu Apr 20 15:15:00 2017 +0200
Committer: Christian Schneider 
Committed: Thu Apr 20 15:15:00 2017 +0200

--
 .../src/main/java/org/apache/cxf/transport/jms/JMSDestination.java  | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/1f9cbe36/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
--
diff --git 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
index 2d7f4db..8ec23cd 100644
--- 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
+++ 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
@@ -136,6 +136,7 @@ public class JMSDestination extends 
AbstractMultiplexDestination implements Mess
 container.setMessageSelector(jmsConfig.getMessageSelector());
 container.setTransacted(jmsConfig.isSessionTransacted());
 
container.setDurableSubscriptionName(jmsConfig.getDurableSubscriptionName());
+container.setPubSubNoLocal(jmsConfig.isPubSubNoLocal());
 
 Object executor = 
bus.getProperty(JMSFactory.JMS_DESTINATION_EXECUTOR);
 if (executor instanceof Executor) {



cxf git commit: [CXF-6576] Handle exceptions in MessageListener container without using setExceptionListener

2017-04-20 Thread cschneider
Repository: cxf
Updated Branches:
  refs/heads/jms-exception-handling [created] 30f0743d0


[CXF-6576] Handle exceptions in MessageListener container without using 
setExceptionListener


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

Branch: refs/heads/jms-exception-handling
Commit: 30f0743d01a3b3060b35622870de6481c098742a
Parents: b43dfb9
Author: Christian Schneider 
Authored: Thu Apr 20 14:15:29 2017 +0200
Committer: Christian Schneider 
Committed: Thu Apr 20 14:15:29 2017 +0200

--
 .../cxf/transport/jms/JMSDestination.java   |  7 +-
 .../util/PollingMessageListenerContainer.java   | 80 +---
 .../transport/jms/util/MessageListenerTest.java |  9 ++-
 3 files changed, 29 insertions(+), 67 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/30f0743d/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
--
diff --git 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
index 2d7f4db..9794cd5 100644
--- 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
+++ 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
@@ -118,19 +118,20 @@ public class JMSDestination extends 
AbstractMultiplexDestination implements Mess
 Session session = null;
 try {
 connection = JMSFactory.createConnection(jmsConfig);
-connection.setExceptionListener(new ExceptionListener() {
+ExceptionListener exListener = new ExceptionListener() {
 public void onException(JMSException exception) {
 if (!shutdown) {
 LOG.log(Level.WARNING, "Exception on JMS connection. 
Trying to reconnect", exception);
 restartConnection();
 }
 }
-});
+};
 session = connection.createSession(false, 
Session.AUTO_ACKNOWLEDGE);
 Destination destination = jmsConfig.getTargetDestination(session);
 
 PollingMessageListenerContainer container = new 
PollingMessageListenerContainer(connection,
-   
 destination, this);
+   
 destination, 
+   
 this, exListener);
 
container.setConcurrentConsumers(jmsConfig.getConcurrentConsumers());
 container.setTransactionManager(jmsConfig.getTransactionManager());
 container.setMessageSelector(jmsConfig.getMessageSelector());

http://git-wip-us.apache.org/repos/asf/cxf/blob/30f0743d/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
--
diff --git 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
index c4276eb..815bcf1 100644
--- 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
+++ 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
@@ -23,6 +23,7 @@ import java.util.logging.Logger;
 
 import javax.jms.Connection;
 import javax.jms.Destination;
+import javax.jms.ExceptionListener;
 import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
@@ -36,12 +37,14 @@ import org.apache.cxf.common.logging.LogUtils;
 
 public class PollingMessageListenerContainer extends 
AbstractMessageListenerContainer {
 private static final Logger LOG = 
LogUtils.getL7dLogger(PollingMessageListenerContainer.class);
+private ExceptionListener exceptionListener;
 
 public PollingMessageListenerContainer(Connection connection, Destination 
destination,
-   MessageListener listenerHandler) {
+   MessageListener listenerHandler, 
ExceptionListener exceptionListener) {
 this.connection = connection;
 this.destination = destination;
 this.listenerHandler = listenerHandler;
+this.exceptionListener = 

cxf git commit: Remove unused attribute

2017-04-20 Thread cschneider
Repository: cxf
Updated Branches:
  refs/heads/master 0b7b18333 -> b43dfb972


Remove unused attribute


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

Branch: refs/heads/master
Commit: b43dfb9721f17fc0166300a359f5dd92c2abf350
Parents: 0b7b183
Author: Christian Schneider 
Authored: Thu Apr 20 11:00:33 2017 +0200
Committer: Christian Schneider 
Committed: Thu Apr 20 14:13:54 2017 +0200

--
 .../main/java/org/apache/cxf/transport/jms/JMSDestination.java| 3 ---
 1 file changed, 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/b43dfb97/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
--
diff --git 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
index ea481d5..2d7f4db 100644
--- 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
+++ 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
@@ -60,8 +60,6 @@ public class JMSDestination extends 
AbstractMultiplexDestination implements Mess
 private JMSConfiguration jmsConfig;
 private Bus bus;
 
-@SuppressWarnings("unused")
-private EndpointInfo ei;
 private JMSListenerContainer jmsListener;
 private ThrottlingCounter suspendedContinuations;
 private ClassLoader loader;
@@ -71,7 +69,6 @@ public class JMSDestination extends 
AbstractMultiplexDestination implements Mess
 public JMSDestination(Bus b, EndpointInfo info, JMSConfiguration 
jmsConfig) {
 super(b, getTargetReference(info, b), info);
 this.bus = b;
-this.ei = info;
 this.jmsConfig = jmsConfig;
 info.setProperty(OneWayProcessorInterceptor.USE_ORIGINAL_THREAD, 
Boolean.TRUE);
 loader = bus.getExtension(ClassLoader.class);



cxf git commit: Recording .gitmergeinfo Changes

2017-04-20 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes db6653c65 -> 672c32c80


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

Branch: refs/heads/3.0.x-fixes
Commit: 672c32c80ed7621405a86fe8a1d3f2d20bd8b460
Parents: db6653c
Author: Colm O hEigeartaigh 
Authored: Thu Apr 20 10:27:44 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Thu Apr 20 10:27:44 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/672c32c8/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 143c6fe..54c4105 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -740,6 +740,7 @@ B 6c9fb62220345bce0b19561d95b38d5507f75e71
 B 6ca95a60dcef2a340bfcfcd526782bd7201f398f
 B 6cb69808178c00e9c935372cd5cf107af8e480e1
 B 6cc16f1de15e7b91e4921f93614b185f9c3d2123
+B 6ccde34c085d9e443520fb86b11cb5d4608e1f02
 B 6d44bab6a03832c3fb73b57ae68edc5bda2029ea
 B 6d637dcb21bb4a17b9c581748e85bf5a82f6c9f8
 B 6daabe0f4501c59c9f0a135143632d72ec79527e
@@ -762,6 +763,7 @@ B 6fe5b5a80d477ba460c223e62f4b73b825cd3771
 B 6ffbba84101f30b7ea481fb9f508e5ae418df853
 B 702f27bc4a334b2d117262252632bf580f20f711
 B 70837021f60524b60e4328c5f47c6170ff30
+B 7084c99ad84fd95f46140162e58421c8c347d751
 B 708f53f7af5a53003f642a4422d8c11de18f8889
 B 70aceaa6f3b93f2a64abdc219fac242f5f0830ab
 B 70b32b7e8f672edfbcce459b4f6276efb1c56285
@@ -1243,6 +1245,7 @@ B b8fe59b5d696e31b607efca1dc32f2521e99884a
 B b91bd2354ec2195bfea0309b24949ee2b04a7ade
 B b9431024bcc3e244a220489e7f101adde6380a86
 B b951579b1c5c1e1ae06fdeebe96bdc20f830a5c0
+B b9b356546069166f26ee9f61da85f67639874273
 B ba00202288bce9ba80692f151c2d73b101400c50
 B ba17570e53cec4386f7c6fd40f075c6fbc1c3981
 B ba293c6e7456e80a5fe92f25a4893d3e45380bf0



[3/3] cxf git commit: Fixing merge

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

Branch: refs/heads/3.1.x-fixes
Commit: b9b356546069166f26ee9f61da85f67639874273
Parents: 6ccde34
Author: Colm O hEigeartaigh 
Authored: Thu Apr 20 10:27:19 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Thu Apr 20 10:27:19 2017 +0100

--
 .../ws/security/wss4j/WSS4JInInterceptor.java   | 45 
 1 file changed, 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/b9b35654/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
index 56ccf12..fde6e8c 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
@@ -281,10 +281,6 @@ public class WSS4JInInterceptor extends 
AbstractWSS4JInterceptor {
 }
 
 checkActions(msg, reqData, wsResult.getResults(), actions, 
SAAJUtils.getBody(doc));
-<<< HEAD
-===
-
->>> 0b7b183... NPE fix
 doResults(
 msg, actor, 
 SAAJUtils.getHeader(doc),
@@ -334,48 +330,7 @@ public class WSS4JInInterceptor extends 
AbstractWSS4JInterceptor {
 reqData = null;
 }
 }
-<<< HEAD
-
-===
-private void importNewDomToSAAJ(SOAPMessage doc, Element elem, Node 
originalNode) throws SOAPException {
-if (DOMUtils.isJava9SAAJ()
-&& originalNode != null && !originalNode.isEqualNode(elem)) {
-//ensure the new decrypted dom element could be imported into the 
SAAJ
-Node node = null;
-Document document = null;
-Element body = SAAJUtils.getBody(doc);
-if (body != null) {
-document = body.getOwnerDocument();
-}
-if (elem != null && elem.getOwnerDocument() != null
-&& elem.getOwnerDocument().getDocumentElement() != null) {
-node = elem.getOwnerDocument().
-
getDocumentElement().getFirstChild().getNextSibling().getFirstChild();
-}
-if (document != null && node != null) {
-Node newNode = null;
-try {
-newNode = document.importNode(node, true);
-if (newNode != null) {
-try {
-Method method = 
newNode.getClass().getMethod("getDomElement");
-newNode = (Element)method.invoke(newNode);
-} catch (java.lang.NoSuchMethodException ex) {
-// do nothing;
-}
-}
-
elem.getOwnerDocument().getDocumentElement().getFirstChild().
-getNextSibling().replaceChild(newNode, node);
-} catch (Exception ex) {
-//just to the best try
-}
-
-}
-
-}
-}
 
->>> 0b7b183... NPE fix
 private void configureAudienceRestriction(SoapMessage msg, RequestData 
reqData) {
 // Add Audience Restrictions for SAML
 boolean enableAudienceRestriction = 



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

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

Branch: refs/heads/3.1.x-fixes
Commit: 6ccde34c085d9e443520fb86b11cb5d4608e1f02
Parents: 7084c99
Author: Colm O hEigeartaigh 
Authored: Thu Apr 20 10:26:45 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Thu Apr 20 10:26:45 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/6ccde34c/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 0dbf0f3..7e60a22 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -352,6 +352,7 @@ M 0865c3a85b9687f857b51d1ae56c8f8e97bdbf5b
 M 08c9194ce2c567ebfe59f59ee628b1197d90fd43
 M 090fa6100ae3a5aa8ae894b0e238acb793f705ec
 M 09fb22b25333c66514f06652ceaf7fc11bde51cc
+M 0b7b18333591d6bb8e0bfcf324bbdefaa8cce21d
 M 0e5fd5a54cb271ba494e7e30b45d4228b33364a9
 M 0eef86f37288f71fd96506fb2ac7fa27169d1e43
 M 10d34e1a812ab2a709376f008c738de68c8720cf



[1/3] cxf git commit: NPE fix

2017-04-20 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes c5c8f2d97 -> b9b356546


NPE fix

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


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

Branch: refs/heads/3.1.x-fixes
Commit: 7084c99ad84fd95f46140162e58421c8c347d751
Parents: c5c8f2d
Author: Colm O hEigeartaigh 
Authored: Thu Apr 20 10:26:02 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Thu Apr 20 10:26:44 2017 +0100

--
 .../ws/security/wss4j/WSS4JInInterceptor.java   | 47 +++-
 1 file changed, 46 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/7084c99a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
index 967917f..56ccf12 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
@@ -158,7 +158,7 @@ public class WSS4JInInterceptor extends 
AbstractWSS4JInterceptor {
 }
 
 public void handleMessage(SoapMessage msg) throws Fault {
-if (msg.containsKey(SECURITY_PROCESSED) || isGET(msg)) {
+if (msg.containsKey(SECURITY_PROCESSED) || isGET(msg) || 
msg.getExchange() == null) {
 return;
 }
 
@@ -281,6 +281,10 @@ public class WSS4JInInterceptor extends 
AbstractWSS4JInterceptor {
 }
 
 checkActions(msg, reqData, wsResult.getResults(), actions, 
SAAJUtils.getBody(doc));
+<<< HEAD
+===
+
+>>> 0b7b183... NPE fix
 doResults(
 msg, actor, 
 SAAJUtils.getHeader(doc),
@@ -330,7 +334,48 @@ public class WSS4JInInterceptor extends 
AbstractWSS4JInterceptor {
 reqData = null;
 }
 }
+<<< HEAD
 
+===
+private void importNewDomToSAAJ(SOAPMessage doc, Element elem, Node 
originalNode) throws SOAPException {
+if (DOMUtils.isJava9SAAJ()
+&& originalNode != null && !originalNode.isEqualNode(elem)) {
+//ensure the new decrypted dom element could be imported into the 
SAAJ
+Node node = null;
+Document document = null;
+Element body = SAAJUtils.getBody(doc);
+if (body != null) {
+document = body.getOwnerDocument();
+}
+if (elem != null && elem.getOwnerDocument() != null
+&& elem.getOwnerDocument().getDocumentElement() != null) {
+node = elem.getOwnerDocument().
+
getDocumentElement().getFirstChild().getNextSibling().getFirstChild();
+}
+if (document != null && node != null) {
+Node newNode = null;
+try {
+newNode = document.importNode(node, true);
+if (newNode != null) {
+try {
+Method method = 
newNode.getClass().getMethod("getDomElement");
+newNode = (Element)method.invoke(newNode);
+} catch (java.lang.NoSuchMethodException ex) {
+// do nothing;
+}
+}
+
elem.getOwnerDocument().getDocumentElement().getFirstChild().
+getNextSibling().replaceChild(newNode, node);
+} catch (Exception ex) {
+//just to the best try
+}
+
+}
+
+}
+}
+
+>>> 0b7b183... NPE fix
 private void configureAudienceRestriction(SoapMessage msg, RequestData 
reqData) {
 // Add Audience Restrictions for SAML
 boolean enableAudienceRestriction = 



cxf git commit: NPE fix

2017-04-20 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master 1f7241ba6 -> 0b7b18333


NPE fix


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

Branch: refs/heads/master
Commit: 0b7b18333591d6bb8e0bfcf324bbdefaa8cce21d
Parents: 1f7241b
Author: Colm O hEigeartaigh 
Authored: Thu Apr 20 10:26:02 2017 +0100
Committer: Colm O hEigeartaigh 
Committed: Thu Apr 20 10:26:24 2017 +0100

--
 .../apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java  | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/0b7b1833/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
index 686a66d..74227b4 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
@@ -161,7 +161,7 @@ public class WSS4JInInterceptor extends 
AbstractWSS4JInterceptor {
 }
 
 public void handleMessage(SoapMessage msg) throws Fault {
-if (msg.containsKey(SECURITY_PROCESSED) || isGET(msg)) {
+if (msg.containsKey(SECURITY_PROCESSED) || isGET(msg) || 
msg.getExchange() == null) {
 return;
 }
 
@@ -293,7 +293,7 @@ public class WSS4JInInterceptor extends 
AbstractWSS4JInterceptor {
 }
 
 checkActions(msg, reqData, wsResult.getResults(), actions, 
SAAJUtils.getBody(doc));
-   
+
 doResults(
 msg, actor,
 header,
@@ -370,16 +370,16 @@ public class WSS4JInInterceptor extends 
AbstractWSS4JInterceptor {
 newNode = (Element)method.invoke(newNode);
 } catch (java.lang.NoSuchMethodException ex) {
 // do nothing;
-} 
+}
 }
 
elem.getOwnerDocument().getDocumentElement().getFirstChild().
 getNextSibling().replaceChild(newNode, node);
 } catch (Exception ex) {
 //just to the best try
 }
-
+
 }
-
+
 }
 }
 



cxf git commit: [CXF-6778] reset cached destination without using excception listener as it is not always available

2017-04-20 Thread cschneider
Repository: cxf
Updated Branches:
  refs/heads/master be99c5301 -> 1f7241ba6


[CXF-6778] reset cached destination without using excception listener as it is 
not always available


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

Branch: refs/heads/master
Commit: 1f7241ba6017f1496e9b8aadec5c807ed05e63b4
Parents: be99c53
Author: Christian Schneider 
Authored: Wed Apr 19 16:41:27 2017 +0200
Committer: Christian Schneider 
Committed: Wed Apr 19 21:32:49 2017 +0200

--
 .../main/java/org/apache/cxf/transport/jms/JMSConduit.java   | 1 +
 .../main/java/org/apache/cxf/transport/jms/JMSFactory.java   | 8 
 2 files changed, 1 insertion(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/1f7241ba/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
--
diff --git 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
index 1c432e3..2654353 100644
--- 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
+++ 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
@@ -148,6 +148,7 @@ public class JMSConduit extends AbstractConduit implements 
JMSExchangeSender, Me
 // Close connection so it will be refreshed on next try
 ResourceCloser.close(connection);
 this.connection = null;
+jmsConfig.resetCachedReplyDestination();
 this.staticReplyDestination = null;
 if (this.jmsListener != null) {
 this.jmsListener.shutdown();

http://git-wip-us.apache.org/repos/asf/cxf/blob/1f7241ba/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
--
diff --git 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
index e8ebc29..26fea0d 100644
--- 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
+++ 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
@@ -23,7 +23,6 @@ import java.util.concurrent.Executors;
 
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
-import javax.jms.ExceptionListener;
 import javax.jms.JMSException;
 
 import org.apache.cxf.Bus;
@@ -87,13 +86,6 @@ public final class JMSFactory {
 if (jmsConfig.getDurableSubscriptionClientId() != null) {
 connection.setClientID(jmsConfig.getDurableSubscriptionClientId());
 }
-connection.setExceptionListener(new ExceptionListener() {
-
-@Override
-public void onException(JMSException exception) {
-jmsConfig.resetCachedReplyDestination();
-}
-});
 return connection;
 }