Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting services to work with NTLM Authentication over HTTPS/SSL

 
Simon Pink
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cannot seem to get NTLM working with SSL/HTTPS. I get the following exception:
   java.lang.NoSuchMethodException: jcifs.http.NtlmHttpURLConnection.getSSLSocketFactory()

I am using the NTLM Authentication example almost verbatim, and then used a conduit set to allow HTTPS (example to follow).

It seems that the NtlmHttpURLConnection doesn't support SSL, is there an implementation that does? Is it actually possible to use both SSL and NTLM using CXF (or any other JAX-WS implementation)? I would have thought it would be a reasonably common requirement with Sharepoint so prolific in the marketplace?



 
Simon Pink
Greenhorn
Posts: 4
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After going through the very helpful CXF and JCIFs mailing lists I found the answer to my problem, I thought I would post here in case others find it useful.

Basically, as of JDK 6 NTLM authentication is cross-platform (I love you Sun). As a result JCIF's will be stripping all HTTPConnection related code from their code base. You can also specify the username/password to use. The first attempt will use the logged in users credentials (if on windows), after which it will use the supplied username/password.

So, a complete example using HTTPS and NTLM based on the code from the Sun JDK6 Authentication page, the CXF HTTPS Example page, and the trust all manager from the trying to solve IT problems page.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic