Re: You're on SecurityFocus.com for the cleartext passwords. - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: You're on SecurityFocus.com for the cleartext passwords.
Date
Msg-id 39151719.9BD2DB3A@tm.ee
Whole thread Raw
In response to Re: You're on SecurityFocus.com for the cleartext passwords.  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: You're on SecurityFocus.com for the cleartext passwords.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Bruce Momjian wrote:
> 
> Another idea is to add code to 7.1 to convert non-md5 shadow password
> fields to md5 format.  Since we already have special handling to do
> pg_pwd, we could do it there.  Seems like a plan.  MD5 format is all
> hex digits of a specific length.  No way to get that confused with a
> real password.

One way to approach it in a semi-transparent way would be to add a
column md5passwd to pg_shadow and set up a trigger to automatically 
update it whenever passwd is inserted/updated (and for 
security-concious people the same trigger would empty the passwd 
field itself, or set it to some special value that disables 
crypt/cleartext logins)

the WITH ENCRYPTED PASSWORD would then update md5passwd directly, and 
reset the passwd field.

I still think that the easiest way to get unique hashes would be to use 
the username as salt when generating the value for md5passwd .

----------------
Hannu


pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: So we're in agreement....
Next
From: Hannu Krosing
Date:
Subject: Re: So we're in agreement....