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.
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.