Re: Encrypting pg_shadow passwords

From: Jim Mercer <jim(at)reptiles(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Encrypting pg_shadow passwords
Date: 2001-06-26 03:42:27
Message-ID: 20010625234226.I1599@reptiles.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 25, 2001 at 11:27:42PM -0400, Bruce Momjian wrote:
> I am replying to the original message because it has all the relevant
> information. The problem with 'password' authentication is that the
> password goes across the wire in plaintext. Now, if we start to ship
> encrypted passwords across the wire, but use the same salt for every
> authentication request, we are really no more secure than if we sent it
> in the clear.
>
> If a user specifies 'crypt' in pg_hba.conf, they should be assured that
> the password is safe in case someone snoops it. Encrypting pg_shadow
> and comparing that with the same salt every time is not secure from
> snooping so we don't allow it.
>
> Am I missing something?

i don't disagree that sending plaintext across the wire, if possible, it
should be avoided.

however, i look at it this way.

many _existing_ implementations send plaintext across the wire, telnet,
ftp, .htaccess, imap and pop (non-ssl).

i would much rather risk a single plain-text password being snooped on the
wire, rather than having an entire database of plain-text passwords for
someone to scoop.

many people re-use passwords for multiple purposes, thus reducing the bio-core
required to keep track of a bazillion passwords.

in my opinion, storing plain-text passwords in any media is just plain wrong,
and a far greater security risk than having a password sniffed.

in my applications, i have SSL covering the client->app (browser->PHP code),
so the sniffing would need to be on the wire from the app-server -> database
server, which in many cases is the same machine.

my mods don't alter the operation of the server in any respect.

they do, however, allow people the choice of using a traditional
telnetd/binlogin authentication scheme without resorting to external password
files.

--
[ Jim Mercer jim(at)reptiles(dot)org +1 416 410-5633 ]
[ Now with more and longer words for your reading enjoyment. ]

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-06-26 03:48:32 Re: Encrypting pg_shadow passwords
Previous Message Bruce Momjian 2001-06-26 03:40:43 Re: Proposal for encrypting pg_shadow passwords