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

Input step should permit cancellation from anyone with build abort permission

      Given I am Jenkins administrator when I create a job like the following:

      node {
        echo "test"
        input id: 'Edebd25a79a1ac52da788eba9a7fcc3a', message: 'hey!', ok: 'yo', submitter: 'foobar' parameters: []
      }
      

      ... I'm not able to answer the question it asks as I get an error saying "You need to be foobar to submit this" and I'm unable to stop/kill the job (it just doesn't work).

      Probably there should be special permission for admins to stop such jobs and/or the plugin should check if the submitter is a real person when saving/running the job.

      I'm using Jenkins ver. 1.596 and workflow plugin v1.1

          [JENKINS-26363] Input step should permit cancellation from anyone with build abort permission

          Timur Batyrshin created issue -
          Timur Batyrshin made changes -
          Description Original: Given I am Jenkins administrator when I create a job like the following:
          {code}
          node {
            echo "test"
            input id: 'Edebd25a79a1ac52da788eba9a7fcc3a', message: 'hey!', ok: 'yo', submitter: 'foobar' parameters: []
          }
          {code}
          ... I'm unable to stop/kill the job as I get an error saying "You need to be foobar to submit this".


          Probably there should be special permission for admins to stop such jobs and/or the plugin should check if the submitter is a real person when saving/running the job.

          I'm using Jenkins ver. 1.596 and workflow plugin v1.1
          New: Given I am Jenkins administrator when I create a job like the following:
          {code}
          node {
            echo "test"
            input id: 'Edebd25a79a1ac52da788eba9a7fcc3a', message: 'hey!', ok: 'yo', submitter: 'foobar' parameters: []
          }
          {code}
          ... I'm not able to answer the question it asks as I get an error saying "You need to be foobar to submit this" and I'm unable to stop/kill the job (it just doesn't work).


          Probably there should be special permission for admins to stop such jobs and/or the plugin should check if the submitter is a real person when saving/running the job.

          I'm using Jenkins ver. 1.596 and workflow plugin v1.1

          Jesse Glick added a comment -

          The bug is that anyone with cancel permission for the build overall ought to be able to cancel the input step, whether or not they match submitter.

          The stop function is implemented for the input step, but just delegates to the cancellation of the input, so that does not help in your case.

          Form validation should be added for submitter to check whether it is an existing user ID or external group, insofar as the SecurityRealm can give a definitive answer.

          Jesse Glick added a comment - The bug is that anyone with cancel permission for the build overall ought to be able to cancel the input step, whether or not they match submitter . The stop function is implemented for the input step, but just delegates to the cancellation of the input, so that does not help in your case. Form validation should be added for submitter to check whether it is an existing user ID or external group, insofar as the SecurityRealm can give a definitive answer.

          Jesse Glick added a comment -

          See JENKINS-25550 for the short-term workaround.

          Jesse Glick added a comment - See JENKINS-25550 for the short-term workaround.
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-25550 [ JENKINS-25550 ]
          Jesse Glick made changes -
          Summary Original: Can't stop nor delete the workflow job when it is awaiting for input New: Input step should permit cancellation from anyone with build abort permission

          Another issue worth noticing here (probably it will be closed automagically when the above is fixed):

          After I've got the described situation when I can't cancel the job running when I delete the job it disappears from the list of jobs but it is still marked as running in the list of build executors. I believe it should disappear from it when the job is deleted.

          Timur Batyrshin added a comment - Another issue worth noticing here (probably it will be closed automagically when the above is fixed): After I've got the described situation when I can't cancel the job running when I delete the job it disappears from the list of jobs but it is still marked as running in the list of build executors. I believe it should disappear from it when the job is deleted.

          BTW in this case the workaround does not work:

          • when I first click on running job the page appears and I'm able to append doDelete and click POST
          • after that the running job still appears in the list of executors but if I click on it I get 404

          Timur Batyrshin added a comment - BTW in this case the workaround does not work: when I first click on running job the page appears and I'm able to append doDelete and click POST after that the running job still appears in the list of executors but if I click on it I get 404

          Jesse Glick added a comment -

          when I delete the job it disappears from the list of jobs but it is still marked as running in the list of build executors

          A distinct bug, though I am not going to fix it, since JENKINS-25550 is the better fix for the future. (You are not even supposed to be allowed to delete a running build, which is why there is no UI link to do so, but doDelete in Jenkins core does not enforce this check.)

          Anyway: just restart Jenkins and the bad build should get cleaned up.

          Jesse Glick added a comment - when I delete the job it disappears from the list of jobs but it is still marked as running in the list of build executors A distinct bug, though I am not going to fix it, since JENKINS-25550 is the better fix for the future. (You are not even supposed to be allowed to delete a running build, which is why there is no UI link to do so, but doDelete in Jenkins core does not enforce this check.) Anyway: just restart Jenkins and the bad build should get cleaned up.

          Sure, I've just posted it here for the full reference. Thanks!

          Timur Batyrshin added a comment - Sure, I've just posted it here for the full reference. Thanks!

            tfennelly Tom FENNELLY
            erthad Timur Batyrshin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: