Re: [Zope] LoginManager dlpierson example

2001-01-31 Thread Fred Yankowski

I just realized that I responded in terms of a PythonMethod when you
asked about a PythonScript.  My ZClass functions for my LoginManager
subclass are all PythonMethods, yet to be converted to Python
Scripts.  My 'authenticate' method takes (self, password, request) as
parameters and has for the function body only

return password == self.password

I suspect that an equivalent PythonScript will need to take password
and request as parameters (not so sure about 'request') and will have
a body like this:

return password == container.password

Ah, what the heck...  OK, I just converted my authenticate script as
above and it seems to still work fine.

On Wed, Jan 31, 2001 at 07:32:14PM +1300, W. Robert Kellock wrote:
 On passing 'request' (why the extra argument anyway?) I got
 
 Error Type: TypeError
 Error Value: not enough arguments; expected 3, got 2
 
 so I'm wondering have you got LoginManager to work on the Zope 2.3.0 release?

-- 
Fred Yankowski   [EMAIL PROTECTED]  tel: +1.630.879.1312
Principal Consultant www.OntoSys.com   fax: +1.630.879.1370
OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager dlpierson example

2001-01-30 Thread W. Robert Kellock




Hi,

I'm new to Zope and I've been examining the LoginManager 
example given by dlpierson (http://www.zope.org/Members/dlpierson/sqlLogin). 
Although I am nowhere near understanding what it is doing, I'm very close to 
getting it to work - I think! It looks to me like I'm falling down in the 
PythonMethods (PythonScripts) in the Member ZClass. Are PythonScript 
arguments typeless? I keep getting an error

Error Type: AttributeErrorError 
Value: 'string' object has no attribute 'password'

from the authenticate method which I'm passing 
self,password.

Strangely following this error, I can hit the back button on 
my browser and reach the protected HTML page anyway! Here is the 
traceback.Your help would be appreciated.

!--
Traceback (innermost last):
File D:\PROGRA~1\WEBSITE\lib\python\ZPublisher\Publish.py, line 
222, in publish_module
File D:\PROGRA~1\WEBSITE\lib\python\ZPublisher\Publish.py, line 
187, in publish
File D:\PROGRA~1\WEBSITE\lib\python\Zope\__init__.py, line 221, 
in zpublisher_exception_hook
(Object: Traversable)
File D:\PROGRA~1\WEBSITE\lib\python\ZPublisher\Publish.py, line 
162, in publish
File D:\PROGRA~1\WEBSITE\lib\python\ZPublisher\BaseRequest.py, 
line 444, in traverse
File 
D:\PROGRA~1\WEBSITE\lib\python\Products\LoginManager\LoginManager.py, line 237, 
in validate
(Object: ProviderContainer)
File 
D:\PROGRA~1\WEBSITE\lib\python\Products\LoginManager\LoginMethods.py, line 246, 
in findLogin
(Object: PlugInBase)
File 
D:\PROGRA~1\WEBSITE\lib\python\Shared\DC\Scripts\Bindings.py, line 324, in 
__call__
(Object: authenticate)
File 
D:\PROGRA~1\WEBSITE\lib\python\Shared\DC\Scripts\Bindings.py, line 353, in 
_bindAndExec
(Object: authenticate)
File 
D:\PROGRA~1\WEBSITE\lib\python\Products\PythonScripts\PythonScript.py, line 330, 
in _exec
(Object: authenticate)
(Info: ({'script': lt;PythonScript instance at 
01596818gt;, 'context': SMKELLOCK, 'container': SMKELLOCK, 
'traverse_subpath': []}, ('colenso9', 
lt;h3gt;formlt;/h3gt;lt;tablegt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;__ac_passwordlt;/thgt;lt;tdgt;'colenso9'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt; Log In 
lt;/thgt;lt;tdgt;' Log In 
'lt;/tdgt;lt;/trgt;lt;tr valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;__ac_namelt;/thgt;lt;tdgt;'SMKELLOCK'lt;/tdgt;lt;/trgt;lt;/tablegt;lt;h3gt;cookieslt;/h3gt;lt;tablegt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;sql_pref__colslt;/thgt;lt;tdgt;'50'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;dtpref_colslt;/thgt;lt;tdgt;'85'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;sql_pref__rowslt;/thgt;lt;tdgt;'15'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;dtpref_rowslt;/thgt;lt;tdgt;'15'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;tutorialExamplesURLlt;/thgt;lt;tdgt;'http://sharonk:8080/ZopeTutorial/examples/lesson3'lt;/tdgt;lt;/trgt;lt;/tablegt;lt;h3gt;otherlt;/h3gt;lt;tablegt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;dtpref_rowslt;/thgt;lt;tdgt;'15'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;__ac_passwordlt;/thgt;lt;tdgt;'colenso9'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;__ac_namelt;/thgt;lt;tdgt;'SMKELLOCK'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;dtpref_colslt;/thgt;lt;tdgt;'85'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;BASE3lt;/thgt;lt;tdgt;'http://sharonk:8080/FinanceNow/index_html'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;BASE2lt;/thgt;lt;tdgt;'http://sharonk:8080/FinanceNow'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;BASE1lt;/thgt;lt;tdgt;'http://sharonk:8080'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;BASE0lt;/thgt;lt;tdgt;'http://sharonk:8080'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;URL1lt;/thgt;lt;tdgt;'http://sharonk:8080/FinanceNow'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;SERVER_URLlt;/thgt;lt;tdgt;'http://sharonk:8080'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;AUTHENTICATED_USERlt;/thgt;lt;tdgt;LoggingInUserlt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;TraversalRequestNameStacklt;/thgt;lt;tdgt;[]lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;sql_pref__rowslt;/thgt;lt;tdgt;'15'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;URL2lt;/thgt;lt;tdgt;'http://sharonk:8080'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt;URL0lt;/thgt;lt;tdgt;'http://sharonk:8080/FinanceNow/index_html'lt;/tdgt;lt;/trgt;lt;tr 
valign=quot;topquot; 
align=quot;leftquot;gt;lt;thgt; Log In 
lt;/thgt;lt;tdgt;' Log In 

Re: [Zope] LoginManager dlpierson example

2001-01-30 Thread Fred Yankowski

On Wed, Jan 31, 2001 at 09:25:08AM +1300, W. Robert Kellock wrote:
 Are PythonScript arguments typeless?  I keep getting an
 error
 
 Error Type: AttributeError
 Error Value: 'string' object has no attribute 'password'
  
 from the authenticate method which I'm passing self,password.


I think you should pass (self, password, request).


-- 
Fred Yankowski   [EMAIL PROTECTED]  tel: +1.630.879.1312
Principal Consultant www.OntoSys.com   fax: +1.630.879.1370
OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager, can't get past login form

2001-01-26 Thread Fred Yankowski

Nick,

Thank you!  Installing the latest ZPatterns did the trick, exactly as
you said.  EXcellent.

But I still wish I had some way to test the pieces of the application,
or to at least trace their operation.  ZPatterns is a bit too opaque
for my taste, particularly given its complexity, unfamiliarity and
immaturity (in the sense of being new and not fully developed).

On Fri, Jan 26, 2001 at 06:12:52PM +1300, Nick McDowell wrote:
 I encountered the same problem.  I soon realized that the ZPatterns that is
 packaged with LoginManger is a version different to the one Dan Pierson
 mentions in his article.

-- 
Fred Yankowski   [EMAIL PROTECTED]  tel: +1.630.879.1312
Principal Consultant www.OntoSys.com   fax: +1.630.879.1370
OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager ...

2001-01-25 Thread mapr

Hi everybody,
I installed LoginManager-0-8-8b1 on Zope-2.2.2 by following the
install.-instructions in the HOWTO: 'LoginManager with SQL DB' by
jok. Nevertheless when I try to watch my TestFolder I get some weird
error messages, like :
Error Type: NameError
Error Value: username

 ... any hints would be appreciated.

Thanks
Mario



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager ...

2001-01-25 Thread mapr

Oops, I have forgotten to ask something:
I have heard that GenericUserFolder doesn't work under
Zope-2.2.x, is that right ?
Thanks
Mario



On Thu, 25 Jan 2001 [EMAIL PROTECTED] wrote:

 Hi everybody,
 I installed LoginManager-0-8-8b1 on Zope-2.2.2 by following the
 install.-instructions in the HOWTO: 'LoginManager with SQL DB' by
 jok. Nevertheless when I try to watch my TestFolder I get some weird
 error messages, like :
   Error Type: NameError
   Error Value: username
 
  ... any hints would be appreciated.
 
 Thanks
   Mario
 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager disrupts access to protected object above it

2001-01-21 Thread Itai Tavor

Hi,

This problem started with failure to access Control_Panel, which I 
thought was due to a SiteAccess problem... but I now tracked it to a 
problem with an instance of LoginManager.

I have the following setup:

Zope 2.3.0b2
ZPatterns 0.4.3b2
LoginManager 0.8.8b1

Zope/
 test1 (PythonScript) requires Manager to view
 folder/
 test2 (PythonScript) Manager proxy role
 acl_users (LoginManager)

test1:
 return 'spam'

test2:
 return container.test1

Calling test2 results in the traceback attached below. If I remove 
acl_users, test2 works. The LoginManager is a bit tricky, as it uses 
a virtual UserSource loading user objects from an external 
Specialist, but it seems to work in every other way. I have no idea 
if this problem is due to a bug in my LoginManager implementation or 
a general LoginManager bug.

Can anyone explain this or suggest a way to find out what is going wrong?

TIA


   AttributeError

   test1

Traceback (innermost last):
   File /opt/Zope-2.3.0b2-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 222, in publish_module
   File /opt/Zope-2.3.0b2-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 187, in publish
   File /opt/Zope-2.3.0b2-linux2-x86/lib/python/Zope/__init__.py, line 
221, in zpublisher_exception_hook
 (Object: Traversable)
   File /opt/Zope-2.3.0b2-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 171, in publish
   File /opt/Zope-2.3.0b2-linux2-x86/lib/python/ZPublisher/mapply.py, 
line 160, in mapply
 (Object: test2)
   File /opt/Zope-2.3.0b2-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 112, in call_object
 (Object: test2)
   File 
/opt/Zope-2.3.0b2-linux2-x86/lib/python/Shared/DC/Scripts/Bindings.py, 
line 325, in __call__
 (Object: test2)
   File 
/opt/Zope-2.3.0b2-linux2-x86/lib/python/Shared/DC/Scripts/Bindings.py, 
line 354, in _bindAndExec
 (Object: test2)
   File 
/opt/Zope-2.3.0b2-linux2-x86/lib/python/Products/PythonScripts/PythonScript.py, 
line 330, in _exec
 (Object: test2)
 (Info: ({'script': PythonScript instance at 8894938, 'context': 
Folder instance at 88096c8, 'container': Folder instance at 
88096c8, 'traverse_subpath': []}, (), {}, None))
   File Script (Python), line 2, in test2
   File 
/opt/Zope-2.3.0b2-linux2-x86/lib/python/Products/PythonScripts/Guarded.py, 
line 273, in __getattr__
   File 
/opt/Zope-2.3.0b2-linux2-x86/lib/python/Products/PythonScripts/Guarded.py, 
line 143, in __careful_getattr__
 (Object: Traversable)
AttributeError: (see above)
-- 
Itai Tavor"Je sautille, donc je suis."
C3Works[EMAIL PROTECTED]  - Kermit the Frog

"If you haven't got your health, you haven't got anything"


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager with SQL and Skinscript: adding properties to propertysheet propertysheet

2001-01-08 Thread Dan L. Pierson

Aaron Payne [EMAIL PROTECTED] writes:

 I am following Dan Pierson's How-To SQL LoginManager with SQL and
 Skinscript. I am not able to add properties.

You may have noticed my silence on property sheets...  At first, I
didn't expect to use them, because I expected only members to edit
their "properties" and I'm certainly not going to expose the standard
Zope management interface to them.  After going through the latest PTK
sources some more, it looks like I may try using them after all.  In
either case, the important things to remember are:

- The actual property data isn't stored in the ZClass or its property
sheets, and the Skinscript code makes the ZClass "property" attributes
have values with or without property sheets, and

- The ZClass instances are ephemeral -- nothing is expected to store
them for any length of time (though they may be cached).

 I created LoginManager:LoginUser subclassed zclass def for a user with
 a propertysheet Basic.
 
 It had properties password and email.  The LM methods I tested failed
 so I deleted the properties.  Now I want to add them again. When I try
 I get:
 
 
 for password
 Invalid property id, password. It is in use.
 for email:
 Invalid property id, email. It is in use.
 
 I also deleted the entire propertysheet and tried to add the props but
 the same error occured.
 
 
 I can add new props but not ones that were deleted earlier. Is there a
 way around this problem?

I think you'll have to delete the whole ZClass and start over :-(.
This shouldn't be too much of a pain because you shouldn't have any
instances to worry about.  If you've written custom methods, you'll
want to copy them someplace before deleting the class.

Hope this helps,

Dan Pierson





___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager and Zope 2.3

2001-01-08 Thread Austin Mayberry

Has anyone tried get the LoginManager to work with Zope 2.3a1?  When I
try the LoginManager product is broken with error message:

LoginManager Import Traceback

Traceback (innermost last):
  File "/usr/lib/Zope-2.3.0a1-src/lib/python/OFS/Application.py", line
405, in import_products
product=__import__(pname, global_dict, global_dict, silly)
  File
"/usr/lib/Zope-2.3.0a1-src/lib/python/Products/LoginManager/__init__.py",
line 1, in ?
import LoginManager, LoginMethods, UserSources
  File
"/usr/lib/Zope-2.3.0a1-src/lib/python/Products/LoginManager/LoginManager.py",
line 114, in ?
from AccessControl.User import _remote_user_mode, Super
ImportError: cannot import name Super


Thanks,
Austin Mayberry

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager and Zope 2.3

2001-01-08 Thread Shane Hathaway

Austin Mayberry wrote:
 
 Has anyone tried get the LoginManager to work with Zope 2.3a1?  When I
 try the LoginManager product is broken with error message:

LoginManager 0.8.6 seems to work fine.  0.8.8b1 tries to use a class in
User.py that no longer exists.  In fact, it does things that are
probably outside the realm of a "user folder" product and might be more
appropriate as a different product.  I don't know about 0.8.7.

I could fix LoginManager easily but the author might fix it a different
way.

Shane

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager and Zope 2.3

2001-01-08 Thread Austin Mayberry

Since I posted this this morning I have since figured out a way to fix
it.  The LoginManager was referencing a class in AccessControl/Users.py
called Super, but in Zope 2.3 this class is called UnrestrictedUser. 
This introduced a new error which tracedback to HTTPRequest.py.  I know
it is probably not a good a idea, but I changed that code to make it
work only because it seemed to have a bug in it.  I could be totally
wrong, but lines 772-774 look as if they need to be further indented as
some of the variables that code references are declared in the if block
above which is one level deeper.  Someone check me on this one to make
sure that this is correct.

Austin

Austin Mayberry wrote:
 
 Has anyone tried get the LoginManager to work with Zope 2.3a1?  When I
 try the LoginManager product is broken with error message:
 
 LoginManager Import Traceback
 
 Traceback (innermost last):
   File "/usr/lib/Zope-2.3.0a1-src/lib/python/OFS/Application.py", line
 405, in import_products
 product=__import__(pname, global_dict, global_dict, silly)
   File
 "/usr/lib/Zope-2.3.0a1-src/lib/python/Products/LoginManager/__init__.py",
 line 1, in ?
 import LoginManager, LoginMethods, UserSources
   File
 "/usr/lib/Zope-2.3.0a1-src/lib/python/Products/LoginManager/LoginManager.py",
 line 114, in ?
 from AccessControl.User import _remote_user_mode, Super
 ImportError: cannot import name Super
 
 Thanks,
 Austin Mayberry
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager with SQL and Skinscript: adding properties topropertysheet propertysheet

2001-01-07 Thread Aaron Payne

Hi all,

I am following Dan Pierson's How-To SQL LoginManager with SQL and 
Skinscript. I am not able to add properties.

I created LoginManager:LoginUser subclassed zclass def for a user with a 
propertysheet Basic.
It had properties password and email.  The LM methods I tested failed so I 
deleted the properties.  Now I want to add them again. When I try I get:

for password
Invalid property id, password. It is in use.
for email:
Invalid property id, email. It is in use.

I also deleted the entire propertysheet and tried to add the props but the 
same error occured.

I can add new props but not ones that were deleted earlier. Is there a way 
around this problem?

Zope 2.2.1
System Platform: freebsd4

-Aaron


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager - logging out

2000-12-21 Thread Mohan Baro

Thank you

Mohan.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill
Anderson
Sent: Thursday, December 21, 2000 1:57 PM
To: [EMAIL PROTECTED]
Subject: Re: [Zope] LoginManager - logging out


Mohan Baro wrote:
 
 Its just not working for me.
 
 I am going to try  LoginManager + ZPatterns (hope it has a handy logout
 feature)


Well, you could look at the Membership product to see how we do it
there. :)
IIRC, it works fine with the latest LM and Zope.

Zpatterns won't provide a logout feature, since that is not it's
responsibility.

Bill


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager

2000-12-20 Thread Kaeidinejad, Shahram

Hi Bill,

I treid to install LoginManager 0.8.8.b1 too.
But i got this error:

2000-12-20T10:49:53 ERROR(200) Zope Couldn't import Products.LoginManager
Traceback (innermost last):
  File /server/opt/Zope-2.2.4/lib/python/OFS/Application.py, line 397, in
import_products
(Object: string)
  File /server/opt/Zope-2.2.4/lib/python/Products/LoginManager/__init__.py,
line 1, in ?
  File
/server/opt/Zope-2.2.4/lib/python/Products/LoginManager/LoginManager.py,
line 8, in ?
  File /server/opt/Zope-2.2.4/lib/python/Products/ZPatterns/__init__.py,
line 1, in ?
  File /server/opt/Zope-2.2.4/lib/python/Products/ZPatterns/Rack.py, line 9,
in ?
  File /server/opt/Zope-2.2.4/lib/python/Products/ZPatterns/DataSkins.py,
line 1, in ?
ImportError: No module named DynPersist

does the LoginManager dependent from other product of zope?
Do you know which product of zope contians "DynPersist"?

bye


Shahram

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager

2000-12-20 Thread Oliver Bleutgen


 Impo  rtError: No module named DynPersist

 does the LoginManager dependent from other product of zope?
 Do you know which product of zope contians "DynPersist"?

Reread the instructions for installing ZPatterns, they tell you 
how to compile Dynpersist.c.


cheers,
oliver

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager - logging out

2000-12-20 Thread Bill Welch

Inspired by Jim Washington's recent post re 'Anonymous user', I was
reminded of a previous post in which someone suggested
http://garbage:x@yourSite would also clear the browser's credential.
Much faster and works in IE and Konqueror, but not Navigator or lynx. Very
easy to test, too.

first,
http://yourSite/manage
and login
then
http://garbage:x/yourSite/debug
and check other/AUTHENTICATED_USER

On Tue, 19 Dec 2000, Bill Welch wrote:

 Not true, depends on the browser. My tests indicate that Navigator and IE
 both trash the existing good credential with the garbage one and you're
 really logged out. Konqueror and lynx seem to hang on to the last
 successful authentication and this method doesn't log you out.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager

2000-12-20 Thread Mohan Baro


Where do I get a copy of cPersistance.h? I need it to compile DynPersist.c


Mohan


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Oliver Bleutgen
Sent: Wednesday, December 20, 2000 7:20 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [Zope] LoginManager



 Impo  rtError: No module named DynPersist

 does the LoginManager dependent from other product of zope?
 Do you know which product of zope contians "DynPersist"?

Reread the instructions for installing ZPatterns, they tell you 
how to compile Dynpersist.c.


cheers,
oliver

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager

2000-12-20 Thread Steve Drees

 Where do I get a copy of cPersistance.h? I need it to compile DynPersist.c

You need to download the Zope src tarball if your going to build ZPatterns.
(This note really should be in the installation instructions of ZPatterns.)


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager - logging out

2000-12-20 Thread Bill Welch

Up to this point, I've been talking about mechanisms for you, personally,
to log out to switch between developer and user roles for testing. 
Clearly, these mechanisms aren't appropriate for the users of your site.

I think LoginManager isn't the only choice, but I can't say, off hand,
what the other choices are.

Bill.

On Wed, 20 Dec 2000, Mohan Baro wrote:

 for me I need to log out completely.
 similar to what they do at ZOPE.ORG (login/logout)

 In fact I wouldn't mind a form based login system similar to zope.org
 
 Mohan.
 
 what you guys are saying is that
 1) using standard authentication ( I have a problem with logout)
 2) and I must use LoginManager + ZPatterns
 



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager - logging out

2000-12-20 Thread Mohan Baro

Its just not working for me.

I am going to try  LoginManager + ZPatterns (hope it has a handy logout
feature)

Mohan.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill
Welch
Sent: Wednesday, December 20, 2000 9:45 AM
To: [EMAIL PROTECTED]
Subject: Re: [Zope] LoginManager - logging out


Inspired by Jim Washington's recent post re 'Anonymous user', I was
reminded of a previous post in which someone suggested
http://garbage:x@yourSite would also clear the browser's credential.
Much faster and works in IE and Konqueror, but not Navigator or lynx. Very
easy to test, too.

first,
http://yourSite/manage
and login
then
http://garbage:x/yourSite/debug
and check other/AUTHENTICATED_USER

On Tue, 19 Dec 2000, Bill Welch wrote:

 Not true, depends on the browser. My tests indicate that Navigator and IE
 both trash the existing good credential with the garbage one and you're
 really logged out. Konqueror and lynx seem to hang on to the last
 successful authentication and this method doesn't log you out.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager - logging out

2000-12-20 Thread Oliver Bleutgen

 reminded of a previous post in which someone suggested
 http://garbage:x@yourSite would also clear the browser's credential.
 Much faster and works in IE and Konqueror, but not Navigator or lynx. Very
 easy to test, too.


Its just not working for me.

I am going to try  LoginManager + ZPatterns (hope it has a handy logout
feature)


Remember to press shift+reload in IE, this nasty thing just takes
the cached pages otherwise.
About LoginManager and ZPatterns, they won't help you for the
Basic http-authentication. This is really a client-side problem.

And finally, I reread a previous mail of  yours:

Thanks,

I have tried it.

dtml-raise type="Unauthorized"
Logout!!
/dtml-raise

I guess it logs me out. But it also gives me a login dialog box  it does
not accept any of the account. So I cannot log back in! Why?


Just a quick guess, is it possible that you reenter your credentials and
just reload the page which contains the above code which again causes
an "Unauthorized" to be raised (and therefore causes the browser to 
show the login-dialog again)?
Have you tried pointing your browser to another URI on that server?

cheers,
oliver



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager - logging out

2000-12-20 Thread Mohan Baro

Thanks for the tips:
1)the logout method work with shift+reload in IE (how would clear cached
pages from zope?)
2)the dtml-raise type="Unauthorized" method does not allow me to log back
in even when I try a redirect to a different page.

I am wondering if something is set incorrectly on my browser. If (2) works
for you it must work for me to??

Any way thanks for all the help  I get it to work I will post the
solution.

BTW
Do you know how the achieve [login/logout] at ZOPE.ORG ie Zope Portal
Toolkit ??



Mohan.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Oliver Bleutgen
Sent: Wednesday, December 20, 2000 1:01 PM
To: [EMAIL PROTECTED]
Subject: RE: [Zope] LoginManager - logging out


 reminded of a previous post in which someone suggested
 http://garbage:x@yourSite would also clear the browser's credential.
 Much faster and works in IE and Konqueror, but not Navigator or lynx.
Very
 easy to test, too.


Its just not working for me.

I am going to try  LoginManager + ZPatterns (hope it has a handy logout
feature)


Remember to press shift+reload in IE, this nasty thing just takes
the cached pages otherwise.
About LoginManager and ZPatterns, they won't help you for the
Basic http-authentication. This is really a client-side problem.

And finally, I reread a previous mail of  yours:

Thanks,

I have tried it.

dtml-raise type="Unauthorized"
Logout!!
/dtml-raise

I guess it logs me out. But it also gives me a login dialog box  it
does
not accept any of the account. So I cannot log back in! Why?


Just a quick guess, is it possible that you reenter your credentials and
just reload the page which contains the above code which again causes
an "Unauthorized" to be raised (and therefore causes the browser to
show the login-dialog again)?
Have you tried pointing your browser to another URI on that server?

