Re: [Zope-dev] storing passwords
Sorry to keep spamming this list. I just want to present a solution if someone browses the archives. I installed exUserFolder. And in pgAuthSource.py defined def remoteAuthMethod(self, username, password): to use a Z SQL Method instead of remoteAuthMethod=None It works. //Markus On Wed, 18 Jun 2003, Markus Bengts wrote: > On Mon, 16 Jun 2003, Chris Withers wrote: > > > [EMAIL PROTECTED] wrote: > > > > > Or SimpleUserFolder: create a user folder class in a Zope product that > > > subclasses both SimpleUserFolder and OFS.Folder. Then put ZSQL methods and > > > a few TTW python scripts in the folder contents of an instance of this class > > > to make it work. I've done something similar to this with relative success. > > > > Hmmm... I prefer to just put the SQL method in the folder containing the SUF, no > > need for subclassing and knowing how to write Zope Products then... > > > > I installed SimpleUserFolder and implemented the required methods. I can > now add and modify users but there is one thing missing. Where do I tell > Zope how to check the password when users try to authenticate? It should > be done with: > > select * from intrauser > where username = 'submitted_username' > and pwdigest = crypt('submitted_password', pwdigest) > > The crypt-function is stored in PostgreSQL (a contrib package). In this > way I can have many programs share the same password database. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] storing passwords
On Mon, 16 Jun 2003, Chris Withers wrote: > [EMAIL PROTECTED] wrote: > > > Or SimpleUserFolder: create a user folder class in a Zope product that > > subclasses both SimpleUserFolder and OFS.Folder. Then put ZSQL methods and > > a few TTW python scripts in the folder contents of an instance of this class > > to make it work. I've done something similar to this with relative success. > > Hmmm... I prefer to just put the SQL method in the folder containing the SUF, no > need for subclassing and knowing how to write Zope Products then... > I installed SimpleUserFolder and implemented the required methods. I can now add and modify users but there is one thing missing. Where do I tell Zope how to check the password when users try to authenticate? It should be done with: select * from intrauser where username = 'submitted_username' and pwdigest = crypt('submitted_password', pwdigest) The crypt-function is stored in PostgreSQL (a contrib package). In this way I can have many programs share the same password database. pgUserFolder has user_login() so this would probably be a possible solution. Is there an easy solution with SimpleUserFolder? Markus ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] storing passwords
[EMAIL PROTECTED] wrote: Or SimpleUserFolder: create a user folder class in a Zope product that subclasses both SimpleUserFolder and OFS.Folder. Then put ZSQL methods and a few TTW python scripts in the folder contents of an instance of this class to make it work. I've done something similar to this with relative success. Hmmm... I prefer to just put the SQL method in the folder containing the SUF, no need for subclassing and knowing how to write Zope Products then... cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] storing passwords
Markus Bengts wrote: I want to use the same usernames and passwords in Zope and some other servers. The usernames and password digests are stored in a PostgreSQL database, and a given username and password -pair can be checked with a simple SQL-query. SimpleUserFolder will let you do this with the addition of a single ZSQL query... cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] storing passwords
There are many possibilities. I would try exUserFolder first (it might work with just configuration (no code) for your use-case), and if you have needs more specific, you can develop your own user-folder type (a bit harder, but not much) using SimpleUserFolder (a generic "base class" for rolling-your-own user folders). Sean > -Original Message- > From: Markus Bengts [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 15, 2003 2:22 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [Zope-dev] storing passwords > > > > Thank you! > > I am still trying to find out what Zope is and what it can do. I > somehow missed the "alternative user folders" when I skimmed > through the > Zope Book. This was a pleasant surprise: > > http://www.zope.org/Products/user_management > > On Sun, 15 Jun 2003 [EMAIL PROTECTED] wrote: > > > Or SimpleUserFolder: create a user folder class in a Zope > product that > > subclasses both SimpleUserFolder and OFS.Folder. Then put > ZSQL methods and > > a few TTW python scripts in the folder contents of an > instance of this class > > to make it work. I've done something similar to this with > relative success. > > > > Sean > > > > > -Original Message- > > > From: Andreas Jung [mailto:[EMAIL PROTECTED] > > > Sent: Sunday, June 15, 2003 1:34 PM > > > To: Markus Bengts; [EMAIL PROTECTED] > > > Subject: Re: [Zope-dev] storing passwords > > > > > > > > > exUserFolder is your friend. > > > > > > -aj > > > > > > --On Sonntag, 15. Juni 2003 23:28 Uhr +0300 Markus Bengts > > > <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > > > > Hello, > > > > > > > > I want to use the same usernames and passwords in Zope and > > > some other > > > > servers. The usernames and password digests are stored in a > > > PostgreSQL > > > > database, and a given username and password -pair can be > > > checked with a > > > > simple SQL-query. > > > > > > > > I need to modify Zope to look up and to save passwords in > > > PostgreSQL. > > > > > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] storing passwords
Thank you! I am still trying to find out what Zope is and what it can do. I somehow missed the "alternative user folders" when I skimmed through the Zope Book. This was a pleasant surprise: http://www.zope.org/Products/user_management On Sun, 15 Jun 2003 [EMAIL PROTECTED] wrote: > Or SimpleUserFolder: create a user folder class in a Zope product that > subclasses both SimpleUserFolder and OFS.Folder. Then put ZSQL methods and > a few TTW python scripts in the folder contents of an instance of this class > to make it work. I've done something similar to this with relative success. > > Sean > > > -Original Message- > > From: Andreas Jung [mailto:[EMAIL PROTECTED] > > Sent: Sunday, June 15, 2003 1:34 PM > > To: Markus Bengts; [EMAIL PROTECTED] > > Subject: Re: [Zope-dev] storing passwords > > > > > > exUserFolder is your friend. > > > > -aj > > > > --On Sonntag, 15. Juni 2003 23:28 Uhr +0300 Markus Bengts > > <[EMAIL PROTECTED]> > > wrote: > > > > > > > > Hello, > > > > > > I want to use the same usernames and passwords in Zope and > > some other > > > servers. The usernames and password digests are stored in a > > PostgreSQL > > > database, and a given username and password -pair can be > > checked with a > > > simple SQL-query. > > > > > > I need to modify Zope to look up and to save passwords in > > PostgreSQL. > > > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] storing passwords
Or SimpleUserFolder: create a user folder class in a Zope product that subclasses both SimpleUserFolder and OFS.Folder. Then put ZSQL methods and a few TTW python scripts in the folder contents of an instance of this class to make it work. I've done something similar to this with relative success. Sean > -Original Message- > From: Andreas Jung [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 15, 2003 1:34 PM > To: Markus Bengts; [EMAIL PROTECTED] > Subject: Re: [Zope-dev] storing passwords > > > exUserFolder is your friend. > > -aj > > --On Sonntag, 15. Juni 2003 23:28 Uhr +0300 Markus Bengts > <[EMAIL PROTECTED]> > wrote: > > > > > Hello, > > > > I want to use the same usernames and passwords in Zope and > some other > > servers. The usernames and password digests are stored in a > PostgreSQL > > database, and a given username and password -pair can be > checked with a > > simple SQL-query. > > > > I need to modify Zope to look up and to save passwords in > PostgreSQL. > > > > Has someone done this before? Can someone tell me which source file > > contains the method that reads or saves passwords? Can this > be done by > > modifying only one source file? > > > > Markus > > > > ___ > > Zope-Dev maillist - [EMAIL PROTECTED] > > http://mail.zope.org/mailman/listinfo/zope-dev > > ** No cross posts or HTML encoding! ** > > (Related lists - > > http://mail.zope.org/mailman/listinfo/zope-announce > > http://mail.zope.org/mailman/listinfo/zope ) > > > > > > ___ > Zope-Dev maillist - [EMAIL PROTECTED] > http://mail.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope ) > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] storing passwords
exUserFolder is your friend. -aj --On Sonntag, 15. Juni 2003 23:28 Uhr +0300 Markus Bengts <[EMAIL PROTECTED]> wrote: Hello, I want to use the same usernames and passwords in Zope and some other servers. The usernames and password digests are stored in a PostgreSQL database, and a given username and password -pair can be checked with a simple SQL-query. I need to modify Zope to look up and to save passwords in PostgreSQL. Has someone done this before? Can someone tell me which source file contains the method that reads or saves passwords? Can this be done by modifying only one source file? Markus ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )