SORMAS-Project icon indicating copy to clipboard operation
SORMAS-Project copied to clipboard

[AUDIT] Important, type-specific information does not show up in the audit log [2]

Open JonasCir opened this issue 3 years ago • 1 comments

Problem Description

For example, if we change the user name, the action gets log through the auditor, however, the name is not included in the log line. This shows that we need a mechanism which allows us two tweak the representation in the audit log.

Proposed Change

~Introduce an interface which extends HasUuid and let all DTOs implement it. The default implementation should return only the UUID, but in case we need more information a more specific representation should be returned.~

Introduce an annotation which can be put onto fields and methods to build the representation in the log

Acceptance Criteria

  • No toString based representation, for the most important types
  • Adjustable representation
  • Do it for the user name
  • Architecture test

out of scope

  • No Object@JVM-Address style strings in log

Split tickets

  • [x] #10335
  • [x] #10364
  • [ ] #10377
  • [x] #10403

JonasCir avatar Jul 01 '22 14:07 JonasCir

@MartinWahnschaffe FYI :)

JonasCir avatar Jul 01 '22 14:07 JonasCir

Validated ticket during a peer testing session with Jonas

AndyBakcsy-she avatar Oct 20 '22 09:10 AndyBakcsy-she