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

ModelConverterAction should use CrumbExclusionFilter

XMLWordPrintable

      https://github.com/jenkinsci/pipeline-model-definition-plugin/wiki/Validating-(or-linting)-a-Declarative-Jenkinsfile-from-the-command-line#how-to-use tells you to get a crumb from Jenkins, which makes REST-based access very awkward. This is only needed because we are accepting POST requests, which is only needed because we are sending content. But the action has no side effects so there is no actual need for a crumb. You should implement CrumbExclusionFilter to simplify usage.

      I would also suggest that doValidate should just stream from its body rather than require a form field, but I guess this would be an incompatible change.

            abayer Andrew Bayer
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: