X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5155D52896; Wed, 18 May 2005 11:32:40 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 36887-01; Wed, 18 May 2005 14:32:33 +0000 (GMT) Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id 8A39A5282F; Wed, 18 May 2005 11:32:31 -0300 (ADT) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 18 May 2005 09:32:33 -0500 Subject: Re: [JDBC] Storing/Using Passwords From: Scott Marlowe To: William Shatner Cc: pgsql-jdbc@postgresql.org, pgsql-general@postgresql.org, pgsql-novice@postgresql.org In-Reply-To: <9af1b19905051803367f893136@mail.gmail.com> References: <9af1b19905051803367f893136@mail.gmail.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1116426752.31821.1.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 18 May 2005 09:32:33 -0500 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/801 X-Sequence-Number: 78149 On Wed, 2005-05-18 at 05:36, William Shatner wrote: > Hello, > > > I am using PostgreSQL 8.0 as a data repository for a Java based system > and I now want to add users to my java program with usernames and > passwords. Is their an encrypted password field I can use in a User > Table to store passwords or what would be the best way to approach > this? > > The usernames and passwords will apply for connection to the to the > java program only. All users will be connecting to the PostgreSQL > database transparently using the same username/password stored in a > properties file to validate their java program username/passwords. The md5() function is quite useful for this. It's a one way hash function that's commonly used by many applications to create password hashes.