Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 426
  • Last Modified:

NT domain controller authentication using Java

I am using Java Servlets on an NT machine and was wondering how I could go about getting user authentication from the NT domain controller.  
0
danGynn
Asked:
danGynn
  • 3
  • 3
1 Solution
 
jhanceCommented:
It's quite unclear to me just what you are trying to do.  

If it's to authenticate a remote user against the NT user account database, you'll need to call LogonUser() from advapi32.dll to get a token for that user.  Then what you do with the token depends on what you need to accomplish.

If you need to start an application you would use CreateProcessAsUser().  If you need to access a local resource on behalf of that user, you'll need ImpersonateLoggedOnUser().

How any of this is done from a Java Servlet is beyond me, however.  I'd suspect you need to implement this as a native class or use the JNI from JDK 1.2+
0
 
danGynnAuthor Commented:
I solved the problem using the mod_ntlm module for apache.  It uses the .htaccess file and authenticates via the server.
0
 
danGynnAuthor Commented:
This question has a deletion request Pending
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
jhanceCommented:
This question no longer is pending deletion
0
 
jhanceCommented:
I'd like to point out that my answer is STILL a valid answer to you question.  The fact that you decided on a different course of action doesn't make it less valid.
0
 
danGynnAuthor Commented:
Actually, your answer did NOT answer my question.  You mentioned some windows function call, but not how you would use it from a Java servlet.  However, if you are going to cry about it, I'll give you your points.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now