department-of-veterans-affairs / notification-api

Notification API
MIT License
16 stars 9 forks source link

Personalisation Redaction: Redact notifications during deserialization #1357

Open kalbfled opened 1 year ago

kalbfled commented 1 year ago

User Story - Business Need

User Story(ies)

As a VA service, I want not to see PII when I GET a notification So that everybody remains in compliance with all applicable laws and VA policies.

As a Notify developer, I want not to decrypt personalization data for notifications created from templates with redact_personalisation set to True So that everybody remains in compliance with all applicable laws and VA policies.

Additional Info and Resources

As currently implemented, notification personalization data is encrypted for storage in the database and decrypted during the deserialization process used to GET a notification.

The TemplateBase class has a boolean redact_personalisation attribute that doesn't seem to be used or is not correctly implemented.

The desired behavior is that the response to notification GET and POST requests contain "\<redacted>" for all personalization values when the template used to create the notification has "redact_personalisation" set to True. This should not affect what's actually stored in the database.

Engineering Checklist

Off-track awareness - if the engineering work seems like it's going to take more than 3 days, please raise to the team immediately. Our assumption is engineering gets 3 pts and QA gets 2 pts.

I recommend creating a new file, tests/app/v2/notifications/test_notification_redaction.py, for unit tests rather than adding to the existing files.

Acceptance Criteria

QA Considerations

For QA to populate. Leave blank if QA is not applicable on this ticket.

Out of Scope

mjones-oddball commented 1 year ago

Hey team! Please add your planning poker estimate with Zenhub @babyjunior56 @cris-oddball @EvanParish @k-macmillan @kalbfled @ldraney @nikolai-efimov

k-macmillan commented 2 months ago

okay to keep