Masking and formatting using annotations #824
Replies: 2 comments
-
Hi @pecigonzalo , That would be a nice feature indeed. A few questions tho...
Would you expect the entire collection field to be masked - similar to the current masking behaviour when the path points to the field holding the collection? Example:
Or maybe the @Mask annotation should accept a path pattern that would be evaluated starting at the annotated field? The following example would then mask only the second entry of the collection (index is 0 based):
This would produce a JSON similar to:
Same question when the annotation is put on a field holding a Pojo..
|
Beta Was this translation helpful? Give feedback.
-
I think this would be a good option yeah. It could be interesting to mask on each item (eg a list of email), but this might prove a bit complex both implementation wise and processing wise. If we assume a collection is of a type of something, we most likely want all of the collection masked in the same fashion, so
I would not traverse the Pojo, if the Pojo needs masking the it should be defined in the data class of that pojo. PS: Sorry for the long wait here! |
Beta Was this translation helpful? Give feedback.
-
Hi! Im looking to implement masking of some fields for Arguments and MDC given the origin object annotations. Something along the lines of what is decribed in https://gkovan.medium.com/pci-and-pii-compliance-when-logging-data-in-digital-transformation-projects-7739bab159a6
I've gave it a go using custom Providers and the likes, but it seems that from the provider perspective I can only access maps/strings, but not the original objects, so I can do custom actions based on the annotations.
This would be my sample data class and annotation
Any ideas or pointers? Anyone has implemented something similar?
Beta Was this translation helpful? Give feedback.
All reactions