pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: Permission for not Django app to do Write and Read
Date: Sun, 25 Aug 2019 10:44:18 +0200
Message-ID: <20190825084418.GB30240@hjp.at> (raw)
In-Reply-To: <CAKoxK+5G2MoNs23Ge52Eq4LP9dUN5X+hLDxjvr=26-+2JSNyLg@mail.gmail.com>
References: <CAEEbwbebJESmN7ibEv5aNfG=P_VHiKwPvoXr2hJcnV4+TN0S_g@mail.gmail.com>
	<CAKoxK+6nPOCeuZxBFCTGk+SF52bM+YhZoFj-Hi=GpnjbEDzX-w@mail.gmail.com>
	<CAEEbwbcvLEEYUb+=_KR3CcsFRSc5uzAxEL1VzoUqUoSPY75RUA@mail.gmail.com>
	<CAKoxK+5G2MoNs23Ge52Eq4LP9dUN5X+hLDxjvr=26-+2JSNyLg@mail.gmail.com>

On 2019-08-24 13:22:38 +0200, Luca Ferrari wrote:
> On Sat, Aug 24, 2019 at 11:53 AM Peter Wainaina <petwah17@gmail.com> wrote:
> >
> > Thanks much for the response. This is what I mean am a database
                                                      ^^^^^^^^^^^^^
> > administrator for a production company and the product owner doesn't
    ^^^^^^^^^^^^^
> > want me to be able to either read or write information that will
> > come from Django application.
> 
> I personally hate this kind of setup, because it does not make any
> sense to me that a developer must setup an application that must
> interact with a database that the developer himself cannot interact
> with.

Peter is the DBA here, not the developer. I don't think you can prevent
the DBA from seeing the data in the database - except by encrypting it
(as you suggested below). I guess it would be possible to write a Django
backend which implements an encryption layer, but getting decent
performance out of it might be ... challenging.

> However, keep it simple: define a django user, assign each object to
> such user, revoke any permission from public.
> And then let's the product owner setup a password.

You can still access the tables as postgres.

Of course you could set up another database instance where you don't
have DBA privileges, but then the product owner has to trust the system
administrator instead of the DBA. At some point you have to trust
somebody or do everything yourself.

        hp

-- 
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp@hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/;

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (4+ messages)

Message-ID: <20190825084418.GB30240@hjp.at>
Permalink:  ../20190825084418.GB30240@hjp.at/
Also on:    postgresql.org/message-id/20190825084418.GB30240@hjp.at

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: hjp-pgsql@hjp.at, pgsql-general@lists.postgresql.org
  Subject: Re: Permission for not Django app to do Write and Read
  In-Reply-To: <20190825084418.GB30240@hjp.at>

* 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