agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Jason Aleski <jason.aleski@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Replication and Field Level Encryption
Date: Thu, 10 Aug 2017 12:04:41 -0500
Message-ID: <482a34c7-d0dc-6b8b-0b92-cfef0ad6eadf@gmail.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

I really need some assistance to see if I'm heading in the right 
direction and get a second opinion.  Also to see if there is anything I 
may need to reconsider.

I'm building a database design and application from the ground up. The 
database is going to be synced in three locations using BDR.The local 
office will use the instance closest to them.  Each location will also 
have an additional "BI/Reporting" instance with data being updated once 
a day.

I need to be able to do field level encryption, with both 2-way 
encryption and 1-way hashing (ie: passwords, PII, PHI data).  I believe 
I want to use PGCrypto and keep as much programming logic on the SQL 
server.  Right now, there will be a desktop, mobile and web application; 
plus additional web services to support the applications.  Even though 
the data will be encrypted and decrypted on the server, data transport 
security will rely upon SSL/TLS between the client and server.  I'd like 
to keep the client applications as "dumb" as possible so if we decide to 
change encryption methods, keys, etc.  We don't have to rollout entirely 
new applications just for key changes or if we have to re-hash/re-salt 
the database.

The things I keep going back and forth on are:

 1. Should the encryption and decryption be at the client or server?
     1. Advantage to the client
         1. Data is secured end-to-end
     2. Disadvantage
         1. Managing application changes during security key changes.
     3. Advantage to the server
         1. Consolidates programming logic and reduces the encryption
            process on the client
     4. Disadvantage to the server
         1. Data relies on communications SSL/TLS for encryption
 2. Is BDR ready for multi-master in the production world?  Or should I
    use a master/hot-standby at the main facility?  I'm mainly the two
    of the locations are in rural areas and want to make sure if their
    internet connection goes down, they can still operate?  Yes, I'm
    aware there are commercial packages out there.  We are weighing
    those, but need to show that if we did it without the use of
    commercial software/support/services, there is risk/reward.

Any thoughts or items I should also consider?

-JA-

view thread (2+ messages)  latest in thread

Message-ID: <482a34c7-d0dc-6b8b-0b92-cfef0ad6eadf@gmail.com>
Permalink:  ../482a34c7-d0dc-6b8b-0b92-cfef0ad6eadf@gmail.com/
Also on:    postgresql.org/message-id/482a34c7-d0dc-6b8b-0b92-cfef0ad6eadf@gmail.com

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-sql@postgresql.org
  Cc: jason.aleski@gmail.com
  Subject: Re: Replication and Field Level Encryption
  In-Reply-To: <482a34c7-d0dc-6b8b-0b92-cfef0ad6eadf@gmail.com>

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

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