Encrypting a mySQL database how to? Perfomance issues etc.

Author Message

R Sutton

Monday 20 August 2007 10:05:43 am

I have a client who wants their db to be encrypted *and* to run on https due to sensitive information. I personally think this is overkill, but I have to see what can be done if they insist.

First of all, what is involved in this. I can't find a "how to" anywhere in the docs or forum, much less a mention of this. Has anyone else setup anything similar? If so how big of a performance hit should we expect going this route? Any real world numbers would be most insightful.

I think that https would be enough of a performance hit in the first place, but anything that would back up my argument is great. Alternately, is there a way to have one node on https while the rest of the site has a standard setup?

Any direction from someone who has traversed this road would be most helpful and appreciated.

Thanks!

Bruce Morrison

Monday 20 August 2007 3:42:40 pm

Hi

While I'm not aware of the reasoning behind the request I'd assume that if the database was to be encrypted then you wouldn't want unencrypted cache files hanging around on the local file system.

You might want to look into encrypted filesystems as a lower level solution. http://www.google.com.au/search?q=linux+encrypted+filesystems

I'd suggest taking a step back and identifying the security requirements and then looking for appropriate solutions to meet those requirements.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

R Sutton

Tuesday 21 August 2007 6:06:47 pm

While I'm not aware of the reasoning behind the request I'd assume that if the database was to be encrypted then you wouldn't want unencrypted cache files hanging around on the local file system.

That's what I have looked into for the past day. I think you're right. And I think it will be easier and less of a kludged feel to it once done. Thank for the push, I found several great write ups on encrypting the freeBSD system this will run on. I am pushing this out as an experiment tomorrow, so we will see how this goes :)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 18:31:59
Script start
Timing: Jan 18 2025 18:31:59
Module start 'layout'
Timing: Jan 18 2025 18:31:59
Module start 'content'
Timing: Jan 18 2025 18:32:00
Module end 'content'
Timing: Jan 18 2025 18:32:00
Script end

Main resources:

Total runtime0.8255 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 589.3281152.6563
Module start 'layout' 0.00610.0025 741.984439.4922
Module start 'content' 0.00860.8153 781.4766531.5078
Module end 'content' 0.82390.0015 1,312.984412.0938
Script end 0.8254  1,325.0781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4232160.0002
Check MTime0.00140.1697160.0001
Mysql Total
Database connection0.00100.119410.0010
Mysqli_queries0.778094.2495570.0136
Looping result0.00050.0626550.0000
Template Total0.799096.820.3995
Template load0.00250.301020.0012
Template processing0.796596.488520.3982
Template load and register function0.00020.020110.0002
states
state_id_array0.00080.099210.0008
state_identifier_array0.00070.088320.0004
Override
Cache load0.00210.2555190.0001
Sytem overhead
Fetch class attribute can translate value0.00100.121920.0005
Fetch class attribute name0.00100.117140.0002
XML
Image XML parsing0.00070.087520.0004
class_abstraction
Instantiating content class attribute0.00000.001140.0000
General
dbfile0.00080.0964160.0000
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs