[Techtalk] mongodb with encryption?

Gayathri Swaminathan gayathri.swa at gmail.com
Mon Jul 16 17:03:04 UTC 2018


Hi John!

When it comes to encryption: you would have to review encryption at rest
and transport.

Encryption at rest can be done at the hardware layer (often costly), OS
layer (encrypted filesystems), database layer(encryption as data is being
written) or application layer (encryption at the application tier when
performing writes)

Each of the choices does affect performance measurable from monitoring IO.

Encryption at transport is often offloaded to TLS/SSL

It depends on your cost and compromise on where you want to meet the
requirements.

Now to mongoDB encryption in particular, the wiredtiger engine uses
AES256-CBC by default. You are able to choose a specific mode if preferred.

Review https://docs.mongodb.com/manual/core/security-encryption-at-rest.

Please let me know if you need anything else to get started and if you are
having difficulty when configuration is effected.

On Sun, Jul 15, 2018, 9:10 AM John Sturdy <jcg.sturdy at gmail.com> wrote:

> and again...
>
> I'm trying to avoid the learning curve of switching to a database
> technology that I'm not familiar with, and avoid having to do a migration
> any time we want to change what we store in the user's profile.
>
> So, would an encrypted database really be any better than a database on an
> encrypted filesystem?  (Mongodb's encryption is in the enterprise version
> only, but we want to use a free system.)
>
> __John (sorry about the partial messages, I'm still getting used to a very
> different keyboard!)
>
> On Sun, Jul 15, 2018 at 3:07 PM, John Sturdy <jcg.sturdy at gmail.com> wrote:
>
> > Sorry, accidentally hit send...
> > I'm tryin
> >
> > On Sun, Jul 15, 2018 at 3:06 PM, John Sturdy <jcg.sturdy at gmail.com>
> wrote:
> >
> >> Hi,
> >>
> >> I've been writing a membership and training management database system
> >> for my local hackerspace, and because of GDPR I've been asked to
> separate
> >> out the Personal Identifying Data (basically any profile data that
> could be
> >> used to harass someone) into a separate, encrypted database, which is
> to be
> >> encrypted at rest.  The overall architecture of the system is that
> login,
> >> sessions, authentication, and URL dispatch are all handled by django,
> but
> >> then the rest of it is handled in my python code, which supplies view
> >> functions for django to use (i.e. my code makes up the whole page
> string,
> >> without using django templates etc).  My code uses mongodb for all its
> >> storage.  I've done it this way partly because I'm familiar with mongodb
> >> and templateless HTML generation in python (in the way described at
> >> https://bitbucket.org/tavisrudd/throw-out-your-templates/src) but not
> >> with django and relational databases; and I want the flexibility that
> mongo
> >> provides, and don't want to have to do django migrations whenever the
> form
> >> of a user profile changes.
> >>
> >> My original idea was to keep information such as names and addresses in
> >> the database that django uses to manage user accounts, but when I saw
> about
> >> having to do migrations when these change, I decided I'd rather put
> almost
> >> all that information into mongo, leaving a minimum (name, email and a
> UUID
> >> to link the to the mongo database) in django's database, for flexibility
> >> and minimal technical hassle, and also because we want to get the
> project
> >> up and running ASAP.
> >>
> >> I'd been assuming that keeping the user profile database on an encrypted
> >> filesystem would be as good as using a database that does encryption
> >> itself.   However, the hackerspace committee's GDPR expert is
> encouraging
> >> me to use an encrypted SQL database for this, but I really don't want
> the
> >> learngin
> >>
> >
> >
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> https://mailman.linuxchix.org/mailman/listinfo/techtalk
>


More information about the Techtalk mailing list