BUG #15081: pg_hba_file_rules permission issue

Started by PG Bug reporting formabout 8 years ago3 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 15081
Logged by: Joby John
Email address: jobyjc@gmail.com
PostgreSQL version: 10.2
Operating system: Windows 10
Description:

Hi,
To get access to pg_hba_file_rules view, user needs execute privilege on
pg_hba_file_rules() function too.

But I think this is not the normal behaviour as I can give access to
pg_shadow view without granting access to pg_authid table even though
pg_authid is used inside pg_shadow.

Kind Regards,
Joby

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: PG Bug reporting form (#1)
Re: BUG #15081: pg_hba_file_rules permission issue

On Fri, Feb 23, 2018 at 8:06 AM, PG Bug reporting form <
noreply@postgresql.org> wrote:

The following bug has been logged on the website:

Bug reference: 15081
Logged by: Joby John
Email address: jobyjc@gmail.com
PostgreSQL version: 10.2
Operating system: Windows 10
Description:

Hi,
To get access to pg_hba_file_rules view, user needs execute privilege on
pg_hba_file_rules() function too.

But I think this is not the normal behaviour as I can give access to
pg_shadow view without granting access to pg_authid table even though
pg_authid is used inside pg_shadow.

​pg_authid is a table/view while pg_hba_file_rules() is a function. For
better and worse functions always execute as the user running the query
while access to tables and views is done as the owner of the view. being
accessed.

David J.

#3Joby John
jobyjc@gmail.com
In reply to: David G. Johnston (#2)
Re: BUG #15081: pg_hba_file_rules permission issue

Thank you for your response.

On 23 Feb 2018 3:13 pm, "David G. Johnston" <david.g.johnston@gmail.com>
wrote:

Show quoted text

On Fri, Feb 23, 2018 at 8:06 AM, PG Bug reporting form <
noreply@postgresql.org> wrote:

The following bug has been logged on the website:

Bug reference: 15081
Logged by: Joby John
Email address: jobyjc@gmail.com
PostgreSQL version: 10.2
Operating system: Windows 10
Description:

Hi,
To get access to pg_hba_file_rules view, user needs execute privilege on
pg_hba_file_rules() function too.

But I think this is not the normal behaviour as I can give access to
pg_shadow view without granting access to pg_authid table even though
pg_authid is used inside pg_shadow.

​pg_authid is a table/view while pg_hba_file_rules() is a function. For
better and worse functions always execute as the user running the query
while access to tables and views is done as the owner of the view. being
accessed.

David J.