Re: User Privileges using dblink - Mailing list pgsql-hackers

From Darko Prenosil
Subject Re: User Privileges using dblink
Date
Msg-id 008201c45e04$8b938ec0$1e82bfd5@darko
Whole thread Raw
In response to User Privileges using dblink  ("Kreißl, Karsten" <KREISSL@his.de>)
List pgsql-hackers
>
> create view myinst as select * from dblink('dbname=sva4_int1','select ....
> from inst') as (.......);
>
> The view connect not to a remote database. It uses the local database.
> You can read the data from table inst without any restrictions! (Select *
> from myinst ...)
> This problem could also be resolved, if dblink uses the current login
> information.

I'm sorry but I forgot to comment on this. Isn't this because Your
configuration alows trusted connections for localhost ?
This is the part of pg_hba.conf comment:

# Put your actual configuration here
# ----------------------------------
#
# CAUTION: The default configuration allows any local user to connect
# using any PostgreSQL user name, including the superuser, over either
# Unix-domain sockets or TCP/IP.  If you are on a multiple-user
# machine, the default configuration is probably too liberal for you.
# Change it to use something other than "trust" authentication.
#
# If you want to allow non-local connections, you need to add more
# "host" records.  Also, remember TCP/IP connections are only enabled
# if you enable "tcpip_socket" in postgresql.conf.


Regards !



pgsql-hackers by date:

Previous
From: "Darko Prenosil"
Date:
Subject: Re: INSERT rule
Next
From: "Cason, Kenny"
Date:
Subject: Accessing Specific Schemas