cheers,
oliver



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager+BasicCookieAuthentication

2000-12-20 Thread Robert Senger

Hi all,

does anybody know how I can get rid off this ugly 'traceback' in the loginForm object 
Zope displays
when using LoginManager and BasicCookieAuthentication? I want to customize the look of 
the
loginForm to fit into the design of the rest of my pages.

Thanks!

-- 
Dipl.-Phys. Robert Senger
Fachgebiet Raumfahrttechnik
Technische Universität München
Boltzmannstr. 15, D-85747 Garching
Tel:++49 / (0)89 / 289-15997
Fax:++49 / (0)89 / 289-16004
email:  [EMAIL PROTECTED]


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager - logging out

2000-12-20 Thread Oliver Bleutgen

 Thanks for the tips:
 1)the logout method work with shift+reload in IE (how would clear cached
 pages from zope?)
 2)the dtml-raise type="Unauthorized" method does not allow me to log
 back
 in even when I try a redirect to a different page.

 I am wondering if something is set incorrectly on my browser. If (2) works
 for you it must work for me to??

No, 
actually I hadn't thought of redirecting, but I guess it can't work.
Either because the browser ignores the redirect after an 401 Unauthorized,
or because of the nature of dtml-raise which maybe prevents zope
from interpreting following code. Maybe someone can shed some light on that.

Perhaps you could try this:

dtml-unless "AUTHENTICATED_USER.getUserName()=='Anonymous User'"
dtml-raise type="Unauthorized"
Logout!!
/dtml-raise
/dtml-unless
You are now logged out!

Not very elegant (you have to enter one false login/pw combination
for the unless to work), but perhaps someone else has a better idea.

This may depend on why you want to log out - for just reaching
Anonymous "status" this seems the right thing.
Otherwise introducing a new kind of role might help "logout_user",
so you could test for that.


cheers,
oliver

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager - logging out

2000-12-19 Thread Mohan Baro

Thanks,

I have tried it.

dtml-raise type="Unauthorized"
Logout!!
/dtml-raise

I guess it logs me out. But it also gives me a login dialog box  it does
not accept any of the account. So I cannot log back in! Why?

What is going on here?

Mohan.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill
Welch
Sent: Monday, December 18, 2000 11:06 AM
To: Mohan Baro
Cc: [EMAIL PROTECTED]
Subject: RE: [Zope] LoginManager - logging out


this is my logout DTML method

dtml-raise type="Unauthorized"
Logout!!
/dtml-raise

On Mon, 18 Dec 2000, Mohan Baro wrote:

 Can you please give an example of this code or method?

 Mohan.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager - logging out

2000-12-19 Thread Tim Cook

Mohan Baro wrote:
 
 Thanks,
 
 I have tried it.
 
 dtml-raise type="Unauthorized"
 Logout!!
 /dtml-raise
 
 I guess it logs me out. But it also gives me a login dialog box  it does
 not accept any of the account. So I cannot log back in! Why?
 

I'm not sure WHY it won't accept your username at this point.
BUT, it doesn't really logout you out either. If you hit the back
button a couple of times you'll notice that you are still logged
in.  The only way to logout using standard authentication is to
close the browser.

HTH,
-- Tim Cook, President --
Free Practice Management,Inc. | http://FreePM.com
Office: (901) 884-4126
Censorship: The reaction of the ignorant to freedom.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager - logging out

2000-12-19 Thread Bill Welch

On Tue, 19 Dec 2000, Tim Cook wrote:

 Mohan Baro wrote:
  
  Thanks,
  
  I have tried it.
  
  dtml-raise type="Unauthorized"
  Logout!!
  /dtml-raise
  
  I guess it logs me out. But it also gives me a login dialog box  it does
  not accept any of the account. So I cannot log back in! Why?
  

The login dialog is the reauthentication opportunity that's your browser's
response to the 'Unauthorized' exception and that's normal. Don't know why
you can't log back in. Works for me in Navigator, IE, and Konqueror. Lynx
displayed an opportunity to reauthenticate once, and then only showed the
exception after that.

 I'm not sure WHY it won't accept your username at this point.
 BUT, it doesn't really logout you out either. If you hit the back
 button a couple of times you'll notice that you are still logged
 in.  The only way to logout using standard authentication is to
 close the browser.

Not true, depends on the browser. My tests indicate that Navigator and IE
both trash the existing good credential with the garbage one and you're
really logged out. Konqueror and lynx seem to hang on to the last
successful authentication and this method doesn't log you out.

Hitting the back button doesn't tell you anything about what credential
your browser is sending to the server. Try visiting a privileged page
after going back or look at the request that's actually being sent. Try
using this one line method (I call mine 'debug'):

dtml-var REQUEST

After visting yourSite/logout and trying to login as a garbage user at the
reauthentication opportunity (blanking the user name seems to work fine),
visit yourSite/debug. Check other/AUTHENTICATED_USER, Navigator and IE
show 'Anonymous User', Konqueror and lynx show the last good user.

Bill.



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager - logging out

2000-12-18 Thread Bill Welch

 authentication and that the browser caches the credential. This means
 unless you shut down your browser, whatever you do, you are back to
 square one.

Besides shutting down your browser, you trash its credential. Create a
simple DTML method that raises the 'Unauthorized' exception. Direct your
brower to that method. The browser will, in some form or manner, request
that you authenticate again. Now the important part, don't cancel the
reauthentication! Type in some garbage user name and password and send it.
Your brower will give you another chance to authenticate, but this one you
cancel and you're back to being anonymous as far as Zope is concerned.

Bill.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager - logging out

2000-12-18 Thread Mohan Baro

Where can I get more information on the following methods ( i.e which zope
documentation)

1) authenticate() as in dtml-call "AUTHENTICATED_USER.authenticate()"
2) logout()

Mohan


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager - logging out

2000-12-18 Thread Bill Welch

this is my logout DTML method

dtml-raise type="Unauthorized"
Logout!!
/dtml-raise

On Mon, 18 Dec 2000, Mohan Baro wrote:

 Can you please give an example of this code or method?
 
 Mohan.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager - logging out

2000-12-17 Thread Aleksander Salwa


I used this code in my "logoutForm" to logout user in my old setup
(LoginManager-0_8_7a1, ZPatterns-0-4-2a1 and Zope 2.2.1):
dtml-call "AUTHENTICATED_USER.logout()"

It doesn't work when using LoginManager-0-8-8b1 + ZPatterns-0-4-3b2 +
Zope 2.2.4.
I've found a work-around:
dtml-call "acl_users.logoutUser(AUTHENTICATED_USER.getId())"
It logouts user as expected.

But, can anybody tell me, why the former one doesn't work as it should ?


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager - logging out

2000-12-17 Thread Chalu Kim


No, you are right. It does not work. It is because LM's default login
method is Basic. Basic logout does not work because of Basic
authentication and that the browser caches the credential. This means
unless you shut down your browser, whatever you do, you are back to
square one.

The remedy is to change your login method to Cookie so that
AUTHENTICATED_USER.logout() works.

Good luck.

http://lists.zope.org/pipermail/zope/2000-December/037253.html
Title:  [Zope] LoginManager - logging out


 
 
   [Zope] LoginManager - logging out
Aleksander Salwa 
[EMAIL PROTECTED]
Sun, 17 Dec 2000 14:58:43 +0100 (CET)

 Previous message: [Zope] Windows NT: Changing default TCP port
 Next message: [Zope] how can you tell who created an object in Zope?
  Messages sorted by: 
  [ date ]
  [ thread ]
  [ subject ]
  [ author ]
 
   
  

I used this code in my logoutForm to logout user in my old setup
(LoginManager-0_8_7a1, ZPatterns-0-4-2a1 and Zope 2.2.1):
dtml-call AUTHENTICATED_USER.logout()

It doesn't work when using LoginManager-0-8-8b1 + ZPatterns-0-4-3b2 +
Zope 2.2.4.
I've found a work-around:
dtml-call acl_users.logoutUser(AUTHENTICATED_USER.getId())
It logouts user as expected.

But, can anybody tell me, why the former one doesn't work as it should ?


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/
















	 Previous message: [Zope] Windows NT: Changing default TCP port
	 Next message: [Zope] how can you tell who created an object in Zope?
  Messages sorted by: 
  [ date ]
  [ thread ]
  [ subject ]
  [ author ]
 
   



RE: [Zope] LoginManager - logging out

2000-12-17 Thread Aleksander Salwa

On Sun, 17 Dec 2000, Chalu Kim wrote:
 No, you are right. It does not work. It is because LM's default login
 method is Basic. Basic logout does not work because of Basic
 authentication and that the browser caches the credential. This means
 unless you shut down your browser, whatever you do, you are back to
 square one.

But I use cookie authentication all the time.


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager and SSL client authentication

2000-12-16 Thread Stefan H. Holek

