Re: Storing passwords

From: Oleg Lebedev <oleg(dot)lebedev(at)waterford(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Storing passwords
Date: 2003-12-01 21:01:41
Message-ID: 993DBE5B4D02194382EC8DF8554A52731D77B8@postoffice.waterford.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Can Postgres JDBC driver encrypt a password before sending and inserting
it into the password column?

-----Original Message-----
From: Peter Eisentraut [mailto:peter_e(at)gmx(dot)net]
Sent: Monday, December 01, 2003 1:32 PM
To: Oleg Lebedev
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Storing passwords

Oleg Lebedev writes:

> My application needs to store user names and passwords in the database

> via JDBC connection. What is the right way to do this?

One table, one column for the name, one column for the password.

> What should be the database type of the password column?

text or bytea, depending on how you encrypt it.

> How do I encrypt the password before sending it to the database?

Check out contrib/pgcrypto.

> What other database settings need to be enabled for this to work?

None.

--
Peter Eisentraut peter_e(at)gmx(dot)net

*************************************

This e-mail may contain privileged or confidential material intended for the named recipient only.
If you are not the named recipient, delete this message and all attachments.
Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited.
We reserve the right to monitor e-mail sent through our network.

*************************************

Responses

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-12-01 21:02:01 Re: Good open source mailing list system PHP / Postgresql
Previous Message Jonathan Bartlett 2003-12-01 21:01:11 Re: What is WAL used for?