You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the examples given when extracting attributes only handle for a single instance of the sensitive data of userId.
Under "Masking sensitive data in log message":
when extracting redactedUserId attribute from the logs by using regex (?\d+)
What about the case where I want multiple instances of userId to be masked? There may be more than 2 instances, is there any way to cater for variable number of userId instances? Does (?\d+)+ extract all instances of userId?
For example:
"User account with userId: 12345678 has transferred $5 to user account with userId: 23456789"
masked to:
"User account with userId {redactedUserId} has transferred $5 to user account with userId {redactedUserId}"
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
ID: c44b3c6f-6d7c-475f-7839-2c7091f58530
Version Independent ID: d0bbbbb2-418a-9afd-cff7-e5d3ac832548
I have raised a question on stackoverflow too, with how I tried to go about implementing this handling of multiple instances of sensitive data to be masked:
I would love for a better approach / example to handle variable number of instances of sensitive data rather than hardcoding X number of rules in the json config.
@adamhcj, apologies for delayed response. The feature to capture multimatches in an attribute of type "string array" (to capture all of the values, instead of only the last value) was included in the latest release of SDK - Java 3.4.16.
I also see that you updated StackOverflow question that you were able to get the expected result using + symbol.
Please let us know if you have any further questions.
@adamhcj, apologies for delayed response. The feature to capture multimatches in an attribute of type "string array" (to capture all of the values, instead of only the last value) was included in the latest release of SDK - Java 3.4.16.
I also see that you updated StackOverflow question that you were able to get the expected result using + symbol. Please let us know if you have any further questions.
No worries! I've managed to solve it. Thank you :)
I noticed that the examples given when extracting attributes only handle for a single instance of the sensitive data of userId.
Under "Masking sensitive data in log message":
when extracting redactedUserId attribute from the logs by using regex (?\d+)
What about the case where I want multiple instances of userId to be masked? There may be more than 2 instances, is there any way to cater for variable number of userId instances? Does (?\d+)+ extract all instances of userId?
For example:
"User account with userId: 12345678 has transferred $5 to user account with userId: 23456789"
masked to:
"User account with userId {redactedUserId} has transferred $5 to user account with userId {redactedUserId}"
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: