From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | michael(at)paquier(dot)xyz |
Cc: | masahiko(dot)sawada(at)2ndquadrant(dot)com, martin(at)2ndquadrant(dot)com, sfrost(at)snowman(dot)net, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Read access for pg_monitor to pg_replication_origin_status view |
Date: | 2020-06-09 08:13:47 |
Message-ID: | 20200609.171347.264555441522993989.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Tue, 9 Jun 2020 16:35:55 +0900, Michael Paquier <michael(at)paquier(dot)xyz> wrote in
> On Tue, Jun 09, 2020 at 03:32:24PM +0900, Masahiko Sawada wrote:
> > One thing I'm concerned with this change is that we will end up
> > needing to grant both execute on pg_show_replication_origin_status()
> > and select on pg_replication_origin_status view when we want a
> > non-super user to access pg_replication_origin_status. It’s unlikely
> > that the user can grant both privileges at once as
> > pg_show_replication_origin_status() is not documented.
I also concerned that, but normally all that we should do to that is
GRANTing pg_read_all_stats to the role. I don't think there is a case
where someone wants to allow the view to a user, who should not be
allowed to see other stats views.
> Not sure if that's worth worrying. We have similar cases like that,
> take for example pg_file_settings with pg_show_all_file_settings()
> which requires both a SELECT ACL on pg_file_settings and an EXECUTE
> ACL on pg_show_all_file_settings(). My point is that if you issue a
> GRANT SELECT on the catalog view, the user can immediately see when
> trying to query it that an extra execution is needed.
I agree to that as far as that is not the typical use case, and I
don't think that that's the typical use case.
> > A user having a replication privilege already is able to execute these
> > functions. Do you mean to ease it so that a user also executes them
> > without replication privilege?
>
> Arf. Please forget what I wrote here, the hardcoded check for
> replication rights would be a problem.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2020-06-09 08:24:21 | Re: Resetting spilled txn statistics in pg_stat_replication |
Previous Message | Masahiko Sawada | 2020-06-09 08:07:39 | Re: Read access for pg_monitor to pg_replication_origin_status view |