Re: A little RLS oversight?

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Yaroslav <ladayaroslav(at)yandex(dot)ru>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net>
Subject: Re: A little RLS oversight?
Date: 2015-07-13 04:25:44
Message-ID: CAB7nPqS=EjZguRDLcrQAtTgbYTymYcpavKr_HZ-TSjZfxGog9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jul 12, 2015 at 5:59 PM, Yaroslav wrote:
> I can still see all statistics for 'test' in pg_stats under unprivileged
> user.

Indeed, this looks like an oversight of RLS. Even if a policy is
defined to prevent a user from seeing the rows of other users, it is
still possible to get some information though this view.
I am adding an open item regarding that for 9.5.

> I'd prefer statistics on RLS-enabled tables to be simply hidden completely
> for unprivileged users.

This looks like something simple enough to do.
@Stephen: perhaps you have some thoughts on the matter? Currently
pg_stats breaks its promise to only show information about the rows
current user can read.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2015-07-13 06:12:41 intarray planning/exeuction problem with multiple operators
Previous Message Michael Paquier 2015-07-13 04:12:22 Re: [Postgresql Master Branch Patch] object class patch