| Summary: | Quickstart security_cert produces strange output on client | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise SOA Platform 5 | Reporter: | mvanek |
| Component: | Examples | Assignee: | tcunning |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 5.2.0.ER2, 5.2.0.ER3 | CC: | mvecera, tcunning |
| Target Milestone: | --- | ||
| Target Release: | 5.2.0.ER4 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://jira.jboss.org/jira/browse/SOA-3335 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-10-12 08:20:29 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
I'm not sure what is going on here. JBossRemotingGateway returns a String to the ServerInvoker, which is wrapped in a InvocationResponse, but when that gets back to the client, the HTTPUnMarshaller treats it as a String because it looks at the Content-Type and it sees text/xml;charset=UTF-8. The response we're getting back looks like a InvocationResponse object incorrectly unmarshalled. I see the same thing with previous ESB releases and jboss-5.1.0.GA. This seems like a remoting bug. org.jboss.remoting.transport.web.WebUtil.isBinary does an equalsIgnoreCase on the contentType to see if it is "application/octet-stream". If it is "application/octet-stream?charset=UTF-8" or something similar, it fails this test. HttpClientInvoker grabs the contentType from java.net.HttpURLConnection.getHeaderFields() and overwrites any value we may have placed in there. I'm not seeing a way around this without remoting making a fix. One other datapoint, if the contentType does equal application/octet-stream, this quickstart works as expected. Link: Added: This issue depends JBREM-1301 Logged JBREM-1301. Link: Added: This issue relates to JBESB-3685 cunningts-imac:product cunningt$ svn commit Sending product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpMarshaller.java Sending product/rosetta/src/org/jboss/internal/soa/esb/remoting/JBossRemotingUtil.java Sending product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java Transmitting file data ... Committed revision 37470. Change should be in ER4. Release Notes Docs Status: Added: Not Required Writer: Added: dlesage Verified in ER4. |
Affects: Interactive Demo/Tutorial project_key: SOA Try security_cert quickstart. It works according to the description, but on the client the output is somewhat strange: ---------------------------------------------------------------------------------------- saygoodbye_over_http: [echo] [echo] Invoke JBR Gateway with successful login [java] Calling JBoss Remoting Listener using locator URI: http://localhost:8765 [java] JBR Class: java.lang.String [java] Response from JBoss Remoting Listener 'http://localhost:8765' was '��ysr%org.jboss.remoting.InvocationResponsea�3tm�Z isExceptionLpayloadtLjava/util/Map;LresulttLjava/lang/Object;L sessionIdtLjava/lang/String;xpsrjava.util.HashMap���`�FloadFactorI thresholdxp?@ tResponseCodeMessagetOKt ResponseCodesrjava.lang.Integer⠤���8Ivaluexrjava.lang.Number��� ���xp�t Content-Typettext/xml; charset=ISO-8859-1xt<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:sayGoodbyeResponse xmlns:ns2="http://security_cert/goodbyeworld"><return>... Ah Goodbye then!!!! - Goodbye!!</return></ns2:sayGoodbyeResponse></soap:Body></soap:Envelope>t"3j001-ofbv3n-gs063lgw-1-gs063lha-2'. [echo] [echo] [echo] Invoke JBR Gateway with unsuccessful login [java] Calling JBoss Remoting Listener using locator URI: http://localhost:8765 [java] Call was not successful. See server.log for details. Exception was: [java] org.jboss.remoting.transport.http.WebServerError: ��ysr%org.jboss.remoting.InvocationResponsea�3tm�Z isExceptionLpayloadtLjava/util/Map;LresulttLjava/lang/Object;L sessionIdtLjava/lang/String;xpsrjava.util.HashMap���`�FloadFactorI thresholdxp?@ tResponseCodeMessaget▒Invalid Login Credentials.t ResponseCodesrjava.lang.Integer⠤���8Ivaluexrjava.lang.Number��� ���xp�t Content-Typettext/plainxt�org.jboss.soa.esb.couriers.FaultMessageException: org.jboss.soa.esb.services.security.SecurityServiceException: Exception while trying to login: at org.jboss.soa.esb.listeners.message.errors.Factory.createExceptionFromFault(Factory.java:50) at org.jboss.internal.soa.esb.couriers.helpers.JmsComposer.compose(JmsComposer.java:82) at org.jboss.internal.soa.esb.couriers.JmsCourier.pickup(JmsCourier.java:461) at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.pickup(TwoWayCourierImpl.java:228) at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.pickup(TwoWayCourierImpl.java:204) at org.jboss.soa.esb.client.ServiceInvoker$EPRInvoker.attemptDelivery(ServiceInvoker.java:675) at org.jboss.soa.esb.client.ServiceInvoker$EPRInvoker.access$200(ServiceInvoker.java:569) at org.jboss.soa.esb.client.ServiceInvoker.post(ServiceInvoker.java:359) at org.jboss.soa.esb.client.ServiceInvoker.deliverSync(ServiceInvoker.java:219) at org.jboss.soa.esb.listeners.message.UncomposedMessageDeliveryAdapter.deliverSyncWithoutDecomposing(UncomposedMessageDeliveryAdapter.java:107) at org.jboss.soa.esb.listeners.message.UncomposedMessageDeliveryAdapter.deliverSync(UncomposedMessageDeliveryAdapter.java:86) at org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener.invoke(JBossRemotingGatewayListener.java:375) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:967) at org.jboss.remoting.transport.coyote.CoyoteInvoker.service(CoyoteInvoker.java:396) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451) at java.lang.Thread.run(Thread.java:662)Caused by: org.jboss.soa.esb.services.security.SecurityServiceException: Exception while trying to login: at org.jboss.internal.soa.esb.services.security.JaasSecurityService.authenticate(JaasSecurityService.java:102) at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:549) at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:433) at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:550) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) ... 1 moreCaused by: javax.security.auth.login.LoginException: SignatureException : Signature does not match. at org.jboss.soa.esb.services.security.auth.login.CertificateLoginModule.login(CertificateLoginModule.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769) at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186) at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680) at javax.security.auth.login.LoginContext.login(LoginContext.java:579) at org.jboss.internal.soa.esb.services.security.JaasSecurityService.authenticate(JaasSecurityService.java:94) ... 6 moret"3j001-udaxx1-gs063mw0-1-gs063mw1-2 [java] at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:497) [java] at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:253) [java] at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:176) [java] at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:169) [java] at org.jboss.remoting.Client.invoke(Client.java:2070) [java] at org.jboss.remoting.Client.invoke(Client.java:879) [java] at org.jboss.remoting.Client.invoke(Client.java:867) [java] at org.jboss.soa.esb.samples.quickstart.securitycert.test.SendMessage.sendMessageToJBRListener(SendMessage.java:75) [java] at org.jboss.soa.esb.samples.quickstart.securitycert.test.SendMessage.main(SendMessage.java:115)