Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-2914

Audit Trail Plugin does not record schedule/poll-scm triggered builds

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • plugin-proposals
    • None
    • Platform: All, OS: All

      Hudson version 1.277
      Audit Trail plugin version 1.1

      Audit Trail plugin configuration
      ================================
      Log Location :/wiki/hudson/logs/audit
      Log File Size MB : 5
      Log File Count : 10
      URL Patterns to Log : .*/
      (?:configSubmit|doDelete|build|toggleLogKeep|doWipeOutWorkspace|createItem|creat
      eView)

      1. Use Hudson to monitor an external job
      2. Global security: Anonymous : overall (read )
      3. Job security (bat_orm_cleanup_uatwas10) : Anonymous Job(Build)
      4. External job successfully update Hudson but no audit log

      Audit log
      =========================================
      Jan 24, 2009 7:51:17 PM /createItem by s39103
      Jan 24, 2009 7:52:15 PM /job/bat_orm_cleanup_uatwas10/configSubmit by s39103

          [JENKINS-2914] Audit Trail Plugin does not record schedule/poll-scm triggered builds

          Alan Harder added a comment -

          I don't understand, did you click the "Build" link as anonymous? If the build
          was triggered by "Poll SCM" or "Build on schedule" build triggers, then audit
          trail won't write anything.. nobody made a http request to Hudson to be
          recorded.. these are background actions.

          Alan Harder added a comment - I don't understand, did you click the "Build" link as anonymous? If the build was triggered by "Poll SCM" or "Build on schedule" build triggers, then audit trail won't write anything.. nobody made a http request to Hudson to be recorded.. these are background actions.

          keanuho added a comment -

          There are two issues.
          1) Monitor external job.
          An external cron job fired and updated Hudson. There is no record in audit log.
          2) Build trigger by "Poll SCM" or "Build on schedule".
          There is no record in audit log.

          In audit point of view, the system did something but no record.

          If user A did configuration change and the build failed. User B fixed the
          configuration and the next build is fine.

          In Audit log, you found:
          Jan 22, 2009 7:52:15 PM /job/DidSomething/configSubmit by UserC
          Jan 23, 2009 7:52:15 PM /job/DidSomething/configSubmit by UserA
          Jan 24, 2009 7:52:15 PM /job/DidSomething/configSubmit by UserB

          You knew that build was failed before and you knew UserB fixed it. But from the
          Audit log, you cannot tell easily who ( UserA or UserC ) changed the
          configuration and caused the build failed. You have to compare the failed build
          timestamp with Audit log to find out who did it but not what is the change.

          keanuho added a comment - There are two issues. 1) Monitor external job. An external cron job fired and updated Hudson. There is no record in audit log. 2) Build trigger by "Poll SCM" or "Build on schedule". There is no record in audit log. In audit point of view, the system did something but no record. If user A did configuration change and the build failed. User B fixed the configuration and the next build is fine. In Audit log, you found: Jan 22, 2009 7:52:15 PM /job/DidSomething/configSubmit by UserC Jan 23, 2009 7:52:15 PM /job/DidSomething/configSubmit by UserA Jan 24, 2009 7:52:15 PM /job/DidSomething/configSubmit by UserB You knew that build was failed before and you knew UserB fixed it. But from the Audit log, you cannot tell easily who ( UserA or UserC ) changed the configuration and caused the build failed. You have to compare the failed build timestamp with Audit log to find out who did it but not what is the change.

          Alan Harder added a comment -

          These make sense, but are not defects in the current plugin.
          1) You can do this now.. just update the URL patterns that are logged to include
          posting external job results. I guess you are making an enhancement request to
          include this in the default pattern.. this can be done.
          2) This would be completely new functionality in the plugin.. it watches http
          requests only and has no hooks into the build system. Someone will have to
          investigate to see if such hooks are even possible.

          Alan Harder added a comment - These make sense, but are not defects in the current plugin. 1) You can do this now.. just update the URL patterns that are logged to include posting external job results. I guess you are making an enhancement request to include this in the default pattern.. this can be done. 2) This would be completely new functionality in the plugin.. it watches http requests only and has no hooks into the build system. Someone will have to investigate to see if such hooks are even possible.

          keanuho added a comment -

          It is fair enough.

          It would be great to see the different when someone made configuration changed.
          Something similar to diff command in Unix. If I do not ask too much

          Some people may think it is not necessary, but from the administration
          perspective, it makes live eariler.......

          keanuho added a comment - It is fair enough. It would be great to see the different when someone made configuration changed. Something similar to diff command in Unix. If I do not ask too much Some people may think it is not necessary, but from the administration perspective, it makes live eariler.......

          Alan Harder added a comment -

          add depend on issue #291

          Alan Harder added a comment - add depend on issue #291

          Alan Harder added a comment -

          I've just implemented issue #291, so now audit-trail can register a listener to
          receive info about how builds are started (Hudson 1.279+ will be needed for this
          part of audit-trail to work).

          Alan Harder added a comment - I've just implemented issue #291, so now audit-trail can register a listener to receive info about how builds are started (Hudson 1.279+ will be needed for this part of audit-trail to work).

          Alan Harder added a comment -

          291 rejected, this one blocked again.

          Alan Harder added a comment - 291 rejected, this one blocked again.

          Alan Harder added a comment -

          new #291 code was committed; working on this one now

          Alan Harder added a comment - new #291 code was committed; working on this one now

          Alan Harder added a comment -

          code is ready, waiting on release of Hudson 1.283

          Alan Harder added a comment - code is ready, waiting on release of Hudson 1.283

          Alan Harder added a comment -

          r15327 | mindless | 2009-02-13 16:59:43 -0700 (Fri, 13 Feb 2009) | 4 lines
          Changed paths:
          M
          /trunk/hudson/plugins/audit-trail/src/main/java/hudson/plugins/audit_trail/AuditTrailPlugin.java
          M
          /trunk/hudson/plugins/audit-trail/src/main/resources/hudson/plugins/audit_trail/AuditTrailPlugin/config.jelly

          [FIXED JENKINS-2914] Update default pattern to include some more actions,
          and add option (on by default) to log how each build was started
          (this info is available on Hudson 1.283+).

          Alan Harder added a comment - r15327 | mindless | 2009-02-13 16:59:43 -0700 (Fri, 13 Feb 2009) | 4 lines Changed paths: M /trunk/hudson/plugins/audit-trail/src/main/java/hudson/plugins/audit_trail/AuditTrailPlugin.java M /trunk/hudson/plugins/audit-trail/src/main/resources/hudson/plugins/audit_trail/AuditTrailPlugin/config.jelly [FIXED JENKINS-2914] Update default pattern to include some more actions, and add option (on by default) to log how each build was started (this info is available on Hudson 1.283+).

            mindless Alan Harder
            keanuho keanuho
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: