Masking Extensions (MXS-1302)

[MXS-1305] Partial masking Created: 2017-06-29  Updated: 2017-07-20  Resolved: 2017-07-14

Status: Closed
Project: MariaDB MaxScale
Component/s: masking
Affects Version/s: None
Fix Version/s: 2.2.0

Type: Sub-Task Priority: Major
Reporter: Johan Wikman Assignee: Massimiliano Pinto (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2017-37, 2017-38

 Description   

It should be possible to replace just one part of a value.

As an example, so that a (Finnish) social security number such as 061173-174A is replaced with 061173-XXXX.

This could be done, for instance, so that the rule syntax is extended with a capture clause

{
    "rules": [
        {
            "replace": {
                "column": "ssn"
                "match": ".*-(.*)"
            },
            "with": {
                "fill": "X"
            }
    ...

and then only the captured part would be replaced with the fill character.

Note that the above is only for illustrative purposes, and the actual way for specifying what is captured and how it is replaced remains to be defined during the implementation.

"capture" keyword has been changed to "match" in the JSON

Partial masking "match" option is an optional parameter in the "replace" rule.

If present it takes precedence and the filling is done in the matched string only: see comments below.



 Comments   
Comment by Massimiliano Pinto (Inactive) [ 2017-07-14 ]

Proper keyword is "match" instead of "capture":

"replace":

{ "column": "d_code", "match": "(?<=aaa).*(?=-12)|(?<=-12).*" }

,
"with":

{ "fill": "X#@" }
Comment by Massimiliano Pinto (Inactive) [ 2017-07-14 ]

in "develop" branch

Comment by Dipti Joshi (Inactive) [ 2017-07-20 ]

Massimiliano Pinto Where can I find user documentation on this ?

Generated at Thu Feb 08 04:05:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.