Re: Best way to "mask" password in DBLINK

Поиск
Список
Период
Сортировка
От Tommy Gildseth
Тема Re: Best way to "mask" password in DBLINK
Дата
Msg-id 4A8273EE.60504@usit.uio.no
обсуждение исходный текст
Ответ на Re: Best way to "mask" password in DBLINK  ("Ow Mun Heng" <ow.mun.heng@wdc.com>)
Список pgsql-general
Ow Mun Heng wrote:
>
> -----Original Message-----
> From: Tommy Gildseth [mailto:tommy.gildseth@usit.uio.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?
>
> My connection string looks like this.
>
> SELECT aaa
>    FROM dblink('dbname=hmxmms host=xxx.xxx.xxx.xxx user=yyy
> password=zzz'::text, 'SELECT * from tablename'::text) b4(aaa xxx );
>
> I've placed the above as a view hence the user/pass is being hardcoded(?) of
> sorts

Just leave out the "password=zzz" part of the connection string.

--
Tommy Gildseth

В списке pgsql-general по дате отправления:

Предыдущее
От: "Ow Mun Heng"
Дата:
Сообщение: Re: Best way to "mask" password in DBLINK
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Best way to "mask" password in DBLINK