Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 76A7464FD03 for ; Mon, 15 Sep 2008 23:21:57 -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 11808-06 for ; Mon, 15 Sep 2008 23:21:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id DA86B64FCC6 for ; Mon, 15 Sep 2008 23:21:54 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m8G2JL1M016973; Mon, 15 Sep 2008 22:19:21 -0400 (EDT) To: Bill Moran cc: David Fetter , Greg Smith , Jonathan Bond-Caron , "'Postgres General List'" Subject: Re: Obfuscated stored procedures (was Re: Oracle and Postgresql) In-reply-to: <20080915221136.f39a284e.wmoran@collaborativefusion.com> 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> Comments: In-reply-to Bill Moran message dated "Mon, 15 Sep 2008 22:11:36 -0400" Date: Mon, 15 Sep 2008 22:19:20 -0400 Message-ID: <16972.1221531560@sss.pgh.pa.us> From: Tom Lane 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/677 X-Sequence-Number: 137684 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. regards, tom lane