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

Users with Manage Ownership permissions are unable to change Folder ownership from CLI/REST API

      This is a regression after the 0.12.0 security release. The plugin will reject Ownership Changes by XML submission from non-Admin users having the Manage Ownership Permission.

      Proposed fix:

      • OwnershipDescription readResolve() logic should consult with extension points to verify the required permission
      • Extension points and their implementations are extended to support the API

          [JENKINS-49744] Users with Manage Ownership permissions are unable to change Folder ownership from CLI/REST API

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/OwnershipDescription.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerHelper.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/ComputerOwnerHelper.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/NodeOwnerHelper.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/NodeOwnerPropertyHelper.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/util/AbstractOwnershipHelper.java
          src/main/java/org/jenkinsci/plugins/ownership/model/folders/FolderOwnershipHelper.java
          src/main/java/org/jenkinsci/plugins/ownership/model/runs/RunOwnershipHelper.java
          http://jenkins-ci.org/commit/ownership-plugin/2212e574d5bcd4a0552c882e066a0c5a8705bf02
          Log:
          JENKINS-49744 - Generalize the permission handling logic using OwnershipHelper and locator extensions

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/com/synopsys/arc/jenkins/plugins/ownership/OwnershipDescription.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerHelper.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/ComputerOwnerHelper.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/NodeOwnerHelper.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/NodeOwnerPropertyHelper.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/util/AbstractOwnershipHelper.java src/main/java/org/jenkinsci/plugins/ownership/model/folders/FolderOwnershipHelper.java src/main/java/org/jenkinsci/plugins/ownership/model/runs/RunOwnershipHelper.java http://jenkins-ci.org/commit/ownership-plugin/2212e574d5bcd4a0552c882e066a0c5a8705bf02 Log: JENKINS-49744 - Generalize the permission handling logic using OwnershipHelper and locator extensions

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/test/java/org/jenkinsci/plugins/ownership/folders/FolderOwnershipPropertyTest.java
          http://jenkins-ci.org/commit/ownership-plugin/1f3d3846e50c2d994e99aa7eee485195e143862f
          Log:
          JENKINS-49744 - Add tests for FolderOwnership job property

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/test/java/org/jenkinsci/plugins/ownership/folders/FolderOwnershipPropertyTest.java http://jenkins-ci.org/commit/ownership-plugin/1f3d3846e50c2d994e99aa7eee485195e143862f Log: JENKINS-49744 - Add tests for FolderOwnership job property

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/OwnershipDescription.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerHelper.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/ComputerOwnerHelper.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/NodeOwnerHelper.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/NodeOwnerPropertyHelper.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/util/AbstractOwnershipHelper.java
          src/main/java/org/jenkinsci/plugins/ownership/model/folders/FolderOwnershipHelper.java
          src/main/java/org/jenkinsci/plugins/ownership/model/runs/RunOwnershipHelper.java
          src/test/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerJobPropertyTest.java
          src/test/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/OwnerNodePropertyTest.java
          src/test/java/org/jenkinsci/plugins/ownership/folders/FolderOwnershipPropertyTest.java
          http://jenkins-ci.org/commit/ownership-plugin/cb26e15b7b3d79da413b4c92deaf59b074f2a349
          Log:
          Merge pull request #73 from oleg-nenashev/JENKINS-49744

          JENKINS-49744 - Generalize permission checks via Ownership Helpers to support folders

          Compare: https://github.com/jenkinsci/ownership-plugin/compare/63d071ccf7d7...cb26e15b7b3d

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/com/synopsys/arc/jenkins/plugins/ownership/OwnershipDescription.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerHelper.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/ComputerOwnerHelper.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/NodeOwnerHelper.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/NodeOwnerPropertyHelper.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/util/AbstractOwnershipHelper.java src/main/java/org/jenkinsci/plugins/ownership/model/folders/FolderOwnershipHelper.java src/main/java/org/jenkinsci/plugins/ownership/model/runs/RunOwnershipHelper.java src/test/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerJobPropertyTest.java src/test/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/OwnerNodePropertyTest.java src/test/java/org/jenkinsci/plugins/ownership/folders/FolderOwnershipPropertyTest.java http://jenkins-ci.org/commit/ownership-plugin/cb26e15b7b3d79da413b4c92deaf59b074f2a349 Log: Merge pull request #73 from oleg-nenashev/ JENKINS-49744 JENKINS-49744 - Generalize permission checks via Ownership Helpers to support folders Compare: https://github.com/jenkinsci/ownership-plugin/compare/63d071ccf7d7...cb26e15b7b3d

          Oleg Nenashev added a comment -

          rmaura I am releasing what I have for this issue now. It is not a fix for the regression you reported, will follow-up on that separately.

          Oleg Nenashev added a comment - rmaura I am releasing what I have for this issue now. It is not a fix for the regression you reported, will follow-up on that separately.

          Oleg Nenashev added a comment -

          Some bits have been released in 0.12.1. I am going to also address createItem() somehow, but it's not trivial

          Oleg Nenashev added a comment - Some bits have been released in 0.12.1. I am going to also address createItem() somehow, but it's not trivial

          FYI, I had to roll back to 0.11 to work around the createItem() issue. Hopefully it can be resolved soon 

          Michael Vincent added a comment - FYI, I had to roll back to 0.11 to work around the createItem() issue. Hopefully it can be resolved soon 

          oleg_nenashev

          Also bumping this issue back in your list if not already in it

          Florian RUYNAT added a comment - oleg_nenashev Also bumping this issue back in your list if not already in it

          Deepak added a comment -

          oleg_nenashev More than a year since the last comment on this issue, I can confirm that this issue still exists. Please let me know if you or anyone is working on this ?

          Deepak added a comment - oleg_nenashev  More than a year since the last comment on this issue, I can confirm that this issue still exists. Please let me know if you or anyone is working on this ?

          Oleg Nenashev added a comment -

          My apologies, I have updated the issue status. Unfortunately I have been unable to work on the plugin recently.

          My apologies for this issue and for the fact it has not been fixed yet.

           

          Oleg Nenashev added a comment - My apologies, I have updated the issue status. Unfortunately I have been unable to work on the plugin recently. My apologies for this issue and for the fact it has not been fixed yet.  

          Greg added a comment -

          Thanks for creating this plugin oleg_nenashev. It's been very useful

          Previously I had no issue just using the older ownership plugin release (0.11.0) to fix the copying jobs problem, but in newer versions of jenkins (2.289.4+), that version of the plugin now breaks the UI under the Manage Jenkins section. 

          Is this something that you think might get fixed? And if not, is there anything I can do to help contribute? Based on the comments, it sounded like you were aware what was causing the problem, but just didnt have time to work on it. Maybe you have some notes I can use to try to solve it?

           

          Greg added a comment - Thanks for creating this plugin oleg_nenashev . It's been very useful Previously I had no issue just using the older ownership plugin release (0.11.0) to fix the copying jobs problem, but in newer versions of jenkins (2.289.4+), that version of the plugin now breaks the UI under the Manage Jenkins section.  Is this something that you think might get fixed? And if not, is there anything I can do to help contribute? Based on the comments, it sounded like you were aware what was causing the problem, but just didnt have time to work on it. Maybe you have some notes I can use to try to solve it?  

            Unassigned Unassigned
            oleg_nenashev Oleg Nenashev
            Votes:
            11 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated: