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

Allow hidden data to be sent separately #128

Merged
merged 7 commits into from
Apr 29, 2024

Conversation

ericaporter
Copy link
Contributor

@ericaporter ericaporter commented Apr 5, 2024

Ticket

This PR introduces a with_hidden_data event field
Hidden data is kept separate to both allowed_data and allowed_pii

@ericaporter ericaporter requested a review from asatwal April 8, 2024 08:17
Copy link
Collaborator

@asatwal asatwal left a comment

Choose a reason for hiding this comment

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

@ericaporter - I've suggested a slightly different approach in order to minimise changes, but I might be over simplifying here or misunderstood something. We can discuss anyway. Thanks

lib/dfe/analytics/event.rb Show resolved Hide resolved
lib/dfe/analytics.rb Outdated Show resolved Hide resolved
lib/dfe/analytics/event.rb Outdated Show resolved Hide resolved
@ericaporter ericaporter force-pushed the separate-hidden-data branch from 8dcb87b to 799aa27 Compare April 12, 2024 09:45
lib/dfe/analytics/event.rb Outdated Show resolved Hide resolved
* Add validation for hidden pii fields appearing on both lists
* Prevent erroring if config file is missing
* Update to runtime error, remove logging
Copy link
Collaborator

@asatwal asatwal left a comment

Choose a reason for hiding this comment

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

Looks good @ericaporter - I just have a few questions about on the specs.

@@ -143,8 +165,7 @@
'entity_table_name' => Candidate.table_name,
'event_type' => 'update_entity',
'data' => [
{ 'key' => 'email_address', 'value' => ['bar@baz.com'] },
{ 'key' => 'first_name', 'value' => ['Jason'] }
{ 'key' => 'email_address', 'value' => ['bar@baz.com'] }
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems like we should get first_name here as well as there are no hiddel_pii fields specified for this test ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So previously we were but did that functionality make sense? We only update the email address so shouldn't we just get the updated email address? (Unless there is a benefit to sending the unchanged fields?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked with Steven and it is essential to send complete record of allowable fields... so reverted to previous logic with a few updates to method names to try to make it more clear

spec/dfe/analytics/entities_spec.rb Show resolved Hide resolved
Copy link
Collaborator

@asatwal asatwal left a comment

Choose a reason for hiding this comment

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

👍 - Nice work.

@ericaporter ericaporter merged commit a9646d3 into hidden-pii-updates Apr 29, 2024
@ericaporter ericaporter deleted the separate-hidden-data branch April 29, 2024 15:35
ericaporter added a commit that referenced this pull request May 2, 2024
* Allow hidden data to be sent separately
* Add validation for hidden pii fields appearing on both lists
* Update to runtime error, remove logging
* Add value to expectation
* Ensure allowed_attributes send with updated_at attributes
ericaporter added a commit that referenced this pull request May 2, 2024
* Allow hidden data to be sent separately
* Add validation for hidden pii fields appearing on both lists
* Update to runtime error, remove logging
* Add value to expectation
* Ensure allowed_attributes send with updated_at attributes
ericaporter added a commit that referenced this pull request May 8, 2024
* Allow hidden data to be sent separately
* Add validation for hidden pii fields appearing on both lists
* Update to runtime error, remove logging
* Add value to expectation
* Ensure allowed_attributes send with updated_at attributes
ericaporter added a commit that referenced this pull request Jul 8, 2024
* Add DATA_hidden to events table creation SQL script
* Add hidden PII required permissions to GCP custom IAM role setup instructions
* Add policy tag setup instructions to GCP setup instructions
* Update role configuration to match latest BAT configuration
* Add hidden_pii.yml (#121)
* Allow hidden data to be sent separately (#128)
* Mask hidden_pii from logs
* Add validation for hidden pii fields appearing on both lists
* Change DATA_hidden to hidden_DATA in google_cloud_bigquery_setup.md
* Change DATA_hidden to hidden_DATA in create-events-table.sql
* Cover edge cases for validations (#146)
* Update log masking method (#150)
* Add reference to hidden_pii to cutom events (#153)
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