[jira] [Commented] (CXF-6900) invalid signature in case of soap fault
[ https://issues.apache.org/jira/browse/CXF-6900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15311987#comment-15311987 ] Colm O hEigeartaigh commented on CXF-6900: -- Great, thanks for the confirmation. Yes we normally release every 2 months or so, so a 3.1.7 release is overdue. > invalid signature in case of soap fault > --- > > Key: CXF-6900 > URL: https://issues.apache.org/jira/browse/CXF-6900 > Project: CXF > Issue Type: Bug > Components: WS-* Components >Affects Versions: 3.0.3 > Environment: windows 2008 jdk 1.6.0_45 >Reporter: david leruse >Assignee: Colm O hEigeartaigh > Fix For: 3.1.7 > > Attachments: server7.log > > > Hello, > Having signature verification problems on the cxf client-side with a .NET > Ws-fed protected webservice, I ask you a little help... > Here is a summary of the problem : > Most of the time, communication works well excepted when we got a soap fault > message. > Indeed signature validation works usually well excepted when > we receive a fault message inside the body of the soap message. Even In this > boundary case, signature verification works well excepted for one element, > the fault message (see the enclosed server7.log file). > After digging a bit, i've found that the calculated digest couldn't be equal > to the claimed one because the content of the message given to the > DigesterOutpustrream is not well canonicalized or normalized. > Partial decrypted msg > ... > >xmlns="http://www.w3.org/2003/05/soap-envelope";>DataNotFoundFault xml:lang="nl-BE">ContextContactInfo with Id '1' does not > exist. xmlns="http://schemas.riziv.fgov.be/contact/2015/08/faults"; > xmlns:i="http://www.w3.org/2001/XMLSchema-instance";>ContextContactInfoNotFoundContextContactInfo > with Id '1' does not exist. > > ... > Predigested input : > http://www.w3.org/2003/05/soap-envelope"; > xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; > u:Id="_3"> xmlns="http://www.w3.org/2003/05/soap-envelope";>DataNotFoundFault xmlns="http://www.w3.org/2003/05/soap-envelope";> xml:lang="nl-BE">ContextContactInfo with Id '1' does not > exist. xmlns="http://schemas.riziv.fgov.be/contact/2015/08/faults";>ContextContactInfoNotFoundContextContactInfo > with Id '1' does not > exist. > Could you please check this problem and give me an advice ? > The library used are : > cxf 3.0.3 > wss4j 2.0.2 > xmlsec 2.0.2 > on a jdk 1.6.0_45 > Thanks in advance > David L -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CXF-6928) PhaseInterceptorChain.getCurrentMessage.get() for HttpServletRequest, doesnt get the ServletRequest in WAS 8.5.5.7
Maruthi Shanmugam created CXF-6928: -- Summary: PhaseInterceptorChain.getCurrentMessage.get() for HttpServletRequest, doesnt get the ServletRequest in WAS 8.5.5.7 Key: CXF-6928 URL: https://issues.apache.org/jira/browse/CXF-6928 Project: CXF Issue Type: Bug Components: JAX-RS Affects Versions: 2.7.16 Environment: Production Reporter: Maruthi Shanmugam In Websphere Application Server 8.5.5.7 , PhaseInterceptorChain.getCurrentmessage is not returning the Request parameters on the HttpServletRequest, its returing an empty parameter map. This issue is happening only in WAS 8.5.5.7 and rest all app servers the code works fine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CXF-6929) Request hangs when using JAX-RS AsyncResponse and Exception mapper
Florian Diebold created CXF-6929: Summary: Request hangs when using JAX-RS AsyncResponse and Exception mapper Key: CXF-6929 URL: https://issues.apache.org/jira/browse/CXF-6929 Project: CXF Issue Type: Bug Reporter: Florian Diebold I have a JAX-RS resource which takes an AsyncResponse, but immediately throws an exception before returning from the function. If the exception is then mapped by an ExceptionMapper, the response seems to be never sent, and the request hangs. Am I doing something wrong? Example code: {code} import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.container.AsyncResponse; import javax.ws.rs.container.Suspended; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; import org.apache.commons.lang.NotImplementedException; import org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; public class ServerDemo2 { public static void main( final String[] args ) throws Exception { final Server server = new Server(); final ServerConnector connector = new ServerConnector( server ); connector.setHost( "localhost" ); connector.setPort( ); server.setConnectors( new Connector[] { connector } ); final ServletContextHandler handler = new ServletContextHandler(); final ServletHolder holder = new ServletHolder( CXFNonSpringJaxrsServlet.class ); holder.setInitParameter( "jaxrs.serviceClasses", Resource.class.getName() ); holder.setInitParameter( "jaxrs.providers", Mapper.class.getName() ); handler.addServlet( holder, "/*" ); server.setHandler( handler ); server.start(); System.in.read(); server.stop(); } public static class Mapper implements ExceptionMapper { @Override public Response toResponse( final NotImplementedException exception ) { exception.printStackTrace(); return Response.ok().build(); } } @Path( "/" ) public static class Resource { @GET @Path( "/foo" ) @Produces( "text/plain" ) public void foo( @Suspended final AsyncResponse response ) { throw new NotImplementedException( "foo" ); } @GET @Path( "/bar" ) @Produces( "text/plain" ) public void bar( @Suspended final AsyncResponse response ) { throw new RuntimeException( "bar" ); } } } {code} curl localhost:/foo hangs forever; curl localhost:/bar does not. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CXF-6930) Race-Condition with JMS-transport, LoggingInInterceptor spoils the payload while logging it
Tobias Schöneberg created CXF-6930: -- Summary: Race-Condition with JMS-transport, LoggingInInterceptor spoils the payload while logging it Key: CXF-6930 URL: https://issues.apache.org/jira/browse/CXF-6930 Project: CXF Issue Type: Bug Components: JMS Affects Versions: 3.1.6 Reporter: Tobias Schöneberg Hi, I think we stumbled over a problem with cxf and the JMS-transport, if the {{LoggingFeature}} is used to log incoming response messages. The problem is that sometimes, {{ClientProxyImpl.invoke(...)}} returns {{null}}, but from the logged message payload, it's clear that there is a not-null response payload coming from the sever. I believe, I just figured out that it is in fact the logging of that very payload which causes {{ClientProxyImpl.invoke(...)}} to return {{null}}. How? There is a race between the actual "client thread" which waited for the server's response (i.e. {{exchange.wait()}} in {{JMSConduit.sendAndReceiveMessage(...)}} ) until notified by the ActiveMQ Session Task thread (i.e. {{exchange.notifyAll()}} in {{JMSConduit.processReplyMessage(...)}} ) one one side and the ActiveMQ Session Task thread itself on the other side. Once the client thread is notified, it goes on with {{preProcessResult(...)}} and {{handleResponse(...)}} and somewhere in there the message's {{ByteArrayStream}} is read and the return object is created. However, at the same time, back in the ActiveMQ thread, the interceptor chain is run. In my case it contains the {{LoggingInInterceptor}} which accesses the message's *same* {{ByteArrayInputStream}}, in the method {{LoggingInInterceptor.logInputStream(...)}} ). Now, in {{logInputStream(...)}}, we have {code:java} IOUtils.copyAtLeast(bis, bos, limit == -1 ? Integer.MAX_VALUE : limit); bos.flush(); bis = new SequenceInputStream(bos.getInputStream(), bis); // restore the delegating input stream or the input stream if (is instanceof DelegatingInputStream) { ((DelegatingInputStream)is).setInputStream(bis); } else { message.setContent(InputStream.class, bis); } {code} My problem happens if the client thread tries to read the message while "{{bis}}" was read, but not yet restored. During that time, "{{bis}}" is closed for the in the client thread and it will skip over it (or throw an Exception, based on its config). My current best and maybe naive guess on how to solve this is to change the method {{JMSConduit.processReplyMessage(...)}} and execute the if-block around {{exchange.notifyAll();}} only after the if-block around {{incomingObserver.onMessage(exchange.getInMessage());}} WDYT? Best reagards Tobias -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CXF-6928) PhaseInterceptorChain.getCurrentMessage.get() for HttpServletRequest, doesnt get the ServletRequest in WAS 8.5.5.7
[ https://issues.apache.org/jira/browse/CXF-6928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15313172#comment-15313172 ] Sergey Beryozkin commented on CXF-6928: --- Well, unlikely any of us will have a chance to reproduce it on WAS and WAS 8.5.5.7 in particular, but also note that CXF 2.7.x is no longer supported. Please try CXF 3.0.9, I vaguely recall doing some more work about HttpServletRequest parameter maps. So try CXF 3.0.9 which is Java 6 compatible first and let us know if it helps > PhaseInterceptorChain.getCurrentMessage.get() for HttpServletRequest, doesnt > get the ServletRequest in WAS 8.5.5.7 > -- > > Key: CXF-6928 > URL: https://issues.apache.org/jira/browse/CXF-6928 > Project: CXF > Issue Type: Bug > Components: JAX-RS >Affects Versions: 2.7.16 > Environment: Production >Reporter: Maruthi Shanmugam > > In Websphere Application Server 8.5.5.7 , > PhaseInterceptorChain.getCurrentmessage is not returning the Request > parameters on the HttpServletRequest, its returing an empty parameter map. > This issue is happening only in WAS 8.5.5.7 and rest all app servers the code > works fine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (CXF-6928) PhaseInterceptorChain.getCurrentMessage.get() for HttpServletRequest, doesnt get the ServletRequest in WAS 8.5.5.7
[ https://issues.apache.org/jira/browse/CXF-6928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Beryozkin resolved CXF-6928. --- Resolution: Implemented Assignee: Sergey Beryozkin I'll mark as Implemented assuming you are going to target the latest CXF 3.0.9 or 3.0.10. Please reopen if testing with CXF 3.0.9/3.0.10 won't help > PhaseInterceptorChain.getCurrentMessage.get() for HttpServletRequest, doesnt > get the ServletRequest in WAS 8.5.5.7 > -- > > Key: CXF-6928 > URL: https://issues.apache.org/jira/browse/CXF-6928 > Project: CXF > Issue Type: Bug > Components: JAX-RS >Affects Versions: 2.7.16 > Environment: Production >Reporter: Maruthi Shanmugam >Assignee: Sergey Beryozkin > > In Websphere Application Server 8.5.5.7 , > PhaseInterceptorChain.getCurrentmessage is not returning the Request > parameters on the HttpServletRequest, its returing an empty parameter map. > This issue is happening only in WAS 8.5.5.7 and rest all app servers the code > works fine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)