GX Technology : Database Encryption


Overview

We need to find a solution to get our data from DNPC into Google App Engine. This will require us to switch over to a storage mechanism using salted hash values to perform data lookups. Export the database deltas and have them run in google app engine.


The current create script can be found here.

Requirements

  • We will need table objects in the DNPC environment.
  • We will need to split the data export into segments. IE: before cut over (read only data), and cutover data.
    • Pre cut over data will be things like  the audit table as it contains records that won't be changing very often.
    • post cut over data will be things that are volatile and will need to be re written once the cut over is complete.

  • axis versioned storage should be replaced with a shifting IV in the GAE code base.
  • Create tables that we will insert data into.
  • Create an API to export data into GAE. The exported items will be insert statements to be run on tables already created.
    • Inserts should perform an upsert if the same row is detected but the data is different.


Timeline

  1. Pre cutover SQL scripts are generated and run in GAE.
  2. The cutover blackout window starts
  3. Post cutover items are generated and run in GAE
    1. An order of importance should be set for moderation of names/ugc to happen last as it's easy to regulate.
  4. application is tested and black out window is ended.

Questions

  • Will we be able to use JPA message converters to perform the encryption and decryption process.
    • Likely not because of the need to update the hash data. This will likely need to be a custom solution otherwise we will need to know about what the entity type is in the message converters.

Notes

Encrypted Column lengths.

unencryptedencrypted length
3895
100183
64139
50006711
1555
10001375
254375
255375
3295
128223
64139


Hashing Length: 67 → increasing to 70 in case of long version value.

Configurations

Permissions

  • migration.data.export
  • migration.data.import

Configuration Properties

Instructions

  1. run the create table script.
  2. run each table export call which consists of an auto incremental update followed by the data insertion script.

Table PII and Sensitive Information Audit

DatabaseTablePIIDeprecatedFieldsSize (mb) As of 12th July 2017Migration InstructionsNotesAuto Increment (Sept 19, 2017)Auto Increment (Sept 22)
support_centreaccount_noteyesnoswid, note445.38precutover, postcutover
33382273338226
support_centreadmin_mappingnoyes

None


support_centreapi_credentialsyesyesclient_id, client_token0.03precutoverb2b http basic auth

support_centrefinancial_surveysnoyes
0.03precutover


support_centreintegration_dynamicmodule_endpointnono

precutover
0
support_centreintegration_dynamicmodule_spacenono

precutover
0
support_centremoderation_escalation_historyyesyesnote0.02



support_centremoderation_escalationsyesyesswid0.02



support_centremoderation_report_chat_archiveyesyesraw_msg, filtered_msg5498.33



support_centremoderation_report_checkoutnoyes
0.05



support_centremoderation_reported_playersyesyesswid279.91



support_centremoderation_reportersyesyesswid114.91



support_centremoderation_reportsnoyes
271.91



support_centrename_approval_statsnono
405.09precutover, postcutover
20636450
support_centrename_approvalsyesnoname, account_id, secondary_id172.73precutover, postcutover
337340829
support_centrename_checkoutnono
0.05precutover, postcutover
null
support_centrepremoderated_namesnono
43.13precutover, postcutover
1473321
support_centrerulenoyes
0.05



support_centrerule_matrixnoyes
0.03



support_centresemaphoresnono
0.02precutover
null
support_centresystem_emailsnoyes
0.03



support_centresystemsnono
0.03precutover
264
support_centretasknoyes
649.00



support_centreugc_campaignnono
0.03precutover
325
support_centreugc_campaign_details_mapnono
0.03precutover
0
support_centreugc_campaign_flagsnono
0.08precutover
1509
support_centreugc_campaign_settingsnono
0.06precutover
1547
support_centreugc_campaign_systemsnono
0.03precutover
715
support_centreugc_moderationyesnoaccount_id, source,text,submitted_ip132.81precutover
1156407
support_centreugc_moderation_checkoutnono
0.05precutover
null
support_centreugc_moderation_flagsnono
0.08precutover
4232342322
support_centreugc_moderation_ipv6yesyesaccount_id




support_centreugc_moderation_metadatayesnovalue77.09precutover
33070173313348
support_centreugc_moderation_settingsnono
0.11precutover
175749175616
support_centreugc_moderation_statsnono
51.11precutover
18875671890544
support_centreugc_moderation_submission_queuenono
0.05precutover
174955
support_centrewhats_newnono
1.53precutover
539
axispermission_group_effective_permissionsnono

precutover


axispermission_group_permissionsnono

precutover
1839
axispermission_groupsnono

precutover
38
axispermission_permissionsnono

precutover
313
gxtoolsadapter_typesnono


Axis 5x specific

gxtoolsclientsyesyesclient_uuid, email0.03precutoverCellophane specific12
gxtoolsdata_typesnoyesname0.05



gxtoolspermissionsnoyes
0.03



gxtoolsproduct_adaptersnono





gxtoolsproduct_languagesnono
0.02precutover
null
gxtoolsproduct_settingsyesnovalue0.02precutoverNo PII. Is this just because it is sensitive data?null
gxtoolsproduct_site_settingsyesnoproduct_site_setting_value0.03precutoverNo PII. Is this just because it is sensitive data?null
gxtoolsproduct_sitesnono
0.05precutover
null
gxtoolsproductsnono
0.05precutover
71
gxtoolsrole_permissionsnoyes





gxtoolsrole_settingsno?yes
0.11



gxtoolsrolesnoyes
0.03



gxtoolsuser_effective_permissionsnoyes
view



gxtoolsuser_groupsnoyes
1.42



gxtoolsuser_keystone_abilitiesnono
4.5precutover
null
gxtoolsuser_permissionsnoyes





gxtoolsuser_preferencesnono
1.42precutover
null
gxtoolsusersyesnousername, display_name, firstname, lastname0.17precutoveremail column to be removed6901
gxauditaccessyesnoexternal_key, ip38.68precutover, postcutover
11710431256678
gxauditactionyesnoexternal_key, old_value, new_value, comment6577.0precutover, postcutover
150551593150674396
gxauditaction_reasonnonoreason0.0precutover, postcutoverunused, zero records

gxauditaction_sourcenono
0.0precutover
2828
gxauditaction_typenono
2.69precutover, postcutover
1087410888
gxaudit_action_type_sourcenoyes
view