Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement single sign-on in my java project?

I need to implement single sign-on in my java web application which can achieve the following features: All the computer joined in my domain smb.local , after user login in the computer, and type http://localhost:8080, my application know to use the current logined user to login into my web application. So what protocal should I implement ? Or any reference ? Thanks very much !

like image 592
MemoryLeak Avatar asked Dec 17 '25 22:12

MemoryLeak


1 Answers

If you want to "automatically" extract the user's Windows credentials, one option (maybe the only one?) is NTLM. Once you've actually got the credentials, you'll need to check them against the authoritative source - Active Directory exposes details as LDAP, so most security frameworks would be able to cope with this.

I've done such a thing a few years ago with Spring Security, including deriving privileges based on Windows group membership, and it worked very well.

like image 134
Andrzej Doyle Avatar answered Dec 19 '25 14:12

Andrzej Doyle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!