I work for a mid-size financial company and we are trying to adapt an API driven architecture. We are developing APIs from the ground up using JEE container and the JAX-RS API like Jersey. I'll simplify and say that we have a website where you can manage your financial accounts and personal information. So for simplicity say I have an API:
/bank/accounts
/bank/accounts/{guid}
/customers/{guid}/
I have two potential types of users that can hit these services, the customer themselves and/or customer service representative. I'm wondering if anyone would like to share insight into the best way to secure such services. Do you even have the same services to serve both types of users?
In particular how do you ensure that the data that is being requested can be returned to the user requesting the information.
I think RolesAllowed works great if the check is as simple as "does this user have access to call the API". How do you ensure that user 1 can't see user 2's data. Is there a best practice? What are others doing?
I did happen to come across this which does address what I'm thinking. This was answered in 2009, so I'm wondering if there are other alternatives 6 years later.