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

From Bruce Momjian
Subject Re: You're on SecurityFocus.com for the cleartext passwords.
Date
Msg-id 200005070310.XAA27819@candle.pha.pa.us
Whole thread Raw
In response to Re: You're on SecurityFocus.com for the cleartext passwords.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > 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.
> 
> Well, if you're willing to depend on that, then there's no need for the
> WITH ENCRYPTED PASSWORD variant syntax: the existing syntax WITH
> PASSWORD could do it all, just by checking to see if the supplied
> password string looks like it's already been md5-ified.

Yes, I would like that.  Our syntax for CREATE USER is already pretty
large.  Why not do it automatically?

> The real trick would be to get this to happen during a COPY into
> pg_shadow --- if we did that, then dumps generated by 7.0 pg_dumpall
> would still work.  Perhaps a trigger on pg_shadow insert/update is
> the right place to check and md5-ify the password?  (If that's in place
> then neither CREATE nor ALTER USER would need to do anything special!)

We already have a trigger for pg_shadow updates to recreate pg_pwd.  
Not sure if that happens from COPY however.  I sure hope it does.

--  Bruce Momjian                        |  http://www.op.net/~candle pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: You're on SecurityFocus.com for the cleartext passwords.
Next
From: Bruce Momjian
Date:
Subject: Re: So we're in agreement....