On Fri, 15 Dec 2000, Mayers, Philip J wrote:

 We've got a bespoke application for storing our (very large) user account
 database here. One field a user can have is a crypted unix password (which
 I'm currently using to authenticate users). The other thing that can exist
 is the Subject or SubjectAltName of an SSL certificate suitable for client
 web authentication.
 
 Apache will validate the certificate for me (by passing a valid CA cert to
 it's configuration) and I'm running over PCGI, so by the time we get into
 Zope, we can "TRUST" the SSL_CLIENT_S_DN and SSL_CLIENT_I_DN values passed
 in. What's the next step?

What might possibly help you:

* Look into mod_ssl's FakeBasicAuth feature

* Look at those How-Tos:
http://www.zope.org/Members/unfo/apache_zserver_ssl
http://www.zope.org/Members/Roug/certificate_mapping

Regards,
Stefan


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager and SSL client authentication

2000-12-15 Thread Ng Pheng Siong

On Fri, Dec 15, 2000 at 11:42:23AM -, Mayers, Philip J wrote:
 How would I go about making LoginManager authenticate them on the basis of
 the certificate subject?
 
 Apache will validate the certificate for me (by passing a valid CA cert to
 it's configuration) and I'm running over PCGI, so by the time we get into
 Zope, we can "TRUST" the SSL_CLIENT_S_DN and SSL_CLIENT_I_DN values passed
 in. What's the next step?

ZServerSSL did this with Zope in "remote user" mode. 

Upon successful client cert verification, ZServerSSL maps the subject 
DN to a Zope username and sets REMOTE_USER accordingly. Zope's 
REMOTE_USER machinery took care of the rest.

This was on 2.1.x. I've not had time to test ZServerSSL with 2.2.x.

ZServerSSL is here:

http://www.post1.com/home/ngps/zope/zssl


Cheers.
-- 
Ng Pheng Siong [EMAIL PROTECTED] * http://www.post1.com/home/ngps


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager broken?

2000-12-12 Thread Phil Harris

Phil,

Something that bit me when using the howto you referenced.

When creating the methods, as soon as the authenticate method is created the
LoginManager starts using it, but since the other methods don't yet exist it
starts generating errors with the result that you are locked out of the
LoginManager and any folders secured by it.

My solution was to create all the methods needed but with bogus names, such
as by sticking an x as the first character of each.

This way you can test each in isolation and when satisfied that they are
correct, rename them all in one fell swoop.

Ipso facto, presto magico you have a working LoginManager.

I've tried this procedure on 2.2.x with various versions of
LoginManager/ZPatterns and it's worked every time.  The latest Zope I've
used it with is 2.2.4.

hth

Phil
[EMAIL PROTECTED]


- Original Message -
From: "Mayers, Philip J" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 11, 2000 8:34 PM
Subject: RE: [Zope] LoginManager broken?


 Thanks, I'll take a look.

 Re: LoginManager - After a fast turnaround (confirming my ample faith in
 Open Source software) Magnus Heino pointed me in the right direction - the
 dtml methods and SQL objects need to be inside the UserSource folder,
*not*
 the LoginManager folder as the Howto implies (or maybe I just can't
 read...). Can someone confirm that the SQL methods need to be inside the
 UserSource folder? (which is mildly annoying, but there we go...)

 I'm still having some problems getting multiple roles working, but it's
 behaving itself for now. Now all I have to do is solve my LIMIT problem...

 Regards,
 Phil

 +--+
 | Phil Mayers, Network Support |
 | Centre for Computing Services|
 | Imperial College |
 +--+

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 11 December 2000 20:18
 To: Mayers, Philip J
 Cc: '[EMAIL PROTECTED]'
 Subject: Re: [Zope] LoginManager broken?


 You might look at http://www.zope.org/Members/dlpierson/sqlLogin for a
 different approach that works for me in early testing.  Note that it
 needs additional work before being turned loose on a live site.

 Dan Pierson

 "Mayers, Philip J" [EMAIL PROTECTED] writes:

  Does it even *work*? Even a little bit? Because other than repeating the
  same process 12 damn times, so far I'm not convinced. Maybe I'll look in
 the
  source code to see if there's actually anything in the files (other than
a
  HOWTO.txt, which is empty, which BTW is more annoying than there not
being
  one).
 
  The "LoginManager with SQL database" on the Zope site seems to end up
with
  me having a folder I can't access through the management interface
(unless
  you count "management" as "this is the index_html" document) Wow,
thanks!
  Now I have to delete it and start all over again...
 
  In all seriousness - there *must* be one person who has gotten an
 SQL-backed
  LoginManger working with 2.2.4 - surely?
 
  Thanks for all the great work (little bugs aside...) - Zope is a
wonderful
  product! Now if only it could serve XML as well as Cocoon...
 
  Regards,
  Phil
 
  +--+
  | Phil Mayers, Network Support |
  | Centre for Computing Services|
  | Imperial College |
  +--+
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager broken?

2000-12-12 Thread Mayers, Philip J

Ye gods...

Ok, steps I had to take to get LoginManager working

1) Create a folder, call it "test"
2) In that folder, add a LoginManager with a GenericUserSource, with *just*
"Basic Auth Login" selected. Leave the rest as defaults.
3) In the newly-created ACL-users folder, you'll find "forbiddenPage",
"loginForm" and "logoutForm" - you can delete loginForm.
   Give logoutForm and forbiddenPage the "Manager" proxy role
4) In the UserSource folder/object underneath acl_users, add
   a) A connection to the SQL database you'll be using
   b) an SQL method "check_user" with a parameter "username", which does a
"select username from usertable where username = dtml-sqlvar username
type=string"
   c) an SQL method "check_user" with parameters "username" and "password",
which does a "select username from usertable where username = dtml-sqlvar
username type=string and password = dtml-sqlvar password type=string"
   d) an SQL method "get_roles" with a paramter "username" that does "select
groupname from group_members where username = dtml-sqlvar username
type=string" (or whatever is appropriate for your database)

5) Add the DTML methods WITH A DIFFERENT NAME - DON'T add
userAuthenticate,userExists,userRoles - add (say)
xuserAuthenticate,xuserExists,xuserRoles
   a) xuserExists should read:

dtml-in "HDB_check_user(username=username)"
  dtml-if "_['sequence-item'].username == username"
dtml-return "_.int('1')"
  /dtml-if
/dtml-in

dtml-return "_.int('0')"

   b) xuserAuthenticate should read:

dtml-in "HDB_check_password(username=username,password=password)"
  dtml-if "_['sequence-item'].username == username"
dtml-return "_.int('1')"
  /dtml-if
/dtml-in

dtml-return "_.int('0')"

   c) xuserRoles should read

dtml-call "REQUEST.set('ret', '')"
dtml-in "HDB_get_roles(username=username)"
  dtml-call "REQUEST.set('ret', ret+' '+groupname)"
/dtml-in

dtml-return ret


6) Give the "Manager" proxy role to the DTML methods, so they can access the
SQL methods you just created
7) Turn off acquisition of the permissions on the test folder, and be sure
to add read permissions to any local roles you're using
8) Make a copy of the test folder now, before it all goes wrong...
9) Batch rename the DTML method (e.g. s/x(.*)/$1/g in perl-speak) - if
you're lucky, it will work.

I have to say, I'm not hugely impressed...

Regards,
Phil

+--+
| Phil Mayers, Network Support     |
| Centre for Computing Services|
| Imperial College |
+--+  

-Original Message-
From: Mayers, Philip J [mailto:[EMAIL PROTECTED]]
Sent: 11 December 2000 20:34
To: '[EMAIL PROTECTED]'
Subject: RE: [Zope] LoginManager broken?


Thanks, I'll take a look.

Re: LoginManager - After a fast turnaround (confirming my ample faith in
Open Source software) Magnus Heino pointed me in the right direction - the
dtml methods and SQL objects need to be inside the UserSource folder, *not*
the LoginManager folder as the Howto implies (or maybe I just can't
read...). Can someone confirm that the SQL methods need to be inside the
UserSource folder? (which is mildly annoying, but there we go...)

I'm still having some problems getting multiple roles working, but it's
behaving itself for now. Now all I have to do is solve my LIMIT problem...

Regards,
Phil

+--+
| Phil Mayers, Network Support |
| Centre for Computing Services|
| Imperial College |
+--+  

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 11 December 2000 20:18
To: Mayers, Philip J
Cc: '[EMAIL PROTECTED]'
Subject: Re: [Zope] LoginManager broken?


You might look at http://www.zope.org/Members/dlpierson/sqlLogin for a
different approach that works for me in early testing.  Note that it
needs additional work before being turned loose on a live site.

Dan Pierson

"Mayers, Philip J" [EMAIL PROTECTED] writes:

 Does it even *work*? Even a little bit? Because other than repeating the
 same process 12 damn times, so far I'm not convinced. Maybe I'll look in
the
 source code to see if there's actually anything in the files (other than a
 HOWTO.txt, which is empty, which BTW is more annoying than there not being
 one).
 
 The "LoginManager with SQL database" on the Zope site seems to end up with
 me having a folder I can't access through the management interface (unless
 you count "management" as "this is the index_html" document) Wow, thanks!
 Now I have to delete it and start all over again...
 
 In all seriousness - there *must* be one person who has gotten an
SQL-backed
 LoginManger wo

Re: [Zope] LoginManager broken?

2000-12-12 Thread Dan L. Pierson

"Phil Harris" [EMAIL PROTECTED] writes:

 Phil,
 
 Something that bit me when using the howto you referenced.
 
 When creating the methods, as soon as the authenticate method is created the
 LoginManager starts using it, but since the other methods don't yet exist it
 starts generating errors with the result that you are locked out of the
 LoginManager and any folders secured by it.

Yeah, that bit me too.  I think that the alternate approach in my
writeup below avoids it by not telling the UserSource anything until
everything else is set up.  The main problem with it is that it
doesn't currently take advantage of the cacheing features in
BasicUserSource.  I think that I need a trivial Python subclass of
LoginUser that supports cache management, but I need to understand the
lifetimes of virtual ZClasses in Racks a bit better first...

 My solution was to create all the methods needed but with bogus names, such
 as by sticking an x as the first character of each.
 
 This way you can test each in isolation and when satisfied that they are
 correct, rename them all in one fell swoop.

Cute.  I'll remember this trick.

 Ipso facto, presto magico you have a working LoginManager.
 
 I've tried this procedure on 2.2.x with various versions of
 LoginManager/ZPatterns and it's worked every time.  The latest Zope I've
 used it with is 2.2.4.
 
 hth
 
 Phil
 [EMAIL PROTECTED]
 
 
 - Original Message -
 From: "Mayers, Philip J" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, December 11, 2000 8:34 PM
 Subject: RE: [Zope] LoginManager broken?
 
 
  Thanks, I'll take a look.
 
  Re: LoginManager - After a fast turnaround (confirming my ample faith in
  Open Source software) Magnus Heino pointed me in the right direction - the
  dtml methods and SQL objects need to be inside the UserSource folder,
 *not*
  the LoginManager folder as the Howto implies (or maybe I just can't
  read...). Can someone confirm that the SQL methods need to be inside the
  UserSource folder? (which is mildly annoying, but there we go...)
 
  I'm still having some problems getting multiple roles working, but it's
  behaving itself for now. Now all I have to do is solve my LIMIT problem...
 
  Regards,
  Phil
 
  +--+
  | Phil Mayers, Network Support |
  | Centre for Computing Services|
  | Imperial College |
  +--+
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: 11 December 2000 20:18
  To: Mayers, Philip J
  Cc: '[EMAIL PROTECTED]'
  Subject: Re: [Zope] LoginManager broken?
 
 
  You might look at http://www.zope.org/Members/dlpierson/sqlLogin for a
  different approach that works for me in early testing.  Note that it
  needs additional work before being turned loose on a live site.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager broken?

2000-12-11 Thread Mayers, Philip J

Does it even *work*? Even a little bit? Because other than repeating the
same process 12 damn times, so far I'm not convinced. Maybe I'll look in the
source code to see if there's actually anything in the files (other than a
HOWTO.txt, which is empty, which BTW is more annoying than there not being
one).

The "LoginManager with SQL database" on the Zope site seems to end up with
me having a folder I can't access through the management interface (unless
you count "management" as "this is the index_html" document) Wow, thanks!
Now I have to delete it and start all over again...

In all seriousness - there *must* be one person who has gotten an SQL-backed
LoginManger working with 2.2.4 - surely?

Thanks for all the great work (little bugs aside...) - Zope is a wonderful
product! Now if only it could serve XML as well as Cocoon...

Regards,
Phil

+--+
| Phil Mayers, Network Support |
| Centre for Computing Services|
| Imperial College |
+--+  

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager broken?

2000-12-11 Thread Dan L. Pierson

You might look at http://www.zope.org/Members/dlpierson/sqlLogin for a
different approach that works for me in early testing.  Note that it
needs additional work before being turned loose on a live site.

Dan Pierson

"Mayers, Philip J" [EMAIL PROTECTED] writes:

 Does it even *work*? Even a little bit? Because other than repeating the
 same process 12 damn times, so far I'm not convinced. Maybe I'll look in the
 source code to see if there's actually anything in the files (other than a
 HOWTO.txt, which is empty, which BTW is more annoying than there not being
 one).
 
 The "LoginManager with SQL database" on the Zope site seems to end up with
 me having a folder I can't access through the management interface (unless
 you count "management" as "this is the index_html" document) Wow, thanks!
 Now I have to delete it and start all over again...
 
 In all seriousness - there *must* be one person who has gotten an SQL-backed
 LoginManger working with 2.2.4 - surely?
 
 Thanks for all the great work (little bugs aside...) - Zope is a wonderful
 product! Now if only it could serve XML as well as Cocoon...
 
 Regards,
 Phil
 
 +--+
 | Phil Mayers, Network Support |
 | Centre for Computing Services|
 | Imperial College |
 +--+  
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager broken?

2000-12-11 Thread Oliver Bleutgen

 Does it even *work*? Even a little bit? Because other than repeating the
 same process 12 damn times, so far I'm not convinced. Maybe I'll look in
 the
 source code to see if there's actually anything in the files (other than a
 HOWTO.txt, which is empty, which BTW is more annoying than there not being
 one).

 The "LoginManager with SQL database" on the Zope site seems to end up with
 me having a folder I can't access through the management interface (unless
 you count "management" as "this is the index_html" document) Wow, thanks!
 Now I have to delete it and start all over again...

 In all seriousness - there *must* be one person who has gotten an
 SQL-backed
 LoginManger working with 2.2.4 - surely?


