cleartext password catch-22

From: <mlewis(at)burly(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: cleartext password catch-22
Date: 2001-04-27 20:05:24
Message-ID: Pine.LNX.4.04.10104271240430.21136-100000@lbox1.burly.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

postgresql version = 7.1
platform = linux intel

Hi. I guess this isn't really a bug since it's acknowledged by the docs
in auth-methods.html:

'Alternative passwords cannot be used when using the crypt method. The
file will still be evaluated as usual but the password field will simply
be ignored and the pg_shadow password will be used'

but here's my problem.

I'm trying to get rid of all cleartext passwords: on the filesystem and
sent over the wire.

Using 'CREATE USER' generates $PGDATA/global/pg_pwd that has cleartext
passwords. Setting up pg_hba.conf with a record like:

host somedb somehost 255.255.255.255 password

and you get cleartext passwords over the wire.

changing the hba record to:

host somedb somehost 255.255.255.255 crypt

you get encrypted passwords over the wire. Half of the problem
solved.

You can use pg_passwd to generate a file with encrypted passwords
and use it as the 6th field in pg_hba.conf like:

host somedb somehost 255.255.255.255 crypt somepasswdfile

but I get a client authentication failure and the server logs say:

Password authentication failed for user 'someuser'

changing the record back to:

host somedb somehost 255.255.255.255 password somepasswdfile

authentication is successful but you get cleartext passwords over the
wire. Hence the catch-22: you can have encrypted passwords on the
filesystem but cleartext passwords over the wire OR you can have encrypted
passwords on the filesystem but cleartext passwords over the wire.

Thanks.
Mike

Browse pgsql-bugs by date

  From Date Subject
Next Message Jan Wieck 2001-04-27 20:18:19 Re: v7.1.1 branched and released on Tuesday ...
Previous Message bpalmer 2001-04-27 19:32:28 Re: v7.1.1 branched and released on Tuesday ...