Jenkins version: 2.121.1 .
Global security: LDAP + Matrix-based security . No access rights for Anonymous.
Since anonymous access is disabled, my script cannot get access to 'http://jenkins_host/crumbIssuer/api/json'. in order to get the CSRF token.
In https://issues.jenkins-ci.org/browse/JENKINS-45811, it is mentioned that the Build Token Root Plugin allows to workaround the access restriction for anonymous.
What I'm not sure is how to properly use this plugin in order to execute the crumbIssuer API? Because the plugin URL has a form such as 'buildByToken/build?job=RevolutionTest&token=TacoTuesday' , and it isn't clear to me how to execute '/crumbIssuer/api/json' with buildByToken.. (would I need to create a build job?)
Thanks!