-
Notifications
You must be signed in to change notification settings - Fork 7
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
BAU: Indicate whether account deleted manually in audit message #4901
base: main
Are you sure you want to change the base?
Conversation
2193fd5
to
6fd223b
Compare
if (input.isPresent()) { | ||
ipAddress = PersistentIdHelper.extractPersistentIdFromHeaders(input.get().getHeaders()); | ||
attachLogFieldToLogs(PERSISTENT_SESSION_ID, ipAddress); | ||
ipAddress = IpAddressHelper.extractIpAddress(input.get()); | ||
manualDeletion = Boolean.FALSE; |
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.
Is there a reason we are using boxed booleans rather than primitive e.g. true
and false
?
var pairs = | ||
new AuditService.MetadataPair[] { | ||
pair("manualDeletion", manualDeletion.toString()) | ||
}; |
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.
This variable can probably be inlined as line 134 takes a varargs e.g.
auditService.submitAuditEvent(DELETE_ACCOUNT, auditContext, pair("manualDeletion", manualDeletion))
I think this may make sense as a |
991fd19
to
0824563
Compare
- Changed boxed boolean to primitive boolean. - Changed metadata pair declarations to be inline. - Deleted no longer necessary buildMetadataPairs helper method.
0824563
to
cf5acff
Compare
Quality Gate passedIssues Measures |
What
Indicate whether account deleted manually in audit message.
HMRC have indicated that certain fields are missing from the AUTH_DELETE_ACCOUNT audit event. Account deletion can either be triggered by users, or manually as required when we have to delete accounts. For manual deletion many of the usual fields such as session ids will be missing as there is not a user session. To make this explicit a new field has been added to the event stating whether the account was deleted manually or not.
How to review