X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1B0C15352F for ; Wed, 30 Mar 2005 19:47:48 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 94570-08 for ; Wed, 30 Mar 2005 18:47:45 +0000 (GMT) Received: from fep06-app.kolumbus.fi (fep06-0.kolumbus.fi [193.229.0.57]) by svr1.postgresql.org (Postfix) with ESMTP id A5F735355B for ; Wed, 30 Mar 2005 19:47:43 +0100 (BST) Received: from [192.168.1.3] (really [80.186.80.234]) by fep06-app.kolumbus.fi with ESMTP id <20050330184743.WVYJ525.fep06-app.kolumbus.fi@[192.168.1.3]>; Wed, 30 Mar 2005 21:47:43 +0300 Message-ID: <424AF44F.4040703@kolumbus.fi> Date: Wed, 30 Mar 2005 21:47:43 +0300 From: Marko Ristola User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1 X-Accept-Language: en MIME-Version: 1.0 To: Peter Eisentraut Cc: "Goeke, Tobias" , pgsql-odbc@postgresql.org Subject: Re: Ignoring the limited user-rights by using ODBC References: <72F45784D0E25A429B21E156EAEFE5E3E54BD3@muenchen.ep.de> <200503302014.20728.peter_e@gmx.net> In-Reply-To: <200503302014.20728.peter_e@gmx.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.317 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200503/128 X-Sequence-Number: 5146 I remember from some other databases, that the schema is not for security. It is for application logic: If you have marko.branch and users.branch tables, you can link to both by select * from marko.branch union select * from users.branch You can revoke rights from the tables with the following commands: revoke all from marko on marko.branch; revoke all from marko on users.branch; After these, "marko" user is not able to read, or write into the tables. You can play with the schema like this with ODBC: set search_path to marko,public; -- the new schema is "marko" select * from branch; /* points into marko.branch */ set search_path to users,public; select * from branch; /* points into users.branch */ Read or write rights (grant/revoke) for the table and visibility (naming, search path, namespace, schema) of the table name are a different thing. Marko Ristola Peter Eisentraut wrote: >Goeke, Tobias wrote: > > >>If i connect to the database via obdc with this user, all schemes are >>shown. So i am able to select all the tables and views e.g. in excel, >>although the user isn't autorized. >> >> > >It is not possible that the ODBC driver can circumvent privileges that >would otherwise apply. Please provide a detailed way to reproduce your >problem. > >Note that what the \d commands in psql show does not necessarily define >the scope of a user's access privileges. It merely shows what might be >of interest to the user. > > >