Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 7D8B3634C0E for ; Tue, 7 Jul 2009 14:37:29 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 60955-01-10 for ; Tue, 7 Jul 2009 14:37:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail128154.authsmtp.net (outmail128154.authsmtp.net [62.13.128.154]) by mail.postgresql.org (Postfix) with ESMTP id 0902C634E2C for ; Tue, 7 Jul 2009 14:32:05 -0300 (ADT) Received: from mail-c193.authsmtp.com (mail-c193.authsmtp.com [62.13.128.118]) by punt3.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id n67HW2MH047586; Tue, 7 Jul 2009 18:32:02 +0100 (BST) Received: from [192.168.0.3] (88-111-6-11.dynamic.dsl.as9105.com [88.111.6.11]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id n67HW1c1036630; Tue, 7 Jul 2009 18:32:01 +0100 (BST) Subject: Re: GRANT ON ALL IN schema From: Simon Riggs To: Tom Lane Cc: Petr Jelinek , PostgreSQL-development In-Reply-To: <7045.1246979795@sss.pgh.pa.us> References: <4A37BF63.50008@pjmodos.net> <4A37E122.8070303@pjmodos.net> <4A38A956.8080600@pjmodos.net> <4A4DE104.8090605@pjmodos.net> <1246963514.3874.156.camel@ebony.2ndQuadrant> <7045.1246979795@sss.pgh.pa.us> Content-Type: text/plain Date: Tue, 07 Jul 2009 18:31:34 +0100 Message-Id: <1246987894.3874.168.camel@ebony.2ndQuadrant> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Server-Quench: 14b220c9-6b1c-11de-98d8-002264978518 X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadRtFaAJbZ0xd HGQLW11EUVV7WmF/ awsfZQ1DY0tPQQN0 UUlWQFdQERpoT0IH AWZ5U0pzdwZAfn1w K0RjXHgVXUAod0R9 EUdJEz8HNnphaTRK TUlQIwtJcANIfBlB Y1d3UXIFLwdSbGoL PyYYHB0LBgAXBx58 ZD1FCnRaaGIvVh8a DwsJHTgqFCVf X-Authentic-SMTP: 61633235383639.pelican.dmpriest.net.uk:1562/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL=0.007 X-Spam-Level: X-Archive-Number: 200907/408 X-Sequence-Number: 141030 On Tue, 2009-07-07 at 11:16 -0400, Tom Lane wrote: > Simon Riggs writes: > > I would like to see > > GRANT ... ON ALL OBJECTS ... > > This seems inherently broken, since different types of objects > will have different grantable privileges. > > > (I'm sure we can do something intelligent with privileges that don't > > apply to all object types rather than just fail. e.g. UPDATE privilege > > should be same as USAGE on a sequence.) > > Anything you do in that line will be an ugly kluge, and will tend to > encourage insecure over-granting of privileges (ie GRANT ALL ON ALL > OBJECTS ... what's the point of using permissions at all then?) My perspective would be that privilege systems that are too complex fall into disuse, leading to less security, not more. On any database that has moderate security or better permissions errors are one of the three errors on production databases. Simplifying the commands, by aggregating them or another way, is likely to yield benefits in usability for a wide range of users. Unix allows chmod to run against multiple object types. How annoying would it be if you had to issue chmodfile, chmodlink, chmoddir separately for each class of object. (Links don't barf if you try to set their file mode, for example). We follow the Unix file system in many other ways, why not this one? -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support