Re: Is this a security risk? - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Is this a security risk?
Date
Msg-id D960CB61B694CF459DCFB4B0128514C202DCBE33@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Is this a security risk?  (Adam Witney <awitney@sgul.ac.uk>)
Responses Re: Is this a security risk?
List pgsql-general
Adam Witney wrote:
> I would like to provide a limited view of my database to some users,
> so i thought of creating a second database (I can control access by IP
> address through pg_hba.conf) with some views that queried the first
> database using dblink.

In my opinion dblink is not the right tool for that.
It will require a user account on the "secret" database through which
dblink accesses it. You'd have to restrict permissions for that user
if you want to keep the thing secure.

So why not access the "secret" database directly with that user and
get rid of the added difficulty of dblink?

You can rely on the permission system. Just grant the user the appropriate
privileges on the necessary objects, and if you need the user to see
only part of the data in a table, create a view for that.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: "Hoover, Jeffrey"
Date:
Subject: Re: Need help to dynamically access to colomns in function!
Next
From: Herouth Maoz
Date:
Subject: Copy/delete issue