Expand my Community achievements bar.

SOLVED

How can I mask CTX column in a schema (EVENT XML)

Avatar

Level 2

Hi All,

I need to mask a CTX column in one of my schema (EVENT XML column) with some random value or can keep it blank too. I can always mask some other columns which are not CTX either by null or black depending on the data type of the column , I did some search and found that for CTX we can do it through JAVA code but I am not sure what we can write in JAVA code to mask this column.

Thanks

Arif

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Mohammad,

Yes, it is not possible to modify a factory schema (here nms:rtEvent); it is why I mentioned to extend the factory schema, you must achieve your changes in a new schema such as cus:rtEvent in order to apply your data masking with accessibleIf attribute.

What you try to do is a wrong approach, not secure enough.

Regards.
J-Serge

View solution in original post

3 Replies

Avatar

Level 10

Hi Mohammad,


You should rather change the factory schema (actually by extending it ), using sysfilter you can either mask the value (replaced by blank, using accessibleIf, see PII access in the documentation :
https://docs.campaign.adobe.com/doc/AC/en/CFG_Editing_schemas_Restricting_PII_view.html ) or mask the element itself (visibleIf).

The good thing with accessibleIf is that it is not valuable not only for form display, but all objects (example, not allow people to export data or access it through Queries activities).

Regards
J-Serge

Avatar

Level 2

Hi Serge,

Thanks for the useful tips , but unfortunately we are not allowed to touch the schema , I am writing something like below but seems it's not updating the column with blank . Not sure where I am goign wrong.

var schemaName = vars.targetSchema.substring(vars.targetSchema.indexOf(":") + 1);

logInfo(schemaName);

var collection = <{schemaName + '-collection'} xtkschema={vars.targetSchema}/>

//logInfo("Collection" +collection);

var query = xtk.queryDef.create(

<queryDef schema= {vars.targetSchema} operation="select" lineCount={vars.recCount}>

<select>

<node expr="[target/ctx]" alias="data" />

<node expr="@id" />

</select>

</queryDef>

)

var res = query.ExecuteQuery();

//logInfo("DATA" + res);

var result = res.toXMLString()

for each (var tmp in res.query2)

{

var Data = ""; 

var EId = tmp.@id;

if(tmp.data) { 

xtk.session.Write(<eventHisto xtkschema="nms:eventHisto" _operation="update" id={tmp.@id} data={Data}/>);

}

}

Thanks

Arif

Avatar

Correct answer by
Level 10

Hi Mohammad,

Yes, it is not possible to modify a factory schema (here nms:rtEvent); it is why I mentioned to extend the factory schema, you must achieve your changes in a new schema such as cus:rtEvent in order to apply your data masking with accessibleIf attribute.

What you try to do is a wrong approach, not secure enough.

Regards.
J-Serge