Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 6A57A650EAE for ; Fri, 27 Jun 2008 11:35:56 -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 53167-08 for ; Fri, 27 Jun 2008 11:35:41 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.244]) by postgresql.org (Postfix) with ESMTP id B0BE6650EAB for ; Fri, 27 Jun 2008 11:35:47 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id d30so116148and.33 for ; Fri, 27 Jun 2008 07:35:46 -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:cc:in-reply-to:mime-version:content-type:references; bh=EYwG96gvJ7HqDRiqlPn2sKiO2AzOoGI3QWtwyki3MNU=; b=i/KmENb760EX4j48eBZXCgcWI3PZTDDe0UJ8pbDTuQQglLI4P7uHknF9O7JpS6/0BU yiqL6fAPh+CYP2OS0wwc0Ki7AKC+2Ya96OGnn8DfhLdRLwLOzYy7v9GOCpqes/GqzSNb gR8C/8zoJc4KnxYwud1z1SmRl77uBHpJUpBeg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=S0g6PTcRgmk3L0SS1MybW6WfPQPMtuoDm3Ujc2P/qd+6EHh7oQNniNqCO+v3S5uLia C2uMsWDhog6FGoiud1a5NdeO27OZeYIVWpNgyHDRHtyedxiL1zGPlqpSHbAzdabsp53L mNPDc7SpTNBv4hSkABD/cK/0JIfqUHmHXRnj0= Received: by 10.100.173.9 with SMTP id v9mr1728118ane.39.1214577346162; Fri, 27 Jun 2008 07:35:46 -0700 (PDT) Received: by 10.101.69.7 with HTTP; Fri, 27 Jun 2008 07:35:46 -0700 (PDT) Message-ID: Date: Fri, 27 Jun 2008 16:35:46 +0200 From: "Domingo Alvarez Duarte" To: lennin.caro@yahoo.com Subject: Re: Extended security/restriction to any role with login access Cc: "Carol Walter" , pgsql-admin@postgresql.org In-Reply-To: <607359.23897.qm@web59503.mail.ac4.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_19244_11762702.1214577346197" References: <607359.23897.qm@web59503.mail.ac4.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.452 tagged_above=0 required=5 tests=AWL=-0.451, HTML_MESSAGE=0.001, NORMAL_HTTP_TO_IP=0.001, URIBL_RHS_DOB=0.901 X-Spam-Level: X-Archive-Number: 200806/245 X-Sequence-Number: 29583 ------=_Part_19244_11762702.1214577346197 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Look this isn't the point I know what can be done with pg_hba.conf The main point is: When I create a postgresql user and grant to it only access to part of a database (let's say one view). I'm expecting that the server will honor it. But right now postgresql server isn't. This is the reason I'm writing here and tried too hackers list but no one seems to understand the importance of this point. Maybe it's my fault of knowledge but till now no one showed me how to get the expected result, people try to tell me how to use firewall, change the way of build my application, they don't understand the point. I'll repeat it again: When I create a postgresql user and grant to it only access to part of a database (let's say one view). I'm expecting that the server will honor it. But right now postgresql server isn't. Actually any user with login access can see all databases/roles/functions/table-definitions/triggers. What I thinks isn't correct. I'll apreciate any solution to this problem. On Fri, Jun 27, 2008 at 3:44 PM, Lennin Caro wrote: > ok, let try this ..... > > open the pg_hba.conf and check the line > > host all all 127.0.0.1/32 trust > > and change to > > host all all 127.0.0.1/32 password > > > > --- On *Thu, 6/26/08, Domingo Alvarez Duarte * wrote: > > From: Domingo Alvarez Duarte > Subject: Re: [ADMIN] Extended security/restriction to any role with login > access > To: lennin.caro@yahoo.com > Cc: "Carol Walter" , pgsql-admin@postgresql.org > Date: Thursday, June 26, 2008, 9:45 PM > > > I did the following: > -Connect as superuser postgres with pgadmin and create a user -> noaccess > CREATE ROLE noaccess LOGIN > NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE; > > -Disconnect from the server > -Connect to the server with user 'noaccess' through pgadmin3, and I can see > all databases/functions/schemas/roles. > > What am I missing ? > > On Thu, Jun 26, 2008 at 8:44 PM, Lennin Caro > wrote: > >> hello... >> >> you can restric acces from all the databases in your cluster. When you use >> pgadmin3 this show all the databases but if you dont have access to the >> databases you cant see the struct of this. >> >> check waht user use pgadmin3 for connect to databases >> >> create groups and add privileges to the group later add the users to the >> group >> >> >> > > ------=_Part_19244_11762702.1214577346197 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Look this isn't the point I know what can be done with pg_hba.conf

The main point is:

When I create a postgresql user and grant to it only access to part of a database (let's say one view). I'm expecting that the server will honor it. But right now postgresql server isn't.

This is the reason I'm writing here and tried too hackers list but no one seems to understand the importance of this point.

Maybe it's my fault of knowledge but till now no one showed me how to get the expected result, people try to tell me how to use firewall, change the way of build my application, they don't understand the point. I'll repeat it again:


When I create a postgresql user and grant to it only access to part of a database (let's say one view). I'm expecting that the server will honor it. But right now postgresql server isn't.

Actually any user with login access can see all databases/roles/functions/table-definitions/triggers. What I thinks isn't correct.

I'll apreciate any solution to this problem.

On Fri, Jun 27, 2008 at 3:44 PM, Lennin Caro <lennin.caro@yahoo.com> wrote:
ok, let try this .....

open the pg_hba.conf and check the line

host    all         all         127.0.0.1/32          trust

and change to

host    all         all         127.0.0.1/32          password



--- On Thu, 6/26/08, Domingo Alvarez Duarte <mingodad@gmail.com> wrote:
From: Domingo Alvarez Duarte <mingodad@gmail.com>

Subject: Re: [ADMIN] Extended security/restriction to any role with login access
To: lennin.caro@yahoo.com
Cc: "Carol Walter" <walterc@indiana.edu>, pgsql-admin@postgresql.org
Date: Thursday, June 26, 2008, 9:45 PM


I did the following:
-Connect as superuser postgres with pgadmin and create a user -> noaccess
CREATE ROLE noaccess LOGIN
  NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;

-Disconnect from the server
-Connect to the server with user 'noaccess' through pgadmin3, and I can see all databases/functions/schemas/roles.

What am I missing ?

On Thu, Jun 26, 2008 at 8:44 PM, Lennin Caro <lennin.caro@yahoo.com> wrote:
hello...

you can restric acces from all the databases in your cluster. When you use pgadmin3 this show all the databases but if you dont have access to the databases you cant see the struct of this.

check waht user use pgadmin3 for connect to databases

create groups and add privileges to the group later add the users to the group





------=_Part_19244_11762702.1214577346197--