Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

NT authentication problem

  Asked By: Elliott    Date: Mar 02    Category: Java    Views: 811

I need to implement windows NT authentication for my application.I developed application with jsp,ejb and with struts.my application is deployed in Websphere application server. whenever my application is requested it has to validate whether the given username and password is a valid user who logged in windows currently.
I read JAAS and NTLM-JCIFS. but i couldnt get clear picture in that to implement such security. if you find any code samples or idea plz reply asap.



2 Answers Found

Answer #1    Answered By: Grady Stewart     Answered On: Mar 02

If this is going to be you own implementation, jaas  is what you need. We had this discussion before under title of "Security" in the list before, may be if you have a quick look at history of that discussion you find  it helpful.

So many samples  are out there which you can use i.e.

here is also a sample code  for you


Answer #2    Answered By: Brendan Smith     Answered On: Mar 02

This module which is only available on windows  NT and 2000 allows
users to be authenticated against an NT domain. The module will
request a username, password  and optionally domain (the domain to use
may be named in the config file) and attempt to retrieve the user's
credentials using them. Depending on settings in the config file the
returned Principals may have human readable names
(eg "administrator"), NT SID format names (eg "S-1-5-32-544") or
both. Note that if the system on which authentication  is performed is
temporarily out of contact with its PDC it will not necessarily be
able to return human readable names, but it will be able to return
SID format names.
The NTSystemLogin module is configured with an entry in the config
file like this

com.tagish.auth.win32.NTSystemLogin required returnNames=true
returnSIDs=false defaultDomain="domain";
The following parameters may be specified:
returnNames Principals with human readable names will be created
returnSIDs Principals with names in NT SID format will be created
defaultDomain Domain to authenticate against. If this is ommitted the
module will raise a TextInputCallback to request the Domain if it is
not supplied here. optional

user  logged on using this module will have a number of Principals
(actually com.tagish.auth.win32.NTPrincipal) associated with them.
There will be a USER Principal representing the user's name, a GROUP
principal for each NT group the user is a member of and a DOMAIN
Principal representing the NT Domain that authenticated the user..

Ref:- http://free.tagish.net/jaas/

Didn't find what you were looking for? Find more on NT authentication problem Or get search suggestion and latest updates.