Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-5166

Changing CSV audit event handler formatting fields causes an exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: OpenIDM 4.5.0
    • Fix Version/s: None
    • Component/s: Module - Audit
    • Environment:
      OS: CentOS 6
      OpenIDM 4.1.0 build 1153
      Repo: OrientDB

      Description

      When tried to change CSV audit handler formatting fields: quoteChar, delimiterChar and endOfLineSymbols through OpenIDM admin UI, OpenIDM console has the following exceptions:

      Feb 09, 2016 11:54:23 AM org.forgerock.audit.handlers.csv.CsvAuditEventHandler startup
      SEVERE: Error when creating audit file: /home/testuser/Downloads/openidm/audit/access.csv
      java.io.IOException: Resuming an existing CSV file but the headers do not match.
              at org.forgerock.audit.handlers.csv.StandardCsvWriter.<init>(StandardCsvWriter.java:64)
              at org.forgerock.audit.handlers.csv.CsvAuditEventHandler.createCsvWriter(CsvAuditEventHandler.java:340)
              at org.forgerock.audit.handlers.csv.CsvAuditEventHandler.openWriter(CsvAuditEventHandler.java:330)
              at org.forgerock.audit.handlers.csv.CsvAuditEventHandler.startup(CsvAuditEventHandler.java:219)
              at org.forgerock.audit.AuditServiceImpl.startup(AuditServiceImpl.java:377)
              at org.forgerock.audit.AuditServiceProxy.setDelegate(AuditServiceProxy.java:92)
              at org.forgerock.openidm.audit.impl.AuditServiceImpl.activate(AuditServiceImpl.java:337)
              at org.forgerock.openidm.audit.impl.AuditServiceImpl.modified(AuditServiceImpl.java:374)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:227)
              at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:38)
              at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:591)
              at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:472)
              at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:146)
              at org.apache.felix.scr.impl.manager.ImmediateComponentManager.modify(ImmediateComponentManager.java:471)
              at org.apache.felix.scr.impl.manager.ImmediateComponentManager.reconfigure(ImmediateComponentManager.java:416)
              at org.apache.felix.scr.impl.config.ConfiguredComponentHolder.configurationUpdated(ConfiguredComponentHolder.java:201)
              at org.apache.felix.scr.impl.config.ConfigurationComponentRegistry.configurationEvent(ConfigurationComponentRegistry.java:277)
              at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:2032)
              at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:2002)
              at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
              at java.lang.Thread.run(Unknown Source)
      

      and newly generated audit records don't have new formats until remove the old files.
      The expected behavior would be that old audit files being saved and new audit files have the new format.

      To reproduce:
      1. start OpenIDM,
      2. Access OpenIDM admin UI.
      3. Navigate to Configure->System Preference->Audit->CSV
      4. Enable and edit the CSV audit event handler, and change quoteChar to *, delimiterChar to - and endOfSymbols to \n, submit changes and save changes.
      Observer the exceptions in console.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jason Jason Lemay
                Reporter:
                Tinghua.Xu Tinghua.Xu
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: