SSO webapp: home-made or factory-made solution?
Target
I have 2 webapps (in the future can be more) on the company server. User accounts in the first are different from those for the second webapp, but I can define a mapping among them.
My aim is to allow the user to login only once and gain access for both webapps. The solution is obviously the Single sign-on. I need a SSO webapp and the other webapps must rely on it to authenticate the users. I think I'll follow this good pattern.
I work on Tomcat 7.0.
Users and mapping
- Users for webapp1 are in a DB.
- Users for webapp2 should come from a mapping of the former ones.
E.g. user 'Alice' in webapp1 corresponds to user 'Lisa' in webapp2; so the SSO should communicate that the user who has just logged in is 'Alice' to webapp1 and 'Lisa' to webapp2).
开发者_开发知识库Question
Is it better to write my home made SSO webapp or is there any useful open source webapp ready to use (also with a little customization) that can do SSO?
I also read about SAML, but I can't figure out if it's worth to implement such a protocol for my use case.
Thanks!
Use Tomcat Authentication. It includes a set of authentication modules and can be configured to allow access to configured websites. For more details see here.
At the end I realized it's better to build an home-made solution, even if you have to put attention on the security, because the task is not so hard and it's so difficult to find something that suits to my simple case without an overhead of too many features.
精彩评论