-
Notifications
You must be signed in to change notification settings - Fork 14
Update db export script to generate PII scrubbed copy of the Job Server production database #5437
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
Draft
nishtha-kalra
wants to merge
38
commits into
main
Choose a base branch
from
nk/export-script
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
e945585
Adding allow list for safe production database export
nishtha-kalra 9811567
Fix indentation in allow_list.yaml
nishtha-kalra 3980665
Updating sump_db.py script
nishtha-kalra 0fe066a
Refactor script so that values for sensitive columns are made null
nishtha-kalra 7fed429
Removing allow_list.yaml
nishtha-kalra 176304d
Refactor dump_db script
nishtha-kalra 12ae1ed
Refactor dump_db script
nishtha-kalra f3c310e
Make code functional and readable
nishtha-kalra 4f4917a
Rename temp schema and add description
nishtha-kalra 2c84857
Update DEVELOPERS.md with changes in dump_db script
nishtha-kalra 9fb5a75
remove comment
nishtha-kalra 0d3a67e
Rename script and dump
nishtha-kalra 8a653eb
Updating name of script in DEVELOPERS.md
nishtha-kalra c313c23
Move allowlist_path and out_dir with constants
nishtha-kalra 6d6e0cc
Load sanitised DB by default and keep django_session usable
nishtha-kalra 2128c33
Improve _fake_expression function
nishtha-kalra 880496c
Terminate script when allowlist is not present
nishtha-kalra 831c0b3
Improve sanitised dump cleanup
nishtha-kalra b443315
Add docstrings for clarity and documentation
nishtha-kalra 1f6b671
Add unit tests for dump_sanitised_db script
nishtha-kalra 24eca16
Removed is_nullable from column metadata
nishtha-kalra f7cd9ef
More unit tests for dump_sanitised_db script
nishtha-kalra 274bbb7
Add integration tests for dump_sanitised_db script
nishtha-kalra d6296df
Refactor fake data generation logic to avoid duplication
nishtha-kalra f4234bf
Move sanitised dump daily job to yearly job
nishtha-kalra 8724385
Refactor script to prevent sql injection
nishtha-kalra 954e2ab
Add document for Sanitised db dump job
nishtha-kalra aa08fde
Handle missing allowlisted columns
nishtha-kalra 4d257f3
Restore docker db logic to handle temp schema
nishtha-kalra 1539a7c
Remove sanitised dump script from Developers doc
nishtha-kalra 10e54f6
Remove mention of sanitised dump from doc
nishtha-kalra 108730a
Get a list of tables: columns excluded from allowlist
nishtha-kalra b456179
Update location of get_excluded_columns script
nishtha-kalra 89f8c4f
Adding non sensitive columns fot social_auth_code in allowlist
nishtha-kalra 9fd815a
Improve documentation for dump sanitised db
nishtha-kalra 803f698
Edit note about future of dump_db script
nishtha-kalra 3657891
Add missing info in markdown file
nishtha-kalra 11fb1d6
Keep scrubbed dump sequences in sync to avoid duplicate IDs
nishtha-kalra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor, documentation: Could use a comment here explaining that if restoring the sanitised dump we need to alter the scratch schema name to public, and a reference to the overview documentation.