Re: Best way to "mask" password in DBLINK

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Ow Mun Heng <ow(dot)mun(dot)heng(at)wdc(dot)com>
Cc: Tommy Gildseth <tommy(dot)gildseth(at)usit(dot)uio(dot)no>, pgsql-general(at)postgresql(dot)org
Subject: Re: Best way to "mask" password in DBLINK
Date: 2009-08-12 08:08:48
Message-ID: 9837222c0908120108t1956a3b5h90b1f76bf234e0f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 12, 2009 at 10:01, Ow Mun Heng<ow(dot)mun(dot)heng(at)wdc(dot)com> wrote:
>
>
> -----Original Message-----
> From: Magnus Hagander [mailto:magnus(at)hagander(dot)net]
> On Wed, Aug 12, 2009 at 09:30, Ow Mun Heng<ow(dot)mun(dot)heng(at)wdc(dot)com> wrote:
>>>
>>> From: Tommy Gildseth [mailto:tommy(dot)gildseth(at)usit(dot)uio(dot)no]
>>>
>>> Ow Mun Heng wrote:
>>>>> I'm starting to use DBLink / DBI-Link and one of the "bad" things is
>>>>that
>>>>> the password is out in the clear.
>>>>> What can I do to prevent it from being such? How do I protect it from
>>>>> 'innocent' users?
>>>
>>>>If I'm not mistaken, it's possible to put your password in the .pgpass
>>>>file in the postgres-users home folder, on the server where the postgres
>>>>cluster is running.
>>>
>>> Isn't that how one connects using the CLI? Eg: via psql?
>
>>You need to put it in the .pgpass file of the postgres user - the one
>>that runs the server. .pgpass is dealt with by libpq, and DBLink and
>>DBI-Link both use libpq to connect to the remote server.
>
> The View is owned by the user "operator" not postgres
> Does it make a difference?

No, we're talking about operating system user here, not postgres user.
So the owner of the database object is irrelevant - only the user that
the backend process is executing as.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ow Mun Heng 2009-08-12 08:10:59 Re: Best way to "mask" password in DBLINK
Previous Message Ow Mun Heng 2009-08-12 08:01:16 Re: Best way to "mask" password in DBLINK