From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bryn Llewellyn <bryn@yugabyte.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Peter J. Holzer <hjp-pgsql@hjp.at>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: Limiting the operations that client-side code can perform upon its database backend's artifacts
Date: Wed, 28 Sep 2022 00:00:39 -0400
Message-ID: <3881881.1664337639@sss.pgh.pa.us> (raw)
In-Reply-To: <C1704EC1-487A-4BB0-8301-2530E97F04AA@yugabyte.com>
References: <3D119733-6784-4E84-98E4-5124E69D43F9@yugabyte.com>
<20220927065858.ibrmzrrbefjq5o4l@jrouhaud>
<20220927222637.aolob6gk3kuyirfs@hjp.at>
<87E125A5-A4B8-4BD6-9E9C-7ABF77650F3F@yugabyte.com>
<20220928011353.zo7enlnig5vvpowe@jrouhaud>
<5B23D9B8-56E8-458F-AD3D-B5F88AAB2844@yugabyte.com>
<20220928025427.coznr3we5plyq5pp@jrouhaud>
<C1704EC1-487A-4BB0-8301-2530E97F04AA@yugabyte.com>
Bryn Llewellyn <bryn@yugabyte.com> writes:
> rjuju123@gmail.com wrote:
>> I'm not convinced... that the authorization system can prevent an untrusted user with a direct SQL access from actually hurting you.
> What do you mean by "untrusted"? Any person who is given the credentials
> to start a database session is trusted—even a person who can connect as
> a superuser and do untold harm. So focus on a person who has the
> credentials to connect as "client" in my example. But imagine a design
> that exposes functionality to "client" sessions exclusively through a
> carefully designed and implemented API that's expressed exclusively with
> user-defined functions and procedures.
Sure. That is called an application server. What we are is a SQL server,
and that means that the API is SQL commands, and the authorization model
is what the SQL spec says it is. (Well, okay, there's some discrepancies
between the letter of the spec and what we actually do. But my main
point here is that any session authenticated as user X has the same
privileges as any other session authenticated as user X, so there is
not a lot of point in user X mounting defenses against user X.)
So I think the concerns you're expressing here would be better addressed
at the next level up the stack.
regards, tom lane
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: tgl@sss.pgh.pa.us, bryn@yugabyte.com, rjuju123@gmail.com, hjp-pgsql@hjp.at
Subject: Re: Limiting the operations that client-side code can perform upon its database backend's artifacts
In-Reply-To: <3881881.1664337639@sss.pgh.pa.us>
References: <3D119733-6784-4E84-98E4-5124E69D43F9@yugabyte.com> <20220927065858.ibrmzrrbefjq5o4l@jrouhaud> <20220927222637.aolob6gk3kuyirfs@hjp.at> <87E125A5-A4B8-4BD6-9E9C-7ABF77650F3F@yugabyte.com> <20220928011353.zo7enlnig5vvpowe@jrouhaud> <5B23D9B8-56E8-458F-AD3D-B5F88AAB2844@yugabyte.com> <20220928025427.coznr3we5plyq5pp@jrouhaud> <C1704EC1-487A-4BB0-8301-2530E97F04AA@yugabyte.com> <3881881.1664337639@sss.pgh.pa.us>
* 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