Well, not 2.2.4 but 2.2.3, and I had some bugs when
trying it on a copy of a production server. I couldn't
get the "old" installation to work in a different directory,
although I thought I changed every path in start etc..
I also deleted all pyc files and reran wo_pcgi.py.
One symtom was that loginmanager didn't acquire users from
a level above. Later on it wouldn't want to to the sql-query,
nothing showed up in I postgres' debugging output.

Btw. can anybody tell me if and how it's possible to relocate
an installed Zope?

Back to your question, loginmanager now works fine for me now,
and it did so flawlessly on a fresh installed zope.

Did you eventually try to use the loginmanager-with-SQL-howto
in the toplevel folder? 
IIRC, this will lock you out permanently.
Did you reuse a user name (just a guess
that this might cause problems)?

Try to find out whether and which sql-queries are issued by
LoginManager, I guess other dbs than postgres will also allow
to find that out.
Oh, and if you try LM in a subfolder, have a look at the
undo tab if things go wrong ;-), you might at first use some
fake methods at first which always return 1, manager etc.
and change them step by step (and say goodbye to security).

cheers,
oliver






___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager broken?

2000-12-11 Thread Mayers, Philip J

Thanks, I'll take a look.

Re: LoginManager - After a fast turnaround (confirming my ample faith in
Open Source software) Magnus Heino pointed me in the right direction - the
dtml methods and SQL objects need to be inside the UserSource folder, *not*
the LoginManager folder as the Howto implies (or maybe I just can't
read...). Can someone confirm that the SQL methods need to be inside the
UserSource folder? (which is mildly annoying, but there we go...)

I'm still having some problems getting multiple roles working, but it's
behaving itself for now. Now all I have to do is solve my LIMIT problem...

Regards,
Phil

+--+
| Phil Mayers, Network Support |
| Centre for Computing Services|
| Imperial College |
+--+  

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 11 December 2000 20:18
To: Mayers, Philip J
Cc: '[EMAIL PROTECTED]'
Subject: Re: [Zope] LoginManager broken?


You might look at http://www.zope.org/Members/dlpierson/sqlLogin for a
different approach that works for me in early testing.  Note that it
needs additional work before being turned loose on a live site.

Dan Pierson

"Mayers, Philip J" [EMAIL PROTECTED] writes:

 Does it even *work*? Even a little bit? Because other than repeating the
 same process 12 damn times, so far I'm not convinced. Maybe I'll look in
the
 source code to see if there's actually anything in the files (other than a
 HOWTO.txt, which is empty, which BTW is more annoying than there not being
 one).
 
 The "LoginManager with SQL database" on the Zope site seems to end up with
 me having a folder I can't access through the management interface (unless
 you count "management" as "this is the index_html" document) Wow, thanks!
 Now I have to delete it and start all over again...
 
 In all seriousness - there *must* be one person who has gotten an
SQL-backed
 LoginManger working with 2.2.4 - surely?
 
 Thanks for all the great work (little bugs aside...) - Zope is a wonderful
 product! Now if only it could serve XML as well as Cocoon...
 
 Regards,
 Phil
 
 +--+
 | Phil Mayers, Network Support |
 | Centre for Computing Services|
 | Imperial College |
 +--+  
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager broken?

2000-12-11 Thread Oliver Bleutgen


 Well, not 2.2.4 but 2.2.3, and I had some bugs when
ehm replace 2.2.3 with 2.2.2

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager broken?

2000-12-11 Thread Dan L. Pierson

"Mayers, Philip J" [EMAIL PROTECTED] writes:

 Thanks, I'll take a look.
 
 Re: LoginManager - After a fast turnaround (confirming my ample faith in
 Open Source software) Magnus Heino pointed me in the right direction - the
 dtml methods and SQL objects need to be inside the UserSource folder, *not*
 the LoginManager folder as the Howto implies (or maybe I just can't
 read...). Can someone confirm that the SQL methods need to be inside the
 UserSource folder? (which is mildly annoying, but there we go...)

This isn't required in my experience.  The UserSource will find them
via acquisition if the permissions are OK.  I tend to keep them in a
level above the acl_users (i.e. the LoginManager) in question while
debugging just in case I wind up turning off permissions to that
folder accidentally.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager broken?

2000-12-11 Thread Michael Bernstein

"Mayers, Philip J" wrote:
 
 Thanks, I'll take a look.
 
 Re: LoginManager - After a fast turnaround (confirming my ample faith in
 Open Source software) Magnus Heino pointed me in the right direction - the
 dtml methods and SQL objects need to be inside the UserSource folder, *not*
 the LoginManager folder as the Howto implies (or maybe I just can't
 read...). Can someone confirm that the SQL methods need to be inside the
 UserSource folder? (which is mildly annoying, but there we go...)
 
 I'm still having some problems getting multiple roles working, but it's
 behaving itself for now. Now all I have to do is solve my LIMIT problem...

If you're having dificulties getting LoginManager to work
with the local roles management interface, maybe this
solution (which I only tested using LoginManger+Membership)
will help:

http://lists.zope.org/pipermail/zope-dev/2000-September/006953.html

I ahve no idea how this would work with SQL users, but
hopefully it'll give you a clue.

HTH,

Michael Bernstein.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] CURRENT MEMBERSHIP PRODUCT IS COOL -- was: [Zope] LoginManager / Membership / ZODB as UserSource

2000-11-27 Thread Danny William Adair

Hi Dirk Dirksen ;-)

In my implementation I wanted to avoid MySQL and thelike, because they would
have only served as "user sources" for the site's membership functionality
and that's it (and I wasn't talking about Ks of users...). So I considered
this O.D., and tried to get a ZODB based membership up and running. Well,
here we are - see below. Unfortunately, I do not have any experience with
hooking up MySQL to the current Membership/LM/ZPatterns trio. And now that
the membership product has become a ZODB drop-in solution for me, I guess
now there's no reason for me to go at that. I'd rather go for new methods to
enhance the product's features. (there has been more than one proposal for
this on this list)

Sorry with that one. Charlie E Wilkinson is probably your man (check the
mail archives).

CU+Prost,


 .oO( "Du konntest mal einen bauen" )
Danny


-Ursprungliche Nachricht-
Von: Dirksen [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 27. November 2000 03:45
An: [EMAIL PROTECTED]
Betreff: Re: [Zope] CURRENT MEMBERSHIP PRODUCT IS COOL -- was: [Zope]
LoginManager / Membership / ZODB as UserSource


Hi Danny,

Could you show me some enlightenment on how to use Zpatterns and
LoginManager to build a
hook to rdbms for Membership? I've read the Howto for hook up LoginManager
with MySql,
and tried it on Membership, but that trick didn't work. Look forward to your
advice!

cheers
Dirksen

--- Danny William Adair [EMAIL PROTECTED] wrote:
 Hello Bill,

 Now this _is_ cool. I had tried 0.75 in the past and had lots of problems.
 Version 0.78 is a real drop-in, like what I was dreaming of. Thank you
very
 much for your efforts so far. I recommend the Membership product to
everyone
 looking for a ready-to-use authentication and personalization solution,
 though ZODB based in the first place, thanks to ZPatterns and LoginManager
 it is always ready for rdbms.

 Btw, if you maintain a Membership version outside of the PTK, why do I see
 the word "Portal" so often? IMHO you shouldn't narrow down the
opportunities
 of using this product to mere portals.

 CU+Prost,


  .oO( "Du konntest mal einen bauen" )
 Danny


 -Ursprungliche Nachricht-
 Von: ucntcme [mailto:ucntcme]Im Auftrag von Bill Anderson
 Gesendet: Samstag, 25. November 2000 19:44
 An: [EMAIL PROTECTED]
 Betreff: Re: [Zope] LoginManager / Membership / ZODB as UserSource


 Danny William Adair wrote:
 
  Has somebody been able to setup this combination as for today? I guess
 this
  is an easy one for the LM experienced...
  I am looking for a completely ZODB based solution concerning membership,
 no
  rdbms.


 It it still beta, but there is a membership product, which uses
 loginmanager. You can get it at
 http://www.zope.org/Members/Bill/Products/Membership

 It works quite well, despite the beta label.

 Bill Anderson

 --
 E PLURIBUS LINUX



 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )



__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] CURRENT MEMBERSHIP PRODUCT IS COOL -- was: [Zope] LoginManager / Membership / ZODB as UserSource

2000-11-26 Thread Danny William Adair

Hello Bill,

Now this _is_ cool. I had tried 0.75 in the past and had lots of problems.
Version 0.78 is a real drop-in, like what I was dreaming of. Thank you very
much for your efforts so far. I recommend the Membership product to everyone
looking for a ready-to-use authentication and personalization solution,
though ZODB based in the first place, thanks to ZPatterns and LoginManager
it is always ready for rdbms.

Btw, if you maintain a Membership version outside of the PTK, why do I see
the word "Portal" so often? IMHO you shouldn't narrow down the opportunities
of using this product to mere portals.

CU+Prost,


 .oO( "Du konntest mal einen bauen" )
Danny


-Ursprungliche Nachricht-
Von: ucntcme [mailto:ucntcme]Im Auftrag von Bill Anderson
Gesendet: Samstag, 25. November 2000 19:44
An: [EMAIL PROTECTED]
Betreff: Re: [Zope] LoginManager / Membership / ZODB as UserSource


Danny William Adair wrote:

 Has somebody been able to setup this combination as for today? I guess
this
 is an easy one for the LM experienced...
 I am looking for a completely ZODB based solution concerning membership,
no
 rdbms.


It it still beta, but there is a membership product, which uses
loginmanager. You can get it at
http://www.zope.org/Members/Bill/Products/Membership

It works quite well, despite the beta label.

Bill Anderson

--
E PLURIBUS LINUX



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager Help.

2000-11-26 Thread Jason C. Leach

hi,

So I have LoginManager installed. The easy part.  Now I'd like to know how
to use it.  To start with, I'd like to authenticate against a standard
acl_users folder or a plane text file w/ username/passwords in it.

I just have no idea how to get cracking on this since the documentation
on LoginManager is pretty short.

I don't mind doing the SQL method, if I don't have to install a 3rd party
Database like mySQL or Postgres. It's a bit of an overkill so several
users.

Thanks,
j.

..
. Jason C. Leach
... University College of the Cariboo.
.. 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager Help.

2000-11-26 Thread seb bacon

* Jason C. Leach [EMAIL PROTECTED] [001126 20:46]:
 hi,
 
 So I have LoginManager installed. The easy part.  Now I'd like to know how
 to use it.  To start with, I'd like to authenticate against a standard
 acl_users folder or a plane text file w/ username/passwords in it.

OK, I've just struggled with this and won.  I wanted to write a How-To
but it's too late in the evening to consider right now.  So, here's
some notes that might become a HowTo:

1) Why LoginManager
"LoginManager is a User Folder workalike and replacement which solves
the "N * M" problem seen with previous User Folders." 
(http://www.zope.org/Members/tsarna/LoginManager)

Hmm, OK.  What I *think* this means is that you can use LoginManager
to do all the security heavy lifting for you.  All you have to do
is tell it how  to decide if someone's authenticated or not.  A bit
like PAM in Linux, if you know about that.  With other types of
UserFolder, you're stuck with SQL or LDAP or some other flavour of user
storage you decided on a couple of months ago.  If you want to change
the type of user store, you have to tinker with the business logic
too.

With LoginManager, it's more or less just a case of plugging in a new
data source.  You can have more than one data source and have
LoginManager authentivate against each of them in order.  You can do
even cleverer things but I'm not sure about that yet.

2) How
This is the only way I've worked out how to use it.  I know there's
better ways of doing it because I've seen mails to thateffect from
Ty.  My way is the GUF-compatability way.

