From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #18387: Erroneous permission checks and/or misleading error messages with refresh materialized view |
Date: | 2024-03-15 02:36:10 |
Message-ID: | ZfO0GvqLn7Xb7sgq@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Wed, Mar 13, 2024 at 02:32:55PM -0400, Tom Lane wrote:
> I think there's been a policy of being minimalistic on
> permission-denied errors to avoid giving away security information,
> but I'm not sure how much sense that really makes. We already show
> the specific object that didn't have permissions. I think it would
> be good for these errors to also mention the specific role whose
> permissions were checked. Perhaps also show the specific privileges
> that were missing --- although it might be hard to do that in a
> non-confusing way for complicated cases, such as queries that are
> valid if you have either table- or column-level permissions.
>
> If we just add the role I'd envision
>
> ERROR: permission denied to role "foo" for [object]
>
> although with any more detail that would get too long.
> Another way could be
>
> ERROR: permission denied for [object]
> DETAIL: Role "foo" lacks permission [permission].
>
> Mentioning the role that was checked should address the concern
> of "I'm a superuser, why did I get this error?". However,
> fixing it requires knowing which privilege to grant. I'm not
> sure if that's always obvious.
If we don't want to expand the error, and I can see why we might not
want to, giving the detailed error only for the superuser would be safe,
I think, since they are already the superuser.
Personal note: my son Matthew got this error when using photoview
software, and I was confused why the superuser was getting a permission
error.
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com
Only you can decide what is important to you.
From | Date | Subject | |
---|---|---|---|
Next Message | Ronan Dunklau | 2024-03-15 06:23:46 | Re: FSM Corruption (was: Could not read block at end of the relation) |
Previous Message | PG Bug reporting form | 2024-03-14 22:00:05 | BUG #18394: LISTEN error: could not access status of transaction |