.st0{fill:#FFFFFF;}

IBM i Data Obfuscation – Making Data Foggy Murky and Squinty 

 July 3, 2019

By  NickLitten

A little while ago, I wrote a data obfuscation tool – which I decided to call Data Fogging. This is specifically to solve the data privacy problems that we face when we want to suck down real data from production environments to our development and Test/QA boxes.

Obviously we don’t want to implement any real data on our test machines (names, addresses, emails, social, etc etc) and this little tool lets us

  • record a list of keywords to scan for (ie: name, address, social, zip, etc)
  • scan all file data for fields containing those words
  • generate automatic SQL scripts to fog (obfuscate) that data
  • and then.. fog it

I included it with the latest V7202 free (and commercial) version of Projex4i

Hope its useful!

IBM I DATA OBFUSCATION ā€“ FOGGING TOOL 

The Data Fogging Tool allows selection and obfuscation of various data sets in any IBM I Library or SQL Schema. 

Main Menu is FOG (GO FOG)

IBM i Data Obfuscation

1 – WRKFOGWRD 

Create list of word to scan for. 

These scan words will be found in the database and allow you to define obfuscation rules

IBM i Data Obfuscation - Making Data Foggy Murky and Squinty 1

Each search word can have several rules associated with it: 

IBM i Data Obfuscation - Making Data Foggy Murky and Squinty 2

These search word rules let you select database fields based on partial hits, case or even scanning for field names, text or column headings. 

The default obfuscation RULE sets the rule to be used to obfuscate any fields that are selected because they match this scan word. 

2- GENFOGDB 

Generate the fogging database 

To load and scan the QGPL library the command might be: GENFOGDB FUNCTION(*BOTH) FILE(QGPL/*ALL) 

IBM i Data Obfuscation - Making Data Foggy Murky and Squinty 3

This will load all files in the specified library and scan those fields for any occurrences of the search words you defined previously. 

All results will be displayed later allowing to select which ones you want to obfuscate. 

3 – PRTFOG 

Print list of fogging words 

IBM i Data Obfuscation - Making Data Foggy Murky and Squinty 4

The words that have been defined can be listed in PDF and emailed for clearance prior to use 

4 – FOGNOW 

Now we have defined the search words and loaded the scan database we can work with the HITS and define whether fogging rules to be applied. 

This is the main brains of the fogging toolset. 

This allows you to perform data obfuscation on all rows found to contain the search words, as well as interrogate data and define standard obfuscation scripts or even create bespoke ones of your own.

IBM i Data Obfuscation - Making Data Foggy Murky and Squinty 5
IBM i Data Obfuscation - Making Data Foggy Murky and Squinty 6
IBM i Data Obfuscation
IBM i Data Obfuscation - Making Data Foggy Murky and Squinty 7

As you can see, if the fogging database has not been built the utility will report that it is empty 

5 – PRGDATA 

Data purging allows you to reduce the dataset that you are working with.  

This screen lets you add SQL purge scripts ā€“ obviously only SQL expert should use this option. 

IBM i Data Obfuscation - Making Data Foggy Murky and Squinty 8

NickLitten


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
__CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"cff50":{"name":"Main Accent","parent":-1},"a344d":{"name":"Accent Transparent","parent":"cff50"}},"gradients":[]},"palettes":[{"name":"Default","value":{"colors":{"cff50":{"val":"var(--tcb-skin-color-0)"},"a344d":{"val":"rgba(46, 138, 229, 0.85)","hsl_parent_dependency":{"h":210,"l":0.54,"s":0.78}}},"gradients":[]},"original":{"colors":{"cff50":{"val":"rgb(0, 178, 255)","hsl":{"h":198,"s":1,"l":0.5}},"a344d":{"val":"rgba(0, 178, 255, 0.85)","hsl_parent_dependency":{"h":198,"s":1,"l":0.5}}},"gradients":[]}}]}__CONFIG_colors_palette__

Get In Touch

Iā€™m always looking for awesome input, feedback and critique!

>