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

Builds triggered using token with build-token-root plugin show remote host as '127.0.0.1'

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • Jenkins 1.514, Oracle Linux, accessed via reverse Apache proxy (for SSL)

      Builds triggered using per-project token via the API provided by this plugin show their remote host as '127.0.0.1' rather than the real IP the build was started from. In my case, I ran curl(1) to trigger the build from another machine, and it still shows up as 127.0.0.1 (localhost), see attached screenshot.

      I am accessing this Jenkins instance via an Apache reverse proxy so that I can use SSL. But I believe my Apache virtual host is configured properly to set proxy headers like X-Forwarded-For, etc. (per http://httpd.apache.org/docs/trunk/mod/mod_proxy.html). My Apache config includes the following:

      ProxyRequests On
      ProxyPreserveHost On
      ProxyPass / http://localhost:8080/ retry=0
      ProxyPassReverse / http://localhost:8080/

      Is Jenkins not respecting the X-Forwarded-* HTTP headers when determining the remote IP? That may be the root cause here.

          [JENKINS-18008] Builds triggered using token with build-token-root plugin show remote host as '127.0.0.1'

          Stuart Montgomery created issue -
          Stuart Montgomery made changes -
          Summary Original: Builds triggered using token with this plugin show remote host as '127.0.0.1' New: Builds triggered using token with build-token-root plugin show remote host as '127.0.0.1'
          Mirko Friedenhagen made changes -
          Component/s New: core [ 15593 ]
          Stuart Montgomery made changes -
          Component/s Original: build-token-root [ 17622 ]
          Assignee Original: Jesse Glick [ jglick ]
          Daniel Beck made changes -
          Labels New: lts-candidate
          Daniel Beck made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Oliver Gondža made changes -
          Labels Original: lts-candidate New: 1.554.2-fixed
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 149305 ] New: JNJira + In-Review [ 193060 ]

            Unassigned Unassigned
            stmontgomery Stuart Montgomery
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: