pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Förster <paul.foerster@gmail.com>
To: Laura Smith <n5d9xq3ti233xiyif2vp@protonmail.ch>
Cc: postgre <pgsql-general@lists.postgresql.org>
Subject: Re: Postgres 12 RLS
Date: Mon, 8 Jun 2020 12:25:04 +0200
Message-ID: <B3750A95-C425-4C69-9D85-DAF5582FEA8B@gmail.com> (raw)
In-Reply-To: <HQQTmWw2GOI540iQNVYlo-Hdq7FXd-L1Iyq1g3SOen8t-jugIBcwQ1FCKngTRnZ4wwttn1z5mMLbQrS5aK_srLa6HKN6mFUOoiUDtS__y0I=@protonmail.ch>
References: <HQQTmWw2GOI540iQNVYlo-Hdq7FXd-L1Iyq1g3SOen8t-jugIBcwQ1FCKngTRnZ4wwttn1z5mMLbQrS5aK_srLa6HKN6mFUOoiUDtS__y0I=@protonmail.ch>

Hi Laura,

> On 08. Jun, 2020, at 12:17, Laura Smith <n5d9xq3ti233xiyif2vp@protonmail.ch> $$ LANGUAGE plpgsql SECURITY DEFINER;

you might want to use security invoker instead of definer.

https://www.postgresql.org/docs/current/sql-createfunction.html#SQL-CREATEFUNCTION-SECURITY

https://www.cybertec-postgresql.com/en/abusing-security-definer-functions/

Cheers,
Paul






view thread (5+ messages)  latest in thread

Message-ID: <B3750A95-C425-4C69-9D85-DAF5582FEA8B@gmail.com>
Permalink:  ../B3750A95-C425-4C69-9D85-DAF5582FEA8B@gmail.com/
Also on:    postgresql.org/message-id/B3750A95-C425-4C69-9D85-DAF5582FEA8B@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: paul.foerster@gmail.com, n5d9xq3ti233xiyif2vp@protonmail.ch
  Subject: Re: Postgres 12 RLS
  In-Reply-To: <B3750A95-C425-4C69-9D85-DAF5582FEA8B@gmail.com>
  References: <HQQTmWw2GOI540iQNVYlo-Hdq7FXd-L1Iyq1g3SOen8t-jugIBcwQ1FCKngTRnZ4wwttn1z5mMLbQrS5aK_srLa6HKN6mFUOoiUDtS__y0I=@protonmail.ch> <B3750A95-C425-4C69-9D85-DAF5582FEA8B@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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