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

ComputedFolder shows BuildAuthorizationToken configuration but does not actually support it

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            nmaclennan Norm MacLennan created issue -
            recena Manuel Recena Soto made changes -
            Field Original Value New Value
            Assignee Manuel Recena Soto [ recena ] Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-30519 [ JENKINS-30519 ]
            nmaclennan Norm MacLennan made changes -
            Attachment config-screen.png [ 32915 ]
            plehmkuhl Phil Lehmkuhl made changes -
            Rank Ranked higher
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 171557 ] JNJira + In-Review [ 184357 ]
            jglick Jesse Glick made changes -
            Component/s workflow-multibranch-plugin [ 21465 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]
            jglick Jesse Glick made changes -
            Link This issue duplicates JENKINS-33020 [ JENKINS-33020 ]
            jglick Jesse Glick made changes -
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Resolved [ 5 ]
            jglick Jesse Glick made changes -
            Component/s cloudbees-folder-plugin [ 18137 ]
            Component/s pipeline [ 21692 ]
            Labels multibranch pipeline
            Summary "Trigger builds remotely" doesn't save authToken ComputedFolder shows BuildAuthorizationToken configuration but does not actually support it

              People

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

                Dates

                Created:
                Updated:
                Resolved: