/srv/irclogs.ubuntu.com/2010/11/08/#launchpad-reviews.txt

thumperlifeless: sure00:55
lifelessthanks01:14
thumperlifeless: done01:34
lifelessthanks01:38
jtvthumper: while you're at it, can you review this one for me?  https://code.launchpad.net/~jtv/launchpad/recife-policy-mixin/+merge/4030002:47
jtv(that was deliberately phrased for a flippant rebuttal, so feel free if it's not convenient)02:48
thumperjtv: if it was small I'd say yes, but I'm in the middle of something.  Sorry.02:48
jtvno worries02:49
* jtv scans for victims02:49
jtvbac!02:49
jtvAre you up for a non-small review?02:49
bacjtv i can be.  can it wait a little bit as i just started something?02:49
jtvbac: yes it can02:50
lifelessahhh the sweet smell of real urls in the morning02:51
lifelessit smells like victory02:51
* jtv finds this obvious crack in lifeless' sanity a good reason to ask:02:58
jtvyou're suggesting a standalone class to implement translation policy.  Were you thinking of a schema change?02:59
lifelessjtv: I wasn't, but perhaps one is needed.02:59
lifelesss/needed/possibly beneficial.03:00
jtvI see it making a lot of sense at this point.03:00
lifelesswe have -way- to many mixins03:00
lifelesswhen you've got 1 mixin its a problem. 20+ mixings is arggggh zomg mode03:00
jtvYes, we do have too many of them.03:01
jtvAnd in this case, there's actual state that's being replicated into multiple classes—basically a denormalized object design.03:02
lifelessis there a good reason for that ?03:02
jtvBest I can come up with is "progressing insight."03:05
jtvIn other words, "no but that may not have been so obvious at the time."03:05
jtvThere's 2 identical fields in Product, ProjectGroup, and Distribution.03:05
jtvI'm trying to expose and unify the common patterns.03:06
jtvExtracting it into a separate database table could be a lot of work, of course.03:08
jtvSome joins will change shape.03:08
jtvThe new objects' lifetimes have to be managed etc.03:09
jtvToo much work for now.  I think I'll go with a standalone non-db class first.03:10
jtvlifeless: I'm looking at implementing this as an adapter.03:24
jtvlifeless: so you'd say "ITranslationPolicy(pillar).makeSomeDecision()"03:25
jtvbut you can also adapt certain other objects to get the ITranslationPolicy that applies to them.03:25
jtvDoes that make sense to you?03:26
lifelessthat seems a decent start03:28
lifelessas for adapter vs pillar.translation_policy - shrug, its largely just spelling (except those pesky lifetimes that you mentioned)03:29
jtvYes, and I don't just want to keep adding to the interfaces.03:36
jtvbac, lifeless: reworking the policy object so that it's not a mixin becomes too much work for this branch; I'll have leave that for a separate branch.03:50
* jtv goes out for a bite03:55
=== jtv is now known as jtv-eat
=== jtv-eat is now known as jtv
stublifeless: Should https://code.launchpad.net/~stub/launchpad/update-storm/+merge/40264 go through without review? It consists entirely of unicode casts, updates to modern Storm syntax and delints at 2.4k lines of diff.08:26
bacjtv: return the favor?09:27
jtvbac: honour compels me.09:28
bacjtv: lucky for you i'm not as prolific.  a measly 88 line diff.  https://code.launchpad.net/~bac/launchpad/bug-671539/+merge/4030909:28
jtvbac: prolific?  I have more changes waiting that I carefully cut out of the diff to keep its size down.  :-)09:28
jtvbac: I find the "if not person.is_team: enabled = True else: enabled = False" a bit hard to read.  Have you considered this alternative?09:31
jtvowner_is_individual = (not person.is_team)09:31
jtv…(…, enabled=owner_is_invidual)09:31
bacjtv: yeah, i'll make that change.09:32
jtvThanks.09:32
bacbrain fart09:32
bacany other comments, jtv?10:21
jtvbac: whoops, got sidetracked!  Getting back to it now.10:21
jtvbac: Shouldn't the section heading in the story test be "---"-underlined instead of "==="-underlined?10:22
jtv(I do not like rest-style headings)10:22
jtvbac: approved.10:27
bacjtv: i'll look at the formatting.  i thought i had followed the style used in the file but perhaps i messed up10:36
jtvbac: or the previous author of the file got it wrong, or we just have a harmless inconsistency.10:36
=== allenaptoo is now known as allenap
=== danilo_ is now known as danilos
=== matsubara-afk is now known as matsubara
=== Ursinha-afk is now known as Ursinha
jtvHey, who's up for a review that I actually tried to make fun?  https://code.launchpad.net/~jtv/launchpad/independence-for-ihastranslationtemplates/+merge/4032112:50
jtvmatsubara maybe?12:51
jtvgmb then?  you're always in for a laugh, no?12:53
matsubarajtv, I'm not an official reviewer12:54
jtvah!12:54
jtvwell good morning, anyway.  :)12:54
=== jtv changed the topic of #launchpad-reviews to: On call: - || Reviewing: - || queue: [jtv] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
matsubaragood morning :-)12:57
jtvStill holding that T-shirt.  :)13:00
jtvhenninge, do you want to review it then?13:03
henningejtv: oh, yes I should ...13:04
jtvSince it's your day and all :)13:04
=== henninge changed the topic of #launchpad-reviews to: On call: henninge || Reviewing: - || queue: [jtv] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
jtvThanks.13:04
henningeYes, I will have to find a replacement for next week.13:04
jtvWe're not usually that picky about missing a review day.13:04
henningeI don't think I should be doing normal reviews *and* r-c reviews...13:04
jtvAt least not on this side of the world, where usually there aren't any OCRs anyway.  :)13:05
jtvhenninge: why do you say normal reviews and r-c reviews?  has there been a change that I'm unaware of?13:05
henningejtv: I am release manager so I will be the one doing r-c reviews next Monday.13:06
jtvah13:06
jtvI forgot that you were rc13:06
henningerm13:06
jtvsorry, rm13:06
jtvrm -rf13:06
henningeIn my world: Returned Missionary ;-)13:07
jtv(Seriously, I once saw Siemens advertise their OS called, if I remember the spelling correctly, RM/UNIX)13:07
henninge:-D13:07
henningeThose Germans...13:13
=== mrevell is now known as mrevell-lunch
=== adeuring1 is now known as adeuring
allenaphenninge: Fancy taking on another branch?14:11
=== allenap changed the topic of #launchpad-reviews to: On call: henninge || Reviewing: - || queue: [jtv, allenap] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
allenaphenninge: I've put myself in the queue, but feel free to eject me.14:15
henningejtv, allenap: Sorry, lunch got in the way. I will relocate now and look at your branches after that.14:19
=== mrevell-lunch is now known as mrevell
=== salgado is now known as salgado-lunch
=== henninge changed the topic of #launchpad-reviews to: On call: henninge || Reviewing: jtv || queue: [allenap] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
=== matsubara is now known as matsubara-lunch
henningejtv: r=me Thank you.15:51
=== henninge changed the topic of #launchpad-reviews to: On call: henninge || Reviewing: allenap || queue: [jtv] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
allenaphenninge: Thanks!16:03
henningeallenap: I have not yet used ARRAY's16:03
henninges/'//16:03
allenaphenninge: Dang, I misread and thought that r=me was for me :) Thank you anyway!16:06
henningeallenap: oh, I am sorry.16:06
jtvthanks henninge16:06
allenaphenninge: Hehe, don't be sorry, it was my fault.16:07
=== matsubara-lunch is now known as matsubara
=== deryck is now known as deryck[lunch]
abentleyhenninge: is [jtv] already reviewed?16:34
jtvabentley: yes I am16:34
=== salgado-lunch is now known as salgado
=== abentley changed the topic of #launchpad-reviews to: On call: henninge, abentley || Reviewing: allenap, - || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
henningeups, chansubjupd error16:34
henningeups=oops(de_DE)16:35
abentleyhenninge: We should have a web page we can use to set the channel topic :-)16:35
jelmerabentley: Hi17:04
jelmerabentley: Can I add a MP to your queue?17:04
abentleyjelmer: sure.17:04
jelmerabentley: https://code.launchpad.net/~jelmer/launchpad/672476/+merge/4034917:05
=== deryck[lunch] is now known as deryck
allenaphenninge: I have to go soon, so ask soon if you have any questions about my branch :)17:31
henningeallenap: sorry, I was about to write the review. I actually understand what's going on now ... ;)17:32
henningeallenap: I don't have questions, though. You can look at it in the morning. Nothing serious just some suggestions.17:32
allenaphenninge: Awesome, thank you.17:35
=== benji is now known as benji-lunch
=== leonardr is now known as leonardr-lunch
=== leonardr-lunch is now known as leonardr
abentleyjelmer: 59: s/iterabel/iterable18:20
abentleyjelmer: Personally, I find using "with" with files more elegant than try/finally.18:21
abentleyjelmer: Why do you test whether htpassword exists (and is a file) and delete it, instead of just overwriting it?18:23
abentleyjelmer: is it secure to use token.person.name[:2] as a salt?18:25
jelmerabentley: Thanks, fixed.18:25
jelmerabentley: I usually don't bother with "with" out of fear of missing a "from __future__ import with_statment" somewhere18:26
abentleyjelmer: we're all-2.6 now.  You shouldn't import with_statement anymore.18:26
jelmerabentley: Overwriting it would work too I guess. That, and the token.person.name[:2] are simply the same as they were in the generate_ppa_htaccess.py script.18:27
abentleyjelmer: yeah, I realize this is mostly just reorganizing old code.18:28
abentleyjelmer: But using token.person.name[:2] as a salt is security-by-obscurity, and now that we're open-source, it's no longer obscure.18:29
jelmerabentley: it'd break a few existing tests though, so I wonder if I should leave that for a separate branch and file a high-priority bug about it for now.18:32
jelmerabentley: What do you think?18:33
james_wsalts can be known18:33
abentleyjames_w: Oh?  I would have thought that would make it trivial to forge the password.18:34
james_wabentley, no. Assuming you are talking about a real salt, and not something wrongly called that, they are not keys18:34
james_wif they were then they wouldn't be separate18:34
abentleyjames_w: we're talking about salts as used by the crypt C function.18:35
james_wwhat they do is prevent exploiting all passwords at once. If there were no salts you could generate one rainbow table and then decrypt everyone's ciphertext at once18:35
james_wadding a salt means that you have to attack each ciphertext in turn18:36
james_wso they do no need to be secret, but they do benefit from being well-distributed18:36
abentleyjames_w: okay, thanks for that clarification.18:36
* jelmer didn't know that either18:37
james_w(if num salts << num ciphertexts then you can decrypt a lot of ciphertexts with on rainbow table)18:37
james_wmaybe a comment in the source?18:37
abentleyjames_w: and happy belated birthday.18:37
james_wthanks :-)18:37
james_whttp://en.wikipedia.org/wiki/Salt_(cryptography)18:38
james_wit does say "For best security, the salt value is kept secret.", but if your system relies on the salt being secret, then the keys are probably too short anyway18:39
abentleyjames_w: it seems like in our context, all the passwords are equivalent, so only one cyphertext is needed.  Therefore using distinct salts doesn't help?18:41
james_wabentley, where can I look to see the use of this in the source?18:42
james_was I'm not sure what you mean by "all the passwords are equivalent"18:42
abentleyjames_w: https://code.launchpad.net/~jelmer/launchpad/672476/+merge/4034918:42
james_wEACCESS18:43
abentleyjames_w: by "all the passwords are equivalent", I mean they all grant equivalent access AIUI18:43
james_wah18:44
james_wso impersonation isn't really a problem18:44
james_wexcept for users who aren't supposed to have access at all18:44
abentleyjames_w: jelmer is refactoring this code: lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py18:44
james_wabentley, yeah, I'd agree, in this case salts aren't particularly useful for their normal use like in unix passwd18:46
james_wit adds a little benefit in that you wouldn't have to revoke every access if one token was compromised, but you may want to do that anyway to be sure18:47
james_win this case though the main requirement is that crypt requires a salt, and so I think that the value used is as good as any other18:48
abentleyjames_w: Right.  Hard to imagine only one token being compromised in this scenario.18:49
abentleyjames_w: okay.18:49
=== benji-lunch is now known as benji
abentleyjelmer: should _setupHtaccess consider the case where htaccess is different from what it would write?19:13
jelmerabentley: No, it sufficient that there is *some* htaccess there.19:13
jelmerabentley: generate_ppa_htaccess should take care of updating it19:14
abentleyjelmer: ISTM that until generate_ppa_htaccess runs, the contents could be exposed.19:15
abentleyjelmer: because the .htaccess might not impose any content restrictions.19:16
jelmerabentley: We only write out one kind of htaccess file at the moment19:16
jelmerabentley: I guess it might make sense take into account that we might want something different in that file in the future.19:17
abentleyjelmer: so _setupHtaccess assumes that htaccess will not be different from what it would write.19:18
jelmerabentley: Sorry, yes. It assumes the .htaccess file would be the same and that there is some .htpasswd19:21
abentleyjelmer: If an earlier process had died causing a partial write, that would not be true, but I think that's rare enough not to care about.19:23
abentleyjelmer: I guess I'm wondering whether skipping writing htaccess and htpasswd is worthwhile.19:26
jelmerabentley: That's a good question, I've wondered about that as well.19:27
abentleyjelmer: it seems like it doesn't save an appreciable amount of IO, and it does introduce a corner case.19:27
jelmerabentley: It saves us a single database query and a certain amount of IO.19:27
jelmerabentley: I don't know what the maximum number of subscriptions for a PPA is.19:28
abentleyjelmer: At 243, I believe temp_filename is supposed to be on a new line.19:29
abentleyjelmer: similarly at 351.19:31
jelmerabentley: Fixed19:34
abentleyjelmer: Your tests would be a bit simpler if you returned the contents of .htaccess and .htpasswd as strings or if your functions took a file parameter.19:35
abentleyjelmer: You could also just use useTempDir in your tests.19:36
=== lifeless_ is now known as lifeless
abentleyjelmer: You can use dedent to write your multi-line strings more neatly at 451.19:39
jelmerabentley: I haven't used dedent before, what is it?19:43
jelmerabentley: is this textwrap.dedent?19:44
abentleyjelmer: Yes.  It strips leading indents.19:44
abentleyjelmer: Anyhow, those are just some ideas.  r=me.19:48
jelmerabentley: Thanks, that was quite educational.19:50
abentleyjelmer: np.19:51
=== matsubara is now known as matsubara-afk
jelmerabentley: I just realized that if we always write out the htaccess file we need to honor the blacklist that currently exists in generate-ppa-htaccess.py20:12
abentleyjelmer: I see.  It's your call.20:13
=== salgado is now known as salgado-afk
=== Ursinha is now known as Ursinha-afk

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