We need to implement authorization rules like below.
If user is a Super Admin, then give him all customers information. like order information. If user is a Customer Admin, only provide him own customer information. Etc.
We are planning to implement the filtration at DAO layer.
What could suggestion for creating a generic design to handle this scenario ? Assume that our application already has a DB model for RBAC(role based authorization control). We are open for any DAO technology, like JPA or iBATIS or native queries etc.
Highlevel acceptance criteria is Authorization policies should be configurable and can be changed at runtime. Example: If Customer admin can see self data, in future rule can be changed to allow them to see self and friends data.
We evaluated authorization policy like XACML, did not like to implement it because of its complexity. We are planning to write a home-grown solution. Any suggestion, please welcome.