I'd like to have my desktop Java application to have single sign on related to Active Directory users. In two steps, I'd like to :
- Be sure that the particular user has logged in to Windows with some user entry.
- Check out some setup information for that user from the Active Directory
With Java: Programatic Way to Determine Current Windows User I can get the name of the current Windows user but can I rely to that? I think the
System.getProperty("user.name")
won't be secure enough? ("user.name" seems to be got from environment variables, so I can't rely on that, I think?)
Question Authenticating against Active Directory with Java on Linux provides me the authentication for given name+pass but I'd like to authenticate based on the Windows logon?
For the Active Directory access, the LDAP would probably be the choise?
I'm not totally sure if I'm asking the right questions but hopefully somebody has some ideas to forward me on.
Project Waffle has both client and server-side code to do SSO on Windows. It's JNA-based, no native libraries required.
This article from Sun, and this open source library might be able to get you what you need.