- Add a LoginManager to your test folder that you created so you didn't
mess any other folders up in your Zope by accident.  Have it generate
a GenericUserSource for you.
- Click on its UserSources tab.  This is where you can add
UserSources, like your LDAP User Source and your Plain Text File User
Source.
- There's a UserSource in there already for you (a GenericUserSource,
indeed)
- Add 4 methods to it: userAuthenticate, userDomains, userExists, and
userRoles.  (see example below)
- That's it!  Watch your folder become inaccessible because you made a
mistake in your authentication methods!
- The methods tab of the LoginManager has some default forms.
- If you want to log in a user from another page, create a form which
posts fields called __ac_name and __ac_password to a method which
doesn't have anonymous user access.  (see the example loginForm for an
example)

Here's an external method which authenticates against a SQL database
with a ZSQL method that's in the UserSource.  Commented out is a
cheesey hardcoded username and password example:


def userAuthenticate(self,REQUEST,username,password):
if self.SQL_authenticate_user(username=username,password=password):
#if username=='seb' and password=='boogaloo':
return 1
else:
return 0

def userExists(self,REQUEST,username):
return 1

def userDomains(self,REQUEST,username):
return []

def userRoles(self,REQUEST,username):
return ['Editor','Manager']

If you want to authenticate against a plain text file, it should be
fairly easy to work it out from this example.

OK I've got to go to bed.  If anyone who knows more wants to let me
know, I'll try and compile it into a better guide.  I'm sure I've got
most of this wrong - but it seems to work for me, so maybe not...

There's already a SQL-LoginManager Howto which I don't want to repeat,
but I already have.  It's at
http://www.zope.org/Members/jok/SQL_based_LoginManager.

seb.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager Help.

2000-11-26 Thread Jason C. Leach


hi,

Those instructions got the ball roling. I have not got it going yet, but
am getting close.

Where do I put my login forms? In the same folder as the acl_users
(LoginManager), or inside the acl_users (LoginManager)?

I have just taken your example and hard coded a user in for now:
def userAuthenticate(self,REQUEST,username,password):
#if self.SQL_authenticate_user(username=username,password=password):
if username=='demo' and password=='demo':
return 1
else:
return 0

And pretty much just cut'n-pasted the example form into my own page for
testing.  I have also added those 4 external methods and Zope seems happy
enough with them.

What I get when I enter my username and password is, noting really. I just
get the same form asking for my user name and pw.


j.



..
. Jason C. Leach
... University College of the Cariboo.
.. 

On Mon, 27 Nov 2000, seb bacon wrote:

snip..


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager Help.

2000-11-26 Thread Jason C. Leach


hi,

Also, I'm not sure what this instruction ment:
- If you want to log in a user from another page, create a form which
posts fields called __ac_name and __ac_password to a method which
doesn't have anonymous user access.  (see the example loginForm for an
example)


Thanks,
j.

..
. Jason C. Leach
... University College of the Cariboo.
.. 



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager Help.

2000-11-26 Thread Dirksen

You can gain some enlightenment from these two documents:
http://www.zope.org/Members/Zen/GenericUserFolder/walkthrough
http://www.zope.org/Members/jok/SQL_based_LoginManager


--- "Jason C. Leach" [EMAIL PROTECTED] wrote:
 hi,
 
 So I have LoginManager installed. The easy part.  Now I'd like to know how
 to use it.  To start with, I'd like to authenticate against a standard
 acl_users folder or a plane text file w/ username/passwords in it.
 
 I just have no idea how to get cracking on this since the documentation
 on LoginManager is pretty short.
 
 I don't mind doing the SQL method, if I don't have to install a 3rd party
 Database like mySQL or Postgres. It's a bit of an overkill so several
 users.
 
 Thanks,
 j.
 
 ..
 . Jason C. Leach
 ... University College of the Cariboo.
 .. 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 


__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager / Membership / ZODB as UserSource

2000-11-24 Thread Danny William Adair

Has somebody been able to setup this combination as for today? I guess this
is an easy one for the LM experienced...
I am looking for a completely ZODB based solution concerning membership, no
rdbms.

tia,
CU+Prost,


 .oO( "Du könntest mal einen bauen" )
Danny


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager and standard_html_header

2000-10-29 Thread Jason Byron

LoginManager seems to append the standard_html_header
to the logoutForm when authorization fails. This would
normally be ok but the problem is that it uses the
standard_html_header from the directory where the
authorization fails and not from where the logoutForm
is.

Is there a way to fix this?  I'm ending up with either
the wrong header or multiple headers.


__
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager 0.8.8b1 examples/suggestions?

2000-10-25 Thread Jason Byron

--- "Morten W. Petersen" [EMAIL PROTECTED] wrote:
 [Jason Byron]
 
 | Does anyone have any LoginManager 0.8.8b1 example 
 | code?  It almost looks like you can extend the
 system
 | using plugins, but I don't know how that's done.
 | Anyone else have luck doing this?  If so then do
 you
 | have any examples/suggestions?
 
 Yes.  After adding your LoginManager instance, you
 should add four
 methods of some sort within the UserSource object.
 
 The four methods are:
 
   userAuthenticate
   userExists
   userRoles
   userDomains
 
 
 Here's the External methods I used just to make the
 logins work; you'll
 have to implement them to fit your system:
 
 def userAuthenticate(self, REQUEST, username,
 password):
 
 if username == 'morten' and password ==
 'morten':
 
 return 1
 
 else:
 
 return 0
 
 
 def userExists(self, REQUEST, username):
 
 return 1
 
 
 def userRoles(self, REQUEST, username):
 
 return 'Manager', 'Owner'
 
 
 def userDomains(self, REQUEST, username):
 
 return []
 
 


Hmmm, I tried implementing these functions before,
but only as DTML methods:

userAuthenticate 
dtml-return "_.int('1')"
  
userDomains 
dtml-return "['']"

userExists 
dtml-return "_.int('1')"

userRoles 
dtml-return "['Manager']"


Yet this never seemed to work.  Does it not
work because they are DTMLMethods and not External
Methods, or because I am returning the wrong
values, or because of a proxy or security setting?

The Methods are in the User Sources 'folder' and
I am sure I chose "GUF" authentication from the
list when I added the LoginManager.

Jason

__
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager 0.8.8b1 examples/suggestions?

2000-10-24 Thread Jason Byron

Does anyone have any LoginManager 0.8.8b1 example 
code?  It almost looks like you can extend the system
using plugins, but I don't know how that's done.
Anyone else have luck doing this?  If so then do you
have any examples/suggestions?

All I want is a simple ZODB/cookie based system, but I
can't get the Generic User Source to work.

Thanks in advance.

__
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager - With SQL

2000-10-16 Thread ed colmar

Thanks for the tips everyone!

I keep going between UserDb and LoginManager to try to get this to work.
UserDb gives me weird errors, and isn't really current, so I'm focusing on
LM.

I feel like I'm getting closer to a solution, but I'm still having
difficuties...

I followed jPenny's how to regarding accessing SQL method variables from
within python, and wrapped the retrieveItem result in a User Class.  It
seems like it is at least running my code now, but no authentication...

Am I close?  Can Anyone working with LoginManager offer any insight into
this?

Thanks!

-e-

Here's the code I have in UserSources.py

class User(BasicUser):
"""  A wrapper for the basic user class """
icon='misc_/UserDb/User_icon'

def __init__(self, name, password, roles, domains):
self.name   =name
self.__ =password
self.roles  =filter(None, map(strip, split(roles, ',')))
self.domains=filter(None, map(strip, split(domains, ',')))

def getUserName(self):
return self.name

def _getPassword(self):
return self.__

def getRoles(self):
return self.roles

def getDomains(self):
return self.domains



class PGCryptUserSource(BasicUserSource):
"""  A sql based encrypted user source """
meta_type="PG Crypt User Source"
__plugin_kind__="User Source"

def retrieveItem(self, name):
try: res=self.getuserbyusername(username=name)
except: return None

fields2index={}
fieldnames=res._schema.items()

for i in range(len(fieldnames)):
fields2index[fieldnames[i][0]]=fieldnames[i][1]

username=res[0][fields2index['username']]
password=res[0][fields2index['password']]
roles=res[0][fields2index['roles']]
domains=res[0][fields2index['domains']]

return User(username, password, roles, domains)


def rolesForUser(self, user):
name = user.getUserName()
res = self.getuserbyusername(username=name)
fields2index={}
fieldnames=res._schema.items()
for i in range(len(fieldnames)):
fields2index[fieldnames[i][0]]=fieldnames[i][1]
roles=res[0][fields2index['roles']]
return roles

def domainsForUser(self, user):
name = user.getUserName()
res = self.getuserbyusername(username=name)
fields2index={}
fieldnames=res._schema.items()
for i in range(len(fieldnames)):
fields2index[fieldnames[i][0]]=fieldnames[i][1]
domains=res[0][fields2index['domains']]
return domains

def authenticateUser(self, user, password, request):
name = user.getUserName()
res = self.getuserbyusername(username=name)
fields2index={}
fieldnames=res._schema.items()
for i in range(len(fieldnames)):
fields2index[fieldnames[i][0]]=fieldnames[i][1]
passwd=res[0][fields2index['password']]
if crypt.crypt(password,'ab')==passwd:
return 1
else:
return 0




Here's one of the tracebacks that I get:

Error Type: TypeError
Error Value: argument 1: expected read-only character buffer, None found

Traceback (innermost last): File
/usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in publish
File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook (Object: Traversable)
File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 162, in publish
File /usr/local/zope/lib/python/ZPublisher/BaseRequest.py, line 440, in
traverse
File /usr/local/zope/lib/python/Products/LoginManager/LoginManager.py, line
108, in validate (Object: ProviderContainer)
File /usr/local/zope/lib/python/Products/LoginManager/LoginMethods.py, line
235, in findLogin (Object: PlugInBase)
File /usr/local/zope/lib/python/Products/LoginManager/LoginManager.py, line
65, in getItem (Object: ProviderContainer)
File /usr/local/zope/lib/python/Products/ZPatterns/Rack.py, line 60, in
getItem (Object: ProviderContainer)
File /usr/local/zope/lib/python/Products/LoginManager/UserSources.py, line
522, in retrieveItem (Object: ProviderContainer)
File /usr/local/zope/lib/python/Products/LoginManager/UserSources.py, line
485, in __init__ TypeError: (see above)


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager - with SQL?

2000-10-13 Thread ed colmar


Has anyone been able to use LoginManager with a SQL db?  with or without
encryption?

I'm still baffled by this how-to:
http://www.zope.org/Members/jok/SQL_based_LoginManager

In this example, there are dtml-methods that do the work of the UserSource,
but there is no retrieveItem?

I would really love to get this working instead of having to revert back to
older depreciated products.

Thanks for any help!

-e-

From: "Aleksander Salwa" [EMAIL PROTECTED]

 I remember I had some troubles trying to put methods rolesForUser,
 domainsForUser, authenticateUser in UserSource class. They can be moved to
 user class. I did so.
 But your case is harder then mine, cause you don't have objects
 representing users in ZODB. Maybe there are problems with retrieveItem
 method ?
 Maybe you should build wrapper class around your database
 data - something like "pluggable brains" ?
 I have no more ideas :(



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager - with SQL?

2000-10-13 Thread Holger Lehmann

Well we use the UserDbFolder Product after havin the same/similar problems 
with the LoginManager :-)

- Holger

