Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-2848

Improve Audit and enable Timeline

    XMLWordPrintable

    Details

    • Type: User story
    • Status: Resolved
    • Priority: Minor
    • Resolution: Incomplete
    • Affects Version/s: 5.2 RC1
    • Fix Version/s: 5.4
    • Component/s: Audit
    • Tags:
    • Impact type:
      API change, Configuration format change
    • Upgrade notes:
      Hide
      • server lib should contain the el-ri-unknown.jar file (groupId: javax.el, artifactId: el-ri, version: unknown)
      • there is no direct compatibility with prior event type contributions, have a look to the up to date documention at http://doc.nuxeo.org/5.1/books/nuxeo-book/html/audit-service.html#d1739e3480 and ask me for help (slacoin at nuxeo.com)
      • NXP_LOGS.DISCRIMINATOR column should be dropped by hand if you use Postgres as database using the following command : ALTER TABLE nxp_logs DROP COLUMN discriminator RESTRICT;
      Show
      server lib should contain the el-ri-unknown.jar file (groupId: javax.el, artifactId: el-ri, version: unknown) there is no direct compatibility with prior event type contributions, have a look to the up to date documention at http://doc.nuxeo.org/5.1/books/nuxeo-book/html/audit-service.html#d1739e3480 and ask me for help (slacoin at nuxeo.com) NXP_LOGS.DISCRIMINATOR column should be dropped by hand if you use Postgres as database using the following command : ALTER TABLE nxp_logs DROP COLUMN discriminator RESTRICT;

      Description

      User Story :
      =======

      In order to manage and audit my ECM system I want to be able to :

      • select a document and view it's full history : creation / modification / workflows ...
      • make reporting on platform usage (who logs in, to see what).

      In order to keep a clear view of the activity of my co-workers, I want to be able to :

      • view what document my co-workers have worked on
      • view what tasks have been resolved by my teams
      • view who consulted the last documents I wrote
        = TimeLine

      The Dev Story :
      =========

      Because Audit logs will be used for business reports and monitoring, it must be easy to configure what data in stored in audit log.
      Idealy, I don't want to write code for that :

      • simply configure where is stored my table
      • configure fields that are attached to audit records

      I want to be able to feed or query the Audit Logs from Java code.

      For synchronization purpous, I want to have a REST or WS API to fetch "what happened" in the platform for a give time frame.

      What we have for now :
      =============

      A Log persistence engine based on JPA.
      A pluggable EntityBean factory.

      A local local and remote API for :

      • creating / getting a log record
      • make basic JPA Query

      A JbossWS based Web Service that exports the uuids of modified documents for a given time frame.

      Design notes :
      ========

      Storage engine :
      ---------------------
      If there is no way to make JPA flexible, we should either use direct JDBC or use SQL Directory.
      Using SQL directory would be very good (we can define a dedicated SQLDirectory API if needed).

      Audit format config :
      --------------------------
      Configuration of Audit format could be defined by el-expression with a plugable evaluation context (default to : user, event, document).
      => It's easier to define EL expression and eventually extend Context than contributing a JPA class.

      LogEntry API :
      ------------------
      Current implementation returns Entities.
      This is a problem for several reasons :

      • contributing entities in a pain
      • for remote EJB3 access and multi-JVM deployment this is a problem since
        entity implementation class needs to be present both client side and server side
      • client code have to do an explicit cast or use java instrospection to use extended fields !

      Target LogEntry implementation should extend exisiting LogEntry interface and simply wrap a HashMap for additionnal attributes.

      JMS dep :
      ------------
      Audit is for now dependent on JMS.
      If we really want to make audit part of the Core Services and let it deploy into a Servlet Container, we should probably move the
      loging code into a helper class that the could be called from a MDB or a CoreListener.

        Attachments

        There are no Sub-Tasks for this issue.

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 week, 1 day, 2 hours
                1w 1d 2h
                Remaining:
                Remaining Estimate - 1 week, 1 day, 2 hours
                1w 1d 2h
                Logged:
                Time Spent - Not Specified
                Not Specified