From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Azimuddin Mohammed <azimeiu@gmail.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
To: Postgres General <pgsql-general@postgresql.org>
Subject: Re: Password encryption
Date: Sun, 15 Apr 2018 17:37:33 -0700
Message-ID: <7dee6678-0114-782b-6c6e-5fa8ad08dd05@aklaver.com> (raw)
In-Reply-To: <CAKUuFd5=VwmFfj4Q3HK2s9EiEycqxQ-BPCdcKniWVWn4q=d0PA@mail.gmail.com>
References: <CAKUuFd5=VwmFfj4Q3HK2s9EiEycqxQ-BPCdcKniWVWn4q=d0PA@mail.gmail.com>
On 04/15/2018 05:22 PM, Azimuddin Mohammed wrote:
> Hello,
> Is there a way I can encrypt the default password column of db user
> password. I know by default the password is encrypted as md5, can we
> encrypt that of shadow column for password?
Are you talking about this view?:
https://www.postgresql.org/docs/10/static/view-pg-shadow.html
If so that is only readable by superusers:
production=# \c - aklaver
You are now connected to database "production" as user "aklaver".
production=> select * from pg_shadow ;
ERROR: permission denied for relation pg_shadow
production=> \c - postgres
You are now connected to database "production" as user "postgres".
production=# select * from pg_shadow ;
usename | usesysid | usecreatedb | usesuper | userepl |
usebypassrls | passwd | valuntil | useconfig
...
Assuming someone is in your database as a superuser, access to the
password field in pg_shadow is pretty much moot.
>
> Thanks in advance
--
Adrian Klaver
adrian.klaver@aklaver.com
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-admin@postgresql.org
Cc: adrian.klaver@aklaver.com, azimeiu@gmail.com, pgsql-general@postgresql.org
Subject: Re: Password encryption
In-Reply-To: <7dee6678-0114-782b-6c6e-5fa8ad08dd05@aklaver.com>
References: <CAKUuFd5=VwmFfj4Q3HK2s9EiEycqxQ-BPCdcKniWVWn4q=d0PA@mail.gmail.com> <7dee6678-0114-782b-6c6e-5fa8ad08dd05@aklaver.com>
* 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