Re: Storing passwords - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: Storing passwords
Date
Msg-id Pine.LNX.4.44.0312012130570.23890-100000@peter.localdomain
Whole thread Raw
In response to Storing passwords  (Oleg Lebedev <oleg.lebedev@waterford.org>)
List pgsql-general
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@gmx.net


pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: grant not working on pg_class
Next
From: merlyn@stonehenge.com (Randal L. Schwartz)
Date:
Subject: Re: Good open source mailing list system PHP / Postgresql