I want to have authorization in my Java EE application.
Online it describes how you should define the roles in sun-web.xml. However I would like to have all my roles, and groups defined in a database table.
That means, when I access a method for my application, the request needs to be intercepted to see if the user is allowed in the role.
Do I need to
- create some kind of interceptor class that checks auth as user makes call to my web service method
- create a custom Login Module that fishes out the group and role data from the database when a user first logs on
Any pointers would be really helpful.