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

Uml 1533 hashing logged email #2460

Merged
merged 13 commits into from
Dec 19, 2023
Merged

Uml 1533 hashing logged email #2460

merged 13 commits into from
Dec 19, 2023

Conversation

Lbagg1
Copy link
Contributor

@Lbagg1 Lbagg1 commented Dec 14, 2023

Purpose

Currently we hash email addresses that we are logging to protect PII from being leaked.

There are 2 places where we have missed this:

UserService.php (front) line 135

$this->logger->notice(
'Authentication failed for {email} with code
[
'code' => $e->getCode(),
'email' => $email
]
);

UserService.php (api) line 200

$this->logger->notice(
'Attempt made to reset password for non-existent account',
['email' => $email]
);

AC

The email is hashed in these places where we have missed it

Search code base for other missed examples and fix

Including MLPA - LPAL-1264: Hash PII when logging password reset requests
BACKLOG

Fixes UML-1533

Checklist

  • I have performed a self-review of my own code
  • [ ] I have added relevant logging with appropriate levels to my code
  • [ ] New event_codes have been documented on the wiki page
    *~ [ ] I have updated documentation (Confluence/GitHub wiki/tech debt doc) where relevant~
  • I have added tests to prove my work
  • [ ] I have added welsh translation tags and updated translation files
    *~ [ ] I have run an accessibility tool on any pages I have made changes to and fixed any issues found~
  • [ ] I have notified the Interaction Designer of any content changes so that appropriate screenshots/flow diagram changes can be made
  • The product team have tested these changes

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Merging #2460 (19e0a44) into main (9fca99b) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #2460      +/-   ##
============================================
+ Coverage     91.94%   92.03%   +0.09%     
- Complexity     1467     1468       +1     
============================================
  Files           279      279              
  Lines          6655     6657       +2     
============================================
+ Hits           6119     6127       +8     
+ Misses          519      513       -6     
  Partials         17       17              
Flag Coverage Δ
use-an-lpa-admin 88.81% <ø> (ø)
use-an-lpa-api 97.05% <100.00%> (+0.43%) ⬆️
use-an-lpa-front 89.11% <100.00%> (-0.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...e-api/app/src/App/src/Service/Log/Output/Email.php 100.00% <100.00%> (ø)
...e-api/app/src/App/src/Service/User/UserService.php 85.26% <100.00%> (+3.15%) ⬆️
...nt/app/src/Common/src/Service/User/UserService.php 84.51% <100.00%> (ø)

... and 1 file with indirect coverage changes

@Lbagg1 Lbagg1 marked this pull request as ready for review December 14, 2023 17:38
@Lbagg1 Lbagg1 requested a review from a team as a code owner December 14, 2023 17:38
Copy link
Contributor

@cooperaj cooperaj 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 bar the .idea folder 👍

service-api/.idea/.gitignore Outdated Show resolved Hide resolved
@Lbagg1 Lbagg1 requested a review from cooperaj December 14, 2023 18:08
cooperaj
cooperaj previously approved these changes Dec 18, 2023
@Lbagg1 Lbagg1 merged commit 57acf94 into main Dec 19, 2023
33 checks passed
@Lbagg1 Lbagg1 deleted the uml-1533-hash-logged-email branch December 19, 2023 15:23
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.

3 participants