How does Audit Trail plugin work?

Issue

  • After installing the Audit Trail plugin, an “operation X” is not being showed on logs.

Environment

Resolution

Firstly, Audit Trail plugin needs to be configured in Manage Jenkins > Configure System > Audit Trail section and one Logger type needs to be added at least.

Having done that, Audit Trail plugin keeps audit trail of those particular Jenkins operations which their particular request matches with one of the following patterns. At the moment of writing this articles the patterns are:

  • configSubmit
  • doDelete
  • postBuildResult
  • enable
  • disable
  • cancelQueue
  • stop
  • toggleLogKeep
  • doWipeOutWorkspace
  • createItem
  • createView
  • toggleOffline
  • cancelQuietDown
  • quietDown
  • restart
  • exit
  • safeExit

Also, it receives notifications about builds thanks to AuditTrailRunListener extends RunListener.

Examples of Jenkins operation being audited

  • Run a build from testJob by testUser
YYYY/MM/DD HH:MM:SS - job/testJob/ #<BUILD_NUMBER> Started by user testUser@mail.com
  • Creating a new job (testUser) or editing an existing one (testUser) have the same output
YYYY/MM/DD HH:MM:SS - /job/testJob/configSubmit by testUser
  • Updating the email of the logged user
YYYY/MM/DD HH:MM:SS - /me/configSubmit by testUser
YYYY/MM/DD HH:MM:SS - /configSubmit by admin

Examples of Jenkins operation NOT being audited

  • Creating new users (sign up) in Jenkins owns Database
    see JENKINS-27028
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.