Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-3886

Modifying Json File-Based Access Logger configuration can cause a corrupt log record

    XMLWordPrintable

    Details

      Description

      I created a basic server, which defaults to JSON logging.

      I then used dsconfig --advanced to interactively change the log-control-oids property of the Json File-Based Access Logger to true. After finishing, and then quitting dsconfig I looked at the ldap-access.audit.json file which included:

      {"eventName":"DJ-LDAP","client":{"ip":"127.0.0.1","port":62484},"server":{"ip":"127.0.0.1","port":4444},"request":{"protocol":"LDAPS","operation":"UNBIND","connId":0,"msgId":65},"transactionId":"0","timestamp":"2017-03-17T15:09:30.841Z","_id":"13f66f5d-8f1b-4f55-86c7-6f4a6a622bc3-133"}
      {"eventName":"DJ-LDAP","client":{"ip":"127.0.0.1","port":62484},"server":{"ip":"127.0.0.1","port":4444},"request":{"protocol":"LDAPS","operation":"DISCONNECT","connId":0},"transactionId":"0","response":{"status":"SUCCESSFUL","statusCode":"0","elapsedTime":0,"elapsedTimeUnits":"MILLISECONDS","reason":"Client Unbind"},"timestamp":"2017-03-17T15:09:30.844Z","_id":"13f66f5d-8f1b-4f55-86c7-6f4a6a622bc3-135"}
      eration":"SEARCH","connId":0,"msgId":58,"dn":"cn=24 Hours Time Limit Rotation Policy,cn=Log Rotation Policies,cn=config","scope":"base","filter":"(objectClass=*)","attrs":["objectclass"]},"transactionId":"0","response":{"status":"SUCCESSFUL","statusCode":"0","elapsedTime":0,"elapsedTimeUnits":"MILLISECONDS","nentries":1},"timestamp":"2017-03-17T15:09:27.972Z","_id":"13f66f5d-8f1b-4f55-86c7-6f4a6a622bc3-119"}
      {"eventName":"DJ-LDAP","client":{"ip":"127.0.0.1","port":62484},"server":{"ip":"127.0.0.1","port":4444},"request":{"protocol":"LDAPS","operation":"SEARCH","connId":0,"msgId":59,"dn":"cn=24 Hours Time Limit Rotation Policy,cn=Log Rotation Policies,cn=config","scope":"base","filter":"(objectClass=*)","attrs":["ds-cfg-java-class","ds-cfg-rotation-interval"]},"transactionId":"0","response":{"status":"SUCCESSFUL","statusCode":"0","elapsedTime":0,"elapsedTimeUnits":"MILLISECONDS","nentries":1},"timestamp":"2017-03-17T15:09:27.974Z","_id":"13f66f5d-8f1b-4f55-86c7-6f4a6a622bc3-121"}
      

      The third line is not valid JSON, and could cause problems with consumers of the log file.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ylecaillez Yannick Lecaillez
              Reporter:
              cjr Chris Ridd
              QA Assignee:
              Ondrej Fuchsik Ondrej Fuchsik
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: