Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DYN-6927: Improvements to RemovePIIData API #15236

Merged
merged 5 commits into from
May 22, 2024

Conversation

reddyashish
Copy link
Contributor

@reddyashish reddyashish commented May 22, 2024

Purpose

Task: https://jira.autodesk.com/browse/DYN-6927

Using the RemovePIIData(JObject jsonObject), we check for the regex patterns in specific parts like the VIew or Annotations section of the JSON to remove the personal sensitive data.

It should remove email pattern, SSN number pattern, credit card pattern, user directory pattern, IP address pattern, date patterns and website patterns.

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

DYN-6927: Improvements to RemovePIIData API to accurately remove only the sensitive personal info.

Reviewers

@QilongTang @zeusongit

FYIs

@DynamoDS/dynamo

@github-actions github-actions bot changed the title Improvements to RemovePIIData API DYN-6927: Improvements to RemovePIIData API May 22, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-6927

Copy link

github-actions bot commented May 22, 2024

UI Smoke Tests

Test: success. 2 passed, 0 failed.
TestComplete Test Result
Workflow Run: UI Smoke Tests
Check: UI Smoke Tests - net8.0

Copy link
Contributor

@QilongTang QilongTang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment then LGTM

//result = Regex.Replace(result, ipPattern, "");
result = Regex.Replace(result, ipPattern, "");
result = Regex.Replace(result, creditCardPattern, "");
result = Regex.Replace(result, websitePattern, "");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @reddyashish So the trick is to just change the order of regex?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main change is to use RemovePIIData(JObject jsonObject) API on the whole json object which will look for the regex pattern in the Views, Annotations etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, in the past we are running the regex against the text?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@reddyashish reddyashish merged commit afc1be2 into DynamoDS:master May 22, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants