bug(securityEvent): Add missing security event names to db#19483
bug(securityEvent): Add missing security event names to db#19483
Conversation
3937b97 to
877378f
Compare
| 'account.recovery_codes_created': 33, | ||
| 'account.recovery_codes_signin_complete': 34, | ||
| 'account.must_reset': 35, | ||
| 'account.recovery_phone_reset_password_success': 36, |
There was a problem hiding this comment.
This was not found in code, but the new recovery_phone_reset_password_complete is.
| 'account.password_upgrade_success': 38, | ||
| 'account.password_upgraded': 39, | ||
| 'account.recovery_phone_setup_failed': 40, | ||
| 'account.recovery_phone_replace_failed': 41, |
There was a problem hiding this comment.
here, _failed is what was in code, but the db had it as _failure. I'm unsure if we should keep the db as the source of truth or update it to match the model here so I went with the former given the comment at the top
There was a problem hiding this comment.
I was just digging into how events are written and, since they're written with whatever name is passed to recordSecurityEvent then this is probably not a great idea to change. We'd have some events with the old _failed and then all new events would have the _failure name.
Maybe it makes more sense to update the event name in the db instead of code/model?
Because: - We're missing some security event names from some events in the db - And we're missing some security event names in the model - And some names have mismatching id This commit: - Updates all security event names in 'fxa.securityEventNames' that are missing - Aligns all values on the model to match the db as source of truth
877378f to
9f7d150
Compare
|
I also noticed that several of the recent values are missing from the |
|
I also found that the |
|
Okay, after a bit more review of how securityEvents are recorded, I think this is a safe change. Since we look up the So, we've just dropped these events that don't exist/map correctly. This should fix that! |
Because:
This commit:
Checklist
Put an
xin the boxes that applyScreenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
Any other information that is important to this pull request.