It is very common to have separate, but similar ACS installations, such as www.arsdigita.com and acs.arsdigita.com. As it is now, in order to use these sites you need to create a separate account on each site. Then you must remember the e-mail address and password you used for each site. You may have used the same e-mail address and password for both to make it easier to remember, but then if you ever want to change your password on one site then they'll be out of sync again.
ArsDigita, as the administrator of these two sites can use the LDAP authentication package to create "cannonical accounts" that are shared between the sites. The cannonical accounts are the authoritative source for a user's primary information such as e-mail address, password, first names, and last name. Each ACS installation (www.arsdigita.com and acs.arsdigita.com in this example) still have their own users table, but they use the LDAP authentication to keep their local user information fresh.
With LDAP Authentication enabled, when Joe User registers on www.arsdigita.com, a local entry is created as well as a canonical entry on the LDAP server. Then, when Joe tries to log into acs.arsdigita.com, the LDAP server will be queried and Joe's information will be found. Additionally, a local entry will be created on acs.arsdigita.com with Joe's info. If Joe were to change his password on acs.arsdigita.com, the password on the LDAP server would also be updated, which implicitly propagates the change to www.arsdigita.com. Finally, ArsDigita could at a later point enable LDAP Authentication on wimpy.arsdigita.com, and everyone with an account on acs.arsdigita.com/www.arsdigita.com could then log into wimpy.
...
The API to the permissions system consists of a few well-known tables, plus a pair of PL/SQL procedures and a pair of tcl functions.
acs_methods, acs_privileges, and acs_privilege_method_rules manage the set of permissions in the system. A package will add to these three tables to introduce new permissions into the system at package installation time.
The main table for queries is acs_object_party_method_map, which contains (object, party, method) triples for all allowed operations in the system.
Also of interest for queries is acs_permissions, which lists directly granted privileges. Neither acs_object_party_method_map (which is a view) nor acs_permissions should be updated directly.
acs_permissions.grant_permission introduces new permissions for an object. It should be given an (object, party, privilege) triple, and will always succeed. If the permission is already in the system, no change occurs. The interface for this procedure is:
procedure grant_permission ( object_id acs_permissions.object_id%TYPE, grantee_id acs_permissions.grantee_id%TYPE, privilege acs_permissions.privilege%TYPE );
acs_permissions.revoke_permission removes a permission entry given a triple. It always succeeds--if a permission does not exist, nothing changes. The interface for this procedure is:
procedure revoke_permission ( object_id acs_permissions.object_id%TYPE, grantee_id acs_permissions.grantee_id%TYPE, privilege acs_permissions.privilege%TYPE );
These procedures are defined in permissions-create.sql
Two tcl procedures provide a simple call for the "can this user perform this method on this object" query. One returns true or false, the other presents an error page.
To receive a true or false value, tcl code should call:
ad_permission_p $object_id $object_type $method -user_id $user_id
If the user_id argument is left out, then the currently logged in user is checked. To create an error page, tcl code should call:
ad_require_permission $object_id $object_type $method
These procedures are defined in acs-permissions-procs.tcl.
The LDAP Authentication data model contains only one table -
ldap_attributes
. This table keeps a list of LDAP attributes for
individual ACS objects. Currently there are just two columns -
object_id
and dn
. With these columns, we can map a
Distinguished Name (dn) to any ACS object in the database.
The bulk of the functionality of the LDAP data model comes from its PL/SQL functions. These functions are wrappers around Java functions that perform specific operations on the LDAP server. The functions are:
All users of the permissions system are the same at the user-interface level. If you have the administer_privileges method permission on an object, then you may edit privileges for that object with the user interface.
The user interface currently provides a list of all granted permissions on the object. If the user wishes to revoke privileges, she may select a set of grants, choose revoke, confirm their deletion, and be returned to the same page after those priviliges have been revoked.
Granting currently works by providing a list of all possible permissions and a list of all parties in the system. In the future, of course, some search mechanism is necessary. After choosing privileges to grant, the user is returned to the edit privileges for one object screen.
If it makes sense, the system will also display a checkbox which the user may select to toggle whether permissions are inherited from the object's context.
There are a number of potential future enhancements for this UI.
There are no configuration options for the permissions system.
...
The most important future changes to the system are likely to be to the user interface. Here's a list of likely changes:
Document Revision # | Action Taken, Notes | When? | By Whom? |
---|---|---|---|
0.1 | Creation | 08/30/2000 | Dennis Gregorovic |
0.2 | Revised | 09/18/2000 | Dennis Gregorovic |