is the process of providing access to a given resource, such as a web page, to an authenticated user. That is,
authentication is the process of identifying and entity, usually via a token such as a username/password pair,
but could equally be via a fingerprint. Authorization is the process of deciding if the authenticated entity is
allowed to have access to, or perform operations on, a given resource, such as a record from a database.
As there are two separate processes required, the Zend Framework provides two separate components:
Zend_Acl and Zend_Auth. Zend_Auth is used to identify the user and is typically used in conjunction with
Zend_Session to hold that information across multiple page requests (known as token persistence). Zend_Acl
is then uses the authentication token to provide access to private information using the Role Based Access
Control List system.
As is becoming a watchword around here, flexibility is a key design decision within the Zend_Auth
component. There are so many ways to authenticate a user that the Zend_Auth system is built with the
intention that the user will provide their own. The most common scenario of HTTP digest authentication is
provided out of the box, but for any other method, you must create a class that extends Zend_Auth_Adapter.
Fortunately, this is not difficult as we will see in chapter 6.
As Zend_Acl is an implementation of the Role Based Access Control List system, the manual talks in lots
of abstract terms. This is because RBACL is a generic system that can provide access to anything by anyone
and so specific terms are discouraged. Hence we talk about Roles requesting access to Resources. A Role is
anything that may want to access something that is under the protection of the Zend_Acl system. Generally, for
a web application, this means that a Role is a user that has been identified using Zend_Auth. A Resource is
anything that is to be protected. This is generally a record in a database, but could equally be an image file
stored on disk. As there is such a wide type of resources, the Zend_Acl system provides for us to create our
own very simply by implementing Zend_Acl_Role_Interface within our class.
