[Zope3-dev] Pluggableauth / IPrincipalSource interface proposal

Jim Fulton jim at zope.com
Mon Jul 12 13:50:22 EDT 2004


Roger ineichen wrote:
> Hi toghether,
> 
> I think there are some methods in the interface
> IPrincipalSource missing.
> 
> We have to wo methods for to get the principal or a list of
> principals.
> 
> ----
> def getPrincipal(id):
> def getPrincipals(name):
> ----
> 
> The pluggableauth service is a local service and there should be
> also a method for to add principals.
> 
> Or is it a readonly source for principals?

I thought we discussed this before.

A principal source need not support management of principals.
For example, a principal source may be a front end to an external
user-managerment system, which provides it's own user management.

IPrincipalSource is the interface used by the pluggable auth service.
The pluggable auth service doesn't care if principals are managed or
not.  It just needs to get principal information.

> If so should we add a IWritePrincipalSource interface as 
> another base interface?

An interface for managing principals is likely to vary from principal
source to principal source.  I don;t think a standard write interface
would be useful.

> I propose to add a method setPrincipal and deletePrincipal 
> to the IPrincipalSource interface. 

No. Don't do that.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list