Re: Permissions, "soft read failure" - wishful thinking? - Mailing list pgsql-general

From Benjamin Smith
Subject Re: Permissions, "soft read failure" - wishful thinking?
Date
Msg-id 11703165.6CsHfLuydK@tesla.schoolpathways.com
Whole thread Raw
In response to Re: Permissions, "soft read failure" - wishful thinking?  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
On Monday, December 14, 2015 05:20:52 PM Adrian Klaver wrote:
> > FOLLOWUP QUESTION: is there a way to ask the query planner what
> > tables/fields were output in a database result?
>
> I am not following, that would be in the query output would it not? A
> more detailed explanation of what you want to see would be helpful.

The problem is that permissions were originally designed to be handled in the
ORM (and they are, just fine) and read-level permissions were set up at the
page level (it's a web based application) so you can either access the page or
you can't.

But in order to satisfy a large client, they want the guarantee of permissions
at the field level. Problem is, our product has been in development for a LONG
time (started when PHP3 was king of the hill) and if we did that, large,
complex queries would break in many horrible ways.

For example, it's typical to create a with prefix table with a 5-table query,
then link to that two or three times over in order to develop a complex
relationship with data, and then output the result.

I may be wishing for magic, but would it be possible to be able to ask the DB
server where the fields of data got their data from? (so we could squelch the
output as it passes through our DB abstraction layer)

EXPLAIN ANALYZE *almost* does this, thus the thought.


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Permissions, "soft read failure" - wishful thinking?
Next
From: Benjamin Smith
Date:
Subject: Re: Permissions, "soft read failure" - wishful thinking?