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

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"

Status

Assignee

Ben Leibert

Reporter

Josh Zamor

Labels

None

Story Points

8

Components

Sprint

None

Fix versions

Priority

Blocker