This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to implement Single Sign On in a Java EE application?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

When the user (client) tries to get into the application by typing the URL, i need to get that machine's windows logged in username.

I have tried with System.getProperty("user.name") but when I access the application from some other machine(client) then this still shows username of logged in user on server. I want this is to be changed according to the client machine username every time.

And also I have tried with some javascript code, it only works on IE but we are using Firefox.

Kindly suggest the possible ways to work with all kind of browsers.

Application Details:

View: Struts
Application Framework: Spring 3.1.1
Application Server: jboss-6.1.0.Final
Server OS: CentOS 5

Thanks,
Deivaa
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The browser would need to support some sort of single sign-on mechanism like Kerberos or NTLM, and so would the remote application.
Firefox supports both Kerberos and NTLM (most browsers do), but the remote host has to be included as a trusted URI in the browser configuration.
For an intranet application this is a viable option, but for a public internet site there's not much use persuing this kind of solution.
 
Marshal
Posts: 25818
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This requirement should really only arise when it's an intranet application, anyway. Why would a server which is accessed by the general public need to know the ID which the user used to sign on to their personal computer? That crosses the spyware line in my opinion.
 
Deiva Arumugam
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Jelle Klap/Paul Clapham,

Thanks for your reply, my actual requirement is..

I am having a J2EE intranet application, in that currently I am using form authentication (getting username and password from the user) to validate the user. Now am trying to implement SSO (Single Sign On) in my application. I don’t have any idea about SSO. So that I asked above question, Kindly suggest (Sequence of steps I need to follow) me to proceed further on this.
 
Paul Clapham
Marshal
Posts: 25818
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now that's a much better question. In fact it's the question you should have asked in the first place, instead of guessing at a solution and then asking how to implement it.

So let me change your thread title, so that people will know what it is actually about.
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming your intranet already has single sign on options, step one is to figure out what is being used. Then you can look at using Spring Security to integrate. Spring Security supports a wide variety of options including CAS, Kerberos, JNDI/LDAP, Active Directory, OAuth, and OpenID.
 
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic