• 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

Transparent NTLM authentication

 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there are way to make a Java application authenticate with an NTLM proxy (such as Microsoft ISA Server or Squid) without having the password, i.e. using whatever credentials the current Windows user is logged in with?

I've heard that some native/.NET newsreaders do this (because they don't prompt for a password from the user nor do they have it in a configuration file) -- I'd love to get pointers regarding where to look for documentation etc. regarding the Windows API's I'd need to use.

Thanks.
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Google on JCIFS.

I also believe that HttpServletRequest.getRemoteUser will return you the NTLM user name...

Originally posted by Lasse Koskela:
Is there are way to make a Java application authenticate with an NTLM proxy (such as Microsoft ISA Server or Squid) without having the password, i.e. using whatever credentials the current Windows user is logged in with?

I've heard that some native/.NET newsreaders do this (because they don't prompt for a password from the user nor do they have it in a configuration file) -- I'd love to get pointers regarding where to look for documentation etc. regarding the Windows API's I'd need to use.

Thanks.

 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Mani, but JCIFS would've not helped me at all. The NTLM protocol was never an issue--there's a good implementation built into Jakarta Commons HttpClient. The issue was whether it would be possible to obtain the currently logged in Windows user's password programmatically for NTLM authentication.

Nevermind, though. Luckily (from a security point of view) that kind of a thing isn't possible.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic