-
1. Re: How to enable HTTPS?
starksm64 Nov 10, 2004 7:02 AM (in response to surak)Thanks!
I got it working!
But there is a tiny problem...
Am trying to connect to my servlet using https and apache XML RPC which uses URLConnection but I get an exception look below...
What I want to do is write a service that will use apache XML rpc, which essentially uses URLConnection...
I also wrote a temporary servlet and hosted it on the same JBoss server.
I have the service connect to localhost which works fine... But I want to use https. Eventually the service will connect externally...
So how can I get the URLConnection used by apache XML RPC to trust the self signed certificate?
Thanks
12:03:23,421 INFO [STDOUT] java.io.IOException: sun.security.validator.ValidatorException: No trusted certificate found
12:03:23,421 INFO [STDOUT] at org.apache.xmlrpc.XmlRpcClient$Worker.execute
(XmlRpcClient.java:444)
12:03:23,421 INFO [STDOUT] at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpc
Client.java:163)
12:03:23,421 INFO [STDOUT] at org.tmi.TestService.startService(TestService.
java:50)
12:03:23,421 INFO [STDOUT] at org.jboss.system.ServiceMBeanSupport.jbossInt
ernalStart(ServiceMBeanSupport.java:271)
12:03:23,421 INFO [STDOUT] at org.jboss.system.ServiceMBeanSupport.jbossInt
ernalLifecycle(ServiceMBeanSupport.java:221)
12:03:23,421 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor2.invoke(U
nknown Source)
12:03:23,421 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invo
ke(DelegatingMethodAccessorImpl.java:25)
12:03:23,421 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:3
24)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.
invoke(ReflectedDispatcher.java:141)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invoc
ation.java:80)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.interceptor.AbstractInterceptor.
invoke(AbstractInterceptor.java:119)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocat
ion.java:74)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.interceptor.ModelMBeanOperationI
nterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocat
ion.java:74)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invo
ke(AbstractMBeanInvoker.java:242)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MB
eanServerImpl.java:642)
12:03:23,421 INFO [STDOUT] at org.jboss.system.ServiceController$ServicePro
xy.invoke(ServiceController.java:891)
12:03:23,421 INFO [STDOUT] at $Proxy0.start(Unknown Source)
12:03:23,421 INFO [STDOUT] at org.jboss.system.ServiceController.start(Serv
iceController.java:416)
12:03:23,421 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor6.invoke(U
nknown Source)
12:03:23,421 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invo
ke(DelegatingMethodAccessorImpl.java:25)
12:03:23,421 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:3
24)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.
invoke(ReflectedDispatcher.java:141)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invoc
ation.java:80)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocat
ion.java:72)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invo
ke(AbstractMBeanInvoker.java:242)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MB
eanServerImpl.java:642)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanP
roxyExt.java:176)
12:03:23,421 INFO [STDOUT] at $Proxy4.start(Unknown Source)
12:03:23,421 INFO [STDOUT] at org.jboss.deployment.SARDeployer.start(SARDep
loyer.java:261)
12:03:23,421 INFO [STDOUT] at org.jboss.deployment.MainDeployer.start(MainD
eployer.java:935)
12:03:23,421 INFO [STDOUT] at org.jboss.deployment.MainDeployer.deploy(Main
Deployer.java:746)
12:03:23,421 INFO [STDOUT] at org.jboss.deployment.MainDeployer.deploy(Main
Deployer.java:709)
12:03:23,421 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor30.invoke(
Unknown Source)
12:03:23,421 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invo
ke(DelegatingMethodAccessorImpl.java:25)
12:03:23,421 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:3
24)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.
invoke(ReflectedDispatcher.java:141)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invoc
ation.java:80)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.interceptor.AbstractInterceptor.
invoke(AbstractInterceptor.java:119)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocat
ion.java:74)
12:03:23,421 INFO [STDOUT] at org.jboss.mx.interceptor.ModelMBeanOperationI
nterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
12:03:23,437 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocat
ion.java:74)
12:03:23,437 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invo
ke(AbstractMBeanInvoker.java:242)
12:03:23,452 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MB
eanServerImpl.java:642)
12:03:23,452 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanP
roxyExt.java:176)
12:03:23,452 INFO [STDOUT] at $Proxy8.deploy(Unknown Source)
12:03:23,452 INFO [STDOUT] at org.jboss.deployment.scanner.URLDeploymentSca
nner.deploy(URLDeploymentScanner.java:305)
12:03:23,452 INFO [STDOUT] at org.jboss.deployment.scanner.URLDeploymentSca
nner.scan(URLDeploymentScanner.java:481)
12:03:23,452 INFO [STDOUT] at org.jboss.deployment.scanner.AbstractDeployme
ntScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
12:03:23,452 INFO [STDOUT] at org.jboss.deployment.scanner.AbstractDeployme
ntScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
12:03:23,452 INFO [STDOUT] at org.jboss.deployment.scanner.AbstractDeployme
ntScanner$ScannerThread.run(AbstractDeploymentScanner.java:194) -
2. Re: principal=null even if request.getUserPrincipal() does n
tschraepen Nov 10, 2004 7:17 AM (in response to surak)Hi Surak,
I've been trolling through several posts lately to find a solution to another problem and your problem rung a bell.
I suggest you take a look at this topic then: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=38229.
Hope that works out for you as well. -
3. Re: principal=null even if request.getUserPrincipal() does n
surak Nov 10, 2004 8:37 AM (in response to surak)Hi tschraepen,
Thanks for the link, but I´m afraid it did not help me this time (had been helped by it before when I hadn´t specified the ClientLoginModule in my security-domain.)
But now I´m using the same domain from the weblayer as I have been using in my EJBs and MBeans. And if I do a similar "manual" aas-login in the StrutsAction as I do in my MBeans and thereafter try to create and use the EJB from the StrutsAction it works like a charm.
So what is the difference if I´m logged in manually and if I´m logged in using the magic servlet j_security_check-thingie? -
4. Re: principal=null even if request.getUserPrincipal() does n
surak Nov 11, 2004 3:18 AM (in response to surak)If I reload the page it seems like everything works fine. So it is only the first time when
I try to access a resource without being logged in that the Exception occurs.
When already being logged in I can load the page without any problems what so ever as many times as I want.
Quite weird, has anyone encountered this before? -
5. Re: principal=null even if request.getUserPrincipal() does n
j_ri Dec 3, 2004 2:37 AM (in response to surak)Hi Surak,
I have exactly the same problem. It would be great if you found a solution and can tell me how it works.
It is very strange that I am able to create an ejb after I click refresh on the browser when I get the security exception?!
Thanks -
6. Re: principal=null even if request.getUserPrincipal() does n
pytaghoras Feb 8, 2005 4:29 AM (in response to surak)I have the some problem. Can somebody tell me what is the solution?
Thank you! -
7. Re: principal=null even if request.getUserPrincipal() does n
j_ri Feb 8, 2005 4:34 AM (in response to surak)yes, the solution is quite easy;-)
just update your JBoss version from 4.0.0 to 4.0.1.....
I hope this solves your problem, too
regards
jochen -
8. Re: principal=null even if request.getUserPrincipal() does n
pytaghoras Feb 8, 2005 10:40 AM (in response to surak)Hello j_ri,
I use jboss-4.0.1RC1. I still have the some problem. Do you know how i can solve the problem?
Regards,
Pyta. -
9. Re: principal=null even if request.getUserPrincipal() does n
bamajob.nl Feb 8, 2005 4:17 PM (in response to surak)I think it is a bug in Jboss. I have the someproblem. After authentication IsUserInRole always returns false.