Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1F3C9476493 for ; Sat, 25 Jan 2003 21:22:56 -0500 (EST) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id DEF734766D7 for ; Sat, 25 Jan 2003 21:16:18 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id h0Q2Fsi24213; Sat, 25 Jan 2003 21:15:54 -0500 (EST) From: Bruce Momjian Message-Id: <200301260215.h0Q2Fsi24213@candle.pha.pa.us> Subject: Re: What goes into the security doc? In-Reply-To: <1043162191.18529.11.camel@camel> To: Robert Treat Date: Sat, 25 Jan 2003 21:15:53 -0500 (EST) Cc: Dan Langille , pgsql-hackers@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/955 X-Sequence-Number: 34565 Robert Treat wrote: > I'm not sure how adequately these topics are covered elsewhere, but you > should probably provide at least a pointer if not improved information: > > * Should have a mention of the pgcrypto code in contrib. > > * Brain hiccup, but isn't there some type of "password" datatype It is in /contrib as chkpass: Chkpass is a password type that is automatically checked and converted upon entry. It is stored encrypted. To compare, simply compare agains a clear text password and the comparison function will encrypt it before comparing. It also returns an error if the code determines that the password is easily crackable. This is currently a stub that does nothing. I haven't worried about making this type indexable. I doubt that anyone would ever need to sort a file in order of encrypted password. If you precede the string with a colon, the encryption and checking are skipped so that you can enter existing passwords into the field. On output, a colon is prepended. This makes it possible to dump and reload passwords without re-encrypting them. If you want the password (encrypted) without the colon then use the raw() function. This allows you to use the type with things like Apache's Auth_PostgreSQL module. D'Arcy J.M. Cain darcy@druid.net The document is a good idea, and the initdb -W item is good too! -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073