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

ComputedFolder shows BuildAuthorizationToken configuration but does not actually support it

      Trying to use the "Trigger builds remotely (e.g., from scripts)" Build Trigger from a multibranch pipeline project doesn't seem to work.

      If I check off the box and type in a token and click save, the job saves successfully but it does not write an authToken element to the job config and the item is unchecked in the configuration when I reload the page. Even manually setting an authToken and POSTing the config doesn't work. While the element is there in the config, I'm not able to kick a job off with the token.

      I can post some screenshots and config snippets if that will be helpful, but this seems to be reproducible easily enough that it might be overkill.

      I've been able to reproduce this with a fresh Jenkins 2.x install as well.

      Repro case

      Given: A Jenkins 1.651.2 instance with some kind of security enabled (e.g. anonymous users cannot build jobs). And the pipeline plugins installed.

      1. Create a freestyle or single pipeline job.
      2. Under "Build Triggers," select "Trigger builds remotely (e.g., from scripts)"
      3. Enter "hello" in the "Authentication Token" field
      4. Save the job.
      5. POST to jobUrl/build?token=hello (e.g. curl -XPOST http://172.17.0.2:8080/job/freestyle/build?token=hello)
      6. Observe the job is triggered.
      7. Create a multibranch pipeline job.
      8. Add an authentication token as above.
      9. Save the job.
      10. POST to jobUrl/build?token=hello (e.g. curl -XPOST http://172.17.0.2:8080/job/multibranch/build?token=hello)
      11. Observe you receive an "Authentication required" error.
      12. Go back to the job configuration and observe the Build Trigger isn't enabled.

          [JENKINS-35310] ComputedFolder shows BuildAuthorizationToken configuration but does not actually support it

          Norm MacLennan created issue -
          Manuel Recena Soto made changes -
          Assignee Original: Manuel Recena Soto [ recena ] New: Jesse Glick [ jglick ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-30519 [ JENKINS-30519 ]
          Norm MacLennan made changes -
          Attachment New: config-screen.png [ 32915 ]
          Phil Lehmkuhl made changes -
          Rank New: Ranked higher
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 171557 ] New: JNJira + In-Review [ 184357 ]
          Jesse Glick made changes -
          Component/s Original: workflow-multibranch-plugin [ 21465 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-33020 [ JENKINS-33020 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            jglick Jesse Glick
            nmaclennan Norm MacLennan
            Votes:
            19 Vote for this issue
            Watchers:
            38 Start watching this issue

              Created:
              Updated:
              Resolved: