Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i1o8T-0004wN-GN for pgsql-general@arkaria.postgresql.org; Sun, 25 Aug 2019 08:44:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i1o8P-0006ei-Vn for pgsql-general@arkaria.postgresql.org; Sun, 25 Aug 2019 08:44:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i1o8P-0006X6-Ju for pgsql-general@lists.postgresql.org; Sun, 25 Aug 2019 08:44:25 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i1o8L-0001hV-5t for pgsql-general@lists.postgresql.org; Sun, 25 Aug 2019 08:44:24 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 0FD4A2FA; Sun, 25 Aug 2019 10:44:18 +0200 (CEST) Date: Sun, 25 Aug 2019 10:44:18 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Permission for not Django app to do Write and Read Message-ID: <20190825084418.GB30240@hjp.at> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="neYutvxvOLaeuPCA" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --neYutvxvOLaeuPCA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2019-08-24 13:22:38 +0200, Luca Ferrari wrote: > On Sat, Aug 24, 2019 at 11:53 AM Peter Wainaina wrot= e: > > > > 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. >=20 > 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 --=20 _ | 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 --neYutvxvOLaeuPCA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAl1iSlgACgkQ8g5IURL+ KF3LRw//bYZruX3JCsyJz1LuLNMFnTzOl9kTeaAoOQLQTCHJZBMtiWaNt4zyknBJ A7vwOohA+yCRnoKd8j7C4OsNYiu/RbBmfIGZE1QVgEThARXmrQscSEPJasHeEsTR 8PyNG7ZvaC1vFzOs0Vzu6eqFOtTqerm5CCw4rsnuvOpVzqpZNFpsOP3sKnaml8bK mpJd4CUfz++YqaKkV53czkg5cSBV99w9BMbj6CI6S07rvYhFSbECOy5XiWANfYwN OdIJ/Dz/xUDjmbTD68hfkgLmVPeO3NtU+LJO/ULn2uv5/L0/+fjhiAxet3hCVI2j 7Lo0KZX9T96uRWUTjxYf3xpjRkO9DiBFeBiui9nscO3TdQhbWVfptXJYb1E1n9ql grZQOMfSeRCYj2mRVqS7UnWp9uUx5HwdZWmCKUKxfJxz9I4emw9VS1ySRZVAv8u5 uTEp0hppSP52AujY4FZj4jlvWSdWQFm59fNdZYy66FBmUSpwhD9PUQqvQcidM+ds OfCN0eJJ4SmX1FGawgW0r3YqnVGfbddyzas45k04SInOwHhwk6gDO2DYSA4PjZps 6ai4baTYGJi/IpFpccO4IlGTGq2mg6tQOxjh131hugRrbs0sguoDfgG+oJkk3qS3 ZVbP7wg9IFIOd+VY3SJbUR0/1ipZBOuKBBo+vl1Wk7bp4RG1Lqg= =BJUG -----END PGP SIGNATURE----- --neYutvxvOLaeuPCA--