[Security & JAAS/JBoss] - Ejb3 Consuming Web Services over SSL-(JBoss) issues
by dejanmr
App sever jboss-4.2.3.GA - Ejb is consuming Web services using @WebServiceRef (from another application @WebServces bean, I am not sure is it relevant).
1)I have both keystore and truststore set up in server.xml (clientauth=true)
2)Communication with Web browsers works as expected
3)Communication with java desktop application consuming web services started with anonymous wrote : -Djavax.net.ssl.keyStore ... works as expected
4)Communication works fine over HTTP. But, when I switch WSDL address to https, I got error:
anonymous wrote : ...
| SEND TLSv1 ALERT:
| [STDOUT] fatal,
| [STDOUT] description = certificate_unknown
| ...
On "client" side log files I see (-Djavax.net.debug=ssl,handshake) "server" certificates as expected, but for for some reason they do not get authenticated.
My latest tests are with running both "client" and "server" application on SAME jboss instance (so they are using the same trust/key stores, as they share server.xml), with the same result - "Client" does not trust "server" (itself?!)
Does someone have similar configuration working? Any clue what might be wrong with my setup?
If I run Jboss with:
anonymous wrote : quote:-Djavax.net.ssl.keyStore=...
I got service working. However, there are no certificates in request. The Same code triggered from desktop application brings results:
MessageContext context = wsContext.getMessageContext();
| HttpServletRequest req = (HttpServletRequest)context.get(MessageContext.SERVLET_REQUEST) ;
| X509Certificate[] certificates = (X509Certificate[]) req.getAttribute("javax.servlet.request.X509Certificate");
|
Code:
wsContext.getUserPrincipal()
fires:
anonymous wrote : No valid security context for the caller identity
1)Why should I (again) provide the very same data to Jboss start up as I did on service.xml?
2)Why is there no certificate data?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198474#4198474
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198474
15 years, 6 months
[JBoss Messaging] - New JBoss Messaging clustering
by jbabad
Hi,
We're using JBoss 5.0.0.GA with JBM 1.4.1(GA).
I have a cluster of 2 Jboss instances running on my machine - node1 and node2.
They're started as follows:
./run.sh -c node1
./run.sh -c node2 -Djboss.service.binding.set=ports-01 -Djboss.messaging.ServerPeerID=1
The nodes are clustered and using an Oracle database as the message store.
JNDI port for node1 is 1099 and for node2 is 1199
I have a simple sender and receiver programs. Sender sends 10 messages at 5 second intervals, Receiver picks them up.
When I connect the Sender to JNDI for node1 and the Receiver to JNDI for node2
then I can CTRL-C node1 (I've set the FailoveronNodeLeave to true) and the receiver still gets the messages.
BUT...
If I have both the Sender and Receiver connecting to the JNDI for node1 and then stop node1, I see errors like:
12:23:48,879 ERROR [ExceptionUtil] SessionEndpoint[ua-xp0jy3pf-1-ix4gy3pf-hm24yq-s2s2o4c5] send [2b-37djy3pf-1-ix4gy3pf-hm24yq-s2s2o4c5]
| javax.jms.JMSException: Failed to route Reference[20154309490524163]:RELIABLE to testDistributedQueue
| at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendMessage(ServerConnectionEndpoint.java:757)
| at org.jboss.jms.server.endpoint.ServerSessionEndpoint.send(ServerSessionEndpoint.java:397)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advised$SessionAdvised$send$aop(SessionAdvised.java:87)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised$send_7280680627620114891.invokeTarget(SessionAdvised$send_7280680627620114891.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
| at org.jboss.jms.server.container.SecurityAspect.handleSend(SecurityAspect.java:157)
| 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 org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised.send(SessionAdvised.java)
| at org.jboss.jms.wireformat.SessionSendRequest.serverInvoke(SessionSendRequest.java:95)
| at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
| at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:549)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
or
| 2008-12-24 13:14:02,460 WARN [org.jgroups.blocks.ConnectionTable] (OOB-17,127.0.0.1:7900) connection table is not running, discarding message to 127.0.0.1:7901
| 2008-12-24 13:14:03,384 ERROR [org.jboss.jms.client.container.ClosedInterceptor] (Thread-40) ClosedInterceptor.ClientProducerDelegate[NO_ID_SET]: method send() did not go through, the interceptor is CLOSED
| 2008-12-24 13:14:03,385 ERROR [org.jboss.messaging.core.impl.clusterconnection.MessageSucker] (Thread-40) Failed to forward message
| javax.jms.IllegalStateException: The object is closed
| at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:157)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.jms.client.delegate.ClientProducerDelegate.send(ClientProducerDelegate.java)
| at org.jboss.messaging.core.impl.clusterconnection.MessageSucker.onMessage(MessageSucker.java:269)
| at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:229)
| at org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(ClientConsumer.java:1043)
| at org.jboss.messaging.util.OrderedExecutorFactory$ChildExecutor.run(OrderedExecutorFactory.java:120)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
| at java.lang.Thread.run(Thread.java:619)
|
Any ideas would be appreciated.
Cheers,
Joseph
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198455#4198455
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198455
15 years, 6 months