[Grok-dev] security ComponentLookupError: todo.auth.PrincipalInfo object

DIVINE PAUL Paul.Divine at alcatel-lucent.com
Fri Jul 23 05:33:20 EDT 2010


Hello grokkers,

 

I use the chapter 7 on the security of the "grok 1.0" great book from
"De la Guardia".

where there is an auth.py module beginning by the following import
lines.

 

import grok

from zope.app.authentication.session import SessionCredentialsPlugin

from zope.app.authentication.interfaces import ICredentialsPlugin

from zope.app.authentication.interfaces import IAuthenticatorPlugin

from zope.app.authentication.interfaces import IPrincipalInfo

from zope.app.authentication.interfaces import IPasswordManager

 

from zope.app.security.interfaces import IAuthentication,
IUnauthenticatedPrincipal, ILogout

from zope.securitypolicy.interfaces import IPrincipalPermissionManager

from zope.securitypolicy.interfaces import IPrincipalRoleManager

from zope.app.authentication.principalfolder import InternalPrincipal

 

from zope import component

from zope.interface import Interface

from zope import schema

 

 

 

As admin I create one project, which can be accessed by 

http://xxx.xxx.xxx.xxx:xxxx/todo/0

 

As admin I create a user ("user1").

Then from one other browser I address the project with the address.

 

http://xxx.xxx.xxx.xxx:xxxx/todo/0

 

As expected the login page is displayed.

 

I enter the user "user1" with the password.

 

After the click on the button, the following lines are displayed. 

 

URL: http://xxx.xxx.xxx.xxx:xxxx/todo/%40%40login

File
'/root/.buildout/eggs/Paste-1.7.2-py2.5.egg/paste/evalexception/middlewa
re.py', line 306 in respond

  app_iter = self.application(environ, detect_start_response)

File
'/root/.buildout/eggs/zope.app.wsgi-3.6.1-py2.5.egg/zope/app/wsgi/__init
__.py', line 59 in __call__

  request = publish(request, handle_errors=handle_errors)

File
'/root/.buildout/eggs/zope.publisher-3.12.3-py2.5.egg/zope/publisher/pub
lish.py', line 131 in publish

  obj = request.traverse(obj)

File
'/root/.buildout/eggs/zope.publisher-3.12.3-py2.5.egg/zope/publisher/bro
wser.py', line 542 in traverse

  ob = super(BrowserRequest, self).traverse(obj)

File
'/root/.buildout/eggs/zope.publisher-3.12.3-py2.5.egg/zope/publisher/htt
p.py', line 459 in traverse

  ob = super(HTTPRequest, self).traverse(obj)

File
'/root/.buildout/eggs/zope.publisher-3.12.3-py2.5.egg/zope/publisher/bas
e.py', line 251 in traverse

  publication.callTraversalHooks(self, obj)

File
'/root/.buildout/eggs/zope.app.publication-3.10.2-py2.5.egg/zope/app/pub
lication/zopepublication.py', line 135 in callTraversalHooks

  self._maybePlacefullyAuthenticate(request, ob)

File
'/root/.buildout/eggs/zope.app.publication-3.10.2-py2.5.egg/zope/app/pub
lication/zopepublication.py', line 122 in _maybePlacefullyAuthenticate

  principal = auth.authenticate(request)

File
'/root/.buildout/eggs/zope.pluggableauth-1.0.1-py2.5.egg/zope/pluggablea
uth/authentication.py', line 71 in authenticate

  interfaces.IAuthenticatedPrincipalFactory)(self)

File
'/root/.buildout/eggs/zope.component-3.9.1-py2.5.egg/zope/component/_api
.py', line 111 in getMultiAdapter

  raise ComponentLookupError(objects, interface, name)

ComponentLookupError: ((<todo.auth.PrincipalInfo object at 0x414e110>, 

<zope.publisher.browser.BrowserRequest instance
URL=http://xxx.xxx.xxx.xxx:xxxx/todo>), <InterfaceClass
zope.pluggableauth.interfaces.IAuthenticatedPrincipalFactory>, u'')

 

 

Did I miss something or the code should be updated for the version 1.1
of grok?

Thanks in advance for your help.

 

Paul Divine

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/grok-dev/attachments/20100723/104a0b21/attachment-0001.html 


More information about the Grok-dev mailing list