pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Tineo <adriantineo@softhome.net>
To: Luke Woollard <luke@taborvision.com>
To: Matthew Horoschun <mhoroschun@canprint.com.au>
Cc: pgsql-php@postgresql.org
Subject: Re: Password Encryption to replicate MySQL PASSWORD function
Date: Wed, 22 Jan 2003 15:54:38 +0100
Message-ID: <007101c2c226$391ddf40$f8ddd8d9@supercable.es> (raw)
References: <NGBBIAJCILLOIJPKMOIFAECHCMAA.luke@taborvision.com>

>We decided that the
> safest method was to create real users in the PostgreSQL system user
> table, and then let Postgres worry about authenticating users. Then,
> even if your PHP code is flawed, the SQL commands still execute with
> only the users permissions.

I thought that way too but now I think it is better to create users and do
the encrypting in the application layer and store logins and passwords in
regular tables. The reason is that if, by any means, someone enters the
database as user postgres or any other with total priviledges then you can
see in the pg_shadow table the paswords in clear, this is a bigger risk than
having your passwords encrypted in PHP and store them as encrypted TEXT in
any table.

Besides if you move from one postgresql server to another you have to worry
a lot about how postgresql is configured (permissions and such). If you put
it all in the application and regular tables you can go to any typical
postgresql installation and install the database and application quickly and
safely.

At least that's what I think.

Adrian Tineo




view thread (6+ messages)

Message-ID: <007101c2c226$391ddf40$f8ddd8d9@supercable.es>
Permalink:  ../007101c2c226$391ddf40$f8ddd8d9@supercable.es/
Also on:    postgresql.org/message-id/007101c2c226$391ddf40$f8ddd8d9@supercable.es

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: adriantineo@softhome.net, luke@taborvision.com, mhoroschun@canprint.com.au
  Subject: Re: Password Encryption to replicate MySQL PASSWORD function
  In-Reply-To: <007101c2c226$391ddf40$f8ddd8d9@supercable.es>
  References: <NGBBIAJCILLOIJPKMOIFAECHCMAA.luke@taborvision.com> <007101c2c226$391ddf40$f8ddd8d9@supercable.es>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox