Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id F024F650E88 for ; Thu, 26 Jun 2008 14:05:06 -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 31881-03 for ; Thu, 26 Jun 2008 14:04:55 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.188]) by postgresql.org (Postfix) with ESMTP id 7CF26650E82 for ; Thu, 26 Jun 2008 14:04:56 -0300 (ADT) Received: by gv-out-0910.google.com with SMTP id i36so30499gve.7 for ; Thu, 26 Jun 2008 10:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=pedKgOW+t85I7rqeeoRR3KenBSf+qT+SsUSwTZQU8q0=; b=eF3DgJKHrP7FVTBZa0FfSVPAwPESUx/AjGhtCcC1D8BOVn4Wnnck+FHumKskDC5qHR tCN1YaM9U7HoNHHjmeJmYsQ5EiQzuY5WbpELzahlcRxVfThM6KiISZ4yfrt94YPqtXKc ryn8Onag6MlgC55JUovEt1csW0mDgP7y4HFoM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=hAlzDf0Gg1jQEhFMuouxwZ5DBSZIKMvu7WdBuF79djeclK1jHEryznt/37OGe2Xn8F 12oR0i1B0Njkj8ypaWlgop4sAv+dU2gD1yxHvAAqGE0+vq7LQ43xpD82uyBIn03PGjZk vIyo940iF3g1dlmvFC6h5NgbfCQZSqPqjR3Eo= Received: by 10.210.65.17 with SMTP id n17mr87555eba.188.1214499894557; Thu, 26 Jun 2008 10:04:54 -0700 (PDT) Received: by 10.210.69.5 with HTTP; Thu, 26 Jun 2008 10:04:54 -0700 (PDT) Message-ID: Date: Thu, 26 Jun 2008 19:04:54 +0200 From: "Domingo Alvarez Duarte" To: pgsql-admin@postgresql.org Subject: Extended security/restriction to any role with login access MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5461_22723884.1214499894551" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200806/222 X-Sequence-Number: 29560 ------=_Part_5461_22723884.1214499894551 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello ! I'm trying to use postgresql in an application that by design will give access to users to a subset of the database. For example for customers access to products_view (wich will only show public offers), orders (only their own orders). I'll provide an application as user interface for the data. For that I'll give for each of then a role in the database that will belong to a group role customers_group. The customers_group only has access to the views/functions that I'll specify. Till here no problem postgresql do that pretty well. My concern is once I give login access to any user, even without grant him/her any access to any database, he/she can using an application like pgadmin3 view all databases/roles/functions/table-definitions on my server. And that was not my intention. Removing all from public doesn't work : revoke all on schema public from public; What I think would be the server behavior when I create a role with login access an say that I only grant access to one view like this: create role oneuser login; grant select on somedatabase.someview to oneuser; In that case when the user login the only thing he/she sees is the view database.someview, even when they use pgadmin3 to connect. Actually he/she can see with pgadmin3 : all databases, all roles and it's right access, all tables on every database (no access to data), all functions, all triggers, all table definitions. The above isn't the intention to a user with a restrict view of the database. Can I achieve it actually, if not how hard could be to implement that in the official release ? Thanks in advance for any feedback/ideas ! ------=_Part_5461_22723884.1214499894551 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello !

I'm trying to use postgresql in an application that by design will give access to users to a subset of the database.

For example for customers access to products_view (wich will only show public offers), orders (only their own orders).

I'll provide an application as user interface for the data.

For that I'll give for each of then a role in the database that will belong to a group role customers_group.

The customers_group only has access to the views/functions that I'll specify.

Till here no problem postgresql do that pretty well.

My concern is once I give login access to any user, even without grant him/her any access to any database, he/she can using an application like pgadmin3 view all databases/roles/functions/table-definitions on my server. And that was not my intention.

Removing all from public doesn't work : revoke all on schema public from public;

What I think would be the server behavior when I create a role with login access an say that I only grant access to one view like this:

create role oneuser login;
grant select on somedatabase.someview to oneuser;

In that case when the user login the only thing he/she sees is the view database.someview, even when they use pgadmin3 to connect.

Actually he/she can see with pgadmin3 : all databases, all roles and it's right access, all tables on every database (no access to data), all functions, all triggers, all table definitions.

The above isn't the intention to a user with a restrict view of the database.

Can I achieve it actually, if not how hard could be to implement that in the official release ?

Thanks in advance for any feedback/ideas !
------=_Part_5461_22723884.1214499894551--