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

ListView's ItemListener runs with user privileges, might miss affected views

    Details

    • Similar Issues:

      Attachments

        Issue Links

          Activity

          danielbeck Daniel Beck created issue -
          jglick Jesse Glick made changes -
          Field Original Value New Value
          Link This issue is blocking JENKINS-18680 [ JENKINS-18680 ]
          jglick Jesse Glick made changes -
          Labels permissions
          jglick Jesse Glick made changes -
          Link This issue is related to JENKINS-20474 [ JENKINS-20474 ]
          jglick Jesse Glick made changes -
          Assignee Jesse Glick [ jglick ]
          jglick Jesse Glick made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          jglick Jesse Glick made changes -
          Labels permissions performance permissions
          Hide
          jglick Jesse Glick added a comment -

          Can also be a performance issue (even when all the ACL checks pass) in case the authorization strategy takes much longer to check an ACL for a real user than for SYSTEM.

          Show
          jglick Jesse Glick added a comment - Can also be a performance issue (even when all the ACL checks pass) in case the authorization strategy takes much longer to check an ACL for a real user than for SYSTEM .
          jglick Jesse Glick made changes -
          Labels performance permissions lts-candidate performance permissions
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/model/listeners/ItemListener.java
          test/src/test/java/hudson/model/ListViewTest.java
          http://jenkins-ci.org/commit/jenkins/c04cdcd9f717ddcd3e8c9dbe86cb353c14ae511e
          Log:
          [FIXED JENKINS-22769] ItemListener callbacks should run as SYSTEM since they sometimes do ACL-checked calls.

          Compare: https://github.com/jenkinsci/jenkins/compare/28dfd90d2d6a...c04cdcd9f717

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/model/listeners/ItemListener.java test/src/test/java/hudson/model/ListViewTest.java http://jenkins-ci.org/commit/jenkins/c04cdcd9f717ddcd3e8c9dbe86cb353c14ae511e Log: [FIXED JENKINS-22769] ItemListener callbacks should run as SYSTEM since they sometimes do ACL-checked calls. Compare: https://github.com/jenkinsci/jenkins/compare/28dfd90d2d6a...c04cdcd9f717
          scm_issue_link SCM/JIRA link daemon made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #3703
          [FIXED JENKINS-22769] ItemListener callbacks should run as SYSTEM since they sometimes do ACL-checked calls. (Revision c04cdcd9f717ddcd3e8c9dbe86cb353c14ae511e)

          Result = SUCCESS
          Jesse Glick : c04cdcd9f717ddcd3e8c9dbe86cb353c14ae511e
          Files :

          • test/src/test/java/hudson/model/ListViewTest.java
          • changelog.html
          • core/src/main/java/hudson/model/listeners/ItemListener.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3703 [FIXED JENKINS-22769] ItemListener callbacks should run as SYSTEM since they sometimes do ACL-checked calls. (Revision c04cdcd9f717ddcd3e8c9dbe86cb353c14ae511e) Result = SUCCESS Jesse Glick : c04cdcd9f717ddcd3e8c9dbe86cb353c14ae511e Files : test/src/test/java/hudson/model/ListViewTest.java changelog.html core/src/main/java/hudson/model/listeners/ItemListener.java
          olivergondza Oliver Gondža made changes -
          Link This issue is related to JENKINS-25400 [ JENKINS-25400 ]
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Caused JENKINS-25400 .
          Daniel, do you vote for reverting the fix?

          Show
          oleg_nenashev Oleg Nenashev added a comment - Caused JENKINS-25400 . Daniel, do you vote for reverting the fix?
          Hide
          danielbeck Daniel Beck added a comment -

          Undecided. How difficult is it to get the real user while impersonating?

          (FWIW this may also break some aspects of Job Config History, haven't try it though.)

          Show
          danielbeck Daniel Beck added a comment - Undecided. How difficult is it to get the real user while impersonating? (FWIW this may also break some aspects of Job Config History, haven't try it though.)
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/model/Fingerprint.java
          core/src/main/java/hudson/model/ListView.java
          core/src/main/java/hudson/model/listeners/ItemListener.java
          core/src/main/java/hudson/tasks/BuildTrigger.java
          http://jenkins-ci.org/commit/jenkins/a6a3d5e1660735edc18d331500f7ce9850fbc724
          Log:
          [FIXED JENKINS-25400] Rework fix of JENKINS-22769 (c04cdcd) to put the burden on each listener to impersonate ACL.SYSTEM if it needs to.

          Compare: https://github.com/jenkinsci/jenkins/compare/ee13a9a930ba...a6a3d5e16607

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/model/Fingerprint.java core/src/main/java/hudson/model/ListView.java core/src/main/java/hudson/model/listeners/ItemListener.java core/src/main/java/hudson/tasks/BuildTrigger.java http://jenkins-ci.org/commit/jenkins/a6a3d5e1660735edc18d331500f7ce9850fbc724 Log: [FIXED JENKINS-25400] Rework fix of JENKINS-22769 (c04cdcd) to put the burden on each listener to impersonate ACL.SYSTEM if it needs to. Compare: https://github.com/jenkinsci/jenkins/compare/ee13a9a930ba...a6a3d5e16607
          Hide
          jglick Jesse Glick added a comment -

          If backporting you would need to include the fix of JENKINS-25400 as well, which is not “soaked” yet.

          Show
          jglick Jesse Glick added a comment - If backporting you would need to include the fix of JENKINS-25400 as well, which is not “soaked” yet.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Backporting w/o a fix for JENKINS-25400 would be a really bad idea.
          We don't know the real impact of the issue.

          Show
          oleg_nenashev Oleg Nenashev added a comment - Backporting w/o a fix for JENKINS-25400 would be a really bad idea. We don't know the real impact of the issue.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/listeners/ItemListener.java
          test/src/test/java/hudson/model/ListViewTest.java
          http://jenkins-ci.org/commit/jenkins/0efd811adb89769c8a6180e33e3d06d755bca4b5
          Log:
          [FIXED JENKINS-22769] ItemListener callbacks should run as SYSTEM since they sometimes do ACL-checked calls.
          (cherry picked from commit c04cdcd9f717ddcd3e8c9dbe86cb353c14ae511e)

          Conflicts:
          changelog.html

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/listeners/ItemListener.java test/src/test/java/hudson/model/ListViewTest.java http://jenkins-ci.org/commit/jenkins/0efd811adb89769c8a6180e33e3d06d755bca4b5 Log: [FIXED JENKINS-22769] ItemListener callbacks should run as SYSTEM since they sometimes do ACL-checked calls. (cherry picked from commit c04cdcd9f717ddcd3e8c9dbe86cb353c14ae511e) Conflicts: changelog.html
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/Fingerprint.java
          core/src/main/java/hudson/model/ListView.java
          core/src/main/java/hudson/model/listeners/ItemListener.java
          core/src/main/java/hudson/tasks/BuildTrigger.java
          http://jenkins-ci.org/commit/jenkins/8478e24609d407268bd579609bf0ce3ad395a046
          Log:
          [FIXED JENKINS-25400] Rework fix of JENKINS-22769 (c04cdcd) to put the burden on each listener to impersonate ACL.SYSTEM if it needs to.
          (cherry picked from commit a6a3d5e1660735edc18d331500f7ce9850fbc724)

          Conflicts:
          changelog.html

          Compare: https://github.com/jenkinsci/jenkins/compare/be835bfcfb17...8478e24609d4

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/Fingerprint.java core/src/main/java/hudson/model/ListView.java core/src/main/java/hudson/model/listeners/ItemListener.java core/src/main/java/hudson/tasks/BuildTrigger.java http://jenkins-ci.org/commit/jenkins/8478e24609d407268bd579609bf0ce3ad395a046 Log: [FIXED JENKINS-25400] Rework fix of JENKINS-22769 (c04cdcd) to put the burden on each listener to impersonate ACL.SYSTEM if it needs to. (cherry picked from commit a6a3d5e1660735edc18d331500f7ce9850fbc724) Conflicts: changelog.html Compare: https://github.com/jenkinsci/jenkins/compare/be835bfcfb17...8478e24609d4
          olivergondza Oliver Gondža made changes -
          Labels lts-candidate performance permissions 1.580.2-fixed performance permissions
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #4292
          [FIXED JENKINS-22769] ItemListener callbacks should run as SYSTEM since they sometimes do ACL-checked calls. (Revision 0efd811adb89769c8a6180e33e3d06d755bca4b5)
          [FIXED JENKINS-25400] Rework fix of JENKINS-22769 (c04cdcd) to put the burden on each listener to impersonate ACL.SYSTEM if it needs to. (Revision 8478e24609d407268bd579609bf0ce3ad395a046)

          Result = UNSTABLE
          ogondza : 0efd811adb89769c8a6180e33e3d06d755bca4b5
          Files :

          • core/src/main/java/hudson/model/listeners/ItemListener.java
          • test/src/test/java/hudson/model/ListViewTest.java

          ogondza : 8478e24609d407268bd579609bf0ce3ad395a046
          Files :

          • core/src/main/java/hudson/tasks/BuildTrigger.java
          • core/src/main/java/hudson/model/ListView.java
          • core/src/main/java/hudson/model/Fingerprint.java
          • core/src/main/java/hudson/model/listeners/ItemListener.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4292 [FIXED JENKINS-22769] ItemListener callbacks should run as SYSTEM since they sometimes do ACL-checked calls. (Revision 0efd811adb89769c8a6180e33e3d06d755bca4b5) [FIXED JENKINS-25400] Rework fix of JENKINS-22769 (c04cdcd) to put the burden on each listener to impersonate ACL.SYSTEM if it needs to. (Revision 8478e24609d407268bd579609bf0ce3ad395a046) Result = UNSTABLE ogondza : 0efd811adb89769c8a6180e33e3d06d755bca4b5 Files : core/src/main/java/hudson/model/listeners/ItemListener.java test/src/test/java/hudson/model/ListViewTest.java ogondza : 8478e24609d407268bd579609bf0ce3ad395a046 Files : core/src/main/java/hudson/tasks/BuildTrigger.java core/src/main/java/hudson/model/ListView.java core/src/main/java/hudson/model/Fingerprint.java core/src/main/java/hudson/model/listeners/ItemListener.java
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 154883 ] JNJira + In-Review [ 195068 ]

            People

            • Assignee:
              jglick Jesse Glick
              Reporter:
              danielbeck Daniel Beck
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: