[Zope3-dev] HEADS UP: PAU (pluggable authentication) users

Jim Fulton jim at zope.com
Tue Mar 29 18:55:22 EST 2005


Garrett Smith wrote:
> Jim Fulton wrote:
> 
>>Garrett Smith wrote:
>>
>>>So you wouldn't expect to ever migrate the use of IAuthentication in
>>>cases where logout wasn't needed?
>>
>>I'd be happy to do this eventually, but we'd need to give people
>>warning and a way to migrate.  I don't want to make it impossible for
>>X3.0 users to upgrade.
>>
>>
>>>If there is a downside to this (not sure there is), it would be
>>>confusion about when to use which interface.
>>
>>Yes, which is why it might be best to migrate eventually.
> 
> 
> This is what I meant by BBB's turning into TODOs. We're really talking
> about deferring a change for a while for the sake of backward
> compability.

But then, wouldn't they remain BBBs?

> 
>>>>>would be nice to have a working example of interface evolution, but
>>>>>it makes for complicated BBB/TODO management.
>>>>
>>>>Yup.
>>>
>>>
>>>So you're your leaning toward IAuthentication2 used in cases when we
>>>only need logout?
>>
>>I'm not really sure.
>>
>>Probably the best thing to do is to update pluggableauth to use
>>IAuthentication2 and hope for the best.  This should take care of
>>existing X3.0 installations. 
>>
>>The other problem is 3rd-party tests that create dummy auth utilities.
>>
>>Hopefully, there aren't many of those (except in my code :).
> 
> 
> I have some of these myself. The bugtracker had some.
> 
> I'd feel a little guilty about the "keep your fingers crossed" approach
> :). If the interface evolution pattern needs to be repeatable, we should
> probably get it off on the right foot.
> 
> I wonder if it's really a problem if we never upgrade to
> IAuthentication2 unless a particular API is needed. It might actually be
> less confusing to not have '2' showing up everywhere. Only people who
> care need to deal with it.

The problem is that code that wants IAuthentication2 will need to be
careful.  If it asked for an IAuthentication utility and an IAuthentication2
utility, it might get a different answer.  There could, theoretically, be
a closer IAuthentication.  Such code wold probably be better off doing
something like:

   auth = component.getUtility(IAuthentication)
   auth = IAuthentication2(auth)

at which point, we might as well have a ILogout interface that we
adapt to.

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