I have a PHP application which has an access control mechanism based on the navigation-id's of the single pages. So a user may have access to pages 1, 4, 5, for example. Navigation-id's are not static, new pages (and therefore new nav-id's) may be generated by admin-user. And I have some kind of a service oriented architecture. So I have services which are called from the client by JSON but also from server-side by PHP-classes (controllers) directly. The problem I have is, I need a access control mechanism for the services. And I'd like to have it separated from the services itself.
The services are returning business objects. All this BO's have some "connection" to an object, which has a navigation id. e.g. service returns images: Image.page-->Page.navID or service returns dimensions (n-n): Dimension-->DimImageConnector-->Image.page-->Page.navID.
I can't imagine a clean solution to check access rights. To search for a navigation-id in the business objects doesen't seem to be a very good and simple solution.
It would be nice to have some input for my access control architecture.
Thank you!
BTW: I'm using an annotation framework, so one possibility is to specify some access information right by the service method.
