Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6072A475806 for ; Mon, 5 Aug 2002 12:07:42 -0400 (EDT) Received: from mail.ivytech.edu (postal.ivytech.edu [168.91.14.3]) by postgresql.org (Postfix) with ESMTP id A6F0D475775 for ; Mon, 5 Aug 2002 12:07:41 -0400 (EDT) Received: from ivytech.edu (rivers.ivytech.edu [168.91.14.5]) by mail.ivytech.edu (Postfix) with SMTP id B35A1688184 for ; Mon, 5 Aug 2002 11:07:17 -0500 (EST) Received: from 168.91.2.45 (SquirrelMail authenticated user jmadden) by mail.ivytech.edu with HTTP; Mon, 5 Aug 2002 11:01:34 -0500 (EST) Message-ID: <46234.168.91.2.45.1028563294.squirrel@mail.ivytech.edu> Date: Mon, 5 Aug 2002 11:01:34 -0500 (EST) Subject: security issue - database user From: "John Madden" To: X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal X-Mailer: SquirrelMail (version 1.2.6) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/21 X-Sequence-Number: 5136 (My apologies if this has been posted before - as you'll see, this isn't the easiest thing to find in the archives.) The scenario: We want to allow common users access to their own databases for development. The issue: As a user (not a superuser), I can modify any database on the system, albeit only through CREATE TABLE. CREATE USER myuser WITH PASSWORD 'blah' CREATEDB; psql template1 -h db -U myuser (password auth) template1 => CREATE DATABASE myuser; (re-auth as user postgres, drop createdb privs) ALTER USER myuser NOCREATEDB; Now, we connect to our database (myuser) as myuser and go about our business. However, I can connect to any other database I've got access to through pg_hba.conf: psql somedb -h db -U myuser (password auth) somedb => \d I can't modify/etc. any existing tables, as one would expect, but: somedb=> CREATE TABLE mytable(test text); CREATE Why is this allowed? Any way to prevent it? We've got a lot of users working on a development server that obviously has hba to quite a few databases... Thanks, John -- John Madden UNIX Systems Engineer Ivy Tech State College jmadden@ivytech.edu