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

Capture logged in username and IP Address Audit Trail Plugin

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • audit-trail-plugin
    • None

      Enhance the audit trail plugin to capture the logged in username and Client IP address for all the action that is configured in audit trail parser.

      New feature would support capturing the username and client IP address for the "login action" , all the build, configuration related action each requests appended with logged in user and "clientIP address" including the user actions.

          [JENKINS-53430] Capture logged in username and IP Address Audit Trail Plugin

          Trey Owens created issue -

          Pierre Beitz added a comment -

          towens as far as I can tell, the current implementation is

          • using the user if available (ie if somebody is logged)
          • falling back to the IP if it's not possible

          My understanding is that you'd like to see both logged, am I correct?

          Pierre Beitz added a comment - towens as far as I can tell, the current implementation is using the user if available (ie if somebody is logged) falling back to the IP if it's not possible My understanding is that you'd like to see both logged, am I correct?
          Pierre Beitz made changes -
          Assignee Original: Tomasz Sęk [ tsek ] New: Pierre Beitz [ pierrebtz ]

          Pierre Beitz added a comment -

          Closing for inactivity, please reopen in case you still have this need and have details on the feature.

          Pierre Beitz added a comment - Closing for inactivity, please reopen in case you still have this need and have details on the feature.
          Pierre Beitz made changes -
          Resolution New: Incomplete [ 4 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

          I just installed Audit Trail plugin on a Jenkins instance running in "everyone can do anything" mode. This works just fine for us, but sometimes it is nice to know who did what, so we don't have to shout in the chat groups: "Hey, who just started this job, it has failed, please have a look!"

          So I installed this plugin, expecting it to log user's IP addresses, since in JENKINS-10559 it is written that it should. However, in reality the plugin thinks that anonymous is a good username and there is no need to retrieve the IP address. So in the logs I see the following:

          Aug 24, 2023 3:27:03,083 PMSandbox » auto-tests #171 Started by user anonymous, Parameters:[] on node #unknown# started at 2023-08-24T15:00:38Z completed in 1584852ms completed: FAILURE
          

          As you can see, no IP address is logged. So I'll take the liberty to go ahead and reopen this ticket.

          Vlad Nikiforov added a comment - I just installed Audit Trail plugin on a Jenkins instance running in "everyone can do anything" mode. This works just fine for us, but sometimes it is nice to know who did what, so we don't have to shout in the chat groups: "Hey, who just started this job, it has failed, please have a look!" So I installed this plugin, expecting it to log user's IP addresses, since in JENKINS-10559 it is written that it should. However, in reality the plugin thinks that anonymous is a good username and there is no need to retrieve the IP address. So in the logs I see the following: Aug 24, 2023 3:27:03,083 PMSandbox » auto-tests #171 Started by user anonymous, Parameters:[] on node #unknown# started at 2023-08-24T15:00:38Z completed in 1584852ms completed: FAILURE As you can see, no IP address is logged. So I'll take the liberty to go ahead and reopen this ticket.
          Vlad Nikiforov made changes -
          Resolution Original: Incomplete [ 4 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]

          Chase added a comment -

          myx_ostankin did you ever find a solution? I am experiencing the same issue - there is no ip address in the logs.  

          Chase added a comment - myx_ostankin did you ever find a solution? I am experiencing the same issue - there is no ip address in the logs.  

          Chase added a comment -

          After enabling the setting Display Username instead of UserID the IP address appeared in the logs

          Chase added a comment - After enabling the setting Display Username instead of UserID the IP address appeared in the logs

          sirkingchase , strangely your suggestion doesn't work for me. I ticked the checkbox in the settings you mentioned, but I still see "user anonymous" instead of their IP address. In fact, I didn't notice any changes at all.

          My Jenkins version is 2.442, Audit Trail plugin version is 361.v82cde86c784e.

          Vlad Nikiforov added a comment - sirkingchase , strangely your suggestion doesn't work for me. I ticked the checkbox in the settings you mentioned, but I still see "user anonymous" instead of their IP address. In fact, I didn't notice any changes at all. My Jenkins version is 2.442, Audit Trail plugin version is 361.v82cde86c784e.

            pierrebtz Pierre Beitz
            towens Trey Owens
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: