How can I achieve user auth on Jersey 1.18 under Tomcat6?
Tomcat6 use Realms (cannot be used for now) or Servlets (with dispatcher logic if user can call URI or not).
Jersey has ServletContainer with filters, but I can't find any for this goal.
What I need is:
- Retrieve user name (httpReq.getRemoteUser())
- Load user role from DB
- Check access for URI by user role and throw 401
With which Class/Jersey.Filter/Jersey.Servlet can be step 3 processed?
I am really sorry, Realms are very handfull, but this server has own Realm modul and for security reasons it cannot be reimplemented. I am worry about using Http Servlets because of Jersey Servlet Container existence.
Thanks for your advices ;-)