Re: TODO item pg_hba.conf

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Gevik Babakhani <pgdev(at)xs4all(dot)nl>
Cc: alvherre(at)commandprompt(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: TODO item pg_hba.conf
Date: 2006-04-21 20:46:00
Message-ID: 200604212046.k3LKk0504023@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Added to TODO:

o %Allow per-database permissions to be set via GRANT

Allow database connection checks based on GRANT rules in
addition to the existing access checks in pg_hba.conf.

and remove:

o %Allow pg_hba.conf settings to be controlled via SQL

This would add a function to load the SQL table from
pg_hba.conf, and one to writes its contents to the flat file.
The table should have a line number that is a float so rows
can be inserted between existing rows, e.g. row 2.5 goes
between row 2 and row 3.

---------------------------------------------------------------------------

Gevik Babakhani wrote:
> Hi,
>
> I read the discussion thread once again and unless I am absolutely
> and totally on the wrong track this is what I understood from the
> general plan to be. The current pg_hba.conf provides the famous
> the host based mechanism to connect to a database.
> In order to add the discussed functionality we want to hold
> the CONNECT permission information inside a table in
> the database (something like pg_connect).
>
> The parser has to be changed in order to understand the new grant
> and revoke and of course the appropriate backend commands have to
> be developed to store/check/remove the new privilege.
>
> The SQL command could be something like this:
>
> REVOKE CONNECT ON DATABASE foo FROM PUBLIC;
> GRANT CONNECT ON DATABASE foo TO user1, user2, user3;
>
> There are some other important details but I will discuss them later.
>
> Would it be correct to state that: only the authentication
> is checked (username and password) when connecting to the
> server and not the any kind of privilege to access a database.
> Please see postmaster.c:2753 Which brings us to the real
> work to be done as suggested by Tom
> in postinit.c:143 ReverifyMyDatabase(const char *name).
>
> Please advice.
> Gevik.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-04-21 20:54:43 Re: Suggestion: Which Binary?
Previous Message Simon Riggs 2006-04-21 20:27:48 Re: Further reduction of bufmgr lock contention