Am Fri, 13 Oct 2000 schrieben Sie:
 Has anyone been able to use LoginManager with a SQL db?  with or without
 encryption?

 I'm still baffled by this how-to:
 http://www.zope.org/Members/jok/SQL_based_LoginManager

 In this example, there are dtml-methods that do the work of the UserSource,
 but there is no retrieveItem?

 I would really love to get this working instead of having to revert back to
 older depreciated products.

 Thanks for any help!

 -e-

 From: "Aleksander Salwa" [EMAIL PROTECTED]

  I remember I had some troubles trying to put methods rolesForUser,
  domainsForUser, authenticateUser in UserSource class. They can be moved
  to user class. I did so.
  But your case is harder then mine, cause you don't have objects
  representing users in ZODB. Maybe there are problems with retrieveItem
  method ?
  Maybe you should build wrapper class around your database
  data - something like "pluggable brains" ?
  I have no more ideas :(

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

-- 
---
catWorkX GmbH Hamburg
Dipl.-Ing. Holger Lehmann
Stresemannstr. 364
22761 Hamburg
Tel: +49 40 890 646-0
Fax: +49 40 890 646-66
mailto:[EMAIL PROTECTED]
http://www.catworkx.de
http://www.catbridge.de

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager - how does it work?

2000-10-10 Thread ed colmar

Thanks for the help!  Still looking for that HOWTO.txt

So, now I have a UserSource Installed into my LoginManager.   It is called
"pgcrypt" and is supposed to authenticate to a SQL database.  The password
stored in the DB is encryputed using the same scheme.  Any ideas why it
doesn't let me in?  Is there any way to troubleshoot this?  It seems like
there should be a way to tell if it's going to work or not form the
management interface.

Here's what I added to UserSources.py:


class PGCryptUserSource(BasicUserSource):
"""  A sql based encrypted user source """
meta_type="PG Crypt User Source"
__plugin_kind__="User Source"

def retrieveItem(self, name):
self.getcustbyusername(username=name)

def rolesForUser(self, user):
name = user.getUserName()
res = self.getcustbyusername(username=name)
fields2index={}
fieldnames=res._schema.items()
for i in range(len(fieldnames)):
fields2index[fieldnames[i][0]]=fieldnames[i][1]
roles=res[0][fields2index['roles']]
return roles

def domainsForUser(self, user):
name = user.getUserName()
res = self.getcustbyusername(username=name)
fields2index={}
fieldnames=res._schema.items()
for i in range(len(fieldnames)):
fields2index[fieldnames[i][0]]=fieldnames[i][1]
domains=res[0][fields2index['domains']]
return domains

def authenticateUser(self, user, password, request):
name = user.getUserName()
res = self.getcustbyusername(username=name)
fields2index={}
fieldnames=res._schema.items()
for i in range(len(fieldnames)):
fields2index[fieldnames[i][0]]=fieldnames[i][1]
passwd=res[0][fields2index['password']]
if crypt.crypt(password,'ab')==passwd:
return 1
else:
return 0




+

context.registerPlugInClass(
PGCryptUserSource,
permission = 'Add PGCrypt UserSource',
constructors = defaultConstructors(PGCryptUserSource,globals()),
)




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager - how does it work?

2000-10-08 Thread Aleksander Salwa


On Sat, 7 Oct 2000, ed colmar wrote:

 I've managed to get loginManager to install, but I am very confused as to
 what to do with it.

I was confused too :)

Now I have working instalation of LoginManager-0-8-7a1. It retrieves
users' data from ZODB, but it may be helpfull to understand how to
implement any other source, i.e. MySQL.
Probably I did it very dirty way, but it works ;)

First, I created my own UserSource class, adding it to source file
lib/python/Products/LoginManager/UserSources.py. Here comes the diff:


7c7
 from Products.ZPatterns.PlugIns import defaultConstructors
---
 from Products.ZPatterns.PlugIns import defaultConstructors, PlugIn
478a479,496
 
 
 
 class OloloUserSource(BasicUserSource):
 
 """Moje wasne rdo uytkownikw"""
 
 meta_type = "Ololo User Source"
 __plugin_kind__ = "User Source"
 
 
 def retrieveItem(self,name):
 Uzytkownicy=getattr(self.aq_parent, 'Uzytkownicy', None)
 return getattr(Uzytkownicy, name, None)
 
 
 
 
489a508,514

 )
 
 context.registerPlugInClass(
 OloloUserSource,
 permission = 'Add Ololo User Source',
 constructors = defaultConstructors(OloloUserSource, globals()),


Method retrieveItem have to return user object with given name. I have
users inside folder Uzytkownicy beside acl_users.

Next thing to do is to create class representing users. It must have
LoginManager:LoginUser as a base class. So I made such ZClass. This class
has methods authenticateUser, domainsForUser, rolesForUser, which do real
work. (Users in folder Uzytkownicy are instances of that ZClass.)
This class contains some properties of user - login (it's just object's
id), name, other data. (Currently I store passwords externally, because I
need them to do POP3 authentication.)

Then, on management tab "User Sources" of your LoginManager instance, add
instance of your UserSource class. Check also for proper settings on
LoginMethods tab.


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager - how does it work?

2000-10-07 Thread ed colmar



I've managed to get loginManager to install, but I 
am very confused as to what to do with it.

I've read the how-tos on zope.org, and the 
documentation of LoginManager itself... But I still don't understand what 
is supposed to happen.

A User Source is a location to find users, Say, my 
SQL database, right?

How do I tell it to use the SQL methods I have for 
retrieveing passwords?

The how-tos say to create dtml-methods called 
"userAuthenticate" "userExists" and "userRoles". Where do these go? 


Can anyone help me see the light on 
this?

Thank you




[Zope] LoginManager Error

2000-10-03 Thread Ed Colmar



Hi!

I'm getting a type error when I try to add a LoginManager to 
a folder.  Any sugestions on how to get past this?

My config:

Zope 2.2.1
ZPatterns 0.3.0
LoginManager 0.8.6

The traceback:

Error Type: TypeError
Error Value: keyword parameter redefined


Traceback (innermost last):
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in 
publish_module
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in publish
   File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 171, in publish
   File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
 (Object: manage_addLoginManager)
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 112, in 
call_object
 (Object: manage_addLoginManager)
   File 
/usr/local/zope/lib/python/Products/LoginManager/LoginManager.py, 
line 237, in manage_addLoginManager
   File /usr/local/zope/lib/python/Products/ZPatterns/PlugIns.py, line 
313, in _constructPlugIn
TypeError: (see above)

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager and ZPatterns - Sparse Install Docs, Help.

2000-08-05 Thread Darin Lee

Zopistas,

Maybe I'm making this harder than it needs to be.

I want to set up a membership system for the site I am developing with Zope.
I do not want to "restrict" any part of the site - instead I want a user to
login (at their convenience) and then extend the "menu" options based on
their group membership. If a user is not logged in - no problem, they just
won't be able to view the advanced options - they'll still be able to surf
the site (I want to maintain my user list in an external database as well).

What is the best tool in Zope to accomplish this? After searching the site,
I find there are several products - ACL Users, GUF, and LoginManager. Is GUF
deprecated (The intro tends to give me this feeling)? Is LoginManager the
way to go?

It also appears GUF is more tailored toward restrictive authentication (I've
already perused the "Using GUF with an SQL Database" how-to). I want a user
to login (via HTML form/cookie) whenever they like, and get presented with
additional menu options (based on their AUTHENICATED/GROUP status). Not have
them try to access a "restricted" page (or type "manage") and get a basic
authentication login box to get in.

As far as LoginManager itself is concerned, I assume it requires ZPatterns.
However, the Zpatterns install instructions are *very sparse.*  How do I get
the thing set up? Here's verbatim from the ZPatterns docs:

-
After unpacking the ZPatterns product, you will need to build this [c]
extension using the included Setup file in the ZPatterns directory.
-

How do I use the "Setup" file?? With the command "python Setup"? It doesn't
say *how* to use it.

-
Please follow the standard procedures for building a Python module on your
platform. (On Unix-ish systems, this usually consists of copying a
Makefile.pre.in to the directory, then doing a make -f Makefile.pre.in boot
followed by make.
-

What are these standard procedures?? I built Python itself with
"configure|Make|Make install". Where do I get this "Makefile.pre.in" file in
the first place, from my Python src/build directory?? Correct me if I'm
wrong, but there's usually some kind of script file to run that get's things
going, or a "configure" script. I find none of this in the
lib/python/Products/ZPatterns directory after I untarred it.

So, I'm basically stumped. It doesn't appear GUF will do what I need, and I
have failed on multiple attempts to get Loginmanager/ZPatterns installed. If
someone could point me in the right direction on this I sure would
appreciate it.

Thanks much,
-Darin Lee


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager UserSources

2000-08-02 Thread Danny William Adair

What UserSources are available as of today for the LoginManager to use? How
do they work?

TIA
Danny


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager UserSources

2000-08-02 Thread Wilkinson Charlie E
Title: RE: [Zope] LoginManager UserSources





Hi Danny,
I don't think the question applies, as you are prettymuch free to build a UserSource to anything you want. Of course, with that freedom comes aggrevation. ;-/ There is ready documentation on the Zope site for interfacing LM to SMB for authentication. I've gotten it working with Postgres (with crypted passwords no less!) It took me a couple of weeks on and off to finally get that going. Yes, it was painful, especially having no prior experience with GUF (or much experience with Zope, for that matter...) I've not made it a very high priority, but I'm working on a LoginManager/PostgreSQL walkthrough hoping that I might save someone else some grief. That info should be easy to translate for any other datasource full of users you might have in mind. Interested?

-cw-


 -Original Message-
 From: Danny William Adair [[EMAIL PROTECTED]]
 Sent: Wednesday, August 02, 2000 4:51 AM
 To: [EMAIL PROTECTED]
 Subject: [Zope] LoginManager UserSources
 
 
 What UserSources are available as of today for the 
 LoginManager to use? How
 do they work?
 
 TIA
 Danny





Re: [Zope] LoginManager UserSources

2000-08-02 Thread Kyler B. Laird


On Wed, 2 Aug 2000 15:13:45 -0400  you wrote:

I've gotten it working with
Postgres (with crypted passwords no less!)  It took me a couple of weeks on
and off to finally get that going.  Yes, it was painful, especially having
no prior experience with GUF (or much experience with Zope, for that
matter...)  I've not made it a very high priority, but I'm working on a
LoginManager/PostgreSQL walkthrough hoping that I might save someone else
some grief.  That info should be easy to translate for any other datasource
full of users you might have in mind.  Interested?

What I read:
"I see you're starving.  Are you interested in some food?"

Yes!  I'm desperate for a way to use Oracle and/or X.500
databases for authentication (and authorization and ...).
I would be happy to pay someone to hold my hand through
creating such a product.  (This is one of the first things
I built into Apache so many years ago.)

I'm a bit fuzzy on this, though.  Shouldn't there be an
easy way to generalize databases for this purpose?  Why do
we need PostgreSQL, Oracle, Gadfly, ... versions?  I'd
like to be able to just choose a connection ID and go.

Thank you.

--kyler

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] LoginManager UserSources

2000-08-02 Thread Wilkinson Charlie E
Title: RE: [Zope] LoginManager UserSources 





 -Original Message-
 From: Kyler B. Laird [[EMAIL PROTECTED]]
 
 On Wed, 2 Aug 2000 15:13:45 -0400 you wrote:
 
 I've gotten it working with
 Postgres (with crypted passwords no less!) It took me a 
 couple of weeks on
 and off to finally get that going. Yes, it was painful, 
 especially having
 no prior experience with GUF (or much experience with Zope, for that
 matter...) I've not made it a very high priority, but I'm 
 working on a
 LoginManager/PostgreSQL walkthrough hoping that I might save 
 someone else
 some grief. That info should be easy to translate for any 
 other datasource
 full of users you might have in mind. Interested?
 
 What I read:
 I see you're starving. Are you interested in some food?


Well, probably more like, Are you interested in Spam and CheezWiz
on saltines? ;-)


 Yes! I'm desperate for a way to use Oracle and/or X.500
 databases for authentication (and authorization and ...).
 I would be happy to pay someone to hold my hand through
 creating such a product. (This is one of the first things
 I built into Apache so many years ago.)


LM is a fantastically versatile product, which also makes it a potentially major PITA. Not having sufficient documentation makes it a recipe for insanity. (Save yourself, it's too late for me!)

 I'm a bit fuzzy on this, though. Shouldn't there be an
 easy way to generalize databases for this purpose? Why do
 we need PostgreSQL, Oracle, Gadfly, ... versions? I'd
 like to be able to just choose a connection ID and go.


The gist of it is this:


First you create (or use the default) UserSource. It's basically an empty box that is used to contain the various methods used to authenticate a user. You can have more than one UserSource, meaning you could have US's validating against SMB, LDAP, UNIX passwd, NIS, etc. (i.e., pretty much anything that Python will talk to) all running in conjunction. If validation fails against the first US, LM will simply drop through to the next and so on, until it either validates the user successfully, or drops out the bottom and denies access.

You will first need to create a method for determining if a user exists. If the user exists, return 1, otherwise 0.


A second method is required to take the entered username and actually look up a password, validate it against the password entered by the user and return success (1) or

failure (0).


A third method is used to look up the user's roles and return them as a list. These roles should match up against either default Zope roles, or preferably roles you've created for the purpose. You then lock down permissions on the desired folders/objects so that only users with the correct roles can access those objects.

And lastly, a forth method is needed to return a list of valid net domains from which the user is allowed to log in. If you don't want to restrict logins by domain, then simply return an empty list.

So, regarding your question about why should it matter which database, it doesn't. Not much anyways. US covers a much broader spectrum than just databases. As I indicated above, pretty much anything you could conceive of to store user data in, LM can interface to it. For some US's you may need to craft one or more external methods in Python. If it's a DBMS like Postgres, Oracle, MySQL, MSSQL, you will need a database connection method, and you will need SQL methods to fulfill the above four validation steps. Which brand of database you connect to is likely only going to affect minor issues of SQL syntax within your methods, if that. The way your user data is *structured* will have more impact than which database you use.

That leaves out a ton of detail, but should hopefully answer your immediate questions and then some. Feel free to drop me a note at [EMAIL PROTECTED] and we can further discuss getting your LM up and running.

-cw-





[Zope] LoginManager / Membership: WTFM (Where's the...)

2000-07-31 Thread Danny William Adair

Hi all!

I've successfully installed current releases of ZPatterns, LoginManager and
"Membership". This Membership product comes up with some nice high level
methods / forms for the common procedures, but still doesn't help me with my
basic LoginManager question: How do I add users? I can see there's a
UserSource, and its property sheet "storage" says something about
"LoginUser"s (resp. "LoginMember"s), and that they are to be "stored
persistently", "directly in this object". Now how does this happen?

(I would like to put my users in a gadfly db, because they are 500, but not
ZODB because too many transactions will happen)

What am I supposed to do?

TY VM IA
Danny


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager / Membership: WTFM (Where's the...)

2000-07-31 Thread Bill Anderson

Danny William Adair wrote:
 
 Hi all!
 
 I've successfully installed current releases of ZPatterns, LoginManager and
 "Membership". This Membership product comes up with some nice high level
 methods / forms for the common procedures, but still doesn't help me with my
 basic LoginManager question: How do I add users? I can see there's a
 UserSource, and its property sheet "storage" says something about
 "LoginUser"s (resp. "LoginMember"s), and that they are to be "stored
 persistently", "directly in this object". Now how does this happen?
 
 (I would like to put my users in a gadfly db, because they are 500, but not
 ZODB because too many transactions will happen)
 
 What am I supposed to do?

First: Remember that all of the above are either _alpha_ or beta, AFAIK. IOW, not 
aimed at
production/still in development.

That will make the rest of it come into perspective, and help keep blood pressure form
spiraling ;^)

Next:
For membership, you add members by 'joining the site'. That is what Membership's intent
is, so of course it won't provide documentation on how to do the above.

To use your gadfly db for users would mean you need to write a Usersource fo rLogin
Manager that would do this. Membership, and the default LoginManager stuff does not 
(yet)
do this. For details on how to do this see
http://www.zope.org/Members/tsarna/LoginManager/Help/API.txt
and post questions on this to zope-dev, since that is the appropriate list.

Bill Anderson



 TY VM IA
 Danny
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager, User Sources, ...

2000-07-24 Thread Wolfgang Klinger

Hi!

I searched the archives and found some entries, all 
concerning the same problem ... 

I read this:

"LoginManager currently comes with a default 
 User Source called Generic User Source (GUS), 
 that is a GUF-like roll-your-own system.  It uses
 GUF-compatible methods (userExists, userRoles, etc),
 so converting any GUF-using site to a LM site 
 . "

and wondered where this GUS is hidden and how I
actually add users ??

(I'm still a newbie and want to know how it works!)

Can somebody please help?

TIA
Wolfgang



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager, User Sources, ...

2000-07-24 Thread Bill Anderson

Wolfgang Klinger wrote:
 
 Hi!
 
 I searched the archives and found some entries, all
 concerning the same problem ...
 
 I read this:
 
 "LoginManager currently comes with a default
  User Source called Generic User Source (GUS),
  that is a GUF-like roll-your-own system.  It uses
  GUF-compatible methods (userExists, userRoles, etc),
  so converting any GUF-using site to a LM site
  . "
 
 and wondered where this GUS is hidden 

It is hidden in the tab that says: UserSources :^)

 and how I actually add users ??


As for adding users, that's a bt more work. You have to create the forms
for doing so. You can search the archives, and it would be a decent idea
to look at the Membership *alpha* product, as it is an example.

http://www.zope.org/Members/tsarna/LoginManager/Help/API.txt
Might also be a good starting point...


Cheers, 
Bill

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager ... USER SOURCE

2000-07-21 Thread Wolfgang Klinger

Hi!

LoginManager needs a User Source ... what can
I use as User Source?

I need detailed instructions   ;-)

Wolfgang

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE:[Zope] LoginManager 0.8.6 on Zope 2.1.6

2000-07-19 Thread Mathias Bengtsson

You need to install the ZPattern package to Zope. You can get it at
Zope.org.
After that it should work fine

/Mathias Bengtsson

--Hi there

--I tried to install LoginManager 0.8.6 owith Zope 2.1.6 but that
failed. Zope
--reports:

--LoginManager Import Traceback
--Traceback (innermost last):
--  File "C:\PROGRA~1\ZOPE_216\lib\python\OFS\Application.py", line 387,
in
--import_products
--product=__import__(pname, global_dict, global_dict, silly)
--  File "C:\Program
--Files\Zope_216\lib\python\Products\LoginManager\__init__.py", line 1,
in ?
--import LoginManager, LoginMethods, UserSources
--  File "C:\Program
--Files\Zope_216\lib\python\Products\LoginManager\LoginManager.py", line
7, in
--?
--from Products.ZPatterns.PlugIns import PlugInGroup
--ImportError: No module named ZPatterns.PlugIns

--Any solutions ? Does it need Zope 2.20 ?!

--Gijs Reulen




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager 0.8.6 on Zope 2.1.6

2000-07-16 Thread Gijs Reulen

Hi there

I tried to install LoginManager 0.8.6 owith Zope 2.1.6 but that failed. Zope
reports:

LoginManager Import Traceback
Traceback (innermost last):
  File "C:\PROGRA~1\ZOPE_216\lib\python\OFS\Application.py", line 387, in
import_products
product=__import__(pname, global_dict, global_dict, silly)
  File "C:\Program
Files\Zope_216\lib\python\Products\LoginManager\__init__.py", line 1, in ?
import LoginManager, LoginMethods, UserSources
  File "C:\Program
Files\Zope_216\lib\python\Products\LoginManager\LoginManager.py", line 7, in
?
from Products.ZPatterns.PlugIns import PlugInGroup
ImportError: No module named ZPatterns.PlugIns

Any solutions ? Does it need Zope 2.20 ?!

Gijs Reulen


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager HOWTO?

2000-06-14 Thread Stuart 'Zen' Bishop

On Tue, 13 Jun 2000, Cesar A. K. Grossmann wrote:

 "Update (10/30/99): Zen has posted a product that has more functionality
 than UserDB, called GenericUserFolder. "
 
 Well, looks like the GenericUserFolder is more advanced. So I go to its
 page. In it there are another observation:

But do you want advanced? If you just want to store your authentication
information, UserDB is just fine - moving to GenericUserFolder in
this case may just cause you troubles, as more advanced also means 
more complicated.

UserDB is a simple user adaptor that is all you need if you are
storing your usernames, passwords and roles etc. in the one central
RDBMS. GenericUserFolder is what you have to move to if you are
in a more peculiar environment or want to use Radius authentication.
LoginManager supports all the functionality of GenericUserFolder,
but is still in developmental stages and probably not recommended for
production sites but may be the perfect choice if you don't plan going
production right now.

 I'm looking for a sequence of steps needed to configure and use the
 LoginManager. How to add users? How to add local roles? How to integrate
 it whith LDAP (not for now, but in the future)? How to use a RDBMS
 server, like PostgreSQL, to store the accounts (in case I cannot put
 LDAP up an running)?

Sounds like you would be happiest with UserDB for now and migrating
to the LDAP Adaptor in the future. Or if you wait long enough before
migrating to LDAP, you will probably find LoginManager supports LDAP
out of the box with no coding.

 I'm not a Python programmer, and I have a limited knowledge of Zope and
 DTML, and my english is only better than your portuguese...

Both GenericUserFolder and the current incarnation of LoginManager
require fairly in depth DTML knowledge unless you follow a cheat sheet
(check the HOWTO's on zope.org).

-- 
Stuart Bishop  Work: [EMAIL PROTECTED]
Senior Systems Alchemist   Play: [EMAIL PROTECTED]
Computer Science, RMIT University


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] LoginManager HOWTO?

2000-06-14 Thread Cesar A. K. Grossmann

Stuart 'Zen' Bishop wrote:
 
 But do you want advanced? If you just want to store your authentication
 information, UserDB is just fine - moving to GenericUserFolder in
 this case may just cause you troubles, as more advanced also means
 more complicated.

I need to provide a logon screen more informative than the default
dialog box. Can I do it with UserDB (I have tried, and have not found
any information about it).

I have tried it and have to figure out by myself the table and column
names and types. I have created one Gadfly connection (only for testing
purposed), and created the tabel users, as bellow:

create table users (
usernamevarchar,
passwordvarchar,
domains varchar,
roles   varchar
)

I suppose it is correct, but I'm not sure (it worked).

 GenericUserFolder is what you have to move to if you are
 in a more peculiar environment or want to use Radius authentication.

I have tried the GUF Walktrough and it doesn't works for me (the very
last part, trying to logon as 'fred', doesn't work). I'm using SiteRoot,
Apache proxying a zserver, and a Squid cache. All in the same machine...

TIA
-- 
César A. K. Grossmann
[EMAIL PROTECTED]
http://members.xoom.com/ckant/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager HOWTO?

2000-06-13 Thread Cesar A. K. Grossmann

Hi!

I'm trying to produce a web site with user authentication, and was
looking for something more customizable than the standard user
authentication mechanism provided by Zope.

My first step was look in the Zope page, making a search on the term
'authentication'. I found three products: UserDB, GenericUserFolder, and
LoginManager.

Reading the page at the UserDB I found the bellow:

"Update (10/30/99): Zen has posted a product that has more functionality
than UserDB, called GenericUserFolder. "

Well, looks like the GenericUserFolder is more advanced. So I go to its
page. In it there are another observation:

"Deprecated
This product is being deprecated in favor of the LoginManager.
LoginManager is what I like to believe that GUF would have been if I
didn't have to write it in a hurry."

Well, the next step is going to the LoginManager and try to figure out
how to install it and put it in my web site. I get the package (I'm
using the Linux version of Zope, in a Conectiva Linux 4.2 - like Red Hat
6.x -, installed from the rpm packages found in the Zope site), and,
after some troubles to make ZPatterns fully functional, I get it
installed. So now? No HOWTO explaining how to put it to run. Well, go to
the mailing list, and search old messages. No one helps me...

I'm looking for a sequence of steps needed to configure and use the
LoginManager. How to add users? How to add local roles? How to integrate
it whith LDAP (not for now, but in the future)? How to use a RDBMS
server, like PostgreSQL, to store the accounts (in case I cannot put
LDAP up an running)?

I'm not a Python programmer, and I have a limited knowledge of Zope and
DTML, and my english is only better than your portuguese...

TIA
-- 
César A. K. Grossmann
[EMAIL PROTECTED]
http://members.xoom.com/ckant/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )