Re: dblink vs SQL/MED - security and implementation details - Mailing list pgsql-hackers

From Martin Pihlak
Subject Re: dblink vs SQL/MED - security and implementation details
Date
Msg-id 4963AB2B.9060607@gmail.com
Whole thread Raw
In response to Re: dblink vs SQL/MED - security and implementation details  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut wrote:
> On Tuesday 06 January 2009 05:54:14 Joe Conway wrote:
>> contrib_regression=> SELECT dblink_connect('myconn', 'fdtest');
>>   dblink_connect
>> ----------------
>>   OK
>> (1 row)
> 
> I think you want some permission checking on fdtest then, right?
> 

The proposed "connection lookup" functions have USAGE check on the
server.

About the connstr validation -- it would be best done in the connection
lookup function. IMO it would make sense to validate the connstring if the
foreign server is not OWNED by a superuser. This would enable less trusted
to create and own servers but would force them to provide a username and
password (validate in CreateUserMapping and GetForeignConnectionOptions).
And superuser could still set up a connection that makes use of .pgpass,
pgservice etc. Comments?

regards,
Martin



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PostgreSQL 8.3.4 reproducible crash
Next
From: Tom Lane
Date:
Subject: Re: Warning about the 8.4 release