PDA

View Full Version : Sparklr2 with self signed ssl cert



kkrikor
Oct 27th, 2010, 07:44 AM
Hello,

I am experimenting with the tonr2 & sparklr2 libraries :: I created the following setup
- Created an app similar to sparklr2, deployed on machine A under tomcat with a self signed cert.
- Tonr2 still same but now has a tab that points to new app. Tonr2 sits on a different machine.

When I use http everything works fine. When i switch the URLs inside tonr2 to https and the tonr2 hits this line


InputStream photosXML = new ByteArrayInputStream(getSparklrRestTemplate().getF orObject(URI.create(getSparklrPhotoListURL()), byte[].class));


Going through the debugger i see the following


org.springframework.security.oauth2.consumer.OAuth 2AccessTokenRequiredException: No OAuth 2 security context has been established. Unable to access resource 'app'.

The resource object contains
accessTokenUri:https://192.168.15.100:8443/app/oauth/authorize


I don't see any exceptions being thrown in tonr2 console. Am I missing anything ?

Thank you

stoicflame
Oct 27th, 2010, 05:44 PM
So is the root problem the OAuth2AccessTokenRequiredException? If so, can you verify that the request passes through the oauth 2 context filter?

kkrikor
Oct 27th, 2010, 07:07 PM
The root cause of the problem was the self signed certificate that I was using. For some reason I don't think that error is bubbling up all the way to the top.

Used this recommendation to fix the issue:
http://www.webapper.com/blog/index.php/2007/02/09/troubleshooting-javaxnetsslsslhandshakeexception/

Thank you