Is postgres_fdw "safe"?

Started by Marcin Borkowskiover 2 years ago4 messagesgeneral
Jump to latest
#1Marcin Borkowski
mbork@mbork.pl

Hello,

I noticed that the docs for postgres_fdw lack the clause about it being
"trusted". Does that mean that `create extension postgres_fdw` poses
any known security risks? If so, what should I do to minimize them?

TIA,

--
Marcin Borkowski
http://mbork.pl

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Marcin Borkowski (#1)
Re: Is postgres_fdw "safe"?

On 10/20/23 01:29, Marcin Borkowski wrote:

Hello,

I noticed that the docs for postgres_fdw lack the clause about it being
"trusted". Does that mean that `create extension postgres_fdw` poses
any known security risks? If so, what should I do to minimize them?

It allows connections to a database, so the same risks as any other
client that does the same thing.

TIA,

--
Adrian Klaver
adrian.klaver@aklaver.com

#3Ron
ronljohnsonjr@gmail.com
In reply to: Marcin Borkowski (#1)
Re: Is postgres_fdw "safe"?

On 10/20/23 03:29, Marcin Borkowski wrote:

Hello,

I noticed that the docs for postgres_fdw lack the clause about it being
"trusted". Does that mean that `create extension postgres_fdw` poses
any known security risks? If so, what should I do to minimize them?

I think a better question to ask is if extensions are implicitly trusted
unless explicitly marked untrusted.

--
Born in Arizona, moved to Babylonia.

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Marcin Borkowski (#1)
Re: Is postgres_fdw "safe"?

Marcin Borkowski <mbork@mbork.pl> writes:

I noticed that the docs for postgres_fdw lack the clause about it being
"trusted". Does that mean that `create extension postgres_fdw` poses
any known security risks? If so, what should I do to minimize them?

It's a definitional question I guess. We don't mark anything trusted
if it can be used to cause outside-the-database effects; and in this
case the ability to connect to other databases qualifies as that.

regards, tom lane