pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Matthias Apitz <guru@unixarea.de>
To: pgsql-general@lists.postgresql.org
Subject: Re: PGPASSWORD in crypted form, for example BlowFish or SHA-256
Date: Thu, 19 Sep 2019 07:19:30 -0700
Message-ID: <39445fcd-dcd8-b971-8f59-38131e503dbd@aklaver.com> (raw)
In-Reply-To: <20190919103039.GA2501@c720-r342378>
References: <20190919103039.GA2501@c720-r342378>

On 9/19/19 3:30 AM, Matthias Apitz wrote:
> 
> Hello,
> 
> Our software, a huge ILS, is running on Linux with DBS Sybase. To
> connect to the Sybase server (over the network, even on localhost),
> credentials must be known: a user (say 'sisis') and its password.
> 
> For Sybase we have them stored on the disk of the system in a file
> syb.npw as:
> 
> $ cat /opt/lib/sisis/etc/syb/syb.npw
> sisis:e53902b9923ab2fb
> sa:64406def48efca8c
> 
> for the user 'sisis' and the administrator 'sa'. Our software has as
> shared library a blob which knows how to decrypt the password hash above
> shown as 'e53902b9923ab2fb' into clear text which is then used in the
> ESQL/C or Java layer to connect to the Sybase server.
> 
> For PostgreSQL the password must be typed in (for pgsql) or can be
> provided in an environment variable PGPASSWORD=blabla
> 
> Is there somehow an API in PG to use ciphered passwords and provide as a
> shared library the blob to decrypt it? If not, we will use the mechanism same as

There is not and I am not sure that would be much use even if it did 
exist. You would be right back at someone being able to grab the 
credentials from a file and feeding them to the database for access.

The system you currently have at least seems to limit access to a 
specific program external to Postgres.

> we use for Sybase. Or any other idea to not make detectable the
> credentials? This was a request of our customers some years ago.
> 
> 	matthias
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (7+ messages)  latest in thread

Message-ID: <39445fcd-dcd8-b971-8f59-38131e503dbd@aklaver.com>
Permalink:  ../39445fcd-dcd8-b971-8f59-38131e503dbd@aklaver.com/
Also on:    postgresql.org/message-id/39445fcd-dcd8-b971-8f59-38131e503dbd@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, guru@unixarea.de
  Subject: Re: PGPASSWORD in crypted form, for example BlowFish or SHA-256
  In-Reply-To: <39445fcd-dcd8-b971-8f59-38131e503dbd@aklaver.com>
  References: <20190919103039.GA2501@c720-r342378> <39445fcd-dcd8-b971-8f59-38131e503dbd@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox