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

Issue 413: Encrypt sensitive data in the event table #3007

Merged

Conversation

mercedesb
Copy link
Contributor

@mercedesb mercedesb commented Jun 26, 2023

I rule and have completed some work on Case Manager that's ready for review!

This PR encrypts sensitive event data at-rest.

This pull request makes the following changes:

  • Encrypts sensitive event columns
  • Adds post-deploy rake task to encrypt existing event data
    • run rails event:encrypt_sensitive_columns after you deploy this branch
    • if you run a select query on the events table in production, you should see both cm_name and patient_name are encrypted
  • Removes note encryption task that has already been run in production (this is just some clean up)

(If there are changes to the views, please include a screenshot so we know what to look for!)

It relates to the following issue #s:

For reviewer:

  • Adjust the title to explain what it does for the notification email to the listserv.
  • Tag this PR:
    • feature if it contains a feature, fix, or similar. This is anything that contains a user-facing fix in some way, such as frontend changes, alterations to backend behavior, or bug fixes.
    • dependencies if it contains library upgrades or similar. This is anything that upgrades any dependency, such as a Gemfile update or npm package upgrade.
  • If it contains neither, no need to tag this PR.

@mercedesb mercedesb marked this pull request as draft June 27, 2023 00:09
@mercedesb mercedesb force-pushed the iss-413/encrypt-event-columns branch from ae2435a to e635af9 Compare August 18, 2023 01:05
@mercedesb mercedesb changed the title Encrypt event columns Encrypt sensitive data in the event table Aug 18, 2023
@mercedesb
Copy link
Contributor Author

Encrypting number fields would require some non-trivial custom logic, so we've updated the requirements to encrypt the sensitive string fields on the Event model

@mercedesb mercedesb marked this pull request as ready for review August 18, 2023 01:15
@mercedesb mercedesb changed the title Encrypt sensitive data in the event table Issue 413: Encrypt sensitive data in the event table Aug 18, 2023
Copy link
Member

@colinxfleming colinxfleming left a comment

Choose a reason for hiding this comment

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

marvelously clean and works great! thank you much @mercedesb and sorry for the delay in getting this reviewed and in.

@colinxfleming colinxfleming merged commit 4e1de3e into DARIAEngineering:main Sep 24, 2023
3 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