Re: [Zope3-Users] PAU and Session Credentials

2006-01-04 Thread Florian Lindner
Am Dienstag, 3. Januar 2006 16:02 schrieb Stephan Richter:
> On Sunday 20 November 2005 16:57, Florian Lindner wrote:
> > TraversalError: (Principal(u'pre1'), 'getLogin')
> >
> > The error log information of the user:
> >
> > User:  unauthenticated, pre1, CS.User,

The log entry came from the RootErrorReportingUtility.

> Ah, there is your problem. IPrincipal does not promise to implement
> "getLogin". In fact, the login name is commonly well-protected for security
> reasons.

I assume that self.request.principal.id comes to be the same like a call to 
getLogin. Since I don't even use getLogin.

What would be your way to work around that?

>
> > pre is the prefix of my principal folder (BTW: what is the sense of this
> > prefix), 1 is the object id of my test principal, CS.User the role of the
> > principal.
>
> Because if you have several different principal folders they might
> duplicate principal names (local ids). The prefix helps to distinguish
> between the various principal folders.

Ok, I see.

Thanks,

Florian
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] PAU and Session Credentials

2006-01-03 Thread Stephan Richter
On Sunday 20 November 2005 16:57, Florian Lindner wrote:
> TraversalError: (Principal(u'pre1'), 'getLogin')
>
> The error log information of the user:
>
> User:  unauthenticated, pre1, CS.User,

Ah, there is your problem. IPrincipal does not promise to implement 
"getLogin". In fact, the login name is commonly well-protected for security 
reasons.

> pre is the prefix of my principal folder (BTW: what is the sense of this
> prefix), 1 is the object id of my test principal, CS.User the role of the
> principal.

Because if you have several different principal folders they might duplicate 
principal names (local ids). The prefix helps to distinguish between the 
various principal folders.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] PAU and Session Credentials

2005-11-27 Thread Florian Lindner
Am Freitag, 25. November 2005 00:06 schrieb Christian Lück:
> Hi Florian,
>
> Florian Lindner wrote:
> > If I try to call a page which reguired a specific permission the
> > loginForm comes up. But when I enter the login and password of the
> > Principal in the Principal Folder or a the manager principal defined on
> > creation of the instance I just get redirected to the login page again.
>
> I guess that you still have to grant permissions or a role to the
> principal. If you want to grant it globally you should login as admin
> and get to the rootfolder ("[top]"). There is a "Grant" item the ZMI
> menu. On the @@grant.html view you have to choose the right source path,
> probably
> /++etc++site/default/YourPluggableAuthentication/YourPrincipalFolder
> Yust press buttons, ZMI does the rest... :-)

I've done that:


Selected
Nothing
PrincipalFolder
Source path
/cs/++etc++site/default/PluggableAuthentication/PrincipalFolder



> > behavior before a played around with the PAU a bit now it has changed to
> > a system error:
> >
> > TraversalError: (Principal(u'pre1'), 'getLogin')
>
> Maybe it's the same error I once reported on the dev list:
> http://mail.zope.org/pipermail/zope3-dev/2005-October/016163.html
> I've not yet filed a report -- sorry to much to do at work last month.

I don't know if it is the same... I'm still stuck with this SystemError...


Florian
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] PAU and Session Credentials

2005-11-24 Thread Christian Lück
Hi Florian,

Florian Lindner wrote:
> If I try to call a page which reguired a specific permission the loginForm 
> comes up. But when I enter the login and password of the Principal in the 
> Principal Folder or a the manager principal defined on creation of the 
> instance I just get redirected to the login page again.

I guess that you still have to grant permissions or a role to the
principal. If you want to grant it globally you should login as admin
and get to the rootfolder ("[top]"). There is a "Grant" item the ZMI
menu. On the @@grant.html view you have to choose the right source path,
probably
/++etc++site/default/YourPluggableAuthentication/YourPrincipalFolder
Yust press buttons, ZMI does the rest... :-)


> behavior before a played around with the PAU a bit now it has changed to a 
> system error:
> 
> TraversalError: (Principal(u'pre1'), 'getLogin')
> 

Maybe it's the same error I once reported on the dev list:
http://mail.zope.org/pipermail/zope3-dev/2005-October/016163.html
I've not yet filed a report -- sorry to much to do at work last month.

Regards,
Christian
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] PAU and Session Credentials

2005-11-24 Thread Florian Lindner
Am Sonntag, 20. November 2005 22:57 schrieb Florian Lindner:
> Hello,
> I've created and registered a PluggableAuthentication in my site. I've
> added two plugins: PrincipalFolder and SessionCredentialsPlugin and
> registered both. I've configured the PAU to use these plugins. In the
> principal folder I've created a Principal. I've also created a
> loginForm.html that looks like that:
>
[...]

No one got a idea how to make the principal folder working?

Thanks,

Florian
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] PAU and Session Credentials

2005-11-20 Thread Florian Lindner
Hello,
I've created and registered a PluggableAuthentication in my site. I've added 
two plugins: PrincipalFolder and SessionCredentialsPlugin and registered 
both. I've configured the PAU to use these plugins. In the principal folder 
I've created a Principal. I've also created a loginForm.html that looks like 
that:



  
  

  



If I try to call a page which reguired a specific permission the loginForm 
comes up. But when I enter the login and password of the Principal in the 
Principal Folder or a the manager principal defined on creation of the 
instance I just get redirected to the login page again. This now was the 
behavior before a played around with the PAU a bit now it has changed to a 
system error:

TraversalError: (Principal(u'pre1'), 'getLogin')

The error log information of the user:

User:  unauthenticated, pre1, CS.User,

pre is the prefix of my principal folder (BTW: what is the sense of this 
prefix), 1 is the object id of my test principal, CS.User the role of the 
principal.

I've been stepping in the session credentials plugin code and I see that the 
login and password date is extracted correctly.

Somehow I'm still confused how everything is supposed to work... 

Thanks,

Florian

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users