Using NT user id for accessing the application.

misty_rhymes
misty_rhymes used Ask the Experts™
on
Hi,

I have a requirement that goes as follows:

There would be a web-based application that would be built on weblogic application server. The web server would also be weblogic. The user would login into his NT machine and can then open the browser and type the URL to this web-based application. This applicaiton would only be accessible from intranet.

When the user types in the URL, there would be no login screen presented to the user. Instead, it is required that the user directly reaches the homepage of the application. Since, not all the users would have access to this application, there is a requirement to get this user's NT loginid and validate the same against the application users. I have been trying to use getRemoteUser() method in the request object but that always returns null. I think there would be some setting required at the web server level so that getRemoteUser() does not return null. Can anyone help please?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
NT uses Active Directory which is a form of LDAP if I am correct.

Have a look at LDAP authentication in Weblogic

Cheers,
Barry

Commented:
is it possible to somehow append

System.getProperty("user.name")

to your homepage and then retrieve it on the server end and see if the user is valid?

vemul

Commented:
Hmmm... I am sure why you would like to do this via system properties.... Normally you would do this via some sort of form-based authentication in combination with the enterprise server.
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

Commented:
Ok, what I just wrote is not very clear :-)

I am NOT sure why you would like to pass a username via system properties....

Author

Commented:
Hi Barry,

Thanks for your comments. Using the LDAP authentication would not really help me. I just need to know what settings at the web server level do I need to make to ensure that getRemoteUser() does not return null.

Hi Vemul,
I know that using system properties will work. But it is not feasible in the context that we have here.

Cheers!
Hi Misty,

You r correct that there is a setting that needs to be done at the web server level. In your web server, you have to set the authentication type appropriately. In IIS you can set the type to "Integrated Windows Authentication" and unset the "Anonymous Access". Similar settings have to be done for the web server that you are using.

Then using the request.getRemoteUser() method in your JSP should get you the desired outcome.

Regards
Sumit

Author

Commented:
Thanks Sumit_Only,

That worked !!!
Regards

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial