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:andreas@andreas-jung.com] Sent: Sunday, June 15, 2003 1:34 PM To: Markus Bengts; zope-dev@zope.org Subject: Re: [Zope-dev] storing passwords
exUserFolder is your friend.
-aj
--On Sonntag, 15. Juni 2003 23:28 Uhr +0300 Markus Bengts <markus@qvd.fi> 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 - Zope-Dev@zope.org 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 - Zope-Dev@zope.org 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 )
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 sean.upton@uniontrib.com 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:andreas@andreas-jung.com] Sent: Sunday, June 15, 2003 1:34 PM To: Markus Bengts; zope-dev@zope.org Subject: Re: [Zope-dev] storing passwords
exUserFolder is your friend.
-aj
--On Sonntag, 15. Juni 2003 23:28 Uhr +0300 Markus Bengts <markus@qvd.fi> 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.
sean.upton@uniontrib.com 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
On Mon, 16 Jun 2003, Chris Withers wrote:
sean.upton@uniontrib.com 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
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:
sean.upton@uniontrib.com 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.
participants (3)
-
Chris Withers -
Markus Bengts -
sean.upton@uniontrib.com