Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 911A264FD09 for ; Tue, 16 Sep 2008 10:39:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 41102-01-3 for ; Tue, 16 Sep 2008 10:39:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.ca.gdesolutions.com (mail.ca.gdesolutions.com [64.15.152.204]) by postgresql.org (Postfix) with ESMTP id AEA7F64FEEF for ; Tue, 16 Sep 2008 10:38:58 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mail.ca.gdesolutions.com (Postfix) with ESMTP id 79C1E5CFE; Tue, 16 Sep 2008 09:38:56 -0400 (EDT) X-Virus-Scanned: amavisd-new at gdesolutions.com Received: from mail.ca.gdesolutions.com ([127.0.0.1]) by localhost (mail.ca.gdesolutions.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FyOjkzMLNbml; Tue, 16 Sep 2008 09:38:54 -0400 (EDT) Received: from jbondc (modemcable158.97-203-24.mc.videotron.ca [24.203.97.158]) by mail.ca.gdesolutions.com (Postfix) with ESMTP id 52D8F5C53; Tue, 16 Sep 2008 09:38:54 -0400 (EDT) From: "Jonathan Bond-Caron" To: "'Bill Moran'" , "'Tom Lane'" Cc: "'David Fetter'" , "'Greg Smith'" , "'Postgres General List'" References: <41c1fa08-86a0-4023-acaa-d838d5b0abf8@i24g2000prf.googlegroups.com> <48BB040E.3040108@earlham.edu> <48C5C394.1070602@gmail.com> <819df3760809131924o4ec38ebetfde7cd890767b1a9@mail.gmail.com> <1A6E6D554222284AB25ABE3229A9276201A1993B@nrtexcus702.int.asurion.com> <20080915135847.GF3666@fetter.org> <7be3f35d0809150731k575bf7aajc689a4278176b1a8@mail.gmail.com> <000001c91748$af9288b0$0eb79a10$@com> <20080915202922.1778a062.wmoran@collaborativefusion.com> <20080916005025.GE3666@fetter.org> <20080915221136.f39a284e.wmoran@collaborativefusion.com> <16972.1221531560@sss.pgh.pa.us> <20080916084045.595ca9ee.wmoran@collaborativefusion.com> In-Reply-To: <20080916084045.595ca9ee.wmoran@collaborativefusion.com> Subject: Re: Obfuscated stored procedures (was Re: Oracle and Postgresql) Date: Tue, 16 Sep 2008 09:39:03 -0400 Message-ID: <003201c91801$95eeaa10$c1cbfe30$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AckX+XOR7scr0NQ0TB+4OwwGBbpopwAAnDxA Content-Language: en-ca X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200809/706 X-Sequence-Number: 137713 On Tue Sep 16 08:40 AM, Bill Moran wrote: > In response to Tom Lane : > >> Bill Moran writes: >>> What I'm _asking_ is why would extending SECURITY DEFINER to include >>> preventing unauthorized users from viewing code _not_ be a valid >>> method of securing the code. >> >> Because it's so full of obvious loopholes. Yes, it might slow down >> someone who didn't have superuser access to the database or root >> access to the machine it's on; but that doesn't count as secure >> really. The problem is that the people who ask for this type of >> feature are usually imagining that they can put their code on >> customer-controlled machines and it will be safe from the customer's >> eyes. Well, it isn't, and I don't think Postgres should encourage > them to think it is. > > Shame that. I can imagine it being a useful feature in certain > situations (such as a hosted environment), although I understand the > concern. > > Code obfuscation is the norm, though. The world at large still seems > to believe that compiling code make it secret, despite the fact that > crooks have demonstrated again and again that they're more than > willing to read through opcodes, and the fact that there are > decompilers available for just about every major compiled format. > I agree here. I hope there's a consensus that it does offer some level of protection. After some research, I found this article that I believe will make a stronger use case: http://www.iosn.net/network/news/Managing%20the%20insider%20threat%20through %20code%20obfuscation Whether or not it belongs in PG I don't really have an opinion.