httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad Nicholes" <>
Subject Merging branch authz-dev - Authorization and Access Control 2.3 vs. 2.2
Date Fri, 06 Jan 2006 23:56:39 GMT
   The Authz refactoring in /branch/authz-dev is basically done and I am
about ready to  merge the branch back into trunk.  Before I do that, I
would like to describe the impact  that the Authz change will have going
forward, as well as the benefits.  All of this  looks like a massive
change to authorization and access control, which granted it is.  
However, I have tried as much as possible to minimize the impact to
existing  configuration files.  For example, existing authentication and
authorization configurations such as the following will continue to load
and work properly:

<Directory /webpages/secure>
    AuthType Basic
    AuthName LDAP_Protected_Place
    AuthBasicProvider file ldap
    AuthBasicAuthoritative Off
    AuthUserFile /apconf.d/usrfile.usr
    AuthGroupFile /apconf.d/grpfile.grp
    AuthLDAPURL "ldap://ldap-server/o=ctx"
    require ldap-group cn=public-users,o=ctx
    require group mygroup

The only problem is in the attempted use of the directives which no
longer exist as  stated in the "Issues:" section below.  For example the
following changes would have to  be made:

<Directory /foo>
  Order Allow,Deny
  Allow from all

LoadModule authz_core_module modules/
LoadModule authz_host_module modules/

<Directory /foo>
  Require all granted


<Directory /foo>
  Order Deny,Allow
  Deny from 192.168.0
  Allow from 

<Directory /foo>
  Reject IP 192.168.0
  Require Host 

Basically here is a list of what has been done:
- Convert all of the authz modules from hook based to provider based
- Remove the ap_requires field from the core_dir_config structure
- Remove the function ap_requires() since its functionality is no
longer supported or necessary in the refactoring
- Remove the calls to ap_some_auth_required() in the core request
handling to allow the  hooks to be called in all cases.
- Add the new module mod_authz_core which will act as the authorization
provider vector and contain common authz directives such as 'Require',
'Reject' and  '<RequireAlias>'
- Add the new module mod_authn_core which will contain common
authentication directives such as 'AuthType', 'AuthName' and
- Move the check for METHOD_MASK out of the authz providers and into
the authz_core provider vector
- Define the status codes that can be returned by the authz providers
- Remove the 'Satisfy' directive 
- Implement the '<RequireAll>', '<RequireOne>' block directives  to
handle the 'and' and 'or' logic for authorization.
- Remove the 'AuthzXXXAuthoritative' directives from all of the authz
- Implement the 'Reject' directive that will deny authorization if the
argument is true
- Fold the 'Reject' directive into the '<RequireAll>', '<RequireOne>'
- Reimplement the host based authorization functionality provided by 
'allow', 'deny' and 'order' as authz providers   
- Remove the 'allow', 'deny' and 'order' directives      
- Merge mod_authn_alias into mod_authn_core
- Add '<RequireAlias>' functionality which is similar to
'<AuthnProviderAlias>' but specific to authorization aliasing
- Remove all of the references to the 'authzxxxAuthoritative'
directives from the documentation
- Remove the 'Satisfy' directive from the documentation
- Remove 'Allow', 'Deny', 'Order' directives from the documentation
- Document '<RequireAll>', '<RequireOne>', 'Reject' directives
- Reimplement the APIs ap_auth_type(), ap_auth_name() as optional
functions and move the  actual implementation into mod_authn_core
- Reimplement the API ap_some_auth_required() as an optional function
and move the  actual implementation into mod_authz_core

Major Changes:
- Added the directives <RequireAll>, <RequireOne>, <RequireAlias>,
- Expanded the functionality of the directive 'Require' to handle all
authorization and access control
- Added the new authz providers 'env', 'ip', 'host', 'all' to handle
host-based access control
- Removed the directives 'Allow', 'Deny', 'Order', 'Satisfy',
- Removed the ap_require() API
- Moved the directives 'AuthType', 'AuthName' out of mod_core and into
- Moved the directive 'Require' out of mod_core and into
- Merged mod_authn_alias into mod_authn_core
- Renamed mod_authz_dbm authz providers from 'group' and 'file-group'
to 'dbm-group' and 'dbm-file-group'

- All authorization and access control is now handle through two
directives, 'Require' and 'Reject'
- Authorization has been expanded to allow for complex 'AND/OR' control
logic through the directives '<RequireAll>' and '<RequireOne>'
- Configuration is now much simpler and consistent across the board
- Other modules like mod_ssl and mod_proxy should be able to plug into
and take advantage of  the same provider based authorization mechanism
by implementing their own providers

- Backwards compatibility between 2.2 and 2.3 configurations will be
broken in the area  of authorization and access control due to the fact
that the directives 'allow', 'deny',  'order' and 'satisfy' have been
removed.  When moving from 2.2 to 2.3 these directives  will have to be
changed to 'Require all granted', 'Require all denied' or some variation
 of the authz host-based providers.
- Existing third party authorization modules will have to adapt to the
new structure.

For more details, take a look at

View raw message