Uploaded image for project: 'OpenLMIS General'
  1. OLMIS-1605

Publish the good pattern on audit logging a resource in a service

    Details

    • Type: Task
    • Status: Done
    • Priority: Blocker
    • Resolution: Done
    • Affects versions: None
    • Fix versions: 3.0
    • Labels:
      None
    • Sprint:
      ILL Sprint 18, ILL Sprint 17
    • Story Points:
      8

      Description

      Establishing the good pattern for using javers / auditing a resource. This is not for concepts around centralized logging or automatically logging everything service-wide.

      Acceptance:

      • create the good pattern for auditing a single resource (facilities) in a service. This looks like: /facilities/{id}/audit and includes any annotations, repositories, base controller, etc
      • solve for the data load problem - perhaps there is a hook after bootstrap/demo data we can use in spring boot. Goal is to tell javers about all the things that it audits when we don't tell javers about it in the first place...
      • write RAML for audit - not facilities, this will be generic javers (the schema is somewhat complex, so take a basic first cut - 1 level - iff javers doesn't give a good json schema for us)
      • IT test for 404 if facility does not exist, empty array if javers has no audit log
      • update Template Service build to include javers
      • Update style guide? to show how to make a resource auditable (and what the endpoint looks like)
      • Socialize with group on this work so that the next thing that can occur is work tickets may be simply written to "make a resource auditable"

        Checklists

          Attachments

          1. For_the_Dev_Forum.docx
            125 kB
          2. log.json
            5 kB
          3. log.txt
            1 kB

            Issue links

              Activity

                People

                • Assignee:
                  ben.leibert Ben Leibert
                  Reporter:
                  joshzamor Josh Zamor
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: