We are building a big gwt app with lots of JavaEE elements..
Our structure so far contains the following:
- GWT
- TomEE/Tomcat as servlet container
- OpenEJB (JPA, JTA)
We thought about JAAS for our security layer, because then we do not have to reinvent the wheel again and TomEE supports that already.
My big question is: What is the best way to use Jaas within GWT?
The problem is, that Jaas thinks of servlets and routes and is good if you have an MVC approach. But what if we had just one big servlet, our GWT app, which uses places/activities inside and doesnt act like Jaas thinks?
Possible approaches:
- Multiple entrypoints in GWT:
- One entrypoint for Login, may use self-implemented LoginModule
- One entrypoint for the app itself, this should be secured
- Multiple modules / module configurations
- more modules, one entrypoint for each
- secure routes in servlet?
- Implement security in the app itself
- SessionService and SecurityExceptions
- implement the auth mechanisms on our own..
- Just one entrypoint and some lightweight login form, JSP maybe..
Does anyone have experiences with GWT and Jaas? What is the best-practice approach for reusable security with GWT?
Links I found so far:
some security in web.xml, but only google stuff: https://developers.google.com/appengine/docs/java/config/webxml#Security_and_Authentication
we do not want to use spring: GWT: How to download EntryPoint after authenticating?
Example with multiple modules: https://github.com/ashtonthomas/GwtAdvancedLogin/tree/master/src/com/acrinta/client/login