Re: PCI:SSF - Safe SQL Query & operators filter - Mailing list pgsql-general

From Christophe Pettus
Subject Re: PCI:SSF - Safe SQL Query & operators filter
Date
Msg-id 87E0DAE2-248C-4F47-B333-436D515FD36D@thebuild.com
Whole thread Raw
In response to Re: PCI:SSF - Safe SQL Query & operators filter  (Jan Bilek <jan.bilek@eftlab.com.au>)
Responses Re: PCI:SSF - Safe SQL Query & operators filter
List pgsql-general

> On Nov 7, 2022, at 17:43, Jan Bilek <jan.bilek@eftlab.com.au> wrote:
>
> Well, superuser (our App) is already logged in and as it is designed
> very much as an "appliance" it simply does that job - manages its
> database.

Well... don't do that. :)  The problem is analogous to having root log into a Linux box and run application commands.
Itworks, but it opens a security hole, as you've discovered. 

> Yes, agreed. Any ideas?

In this particular case (creating an untrusted PL and functions therein), you'll need to use a PostgreSQL superuser.
Thisis a separate operation from routine application use, though.  (I'll note that having functions in an untrusted PL
ina PCI-sensitive system is not a great idea, as you'll need to audit them very closely to make sure that they can't do
anythinguntoward outside the role system.) 


pgsql-general by date:

Previous
From: Jan Bilek
Date:
Subject: Re: PCI:SSF - Safe SQL Query & operators filter
Next
From: "David G. Johnston"
Date:
Subject: Re: PCI:SSF - Safe SQL Query & operators filter