Re: [Zope-dev] Single Sign On
Previously Shane Hathaway wrote: Alternatively, I have wondered if we actually need full-blown SSO; perhaps a carefully constructed domain-wide cookie would do the trick. Any experiences with that? auth_tkt based cookies sounds like a good option, possibly combined with something like SQL or LDAP for shared member properties. It has the advantage of being very widely supported as well as bwing very simple. CAS appears to be a common SSO system used for Plone sites and should work as well. Wichert. -- Wichert Akkerman wich...@wiggy.netIt is simple to make things. http://www.wiggy.net/ It is hard to make things simple. ___ 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] Zope Tests: 7 OK, 1 Failed
Summary of messages to the zope-tests list. Period Tue Feb 17 12:00:00 2009 UTC to Wed Feb 18 12:00:00 2009 UTC. There were 8 messages: 8 from Zope Tests. Test failures - Subject: FAILED (failures=1) : Zope-trunk-alltests Python-2.5.4 : Linux From: Zope Tests Date: Tue Feb 17 20:57:52 EST 2009 URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011136.html Tests passed OK --- Subject: OK : Zope-2.8 Python-2.3.7 : Linux From: Zope Tests Date: Tue Feb 17 20:43:34 EST 2009 URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011129.html Subject: OK : Zope-2.9 Python-2.4.6 : Linux From: Zope Tests Date: Tue Feb 17 20:45:45 EST 2009 URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011130.html Subject: OK : Zope-2.10 Python-2.4.6 : Linux From: Zope Tests Date: Tue Feb 17 20:47:45 EST 2009 URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011131.html Subject: OK : Zope-2.11 Python-2.4.6 : Linux From: Zope Tests Date: Tue Feb 17 20:49:51 EST 2009 URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011132.html Subject: OK : Zope-trunk Python-2.4.6 : Linux From: Zope Tests Date: Tue Feb 17 20:51:51 EST 2009 URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011133.html Subject: OK : Zope-trunk Python-2.5.4 : Linux From: Zope Tests Date: Tue Feb 17 20:53:52 EST 2009 URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011134.html Subject: OK : Zope-trunk-alltests Python-2.4.6 : Linux From: Zope Tests Date: Tue Feb 17 20:55:52 EST 2009 URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011135.html ___ 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 )
Re: [Zope-dev] Single Sign On
On Feb 17, 2009, at 7:55 PM, Shane Hathaway wrote: Gary Poster wrote: Launchpad uses OpenID. We don't have that slated for abstraction and open-sourcing immediately. However, most of the Launchpad code (including this bit) is to be open-sourced by this summer, abstracted or not. Therefore, we should at least be able to give you some idea of what we have done before then. I've forwarded your email to the primary implementer/designer of our OpenID integration. Hopefully he can directly participate, or at least give me some answers to forward to you. Cool, thanks. Generally, we're using python-openid for the Zope code, and an Apache plugin as a front-end for hooking up other bits. In that case, what do you pass to Consumer.begin()? It expects a user URL and no password, yet launchpad.net accepts a user name and password. Shane Hi Shane. Francis Lacoste gave this answer: We use the OpenID 2.0 identifier select URL. This is a special OpenID url that basically means: identity using whatever ID you have on that server. The OpenID response will contain the actual OpenID identifier of the user at the end of the request. So sites that we integrate in our SSO simply sends you to Launchpad for authentication and then uses the returned identifier to link with their local account representation. We also use sreg (Simple Registration) to transfer information about the account to the integrated sites, so that they can update their local account representation with the central data. Gary ___ 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 )
Re: [Zope-dev] Single Sign On
Gary Poster wrote: We use the OpenID 2.0 identifier select URL. This is a special OpenID url that basically means: identity using whatever ID you have on that server. The OpenID response will contain the actual OpenID identifier of the user at the end of the request. So sites that we integrate in our SSO simply sends you to Launchpad for authentication and then uses the returned identifier to link with their local account representation. We also use sreg (Simple Registration) to transfer information about the account to the integrated sites, so that they can update their local account representation with the central data. I see now! Thanks, Francis and Gary. Shane ___ 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 )
Re: [Zope-dev] Single Sign On
Shane Hathaway schreef: * The SSO process should be very similar to an ordinary cookie-based login process. I don't want the user to have to enter their username on one form and their password on another, but that's the standard OpenID process. * This will be implemented in Zope 3. We are considering OpenID, Shibboleth, CAS, and any other mature system that others might suggest. Shibboleth seems like the most obvious fit, but it's nowhere near as popular as OpenID. I haven't yet looked at CAS in detail. Alternatively, I have wondered if we actually need full-blown SSO; perhaps a carefully constructed domain-wide cookie would do the trick. In the two cases where I've been involved in SSO, both times there was some apache module that could handle the actual SSO-part. The result from zope's viewpoint was either a special http header or a special cookie. Working from that header (special_user=username_you_want) or cookie with similar contents is easy with zope2/plone's PAS and thus also zope2's authentication system which is mostly similar. You can look at http://svn.plone.org/svn/collective/PASPlugins/apachepas/ for some copy/paste code. So: easiest way is to let some trusted apache plugin handle the hard part and then laugh all the way to the bank with some 100-line authentication plugin. Reinout -- Reinout van Rees http://reinout.vanrees.org/ ___ 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 )
Re: [Zope-dev] Single Sign On
Reinout van Rees wrote: So: easiest way is to let some trusted apache plugin handle the hard part and then laugh all the way to the bank with some 100-line authentication plugin. That would usually work, but in this case, customers will be doing their own installation, so we need to keep the number of installation steps down. Shane ___ 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] Proposed Patch for zope.site
Today I ran into an exception masked by Zope 3. I found the code that was masking the exception and fixed it locally, but since this small bit of code has no docs or tests, I can't be sure I won't break stuff if I check in my change. What do y'all think I should do? Here is the patch: Index: src/zope/site/hooks.py === --- src/zope/site/hooks.py (revision 96718) +++ src/zope/site/hooks.py (working copy) @@ -91,10 +91,7 @@ def adapter_hook(interface, object, name='', default=None): -try: -return siteinfo.adapter_hook(interface, object, name, default) -except zope.component.interfaces.ComponentLookupError: -return default +return siteinfo.adapter_hook(interface, object, name, default) def setHooks(): Catching ComponentLookupError is a problem when an adapter factory looks up another adapter. If the first adapter lookup succeeds but the second fails with a ComponentLookupError, the current code makes it look like the first adapter is not registered at all. Very confusing. This patch exposes the correct traceback. I think my patch is correct because the 'default' parameter implies to me that if 'siteinfo.adapter_hook' can't find an adapter, it will return None, not raise ComponentLookupError. If 'siteinfo.adapter_hook' does in fact raise ComponentLookupError, then something else must be wrong and we should report the exception. BTW, until recently, this module lived in zope.app.component. It looks like this exception masking originated in Subversion revision 26391. Shane ___ 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 )
Re: [Zope-dev] Single Sign On
On Wed, Feb 18, 2009 at 09:00:10AM -0500, Gary Poster wrote: On Feb 17, 2009, at 7:55 PM, Shane Hathaway wrote: Gary Poster wrote: Launchpad uses OpenID. We don't have that slated for abstraction and open-sourcing immediately. However, most of the Launchpad code (including this bit) is to be open-sourced by this summer, abstracted or not. Therefore, we should at least be able to give you some idea of what we have done before then. I've forwarded your email to the primary implementer/designer of our OpenID integration. Hopefully he can directly participate, or at least give me some answers to forward to you. Cool, thanks. Generally, we're using python-openid for the Zope code, and an Apache plugin as a front-end for hooking up other bits. In that case, what do you pass to Consumer.begin()? It expects a user URL and no password, yet launchpad.net accepts a user name and password. Shane Hi Shane. Francis Lacoste gave this answer: We use the OpenID 2.0 identifier select URL. This is a special OpenID url that basically means: identity using whatever ID you have on that server. The OpenID response will contain the actual OpenID identifier of the user at the end of the request. So sites that we integrate in our SSO simply sends you to Launchpad for authentication and then uses the returned identifier to link with their local account representation. We also use sreg (Simple Registration) to transfer information about the account to the integrated sites, so that they can update their local account representation with the central data. I have the impression that you're talking past each other. There are two ways of using OpenID: * you can be an OpenID provider, i.e. accept logins with username password and respond to authentication requests from other websites confirming that the user does own this particular OpenID. * you can be an OpenID consumer, i.e. accept OpenID URLs from users and ask the corresponding OpenID provider to validate them. It's my impression that launchpad.net is an OpenID provider only, while Shane is trying to figure out how to use the OpenID consumer API in AuthKit. I could be mistaken about any of the particular points here. Marius Gedminas -- http://pov.lt/ -- Zope 3 consulting and development signature.asc Description: Digital signature ___ 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 )
Re: [Zope-dev] Single Sign On
Marius Gedminas wrote: It's my impression that launchpad.net is an OpenID provider only, while Shane is trying to figure out how to use the OpenID consumer API in AuthKit. No. I am going after the more conventional single sign on use case where many consumers depend on only one centralized identity provider, and I'd like to use a restricted form of OpenID to accomplish it. It turns out that Launchpad's internal authentication system is pretty much exactly what I was planning to do, so Gary's info pointed me in the right direction. Launchpad also happens to provide public OpenID services, but I don't need to do that. Shane ___ 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 )
Re: [Zope] Periodic task in a Zope 2 environment
Marco Bizzarri wrote: Thanks, Chris, but I do not want to use cron... Why not? Why re-invent the wheel in a more fragile and less tested way? also because I can end in environments where there is no cron ;) Such as? On *nix, you have cron. On MacOS, you have cron. On Windows, you have Schedules Tasks. On all posix systems you have 'at'. So where are these environments where you don't have cron or an equivalent? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Weird undefined symbol: PyUnicodeUCS{2|4}_AsEncodedString errors
Hi All, I wonder if anyone has seen errors like these before... Scenario is as follows, two Zope instances and a zeo server all running from the debian zope2.9 packages. All the control scripts for these instances fail with the following error when used: Traceback (most recent call last): File /usr/lib/zope2.9/lib/python/Zope2/Startup/zopectl.py, line 322, in ? main() ... File /usr/lib/zope2.9/lib/python/persistent/__init__.py, line 19, in ? from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY ImportError: /usr/lib/zope2.9/lib/python/persistent/cPersistence.so: undefined symbol: PyUnicodeUCS4_AsEncodedString However, when run as a cron job as follows: @daily /var/lib/zope2.9/instance/x/bin/zopectl run /var/lib/zope2.9/instance/x/Products/Stepper/run.py -q / jobs ...the control scripts behave properly and the stepper jobs get run. To solve the problem, I built python from source and installed the latest Zope 2.9 from source. Now, all the instances behave fine, except the above cron job now fails with the following: Traceback (most recent call last): File /opt/Zope-2.9/lib/python/Zope2/Startup/zopectl.py, line 334, in ? exitstatus = main() ... File /opt/Zope-2.9/lib/python/persistent/__init__.py, line 19, in ? from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY ImportError: /opt/Zope-2.9/lib/python/persistent/cPersistence.so: undefined symbol: PyUnicodeUCS2_AsEncodedString So, the problem seems inverted now and the error is about UCS2 rather than UCS4. Anyone ever seen anything like this? What is that symbol and why would it be there when run from a shell and not there when run from cron? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Weird undefined symbol: PyUnicodeUCS{2|4}_AsEncodedString errors
You probably have two different versions of Python installed. And probably this is a 64-bit system at least in parts. Check the python path cron uses and compare to the path the instance is run with. HTH, __Janko Am 18.02.2009 um 11:37 schrieb Chris Withers: Hi All, I wonder if anyone has seen errors like these before... Scenario is as follows, two Zope instances and a zeo server all running from the debian zope2.9 packages. All the control scripts for these instances fail with the following error when used: Traceback (most recent call last): File /usr/lib/zope2.9/lib/python/Zope2/Startup/zopectl.py, line 322, in ? main() ... File /usr/lib/zope2.9/lib/python/persistent/__init__.py, line 19, in ? from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY ImportError: /usr/lib/zope2.9/lib/python/persistent/cPersistence.so: undefined symbol: PyUnicodeUCS4_AsEncodedString However, when run as a cron job as follows: @daily /var/lib/zope2.9/instance/x/bin/zopectl run /var/lib/zope2.9/instance/x/Products/Stepper/run.py -q / jobs ...the control scripts behave properly and the stepper jobs get run. To solve the problem, I built python from source and installed the latest Zope 2.9 from source. Now, all the instances behave fine, except the above cron job now fails with the following: Traceback (most recent call last): File /opt/Zope-2.9/lib/python/Zope2/Startup/zopectl.py, line 334, in ? exitstatus = main() ... File /opt/Zope-2.9/lib/python/persistent/__init__.py, line 19, in ? from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY ImportError: /opt/Zope-2.9/lib/python/persistent/cPersistence.so: undefined symbol: PyUnicodeUCS2_AsEncodedString So, the problem seems inverted now and the error is about UCS2 rather than UCS4. Anyone ever seen anything like this? What is that symbol and why would it be there when run from a shell and not there when run from cron? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) PGP.sig Description: Signierter Teil der Nachricht ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Weird undefined symbol: PyUnicodeUCS{2|4}_AsEncodedString errors
Chris Withers wrote: ImportError: /usr/lib/zope2.9/lib/python/persistent/cPersistence.so: undefined symbol: PyUnicodeUCS4_AsEncodedString ImportError: /opt/Zope-2.9/lib/python/persistent/cPersistence.so: undefined symbol: PyUnicodeUCS2_AsEncodedString Having had a bit of a google, I found this post from Andreas: http://mail.zope.org/pipermail/zope3-users/2006-June/003791.html So it seems that python2.4 resolves to one python when cron is running and another when run from a shell of the same user. Has anyone seen this behaviour before or know what could cause it? cheers, Chris PS: I've solved this for now by changing python2.4 to /usr/local/bin/python2.4 in the control scripts, which seems to have done the trick. -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Weird undefined symbol: PyUnicodeUCS{2|4}_AsEncodedString errors
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 18.02.2009 12:00 Uhr, Chris Withers wrote: Chris Withers wrote: ImportError: /usr/lib/zope2.9/lib/python/persistent/cPersistence.so: undefined symbol: PyUnicodeUCS4_AsEncodedString ImportError: /opt/Zope-2.9/lib/python/persistent/cPersistence.so: undefined symbol: PyUnicodeUCS2_AsEncodedString You are running your Zope with a different Python version as used for installing Zope or your mixing up somehow PYTHONPATHs or your installed modules. - -aj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkmb6qcACgkQCJIWIbr9KYz93wCfd/xvitZqZQUDKkTJkkWj0Rgf xywAni+17U9ZE3nOT0dyGQ+pIos8dIqK =RuDP -END PGP SIGNATURE- begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Filesystem Directory View Child Folders
Hi! I have a filesystem directory view that has 2 child folders But when I switch to debug mode off the 2 folders disappears Is this the normal FDV behaviour or I have any kind of problem? Thanks! -- Mis Cosas http://blogs.sistes.net/Garito Zope Smart Manager http://blogs.sistes.net/Garito/670 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Weird undefined symbol: PyUnicodeUCS{2|4}_AsEncodedString errors
On Wed, Feb 18, 2009 at 12:00 PM, Chris Withers ch...@simplistix.co.uk wrote: Chris Withers wrote: ImportError: /usr/lib/zope2.9/lib/python/persistent/cPersistence.so: undefined symbol: PyUnicodeUCS4_AsEncodedString ImportError: /opt/Zope-2.9/lib/python/persistent/cPersistence.so: undefined symbol: PyUnicodeUCS2_AsEncodedString Having had a bit of a google, I found this post from Andreas: http://mail.zope.org/pipermail/zope3-users/2006-June/003791.html So it seems that python2.4 resolves to one python when cron is running and another when run from a shell of the same user. Has anyone seen this behaviour before or know what could cause it? cheers, Chris PS: I've solved this for now by changing python2.4 to /usr/local/bin/python2.4 in the control scripts, which seems to have done the trick. -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk Is it possible that you've something in your .bash_profile or .bashrc which manipulates the PATH environment variable? The behaviour could be explained because cron could define and execute your script using /bin/sh as the shell. Even though that one is a sym or an hard link to /bin/bash, bash could behave like sh and not reading the .bashrc or .bash_profile scripts before starting. Hope this help Regards Marco -- Marco Bizzarri http://notenotturne.blogspot.com/ http://iliveinpisa.blogspot.com/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Weird undefined symbol: PyUnicodeUCS{2|4}_AsEncodedString errors
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marco Bizzarri wrote: On Wed, Feb 18, 2009 at 12:00 PM, Chris Withers ch...@simplistix.co.uk wrote: Chris Withers wrote: ImportError: /usr/lib/zope2.9/lib/python/persistent/cPersistence.so: undefined symbol: PyUnicodeUCS4_AsEncodedString ImportError: /opt/Zope-2.9/lib/python/persistent/cPersistence.so: undefined symbol: PyUnicodeUCS2_AsEncodedString Having had a bit of a google, I found this post from Andreas: http://mail.zope.org/pipermail/zope3-users/2006-June/003791.html So it seems that python2.4 resolves to one python when cron is running and another when run from a shell of the same user. Has anyone seen this behaviour before or know what could cause it? cheers, Chris PS: I've solved this for now by changing python2.4 to /usr/local/bin/python2.4 in the control scripts, which seems to have done the trick. -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk Is it possible that you've something in your .bash_profile or .bashrc which manipulates the PATH environment variable? The behaviour could be explained because cron could define and execute your script using /bin/sh as the shell. Even though that one is a sym or an hard link to /bin/bash, bash could behave like sh and not reading the .bashrc or .bash_profile scripts before starting. Yup. In fact, this is why battle-scarred sysadmins always use fully-qualified paths in scripts meant to be run from cron, as well as in the crontab itself. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJnEgV+gerLs4ltQ4RAl51AJ9isWVwl7Km7R4gGCVCBQ8Nc8SwRwCgvRXm 1BfLu4pi2wsvE3Bw869KN3M= =wker -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope-DB] [Zope] Stored Procedures Versus ZSQL Methods
Am 18.02.2009, 00:58 Uhr, schrieb jpe...@ykksnap-america.com: Using external methods will be more work for the zope writer. I don't know enough to comment seriously on security issues, but I think that using procedures, like using bind variables, will make SQL Injection much harder. The mxODBC Zope DA makes the execute() method available to connection object instances which allows for parameter binding and the next release will make this available for PythonScripts. Rather than use ExternalMethods, however, I'd suggest that you use Views instead which make tying everything together a lot easier. Regarding performance: the comparisons we did a few years ago suggested that parameter binding is around 40% faster for non-cached access from Zope as Zope does quite a lot of work to turn ZSQL methods into usable queries. If the caching works for you then you will have pretty good performance because Zope will only actually run the query for something that isn't in the cache. Stored procedures can offer a performance improvement if you plan to manipulate the data in any way, ie. if you want to get data out of several views and do something with it before you pass it to the browser. But most importantly - in the Zope world the RDBMS is unlikely ever to be your bottleneck. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source Python/Zope Consulting and Support ...http://www.egenix.com/ mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/ ::: Try our new mxODBC.Connect Python Database Interface for free ! eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
Re: [Zope-DB] [Zope] Stored Procedures Versus ZSQL Methods
Thanks for your help! Rémy On Wed, Feb 18, 2009 at 3:53 AM, Charlie Clark char...@egenix.com wrote: Am 18.02.2009, 00:58 Uhr, schrieb jpe...@ykksnap-america.com: Using external methods will be more work for the zope writer. I don't know enough to comment seriously on security issues, but I think that using procedures, like using bind variables, will make SQL Injection much harder. The mxODBC Zope DA makes the execute() method available to connection object instances which allows for parameter binding and the next release will make this available for PythonScripts. Rather than use ExternalMethods, however, I'd suggest that you use Views instead which make tying everything together a lot easier. Regarding performance: the comparisons we did a few years ago suggested that parameter binding is around 40% faster for non-cached access from Zope as Zope does quite a lot of work to turn ZSQL methods into usable queries. If the caching works for you then you will have pretty good performance because Zope will only actually run the query for something that isn't in the cache. Stored procedures can offer a performance improvement if you plan to manipulate the data in any way, ie. if you want to get data out of several views and do something with it before you pass it to the browser. But most importantly - in the Zope world the RDBMS is unlikely ever to be your bottleneck. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source Python/Zope Consulting and Support ...http://www.egenix.com/ mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/ ::: Try our new mxODBC.Connect Python Database Interface for free ! eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
Re: [Zope-DB] [Zope] Stored Procedures Versus ZSQL Methods
Am 18.02.2009, 20:24 Uhr, schrieb Allen Schmidt Sr. aschm...@fredericksburg.com: Hey Charlie, What timing. I am having my server guys drop the trial egenix zope da in place as I write this. Seeing too many errors and oddities with the ancient MySQLDA we use now. Planning on converting all our mysql connections to the mxodbc connectors, but utilize the exact same name so we don't have to change every ZSQL method. Is this a sound practice? Or do you have any other solutions. If MySQL is to stay as your RDBMS then this work perfectly. It's one of the nice things about Zope that you tend to overlook: some replacement components really can just be dropped in - the ZSQL methods just know the id of the connection. To be honest the 3.0 version of the ZMySQLDA isn't bad and some of the errors may be related to other things - I've recently had a project with key errors on cached ZSQL results which are independent of the DA. But I'm pretty confident that the mxODBC Zope DA is the best around but being able to access more of the underlying driver can be a real life-saver. One thing I would recommend is moving all you ZSQL to the file system if you haven't already done this. Thanks and sorry for bothering you directly. Please let me know if not appropriate. While I don't mind the e-mail at all. It's always good to keep discussions like this on list so to that others can join in or benefit. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source Python/Zope Consulting and Support ...http://www.egenix.com/ mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/ ::: Try our new mxODBC.Connect Python Database Interface for free ! eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
Re: [Zope-DB] [Zope] Stored Procedures Versus ZSQL Methods
I understand. Thanks. Did not realize there was a new version of the python/zmysqlda available. Thanks for that info. Would really like to use the mx connectors but at this point if I can use an updated free one and it works, then I need to do that. And no, all our stuff is in the ZODB as ZSQL methods. Always has been. We do some stuff in straight python on the filesystem and some external methods but the vast majority is still done the same old way. Currently running on 2.8.9.1 Thanks for the info. Allen Charlie Clark wrote: Am 18.02.2009, 20:24 Uhr, schrieb Allen Schmidt Sr. aschm...@fredericksburg.com: Hey Charlie, What timing. I am having my server guys drop the trial egenix zope da in place as I write this. Seeing too many errors and oddities with the ancient MySQLDA we use now. Planning on converting all our mysql connections to the mxodbc connectors, but utilize the exact same name so we don't have to change every ZSQL method. Is this a sound practice? Or do you have any other solutions. If MySQL is to stay as your RDBMS then this work perfectly. It's one of the nice things about Zope that you tend to overlook: some replacement components really can just be dropped in - the ZSQL methods just know the id of the connection. To be honest the 3.0 version of the ZMySQLDA isn't bad and some of the errors may be related to other things - I've recently had a project with key errors on cached ZSQL results which are independent of the DA. But I'm pretty confident that the mxODBC Zope DA is the best around but being able to access more of the underlying driver can be a real life-saver. One thing I would recommend is moving all you ZSQL to the file system if you haven't already done this. Thanks and sorry for bothering you directly. Please let me know if not appropriate. While I don't mind the e-mail at all. It's always good to keep discussions like this on list so to that others can join in or benefit. Charlie ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
Re: [Zope-DB] [Zope] Stored Procedures Versus ZSQL Methods
Am 18.02.2009, 21:36 Uhr, schrieb Allen Schmidt Sr. aschm...@fredericksburg.com: I understand. Thanks. Did not realize there was a new version of the python/zmysqlda available. Thanks for that info. Would really like to use the mx connectors but at this point if I can use an updated free one and it works, then I need to do that. Ours works better! ;-) Which specific errors have you been experiencing? And no, all our stuff is in the ZODB as ZSQL methods. Always has been. We do some stuff in straight python on the filesystem and some external methods but the vast majority is still done the same old way. Currently running on 2.8.9.1 I think DirectoryView, FSObject and FSZSQLMethod are available separately, otherwise just get the latest version of CMFCore that will run on your version of Zope. It takes about five minutes to move a ZODB ZSQL-Method to the file system and it's worth it, especially if you can remove your dependency on ExternalMethods as well. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source Python/Zope Consulting and Support ...http://www.egenix.com/ mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/ ::: Try our new mxODBC.Connect Python Database Interface for free ! eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db