Replies: 2 comments
-
You'll need to use a value masker (as opposed to a path masker) if you want to mask based on field values. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @minubiyer, I had a similar requirement, and I wrote a custom Field Masker class by implementing FieldMasker interface. However, this is causing an issue due to higher number to iteration in case the payload is huge. Please let me know if you have any other alternative solution for this. Thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using structured logging design to log data. When logging a particular data i would like to mask using predicate in json pointer. For eg:
log.info("Printing greeting detail object received in request",greeting);
{"@timestamp":"2024-03-12 10:18:06,297","severity":"INFO","service":"Demo Application Service","class":"c.e.reactivewebservice.GreetingHandler","message":{"text":"Printing greeting detail object received in request ","details":{"Greeting":{"message":"Welcome to Phuket","name":"John","age":"26","world":{"name":null,"geoName":"phuk","geography":null,"longitude":230,"lat":400},"markets":[{"marketName":"spa","location":"mum","gstNo":"2345666"},{"marketName":"bugis","location":"sing","gstNo":"2245680087"},{"marketName":"flower","location":"washdc","gstNo":"112367886433"}]}}},"thread":"reactor-http-nio-6","pid":"29416","correlation-id":"","trace":""}
I am using logback.xml in which i am using MaskingJsonGeneratorDecorator, defining path
/message/details/Greeting/name ---- this will mask name field (irrespective of value)
/message/details/Greeting/age -- this will mask age field (similar to above)
I have requirement if field value contains 'null' then it should not mask (how to do this? As current class masks irrespective of value), is it possible to apply predicate /message/details/Greeting[@.name != 'null']/name --- Kindly let me know how to apply predicate or help me create custom masking component which i can apply to get the predicate support
Beta Was this translation helpful? Give feedback.
All reactions