OpenID with Spring Security 3 and Google OpenID

So much information on Spring OpenID is outdated so quickly…Lots of articles and blog entries describe solutions with Spring Security 2.x which is slightly different from 3.x. I recommend sticking with the sample application at http://repo1.maven.org/maven2/org/springframework/security/spring-security-samples-openid/<your_version>/spring-security-samples-openid-<your_version>.war as a reference. Also, I found http://www.packtpub.com/article/opening-up-to-openid-with-spring-security quite helpful. One caveat though is worth mentioning here: the Spring sample […]

Using a custom SSLSocketFactory with Apache CXF

Java allows to use a custom VM-wide SSLSocketFactory implementation like so: HttpsURLConnection.setDefaultSSLSocketFactory(SSLSocketFactory). Thus, you can either implement your own SSLSocketFactory or you can configure a regular instance according to your needs/environment. You have to understand that there are probably very few use cases where this method actually really helps. Setting a static default SSLSocketFactory influences […]

Self signed certificates in Apache HttpClient

When you need to support self-signed SSL certificates in your Apache HttpClient based application you can use the contributed EasySSLProtocolSocketFactory as described in the HttpClient docs. Instead of using HttpClient’s HostConfiguration object directly you’d modify its protocol socket factory in your code like so: … if (config.isAllowSelfSignedCertificates()) { ProtocolSocketFactory factory = new EasySSLProtocolSocketFactory(); try { […]