We have several applications deployed in Tomcat and want to add 1 application to handle authentication for all of the other applications.

All applications are defined as different host elements in Tomcat configuration (server.xml) like following example:

<Host name="loginapp.localhost" appBase="loginapp" />
<Host name="webapp1.localhost" appBase="webapp1" />
<Host name="webapp2.localhost" appBase="webapp2" />
...

How I see it theoretically working:
When a user goes to an url that points to webapp1, a request filter in the application sees that the user has not been authenticated yet and redirects to the "loginapp" where authentication happens and redirects back to webapp1 where the user now has been authenticated for (only for this specific application).

Is it possible to share data between these applications in any way or somehow access and make changes in the http session for webapp1 to make this flow work?

I hope my question is clear, else I'd like to hear your questions.

Thanks,
Nathan

Reply via email to