public inbox for [email protected]  
help / color / mirror / Atom feed
Re: Row level security policy
2+ messages / 2 participants
[nested] [flat]

* Re: Row level security policy
@ 2024-11-14 09:57 Laurenz Albe <[email protected]>
  2024-11-14 12:04 ` Re: Row level security policy Mark Phillips <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Laurenz Albe @ 2024-11-14 09:57 UTC (permalink / raw)
  To: Mark Phillips <[email protected]>; [email protected]

On Wed, 2024-11-13 at 17:33 -0800, Mark Phillips wrote:
> Given a database table with one policy statement FOR SELECT applied, it is necessary
> to apply additional policy statements for insert, update, and delete operations?
> 
> My testing indicates that this is case but I haven’t found an explanation of this
> requirement in the documentation.

https://www.postgresql.org/docs/current/ddl-rowsecurity.html says:

  When row security is enabled on a table (with ALTER TABLE ... ENABLE ROW LEVEL SECURITY),
  all normal access to the table for selecting rows or modifying rows must be allowed by
  a row security policy.

So if you only have a policy for SELECT, that's all you are allowed to do.

Yours,
Laurenz Albe






^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Row level security policy
  2024-11-14 09:57 Re: Row level security policy Laurenz Albe <[email protected]>
@ 2024-11-14 12:04 ` Mark Phillips <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Mark Phillips @ 2024-11-14 12:04 UTC (permalink / raw)
  To: Laurenz Albe <[email protected]>; +Cc: [email protected]

Thank you for clarifying this. I missed that even though it is there in the second paragraph.
 - Mark, out and about.

> On Nov 14, 2024, at 1:57 AM, Laurenz Albe <[email protected]> wrote:
> 
> On Wed, 2024-11-13 at 17:33 -0800, Mark Phillips wrote:
>> Given a database table with one policy statement FOR SELECT applied, it is necessary
>> to apply additional policy statements for insert, update, and delete operations?
>> 
>> My testing indicates that this is case but I haven’t found an explanation of this
>> requirement in the documentation.
> 
> https://www.postgresql.org/docs/current/ddl-rowsecurity.html says:
> 
>  When row security is enabled on a table (with ALTER TABLE ... ENABLE ROW LEVEL SECURITY),
>  all normal access to the table for selecting rows or modifying rows must be allowed by
>  a row security policy.
> 
> So if you only have a policy for SELECT, that's all you are allowed to do.
> 
> Yours,
> Laurenz Albe







^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-11-14 12:04 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-11-14 09:57 Re: Row level security policy Laurenz Albe <[email protected]>
2024-11-14 12:04 ` Mark Phillips <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox