From: Jan Bilek <jan.bilek@eftlab.com.au>
To: Laurenz Albe <laurenz.albe@cybertec.at>
To: Christophe Pettus <xof@thebuild.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: PCI:SSF - Safe SQL Query & operators filter
Date: Tue, 8 Nov 2022 07:35:02 +0000
Message-ID: <915c39ef-5244-7682-0a2e-fffe17ba8490@eftlab.com.au> (raw)
In-Reply-To: <96d54b77e1584463cc1c12e1a3ed6870063916b2.camel@cybertec.at>
References: <e3cb6a78-8ff2-dcf1-2fdd-26e3093d3106@eftlab.com.au>
<23C450AB-9333-40CB-8ED1-F15D15BED878@thebuild.com>
<33a762ed-a045-c1e5-a042-cd4903f7de4b@eftlab.com.au>
<87E0DAE2-248C-4F47-B333-436D515FD36D@thebuild.com>
<f413286c-ae0f-2649-4288-5f614e7453ef@eftlab.com.au>
<96d54b77e1584463cc1c12e1a3ed6870063916b2.camel@cybertec.at>
On 11/8/22 17:03, Laurenz Albe wrote:
> On Tue, 2022-11-08 at 04:14 +0000, Jan Bilek wrote:
>
>> I know it is not exactly what you suggested (and agreeing a lot with our
>> app user shouldn't be running as superuser), but as all other inputs
>> from our application come sanitized through bind and this is the only
>> way where user can send an explicit command in there - I think it should do!
>>
>> Please let me know if you approve.
> I strongly disapprove, and any security audit you pass with such a setup
> is worthless. I repeat: the application does not need to connect with
> a superuser.
>
> I don't understand what you want to demonstrate with the code samples, or
> what you mean when you say that "the user can send an explicit command".
>
> Yours,
> Laurenz Albe
Interesting.
I agree that our app shouldn't need superuser, but that would mean that
some ... you made me give it some serious though here.
Installation itself is happening under elevated (root) rights. We are
using the postgres account for moving in all what's needed (e.g. that
plpython3u extension). Walking though our code for most of the day, I
can't see why that superuser would be really needed. Those plpython3u
functions are wrapped up under the hood already. I'm sending that in to
check if our QA will find anything.
Thanks for being stubborn about this!
Cheers,
Jan
--
Jan Bilek - CTO at EFTlab Pty Ltd.
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: jan.bilek@eftlab.com.au, laurenz.albe@cybertec.at, xof@thebuild.com
Subject: Re: PCI:SSF - Safe SQL Query & operators filter
In-Reply-To: <915c39ef-5244-7682-0a2e-fffe17ba8490@eftlab.com.au>
References: <e3cb6a78-8ff2-dcf1-2fdd-26e3093d3106@eftlab.com.au> <23C450AB-9333-40CB-8ED1-F15D15BED878@thebuild.com> <33a762ed-a045-c1e5-a042-cd4903f7de4b@eftlab.com.au> <87E0DAE2-248C-4F47-B333-436D515FD36D@thebuild.com> <f413286c-ae0f-2649-4288-5f614e7453ef@eftlab.com.au> <96d54b77e1584463cc1c12e1a3ed6870063916b2.camel@cybertec.at> <915c39ef-5244-7682-0a2e-fffe17ba8490@eftlab.com.au>
* 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