IRC log of #zope3-dev for Sunday, 2008-07-27

*** lurkymclurkleton has joined #zope3-dev00:03
*** aaronv has joined #zope3-dev00:09
*** gberdyshev has quit IRC00:15
*** pcardune has quit IRC00:18
*** aaronv has quit IRC00:30
*** aaronv has joined #zope3-dev00:31
*** fairwinds has quit IRC00:32
*** MrTopf has quit IRC00:51
*** lurkymclurkleton has quit IRC00:57
*** whit has joined #zope3-dev00:59
*** junkafarian has joined #zope3-dev01:21
*** MrTopf has joined #zope3-dev01:53
*** pcardune has joined #zope3-dev01:56
*** junkafarian has quit IRC02:05
*** greenman has joined #zope3-dev02:06
*** greenman has quit IRC02:07
*** whit has quit IRC02:15
*** whit has joined #zope3-dev02:21
*** aaronv has quit IRC02:29
*** sm has quit IRC02:32
*** fairwinds has joined #zope3-dev02:38
*** vipod has quit IRC02:40
*** whit has quit IRC03:00
*** MrTopf has quit IRC03:04
*** b52laptop has quit IRC03:08
*** harobed has quit IRC03:09
*** yota has quit IRC03:39
*** pcardune has quit IRC04:28
*** srichter has joined #zope3-dev04:44
*** rocky has joined #zope3-dev04:45
*** gberdyshev has joined #zope3-dev05:09
*** brandon_rhodes has quit IRC05:39
*** philiKON has joined #zope3-dev05:39
*** dbfrombrc has quit IRC06:33
*** pcardune has joined #zope3-dev06:36
*** gberdyshev_ has joined #zope3-dev06:48
*** gberdyshev has quit IRC07:02
*** greenman has joined #zope3-dev07:07
*** greenman has quit IRC07:33
*** rocky has quit IRC07:37
*** rocky has joined #zope3-dev07:53
*** pcardune_vm_ has joined #zope3-dev07:59
*** pcardune has quit IRC08:00
*** pcardune_vm_ has quit IRC08:00
*** pcardune has joined #zope3-dev08:06
*** rocky has quit IRC08:08
*** greenman has joined #zope3-dev08:13
*** fairwinds has quit IRC08:14
*** greenman has quit IRC09:04
*** harobed has joined #zope3-dev09:18
*** pcardune has quit IRC09:20
*** hexsprite has quit IRC09:28
*** harobed has quit IRC10:14
*** greenman has joined #zope3-dev10:25
*** timte has joined #zope3-dev10:38
*** theuni has joined #zope3-dev10:43
*** junkafarian has joined #zope3-dev10:46
*** georgyberdyshev has joined #zope3-dev10:49
*** gberdyshev_ has quit IRC10:49
*** theuni has left #zope3-dev10:56
*** greenman has quit IRC11:04
*** jukart has joined #zope3-dev11:12
*** jukart_ has joined #zope3-dev11:27
*** jukart has quit IRC11:29
*** jukart has joined #zope3-dev11:29
*** vipod has joined #zope3-dev11:37
*** jukart_ has quit IRC11:47
*** mcdonc_ has quit IRC11:51
*** mcdonc_ has joined #zope3-dev11:51
*** MrTopf has joined #zope3-dev11:52
*** yota has joined #zope3-dev11:59
*** theuni has joined #zope3-dev11:59
*** theuni has quit IRC12:16
*** theuni has joined #zope3-dev12:16
*** jukart has quit IRC12:17
*** b52laptop has joined #zope3-dev12:18
*** romanofski has joined #zope3-dev12:20
*** dunny has joined #zope3-dev12:22
*** sunew has joined #zope3-dev12:27
*** norro has joined #zope3-dev12:31
*** romanofski has quit IRC12:32
*** jukart has joined #zope3-dev12:36
*** jukart_ has joined #zope3-dev12:38
*** MrTopf has quit IRC12:40
*** norro_ has joined #zope3-dev12:49
*** theuni has quit IRC12:50
*** norro has quit IRC12:56
*** norro_ has quit IRC12:56
*** jukart has quit IRC12:57
*** jukart_ has quit IRC12:58
*** MrTopf has joined #zope3-dev13:03
*** greenman has joined #zope3-dev13:14
*** romanofski has joined #zope3-dev13:24
*** acsr has joined #zope3-dev13:28
*** junkafarian has quit IRC13:37
*** projekt01 has joined #zope3-dev13:59
*** vipod has quit IRC14:11
*** flox has joined #zope3-dev14:17
*** dunny has quit IRC14:21
*** MrTopf has quit IRC14:26
*** MrTopf has joined #zope3-dev14:54
*** MrTopf has quit IRC15:20
*** greenman has quit IRC15:21
*** MrTopf has joined #zope3-dev15:25
*** ccomb1 has joined #zope3-dev15:26
*** ccomb has quit IRC15:27
*** romanofski has quit IRC15:28
*** regebro has joined #zope3-dev15:30
*** quodt has joined #zope3-dev15:32
Pan_can i access to zodb without zope?15:33
*** MrTopf has quit IRC15:38
ccomb1Pan_ yes the zodb is independant from zope15:38
Pan_cool! i want to check if some of my objects 'expired' in my system and delete them15:40
Pan_how i could do that? with crontab script accessing to zodb?15:40
*** fairwinds has joined #zope3-dev15:45
ccomb1Pan_ why not, but there is a package to schedule this kind of actions inside zope (don't remember)15:49
philiKONnot in z315:50
ccomb1ah, bad15:50
Pan_hm.15:51
Pan_so how can i solve my problem :/ ?15:51
ccomb1Pan_ by calling an url poiting to a view that performs such an action ?15:54
ccomb1from a cron job15:54
Pan_ccomb1!15:55
Pan_excellent idea! :)15:55
Pan_i didnt think about that. thanks.15:56
Pan_:)15:56
*** sunew has quit IRC15:58
*** ccomb1 is now known as ccomb16:19
*** ccomb has quit IRC16:20
*** ccomb has joined #zope3-dev16:20
*** ccomb has quit IRC16:25
*** ccomb has joined #zope3-dev16:27
*** quodt has quit IRC16:29
*** Theuni has joined #zope3-dev16:41
*** jukart has joined #zope3-dev16:44
*** ccomb has quit IRC16:45
*** jodok has joined #zope3-dev16:45
*** gberdyshev_ has joined #zope3-dev16:50
*** jukart has quit IRC16:51
*** jukart has joined #zope3-dev16:54
*** georgyberdyshev has quit IRC17:04
*** jhauser has joined #zope3-dev17:13
*** afd_ has joined #zope3-dev17:15
*** gberdyshev_ has quit IRC17:18
*** regebro has left #zope3-dev17:41
*** aclark is now known as aclark|away17:58
*** jodok has quit IRC18:00
*** projekt01 has quit IRC18:07
*** elro has joined #zope3-dev18:08
*** andres_f has quit IRC18:11
*** srichter has quit IRC18:11
*** andres_f has joined #zope3-dev18:11
*** jhauser has quit IRC18:14
*** philiKON has quit IRC18:30
*** philiKON has joined #zope3-dev18:31
*** jodok has joined #zope3-dev18:32
*** regebro has joined #zope3-dev18:38
*** flox has quit IRC18:43
*** MrTopf has joined #zope3-dev18:44
*** harobed has joined #zope3-dev18:47
*** jhauser has joined #zope3-dev18:58
*** norro has joined #zope3-dev19:06
*** philiKON has quit IRC19:08
*** norro has quit IRC19:16
*** norro has joined #zope3-dev19:16
*** mcdonc_ has quit IRC19:17
*** mcdonc has joined #zope3-dev19:17
MrTopfIs there some list which versions of which packages make up e.g. Zope 3.3?19:19
MrTopfor are those in sync with the Zope version?19:19
mcdoncMrTopf: I think the "KGS" knows19:20
MrTopfwhere do I find it? :)19:20
mcdoncor not19:20
mcdonci dont see a way to get at 3.319:20
MrTopfI have some problems mixing in a package which needs the ZCA with Plone19:21
MrTopfand I would like to try to pin the version numbers to those used in the Zope2 version used19:21
MrTopfbecause right now I have conflicts as the Zope2 stuff is not installed as eggs19:21
mcdonclooks like the kgs started at 3.4... http://download.zope.org/zope3.4/intro.html19:21
MrTopftoo bad19:21
mcdoncbut i'm sure it's in SVN19:21
mcdonchttp://svn.zope.org/Zope3/tags/19:22
afd_MrTopf: do a checkout on the 3.3 tag and look at svn:externals, they're probably tied o other tags as well19:22
MrTopfok, thanks, will have a look19:22
mcdoncit's likely that you may need to roll your own eggs for the offending packages19:23
mcdoncbecause i dont think 3.3 was eggified19:23
*** timte_ has joined #zope3-dev19:23
*** lurkymclurkleton has joined #zope3-dev19:24
*** lurkymclurkleton has quit IRC19:25
MrTopfI slowly come to the conclusion that the rest of the guys around this project have been right in saying that too many external dependencies are not really good.. :/19:26
mcdoncthat's the zope2 and django way indeed19:28
MrTopfI will now try to remove the requirements from the buildout and setup.py manually19:29
MrTopfwell, so far having introduced buildout for this project has not made many people happy because of several problems which occured to people19:29
MrTopfnow with also introducing virtualenv I hope they are fixed though19:30
MrTopfI just wonder if grokcore.component will now require all these packages again.. probably19:30
mcdoncthe "right" way to make repeatable installs with eggs (IMO) is to use your own index19:30
*** vimes656 has joined #zope3-dev19:30
MrTopfwell, in one instance some wrong version of an egg which already was installed globally has been used all the time19:31
mcdoncWell, just for reference, further gotchas await here... http://plope.com/Members/chrism/distribution_links_considered_harmful19:31
MrTopfcan I switch off the automatic resolve of requirements for one egg somehow?19:31
MrTopfI think I read this19:32
mcdoncthe right thing to do is this: make a directory full of the eggs you want, get the makeindex.sh from that page, run it against the eggs, publish the resulting "index" directory (and its parent) on the web as an index19:32
mcdoncthen use that index in the buildout.cfg19:33
MrTopfwell, that does not yet help me in this particular case though ;-)19:33
MrTopfbut I will definitely set this up for general use19:33
MrTopfthanks19:33
mcdoncif people are becoming untrusting of your buildout, it's the only way to make sure it "always works" (along with virtualenv)19:34
MrTopfwould be nice if virtualenv would be included in buildout19:35
MrTopfI tried to write some different bootstrap.py which does that but so far it's not working19:36
MrTopffor now I would need a way though to prevent grokcore.component from installing it's dependencies in the hope that the stuff in Zope2 is sufficient19:36
MrTopfand btw, so far nobody trusts buildout anymore ;-)19:37
mcdoncyeah.  unfortunately you need to stomp on it in several vectors to make builds reliable.19:37
mcdonci write these sorts of instructions for customers:19:38
mcdonc1. install setuptools19:38
mcdonc2. install virtualenv19:38
mcdonc3. create a virtualenv19:38
mcdonc4. check out the buildout *into* the virtualenv19:38
mcdoncrun bin/python bootstrap.py19:39
mcdonc... and so on19:39
MrTopfHere are my instructions which basically do that:19:39
MrTopfhttps://wiki.secondlife.com/wiki/Pyogp/Client_Lib/The_Development_Sandbox19:39
MrTopfplus I wrote a bootstrap.py which includes a development version of setuptools19:39
MrTopfbecause of the svn 1.5 problem19:39
afd_mcdonc: wouldn't it be better to install zc.buildout with the easy_install from the virtualenv? Is there a connection made between buildout and virtualenv if they function separately (even if inside the same folder)?19:40
*** timte has quit IRC19:40
afd_to tell the truth, I haven't tried this yet19:40
mcdoncafd_: my buildouts seem to always be checkouts19:40
mcdoncbut that's not a bad idea either19:40
afd_based on bootstrap.py?19:41
mcdoncyeah19:41
afd_oh, ok then19:41
MrTopfso, fake_eggs is now recommended to me19:41
mcdonclord19:41
*** norro has quit IRC19:42
MrTopfactually I just wanted to quickly create some devel sandbox ;-)19:42
afd_also, I thought buildout worked to achieve the main functions of virtualenv... it's odd that it needs to be installed like that to really separate yourself from system packages...19:42
MrTopfafd_: well, it would be cool if it's possible to tell buildout as well to not use system packages.. but in one case it found the zope.interface 3.3.0 egg inside the Mac OSX python installation and used this instead19:43
mcdoncafd_: indeed19:43
*** jodok has quit IRC19:44
MrTopfit even put the path to those site-packages into all the scripts19:44
mcdoncMrTopf: which version of zope.interface do you need?19:44
MrTopfI don't care I think as I only use the basics in that package19:44
mcdoncwhich package is getting you now?19:44
MrTopfbut in this case zope.component was already in some newer form there and this led to a problem with OverflowError or somesuch19:44
MrTopfbut this was solved with virtualenv and setting up the buildout from scratch19:45
MrTopfit's this package: http://svn.secondlife.com/svn/linden/projects/2008/pyogp/pyogp.lib.base/trunk/ mixed with a recent plone buildout19:45
MrTopfI now set the zope.interface version to 3.3.0 in the buildout.cfg and hope it works19:45
MrTopfnope :)19:46
MrTopffake eggs then19:46
mcdonc*cough* ..(private index)19:46
MrTopfwhat does a private index bring me?19:48
mcdoncrepoze.plone has everything eggified but it also suffers from some of this (the same package in multiple distributions)... it's a symptom that we need to repackage i'm afraid19:48
MrTopfI don't know the version of the packages I need for it to work. It needs to match what's in Zope 2.10.619:49
mcdoncMrTopf: it will either work or it wont, and it will work the same every time if it does... if some package depends on a non-version-pinned dependency, by default it will go to pypi and get whatever the last person happened to upload19:49
mcdoncwhere by "by default" i mean without a private index19:50
mcdoncso while it might happen to work today19:50
MrTopfI know. But I don't know which egg I should put into my index for zope.component and zope.interface19:50
mcdoncit might not tomorrow19:50
MrTopfI will definitely try out my personal index19:50
MrTopfbut here it's more Zope2 which is the probem19:50
MrTopfproblem19:50
mcdoncwell lets see what it wants...19:51
mcdonc3.3.219:52
mcdonci can roll a 3.3.2 egg for you if you'd like19:52
MrTopf3.3.2 of what? zope.interfaces?19:53
mcdonczope.component19:54
*** mcdonc_ has joined #zope3-dev19:54
*** mcdonc has quit IRC19:54
MrTopfhow did you find that out?19:54
mcdonc_by running "svn propedit svn:externals ." in the lib/python/zope directory of a checkout of the 2.10 branch19:55
MrTopfah, ok19:55
MrTopfthen I guess I can also make my own eggs from that for my own index :)19:56
MrTopfI am nevertheless trying out fake eggs now19:56
mcdonc_fake eggs might be easier19:56
MrTopfesp. as I would like to start developing and stop configuration ;-)19:57
MrTopfbut I will keep this in mind and setup a individual index nevertheless, seems not to be that hard19:57
mcdonc_it appears that no one bothered to tag 3.3.2 in any z3 "satellite" package19:57
MrTopfjust need to figure out where to host it19:57
mcdonc_and why would you?  it's only the most used version.19:57
mcdonc_builds are a pain but they are extremely important... i spend a lot of time getting them right, and it tends to pay off19:58
MrTopfI know, usually they also worked quite well for me.. just now it happened that many people had problems here and they also blame ZCA for it because dependencies is what makes you need buildout20:00
mcdonc_well, they probably should in some sense, because the dependency graph of most z3 eggs is fucked20:00
mcdonc_zope.interface and zope.component arent too bad tho20:01
MrTopfI guess also buildout could be made a little more reliable e.g. by adding support for not using site-packages20:01
MrTopfwell. if you include zc.recipe.testrunner you load 10 eggs with it though20:01
MrTopfand grokcore.component also adds some20:01
MrTopfat some point it might also be nice to see some dependency graph20:02
mcdonc_buildout is also fucked ;-)  you might be better off setting up either a meta-egg with version pins or a private index and using easy_install20:02
MrTopfI simply ship tarballs ;-)20:02
MrTopfbecause when you add windows to the mix....20:02
mcdonc_kinda hard when there's C stuff20:02
MrTopfwell, several tarballs then20:03
MrTopfok, so fake eggs worked20:03
mcdonc_woo hoo!20:03
MrTopfI wonder if this should be in such a buildout per default20:03
MrTopfas Hanno said that they answered this question on the list many times20:03
MrTopfmakes sense to fix it then ;-)20:03
mcdonc_is this a plone build?20:04
MrTopfthe ZopeSkel plone3_buildout20:05
mcdonc_just curious, why are you using plone for this project?20:06
mcdonc_it doesnt look like it has extreme ui requirements20:07
MrTopfwell, I want to use Plone as an example of how you can add an AgentDomain to your web site20:08
MrTopfso how to basically turn your plone site into a provider for Agents which can be used in OGP based virtual worlds20:08
mcdonc_plone seems awful heavy for that20:08
MrTopfsure, but there I know how to create views and all that why when using e.g. grok I will be more lost in finding out how to do certain things with grok/zope320:09
MrTopfwhile I also want to do this at some point as another example right now I wanted to be on the safe side to concentrate on the actual problem20:09
MrTopfturned out though that this did not work as expected ;-)20:09
mcdonc_well, i'll be self serving... http://static.repoze.org/bfgdocs/index.html20:09
MrTopfI read about this and it looks promising but for me right now it would be again learning a new framework20:10
mcdonc_this is a zopeish thing that is 1/16 as complicated as zope3 and 1/1000 as complicated as plone20:10
mcdonc_you could have learned it in the time you spent unfucking the dependencies20:11
MrTopfis there some user management included?20:11
MrTopfwell, this wasn't to be expected ;-)20:11
MrTopfand as a side effect I now learned about fake eggs which might be useful in the future anyway because we do quite a bit of Plone20:11
MrTopfso once I have this finished I will look at bfg :)20:11
MrTopfbut expect some questions :)20:12
mcdonc_ok, i know how it is...20:12
mcdonc_you stick with what you know20:12
MrTopfwell, I am open to try out something new20:12
MrTopfthe thing just it: When I tried out grok a while ago I directly ran into the problem that I wanted to create some user and usermanagement wasn't included in grok.. So I needed to do it the Zope3 way but didn't have philikons book with me and there is not too much findable online20:13
MrTopfbut as I see bfg seems to have good documentation :)20:14
mcdonc_MrTopf: bfg relies on middleware for authentication (repoze.who, typically, or just an apache REMOTE_USER)20:14
mcdonc_it does not have ui for user management20:14
mcdonc_(it doesnt even have a User class)20:14
MrTopfwell, then I would need to implement that..20:14
mcdonc_yes.20:15
MrTopfbut I guess it will be easier than then the zope3 way or at least more approachable20:15
MrTopfas z3 usually is easy as long as you know how you have to do stuff20:15
mcdonc_theres no magic in it20:15
MrTopfthat's why it was also ok to use django because in the case of a problem I still could read the code and knew what was going on20:15
mcdonc_you'd have to write a view that looked in your user database and let you tweak stuff20:16
MrTopfalthough they tried to obfuscate it with metaclasses20:16
mcdonc_yeah.. bfg is modeled more after django from a dev perspective than it is zope.20:16
MrTopfI guess I simply need some db table which has some user info then20:16
mcdonc_right20:16
MrTopfok, sounds easy20:16
MrTopfwell, I will have a look at it :)20:16
MrTopfbut for now I will implement that agent domain stuff for Plone and as a result I will make progress on pyogp.lib.agentdomain which should be reusable then20:17
MrTopfactually Plone only provides the hooks for the lib20:17
mcdonc_seems like maybe you should develop that lib independent from plone (or zope or anything)20:17
MrTopfthat's the plan20:18
MrTopfI just use Plone as an example of how to use it and develop the structure according to what I need there20:18
MrTopfso the views are mostly delegating to that lib20:18
mcdonc_shouldnt your buildout not pull in plone then?20:18
MrTopfthe only question I have to solve is how to do authorization as they have that great concept of capabilities for auth20:19
MrTopfwell, I have a special buildout which installs Plone and those libs20:19
*** jhauser has quit IRC20:19
mcdonc_oic... so what are folks complaining about?  is there a separate build that just pulls in the lib?20:19
MrTopfwhich is basically a plone buildout which installs the libs as externals20:19
MrTopfwell, the lib only buildout already did not work for some20:20
mcdonc_because it depends on zca stuff?20:20
MrTopfand on setuptools which does not work with subversion 1.520:20
MrTopfand in one case it used the zope.interface egg in site packages instead of installing a more recent one20:20
MrTopfthe setuptools was of course some unforseen incident which is only temporary until a new release is out20:21
MrTopfbut it all added to it20:21
mcdonc_yup20:21
MrTopfand of course ZCA is magic to people on the first glance20:21
* mcdonc_ reads the architecture page20:21
MrTopfand I kept explaining it for days20:21
MrTopfeven wrote a tutorial20:22
MrTopfor 220:22
MrTopfand it was hard to see the benefits.. and of course one could also quickly implement something like this oneself...20:22
mcdonc_could you get away with only using zope.interface in the lib?20:23
mcdonc_just mark up classes with interfaces?20:23
*** jodok has joined #zope3-dev20:23
mcdonc_(instead of trying to wire them up using the CA)20:23
CSWookieYay for ZCA20:23
MrTopfmcdonc_: well, then the complaint was: Why use interface if there is exactly 1 interface for 1 implementation20:24
mcdonc_folks could either use the CA to wire them together in a separate package or choose not to... it would be documentation essentially20:24
MrTopfbut I also use adapters already and utilities20:24
MrTopfbecause they make factoring out functional components easier instead of having one big class20:24
MrTopfyes, I think that's seen now20:25
MrTopfwe also reconfirmed the use of ZCA on friday20:25
mcdonc_well it's probably not a library then.. it's more of an application at that point.20:25
MrTopfthe only thing now is that now some people come out of their holes who need it to run under Python 2.320:25
mcdonc_i suspect they'll have to lose20:25
MrTopfwell, there is some wiring inside the library.20:26
MrTopfwell, these are people from Linden Lab and Linden Lab uses 2.3 all over for stability reasons20:26
MrTopfbut I am not sure if LL wouldn't be better of with an internal project anyway ;-)20:26
mcdonc_maybe you can write it in such a way that the wiring is not required in the lib20:26
mcdonc_and wire it up in a separate package20:26
mcdonc_"let libraries be libraries"20:27
MrTopfwell, one example of where I wire is: We have an AgentDomain class which has a login() method. And you can call various functions on the agent domain (the class represents the end point). These are implemented as adapters for that agentdomain20:27
MrTopfof course one can move the adapter registration out of the lib20:27
mcdonc_right20:28
MrTopfbut what does that bring? Doesn't it make sense to specify on which interface this component works?20:28
MrTopfyou can also see this as documentation20:28
MrTopfmaybe you can prevent using ISomeInterface(context) calls20:29
*** jodok has quit IRC20:29
MrTopfbecause you can also do it the hardway by using it as a normal wrapper20:29
MrTopfSomeInterfaceImplementation(instance)20:29
mcdonc_there is a bit of a trick to this too20:29
mcdonc_if you can manage to pass in an interface to the agentdomain constructor, you can call it a "callback"20:29
MrTopfin fact only the high level api module now uses the ISomethign(context)20:29
mcdonc_and folks can either use an interface or a regular python function to give them back something20:30
MrTopfwell, they can do this right now, too20:30
MrTopfI would see it like this: There is a default wiring, if you don't want to use it, then don't use it20:31
MrTopfeither by not using the adapter calls or by overriding it via ZCA20:31
MrTopfthe latter seems to me more flexible though20:31
MrTopfI guess an index of your own also means that one can ship PyOpenSSL in compiled form for windows20:33
mcdonc_likely, as long as its eggified20:34
MrTopfas long as somebody gets it compiled ;-)20:34
MrTopfI tried it last week20:34
MrTopf<-- windows noob20:34
MrTopfor one can tell people to use an installer and modify those packages which need it to not include it in their reqs20:35
MrTopfwhich of course wouldn't be the ideal way20:35
mcdonc_i just checked out the source20:37
mcdonc_so what i'd suggest to get people off your back would be to parameterize the __init__ of e.g. AgentDomain20:37
mcdonc_and have it accept a callback, where the callback defaults to ISerializer20:38
mcdonc_and get rid of the REST utility20:38
mcdonc_and just make it a module-level function20:38
mcdonc_(i know you didnt ask for this, sorry to be presumptuous ;-) )20:39
MrTopfheh, I appreciate it nevertheless :)20:39
MrTopfbut when I make it the default then still zope.interface would be needed and thus a dependency20:39
MrTopfI think the problems people have right now is more about all things coming together20:40
mcdonc_sure... but i suspect you're still going to run into the WTF factor with interfaces20:40
MrTopfbuildout problems, ZCA being magic, not seeing the benefits of it etc.20:40
MrTopfI actually think it also settles now20:40
MrTopftwo people seem to know now what the benefits are20:40
mcdonc_ah ok20:40
MrTopfthe only thing might be the Python 2.3 thing20:41
mcdonc_that's probably irresolveable if you want to maintain sanity20:41
MrTopfIn the end it should actually be quite easy to help implementing as it mainly comes down to implementing new capabilities which basically each is one adapter and one can write recipes for how to implement these20:42
MrTopfwell, if it comes down to 2.3 I guess I am out then20:42
CSWookieThere's a dude from LL that occasionally asks Z3 related questions.  I tried to explain it to him once, but I don't know how good a job I did.20:42
MrTopfwell, neither know I what sort of job I did ;-)20:43
CSWookiequestions in #python.20:43
MrTopfapparently not that good as I kept explaining it ;-)20:43
MrTopfbut I might talk to somebody who know hopefully understood it and ask him how this tutorial can be enhanced20:43
MrTopfCSWookie: you know his name?20:43
MrTopfor nick20:43
CSWookieI don't recall.  I'm wanting to say Siokuden, or something like that.20:44
mcdonc_MrTopf: maybe you could just use a dictionary instead of an adapter lookup for capabilities and serializers/deserializers20:44
CSWookieIt was an odd name, and I've slept since then.20:44
MrTopfHm, no idea then20:44
MrTopfLocklainn?20:44
MrTopfhe at least now seems to know about the benefits :)20:45
CSWookieNo, I'd probably have rememebred that.20:45
CSWookieThe name struck me as...  Orientalish.20:45
MrTopfmcdonc_: sure. I will fallback to such a solution when ZCA is not to be choosen20:45
MrTopfSaijanai?20:45
*** afd_ has quit IRC20:45
CSWookieThat sounds much more promising.20:45
MrTopfI guess it was him then :) He's not working for LL though but is part of the Architecture Working Group as well20:46
MrTopf(which was funded by LL)20:46
MrTopffounded20:46
MrTopfnot funded :)20:46
*** andres_f has quit IRC20:46
MrTopfmcdonc_: my main argument here is that somebody already implemented a registry so why not use it20:47
MrTopfnext thing would be maybe events which I would also see as being useful in that library20:47
CSWookieI probably misunderstood him then.  He said he was working on specs for some Second Life thing.20:47
MrTopfyes, we are working on the Open Grid Protocol20:47
mcdonc_MrTopf: well, i suspect the response will be "why not a dictionary", which is a reasonable question for simple adapter lookups20:47
MrTopfit's a joint effort between Linden Lab and everybody who wants to contribure20:47
MrTopfcontribute20:47
MrTopfmcdonc_: as said, we confirmed ZCA now so I will stick to that now :)20:48
mcdonc_yup20:48
MrTopfif for some reason we again question this decision we can do it like that. My main point is that we don't end up with Zope2ish class structures if possible20:48
MrTopfand don't stick with 2.3 ;-)20:49
mcdonc_setuptools entry points are also good registries20:49
MrTopfI don't even get 2.3 compiled without problems on my mac20:49
MrTopfoh, that's magic, too ;-)20:49
MrTopfI would then stay with dicts20:49
mcdonc_yup20:50
*** andres has joined #zope3-dev20:50
MrTopffor now I wonder why my views are not registered ;-)20:50
mcdonc_the main use case for adapters is the same as it would be for "multimethods"... but if there is exactly one named imlplementation of an adapter and you dont do a dispatch on the caller type, adapters are not as useful.20:50
mcdonc_because then it really is just a dictionary20:51
MrTopfbut if you start without them you might end up faster with big classes.20:51
MrTopfI sorta like the way of thinking they imply20:51
MrTopfand going from doctests => interface => implementation also makes sense to me20:51
MrTopfand yes, you can do all of that without ZCA20:52
MrTopfyou just need some coding guidelines20:52
mcdonc_in bfg we use the hell out of the CA internally but there's no assumption that folks will use it to make apps, except to associate views with models... which feels about right.20:54
MrTopfwell, in pyogp I could imagine people registering the own event handlers for their app20:55
MrTopfas in the end it will be mainly an event loop20:55
mcdonc_yup.. although they might choose to use their own event system... the zope.event system is 4 lines long.20:55
mcdonc_and biting off the CA to use it is a lot.20:56
CSWookiemcdonc_: I'm amused by the name bfg, by the way.  Why did you select it?20:56
MrTopfbut isn't it based on the ZCA and 4 lines long because of that?20:56
MrTopfok, you can of course again do a dictionary or list20:56
mcdonc_CSWookie: i wanted to use "ZF1" (from Fifth Element) but the 1 in the name would have been too confusing... so bfg it was ;-)20:57
MrTopfbut in the end you can do this all the time.. so why doesn't Zope3 use more dict and lists? ;-)20:57
MrTopfbut actually in the end you will have something similar like ZCA, just based on dicts and lists, so I still wonder, why not use ZCA in the first place20:58
MrTopfit's implemented, it's documented, it gives you an interface some people might be familiar with20:58
CSWookieBecause 'Zope' is a big scary word?20:58
MrTopfI also see the danger though in overusing components because then it quickly becomes complicated to understand the structure20:59
mcdonc_MrTopf: i think its mostly a matter of "pay for what you eat"... an app is a reasonable place to rely on the CA.  A library might not be, because in order to use the library, you need to "pay" for "eating" the CA.20:59
mcdonc_and if the problem space can reasonably be solved with simpler stuff, it's not a horrible argument against it.21:00
MrTopfmaybe I should then propose to get rid of ZCA after I was voting for it all the time :)21:00
mcdonc_well, probably not.. but you might consider getting rid of it in the *base* library.. and have an extension "app" that wires it up  with the CA.21:01
MrTopfbut I still don't see the difference. you have to pay for understanding how the lib is wired anyway (or how you can wire it)21:01
mcdonc_well, maybe it's a matter that the library shouldnt need any wiring and the wiring happens above21:01
MrTopfwell, the adapter example comes up again.. then it needs to be in the docs on which classes/interfaces you can use that adapter21:02
*** jodok has joined #zope3-dev21:02
mcdonc_you can poke in interfaces from the outside too onto a class21:02
mcdonc_just for example, if the base lib just implemented classes that were useful for an arbitrary python app21:03
mcdonc_you'd move the stuff that relied on adapter lookups to a higher level21:04
MrTopfwell, I still like the idea of interfaces as documentation though21:04
mcdonc_sure21:04
mcdonc_i think it's just a matter of factoring "for the masses"21:04
mcdonc_no oss developer wants to learn anything new21:05
mcdonc_especially if they cant reuse the knowledge in their day job21:05
* MrTopf uses ZCA all the time after having it learned for Zope/Plone ;-)21:06
MrTopfor buildout21:06
mcdonc_sure... but there are tons of TG developers who use PEAK Rules to get multimethods, and they'd want to use that.21:06
mcdonc_and you'd be like "WTF is this?" ;-)21:06
MrTopfwell, I have no problem with learning something new :)21:07
MrTopfso what is it? :)21:07
MrTopfwell, I will see how things go now in this project21:08
mcdonc_http://peak.telecommunity.com/DevCenter/RulesReadme21:08
MrTopfthe important part, as said, to me is that it's coded in a sane style21:08
MrTopfand maybe ideas from how you would do it with ZCA are used if not ZCA itself21:09
mcdonc_i'm just a busybody, don't listen to me ;-)21:09
MrTopffrom the outside I would even say that you don't need to know about ZCA necessarily21:09
MrTopfnow though my views in my plone site are not found ;-)21:09
MrTopfand I suspect my configure.zcml not even read as I just wrote nonsense inside it, restarted and nothing complained..21:10
mcdonc_oh its one of those products thats not a product eh21:10
mcdonc_<five:package or something21:11
*** jhauser has joined #zope3-dev21:11
MrTopfwell, it does not need to be a product I think21:11
MrTopfit just has some views, no content types21:11
MrTopfbut it maybe helps to put it into the zcml-slugs part21:11
mcdonc_yup21:11
mcdonc_it wont be read automagically unless it's included in there21:12
MrTopfyeah, I actually knew this ;-)21:12
mcdonc_or you turn it into a zope2 product and use the five:package thing21:12
MrTopfok, now my nonsense fails21:12
mcdonc_woo hoo for failing nonsense!21:12
mcdonc_nice tests btw21:13
*** vipod has joined #zope3-dev21:14
MrTopfyou probably mean the message parser stuff21:14
mcdonc_indeed21:15
MrTopfthese are done by a Linden Lab guy who takes this serious :)21:15
MrTopfI just wrote some lousy doctests ;-)21:15
MrTopfI was busy fixing buildout failures21:16
mcdonc_the doctests look pretty good too21:16
MrTopfthanks, but there need to be more tests actually21:17
mcdonc_except the caps.txt imports "Capability" but doesn't actually use it21:17
MrTopfright, it maybe should21:17
MrTopfSeedCapability is a special case of a Capability though and most of the stuff should be tested by using that but nevertheless..21:18
MrTopfoh, and SC returns Capabilities, so in fact it is tested to some extent as I then call them21:18
mcdonc_so the AgentDomain is the "jumping off point"?  its what listens?21:18
MrTopflook at api.py21:19
MrTopfit starts with a credential object which then gets passed to the agend domain login method21:19
MrTopfand this is the starting point then21:19
MrTopfit returns the seed capability if login was ok21:19
mcdonc_ic21:19
MrTopf(internally)21:20
MrTopfthe login method itself returns an agent object which holds a reference to the agent domain and thus the seed cap21:20
*** regebro has quit IRC21:20
MrTopfand all the capabilities are then called on the agent domain21:20
MrTopfor later on a region when the agent chooses to rez on some piece of virtual land (=region)21:21
MrTopfthen the event loop comes into play21:21
MrTopfand something called reverse http21:21
MrTopfhere is some writeup about capabilities btw: http://mrtopf.de/blog/secondlife/slga-capabilities-explained-technical/21:21
MrTopfthey are used instead of header based auth21:21
* mcdonc_ reads21:23
MrTopfI am not really a fan of them though.. but it's what LL uses internally so right now there probably is no way around21:24
mcdonc_is the basic idea that you only need to send your username and password once?21:26
mcdonc_to get the seed capability?21:26
CSWookieHuh...  Since the cap url is sent via http, wouldn't be possible to get it via snooping?21:26
* CSWookie is feeling a little dumb to be asking that question, since it must have been thought about...21:27
MrTopfshould be https21:27
MrTopfmcdonc_: yes21:27
CSWookieOH, your examples say http.21:27
MrTopfwell, then I suck ;-)21:27
MrTopfthanks for spotting this :)21:27
*** sunew has joined #zope3-dev21:28
CSWookieNP.21:28
* MrTopf changed something21:29
MrTopfI should check what Linden Lab actually returns21:29
mcdonc_these folks have no business telling you the CA is complex ;-)21:29
MrTopfmcdonc_: heh :)21:29
MrTopfwell, caps in itself are also easy once you understood them21:29
MrTopfand that took me a while21:30
MrTopfuntil I understood that the caps server in fact is mostly a proxy21:30
MrTopfbut maybe a SPOF21:30
MrTopfand the seed capability also shouldn't go down21:30
MrTopfand it needs to know about all the URLs and permissions itself21:30
MrTopfwhy usually in web frameworks you attach that information to the function21:31
mcdonc_that last bit is what i tried to go for in repoze.decsec21:31
MrTopfand this actually also is my challenge of using it with plone because I have to switch of all security of my views in order for the caps server to access them21:31
mcdonc_attaching authorization info to URLs21:31
MrTopflike caps? where you get a different token for every function you want to use?21:32
MrTopfor move it from cookie to URL basically?21:32
MrTopfthe other problem is that you always have an extra roundtrip for retrieving the token21:32
MrTopfyou might be able to reuse it and you can collect many of them at once though21:33
MrTopfbut some might expire21:33
mcdonc_no... it's more like zope whereby you create a graph of security declarations, and compare the security declaration you find (by virtue of matching the URL against the graph of declarations) against the authenticated user21:33
MrTopfso in this case you have 2 roundtrips then, one with an error, then getting a new one and then finally calling the function21:33
MrTopfic21:34
mcdonc_like http basic auth21:34
mcdonc_(wrt to the roundtrip)21:34
MrTopfyes, but that stays then21:34
MrTopfand you can access all sorts of paths then21:34
MrTopfwith caps you have to ask for every resource you want to access21:35
mcdonc_i kinda wonder why a session id wouldnt have been good enough21:35
mcdonc_i guess it can be snooped21:36
mcdonc_duh21:36
*** vimes656 has quit IRC21:36
MrTopfyour seed cap could be snooped as well21:38
MrTopfor your pw in the first place21:38
MrTopfthe main reason I think is that here all the components don't have to worry about authorization21:39
MrTopfthey get some URL to some resource and answer21:39
MrTopfand you can only call it form the outside when you first asked for a public URL with some uuid21:40
MrTopfand some central authority (the seed cap) has your session and knows that you are user x and your inventory is stored at http://privatemachine/inventory/users/x/21:40
MrTopfand creates a mapping from this to some public URL which it can give out21:40
MrTopfand privatemachine does not need to know anything else about you and your permissions21:41
MrTopfbut this setup directly needs some sort of firewall or at least multiple servers (where one runs on 127.0.0.1 in order to be private)21:41
mcdonc_where is "privatemachine"?  "behind" the capability server?21:42
mcdonc_and the capability server is essentially the firewall?21:43
MrTopfit's behind the firewall (privatemachine)21:44
MrTopfand the caps server is a proxy inside the firewall21:44
MrTopfproxy with a mapping21:44
MrTopfthe private site send it messages like grantCap(privateurl, timeout, oneshot=False)21:45
MrTopfand it creates a new UUID and constructs a public URL with it and stores the mapping publicurl,privateurl inside some database and returns the public url21:45
MrTopfand on the public interface it listens for things like /cap/<uuid> and proxies it to privateurl21:45
MrTopfright now my public url in Plone is actually the same as private url21:46
MrTopfI might bake in some auth into the url to add some security to it21:46
MrTopflike back then with that old session id stuff inside the URL21:47
mcdonc_your plone app is what kind of server wrt to your diagram at http://mrtopf.de/blog/secondlife/slga-capabilities-explained-technical/?  It has the same duty as the "Assets" server or "IM" server?21:49
MrTopfIt's the Agent Host21:49
mcdonc_aw hell ;-)21:49
MrTopfand it might implement IM, inventory etc.21:49
MrTopfwell, maybe I do not all of this with Plone ;-)21:49
MrTopfthis really is just some experiment to get the interface of pyogp.lib.agentdomain right21:50
MrTopfand right now we only have login and placing the avatar on a region anyway21:50
MrTopfwhich involves 3 caps I think21:50
* mcdonc_ checks it otu21:52
MrTopfright now there shouldn't be too much working21:53
MrTopfand you'd need some account in Second Life of course. One that also is already on the beta grid21:53
MrTopfbut somebody might set this up maybe :)21:54
mcdonc_i dont see any plone imports anywhere21:56
MrTopfwhat did you check out?21:57
MrTopfI am not sure that my stuff is already checked in21:57
mcdonc_pyogp.lib.agentdomain21:58
mcdonc_(and base)21:58
MrTopfno, they are supposed to have no imports from Plone21:59
MrTopflet me check21:59
MrTopfok, I did not yet check it in ;-)21:59
MrTopfas there is not much yet to check in21:59
MrTopfI hope to have some progress today (then again it's getting kinda late here)21:59
mcdonc_ok well i'll stop bugging you, sorry... its just sort of interesting ;-)21:59
MrTopfI will tell you when there is something to see :)22:00
MrTopfhopefully with some instructions on how to setup your own test sandbox with your own region22:00
MrTopfin this case no LL server would be required22:00
MrTopfsome IBM guy is working on a patch for OpenSim to support this protocol22:00
MrTopfhere are my slides from EuroPython btw: http://www.slideshare.net/mrtopf/europython-2008-tear-down-the-walls-of-virtual-worlds22:01
mcdonc_if you check in your stuff i will try to turn it into a bfg app just for fun22:01
MrTopfcool22:01
mcdonc_wow.  that's one nice looking presentation.22:04
MrTopfthanks :)22:04
MrTopfnot sure it makes sense without the blabla around it though22:04
mcdonc_it doesnt matter, it's pretty ;-)22:05
*** timte_ has quit IRC22:06
MrTopf:-)22:06
MrTopfso now I need to find out how to check the password manually22:06
mcdonc_the deserialze gets you the payload with the login and password in it?22:08
MrTopfyes, deserialization of the credential22:08
MrTopfit comes all in form of LLSD, some XML dialect22:08
mcdonc_and now you need to check it against the login server?22:09
MrTopfyes, I just found AuthEncoding.pw_encrypt()22:09
MrTopfnow I only need to know where PAS stores the pw22:09
MrTopfPAS is also a mistery to me, btw ;-)22:09
MrTopfis there some good docs on it somewhere?22:09
mcdonc_no.22:10
*** andres_f has joined #zope3-dev22:10
* mcdonc_ looks at the PAS source22:10
MrTopfgreat ;-)22:10
MrTopfwell, that's what I do right now22:10
MrTopfI guess the proper way would be to ask some auth plugin22:11
MrTopfthe problem is though that SL users come as firstname lastname22:11
MrTopfso I first check memberdata now to find a user that fits it22:11
mcdonc_you probably dont want to mix up memberdata and auth data (because although they are related, they should be only loosely)22:12
mcdonc_i think the pas way would be to write an IExtraction plugin22:12
MrTopfmaybe I should use bfg...22:12
MrTopfwell, for now I mix them up, it's all a proof of concept right now22:13
mcdonc_well, you could just ditch pas22:13
mcdonc_and do all the work brutally in the views22:13
mcdonc_against some dictionary22:13
mcdonc_"pay for what you eat" ;-)22:13
MrTopfwell, I maybe simply implement some AT object which stores username and some password22:14
mcdonc_sure22:14
MrTopfI need to ditch security on the views anyway if I want to go with a real caps server22:14
mcdonc_it probably doesnt make too much sense to associate the user with a zope user if they're never actually going to use the zopey bits22:15
MrTopfwell, I was planning to put the auth cookie into the URL22:16
MrTopfand let PAS check this22:16
mcdonc_i suppose you could log in via a method that just brutalizes the body and redirects22:16
mcdonc_(setting the cookie)22:16
mcdonc_you wouldnt actually need to check authentication creds at that point22:17
mcdonc_just set the cookie and redirect22:17
mcdonc_then let pas do its job thereafter22:17
mcdonc_plone overrides the cookie auth in "base" pas22:18
mcdonc_there's some function in that shitpile to set the cookie22:18
MrTopfbut then my client lib would also need to follow that redirect and support cookies22:20
MrTopfwell, for now I simply won't check the pw :)22:20
MrTopfI mean everything else is not protected anyway22:20
MrTopfI guess there might be some need for an CMS out there which it's easy to develop for22:22
mcdonc_heh22:22
mcdonc_you could do this:22:23
mcdonc_site.acl_users.cookie_auth.updateCredentials(request, response, login, password)22:23
mcdonc_its cheating but itd work22:23
*** andres has quit IRC22:23
MrTopfic22:23
MrTopfwhat this return something meaningful or just set a cookie?22:24
mcdonc_it just sets the cookie22:24
MrTopfso I could check the cookie in the response to see whether it worked or not?22:24
MrTopfHm does not look like it22:25
MrTopflooks like it sets the cookie for whatever you provide22:25
mcdonc_yes22:25
mcdonc_it does no checking22:25
MrTopfwell, I acually just need the checking22:26
MrTopfbut anyway, I will go without check for now22:26
MrTopfI want to get to the core of my problem now :)22:26
MrTopfI probably would be finished with Django by now22:26
mcdonc_to check the credentials you can use acl_users.zodb_users.authenticateCredentials, mydict)22:26
MrTopfnext step would be to have some nice starting point for those views and I was thinking about some traversal adapter22:27
mcdonc_where mydict is {'login':'foo', 'password':'bar'}22:27
MrTopfbut these also seem never to do what I expect from them22:27
MrTopfah, thanks22:27
MrTopfI will write this down for now and put in later22:27
mcdonc_it will return None if it can't authenticate i think22:27
MrTopfI will find it out22:28
mcdonc_oops that should be acl_users.zodb_users.authenticateCredentials(mydict)22:28
MrTopf:-)22:29
mcdonc_you you need to ditch plone for this i think22:29
mcdonc_anything would be better...22:29
MrTopfbut Plone has more PR value ;-)22:30
mcdonc_only because we keep propping it up ;-)22:31
MrTopfbut in the long run Plone maybe needs to change somehow anyway.. just looking at all the things involved in users and userdata...22:31
MrTopfmembership tool, memberdata tool, various plugins in PAS22:31
elro+10022:31
MrTopfwell, so far I have no alternative when it comes to CMS22:31
MrTopfDrupal maybe :)22:32
mcdonc_for this, maybe a cms isnt what you need22:32
MrTopfwell, I keep going for this evening now22:32
MrTopfplone.reload also seems not to be active...22:33
mcdonc_can you point me at the code that deserializes the body with the login and password in it?22:34
MrTopfso next try would be with Django22:34
MrTopflet me try to understand my code ;-)22:34
mcdonc_i know the feeling22:35
*** jpcw2002 has joined #zope3-dev22:36
MrTopfI guess I deleted it by accident by some refactoring..22:36
MrTopfor maybe I also never checked this in ;-)22:36
MrTopfbut the basic function to deserialize something is in the indra.llsd package22:36
MrTopfyou can easy_install it22:36
mcdonc_ok22:37
MrTopfand then you have parse(xml)22:37
MrTopfand format_xml(dict)22:37
MrTopfsee http://svn.secondlife.com/svn/linden/projects/2008/pyogp/pyogp.lib.base/trunk/pyogp/lib/base/caps.py22:37
MrTopffor some examples22:37
MrTopfI will quickly add it to the lib now22:38
*** jodok has quit IRC22:40
mcdonc_what are you expecting for an unauthorized response?  a 401?22:41
mcdonc_(in the client lib)22:41
MrTopf403 Forbidden22:43
MrTopfbtw, we have meetings on mon/wed/fri about pyogp if you want to join :)22:44
*** jodok has joined #zope3-dev22:45
*** philiKON has joined #zope3-dev22:46
MrTopfMr philiKON122:46
MrTopf!22:46
philiKONhey22:47
MrTopfhow's life? :)22:48
philiKONgood good22:48
*** quodt has joined #zope3-dev22:51
MrTopfmcdonc_: the deserializer needs to be rewritten anyway because the payload I get does not say anything about what sort of credential it is. it might not be plaintest but might be md5 instead22:51
MrTopfactually that's in the spec defined but it's not yet implemented like this22:51
mcdonc_ic22:52
MrTopfso I don't know which class to instantiate22:53
MrTopfI assume for now plain password22:53
MrTopfmcdonc_: http://svn.secondlife.com/svn/linden/projects/2008/pyogp/pyogp.lib.base/trunk/pyogp/lib/base/credentials.py22:55
MrTopfand here is the test for it: http://svn.secondlife.com/svn/linden/projects/2008/pyogp/pyogp.lib.base/trunk/pyogp/lib/base/tests/login.txt22:55
MrTopf(at the bottom)22:55
MrTopfand there is also #pyogp btw ;-)22:56
*** jodok_ has joined #zope3-dev22:56
*** jodok has quit IRC22:56
mcdonc_its a bit of a bug that there isnt a indra.llsd.parse_file that doesnt assume you want to read the entire string into memory22:58
mcdonc_but i guess you can check if the content-length is sane22:59
MrTopfwell, the indra.llsd package is also just insofar open source as that you can get the source22:59
MrTopfI don't know what the process there is if you want to change something22:59
MrTopfI just eggified it on my own now22:59
MrTopfit's also some wild collection of things anyway22:59
MrTopfthe whole indra thing22:59
MrTopfright now the messages are small though. we will see how big they are when we start working on inventory23:00
MrTopftextures come to mind23:00
mcdonc_this is why people use headers to transfer authentication information, because when you need to read the body to get it, all sorts of weirdnesses happen23:01
MrTopfbut that library is in use at LL so I guess it somehow works23:01
MrTopfwell, with caps you only need the URL23:02
*** jodok has joined #zope3-dev23:02
*** jodok_ has quit IRC23:03
*** Jell-O-Fishi has joined #zope3-dev23:04
mcdonc_MrTopf: is there a special user-agent for the client?23:14
MrTopfwhat do you mean?23:15
MrTopfyou mean as header?23:15
mcdonc_yes23:15
mcdonc_to disambiguate it from a "normal" browser request23:15
mcdonc_or any way to do that really23:15
MrTopfno, not at this point23:16
MrTopfthe assumption is I guess that those servers will be just for the OGP client and not normal web browsers23:17
MrTopfthere are probably too many assumption in the whole thing which come from LL's way of working23:17
MrTopfbut one might bring this up at the next meeting23:17
MrTopfHm, can't I adapt a acquisition wrapper object?23:18
MrTopfI return some fresh agent object with return agent.__of__(self.context) and then the next method tries to adapt it to IAgent a la IAgent(agent)23:19
MrTopfwhich fails23:19
mcdonc_i'm pretty sure you can23:19
mcdonc_hmmm.23:19
mcdonc_dont do that? ;-)23:19
*** jodok has quit IRC23:20
MrTopfwell, I somehow need to construct the URL in that adapter23:20
mcdonc_make it a multiadapter and have it accept the request too?23:20
MrTopfHm, the function adapting it is not in Plone but in the library23:21
mcdonc_although maybe that doesnt solve it23:21
MrTopfso it does not know about the request23:21
MrTopfand shouldn't23:21
mcdonc_right23:21
*** jodok has joined #zope3-dev23:21
MrTopfthe idea is that the login method can return any object (like a normal user object) but also needs to provide an adapter to implement IAgent23:21
MrTopfwhich has a property called "seedcap" which should be the URL to the seed capability23:21
MrTopfbut isn't every normal Zope object also wrapped anyway?23:22
MrTopfTypeError: ('Could not adapt', <ImplicitAcquirerWrapper object at 0x669be70>, <InterfaceClass pyogp.lib.agentdomain.interfaces.IAgent>)23:22
mcdonc_anything obtained via traversal is anyway23:22
MrTopfin this case it's more a virtual object23:23
MrTopfI create it on the fly when the client asks for a user23:23
MrTopfand is derived from SimpleItem23:23
mcdonc_that should work fine23:23
MrTopfah, I am doing something wrong :)23:24
MrTopfok, nvm :)23:24
mcdonc_what should be in the cookie?  the firstname, lastname, and password?  or just a login and a password where the login is derived from the first name and the lastname?23:30
MrTopfyou mean credential23:30
MrTopf?23:30
*** sunew has quit IRC23:30
mcdonc_yeah23:30
mcdonc_i mean, i'm writing something that parses the body xml and sets a cookie23:31
MrTopfwell, in the Open Grid Protocol there actually are no cookies used23:31
MrTopfor maybe I misunderstand what you are doing :)23:32
mcdonc_i think i do too ;-)23:32
mcdonc_you were originally trying to set a cookie at some point23:32
MrTopfand I wonder: don't I instaniate a SimpleItem with an id?23:32
MrTopfwell, not really, I was thinking about how to check the password23:32
mcdonc_you'll have to look at OFS.SimpleItem23:32
MrTopfthere is no __init__() and I wonder which superclass implements it ;-)23:32
mcdonc_who fucking knows ;-)23:33
MrTopfbut the tests do instantiate it like this23:33
MrTopfok, pdb time..23:33
mcdonc_so under what circumstance is your app going to get a request with one of these llnd bodies in it23:33
mcdonc_every request?23:33
*** yota has quit IRC23:35
MrTopfI have views for login, the seed capability and the place_avatar capability23:35
MrTopfand they all get LLSD23:35
MrTopfand it's open right now how they know if the person is authorized23:35
mcdonc_ic23:35
MrTopfso right now it will just do for everybody23:35
MrTopfone idea was to return URLs like /<authcode>/agent/@@seedcap23:36
MrTopfinstead of using a caps server23:36
MrTopfbut I actually have a caps server running so I can also use this23:36
MrTopfthe only thing is that login needs to be public23:36
mcdonc_i'm in over my head i think.23:36
MrTopfwell, right now I use URLs like /agents/<username>/@@seedcap23:37
MrTopfor probably ++agents++username/ or so23:37
MrTopfand seedcap is the endpoint of the seed capability23:37
MrTopfso you send it LLSD formatted lists like ['place_avatar']23:38
mcdonc_chicken and egg thing going on i think.23:38
MrTopfand it needs to return some public URL for this capability23:38
*** jodok_ has joined #zope3-dev23:38
MrTopfI now always return /agents/<username>/@@place_avatar23:38
MrTopfand this is some function defined in the spec with the payload it expects23:39
MrTopfhere is the not so uptodate spec: http://wiki.secondlife.com/wiki/SLGOGP_Draft_123:39
mcdonc_given that the client stuff accesses the url "/agents/<username>/@@seedcap", you eventually want to challenge if the request does not contain information that would prove that this user is "username", right?23:39
MrTopfyes, what's missing is some sort of authentication here23:40
MrTopfthis is what the caps server usually is good for23:40
MrTopfyou prove on login and you get some cryptic URL instead as the seed cap23:41
MrTopfinternally it might resolve to the one above23:41
mcdonc_but in "production" you wont need the authentication right?23:41
mcdonc_because you'll assume that the login server has done the job for you?23:41
MrTopfwell, if I have such a caps server in place23:41
*** dunny has joined #zope3-dev23:41
MrTopfonly with a caps server which shields these urls because otherwise people of course could guess that URL23:41
MrTopfthe login service is public and you send some credentials to it23:42
MrTopfthen it checks it and if it's ok it will compute that seedcap URL and will then ask the capsserver to grant a cap for it23:42
mcdonc_i guess i'm wondering how the caps server could be optional in such a setup23:42
MrTopfthe capsserver then returns a cryptic unguessabl URL23:42
MrTopfwell, right now it can't be23:42
MrTopfbut I might return some URL like /c7dzdcscdhbsjhbdjhbds/agents/<username>/@@seedcap23:43
MrTopfand that path element in front maybe could be eaten by PAS23:43
MrTopfnot sure if it can eat path elements23:43
MrTopfbut i could also put it behind the URL as query parameter23:43
mcdonc_probably not pas' job23:43
MrTopfI could write some traverser23:44
MrTopfand make it as obfuscated as possible ;-)23:44
*** jodok__ has joined #zope3-dev23:44
MrTopfor use some WSGI middleware ;-)23:44
MrTopfbut I don't care that much about this part right now before not the caps are working itself without security23:45
MrTopfI could always put a caps server in front23:45
*** jodok__ has quit IRC23:45
MrTopfI even have one23:45
*** jodok has quit IRC23:45
MrTopfok, now I wonder if I use SimpleItem correctly23:45
mcdonc_i think maybe you want /agents/<username>/seedcap/8asduasdhasdh23:45
mcdonc_and write "seedcap" in such a way that it has a bobo_traverse that's willing to eat the random stuff23:46
MrTopfyep23:47
MrTopfbut not with bobo* :)23:47
*** jodok has joined #zope3-dev23:47
MrTopfbut IPublishTraverse23:47
mcdonc_or before_publishing_traverse or whatever other travesty23:47
MrTopfI wish one would have things like those urlmapper from django in Zope/PLone23:47
MrTopfwould make some stuff like this easier23:48
mcdonc_you can, if you use bfg23:48
MrTopf:-)23:48
MrTopfI should propose to the pyogp people to use bfg :)23:48
mcdonc_http://static.repoze.org/bfgdocs/api/urldispatch.html23:48
MrTopfjust for the fun of discussing things :)23:48
MrTopfnice23:49
MrTopfI will base my next CMS on bfg then23:49
mcdonc_or pylons23:49
MrTopfbut do you also do URL traversal?23:49
mcdonc_anything but plone for this23:49
mcdonc_yeah, graph traversal is the default23:49
MrTopfic, cool23:49
mcdonc_http://static.repoze.org/bfgdocs/tutorials/lxmlgraph/index.html23:50
mcdonc_a website with the "model" data implemented as an xml document23:51
MrTopfi will have a look at this later :)23:51
MrTopfI now solved my problem be ditching SimpleItem23:52
MrTopfand deriving from object23:52
MrTopfand passing the context in there23:52
mcdonc_sigh23:52
MrTopfas said, just proof of concept :)23:53
MrTopftomorrow then the next try with grok/bfg/django/pylons/TG23:53
*** sunew has joined #zope3-dev23:58
*** jodok_ has quit IRC23:59

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!