Chapter 7. Access Control
With ideas about users and database established, we quickly run into another requirement. Many websites will want to control who has access to what. Once embarked on this route, it turns out there are many situations where access control is appropriate, and they can easily become very complex. So in this chapter we look at the most highly regarded model role based access control and find ways to implement it. The aim is to achieve a flexible and efficient implementation that can be exploited by increasingly sophisticated software. To show what is going on, the example of a file repository extension is used.
The problem
We need to design and implement a role-based access control (RBAC) system, demonstrate its use, and ensure that the system can provide:
A simple data structure
Flexible code to provide a usable RBAC interface
Efficiency so that RBAC avoids heavy overheads