• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Getting services to work with NTLM Authentication over HTTPS/SSL

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic