• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core, job-dsl-plugin
    • None
    • Jenkins Core: 2.236
      Job DSL plugin version; 1.77

      Configuring parameter of type "password" is no longer available out-of-the-box with the DSL plugin.

      https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.jobs.WorkflowJob.parameters

       

      Likely related to the security hardening:

      https://github.com/jenkinsci/jenkins/commit/8a9a1b2f7bf72c305597ed5e7121b80f58528c5c#diff-5ad942ec64a4a90effc70dd2aaea13ca

       

      Configuration via the configure method is likely a possible workaround, but you'd need to encrypt the password as Secret.

       

      This works as expected with Jenkins Core 2.235

          [JENKINS-62337] "password" parameter no longer available

          Grigor Lechev created issue -
          Grigor Lechev made changes -
          Description Original: Configuring parameter of type "password" is no longer available out-of-the-box.

          [https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.jobs.WorkflowJob.parameters]

           

          Likely related to the security hardening:

          [https://github.com/jenkinsci/jenkins/commit/8a9a1b2f7bf72c305597ed5e7121b80f58528c5c#diff-5ad942ec64a4a90effc70dd2aaea13ca]

           

          Configuration via the configure method is likely a possible workaround. But you'd need to encrypt the password as [Secret|https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/util/Secret.java].

           

          This works as expected with Jenkins Core 2.235
          New: Configuring parameter of type "password" is no longer available out-of-the-box with the DSL plugin.

          [https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.jobs.WorkflowJob.parameters]

           

          Likely related to the security hardening:

          [https://github.com/jenkinsci/jenkins/commit/8a9a1b2f7bf72c305597ed5e7121b80f58528c5c#diff-5ad942ec64a4a90effc70dd2aaea13ca]

           

          Configuration via the configure method is likely a possible workaround. But you'd need to encrypt the password as [Secret|https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/util/Secret.java].

           

          This works as expected with Jenkins Core 2.235
          Grigor Lechev made changes -
          Description Original: Configuring parameter of type "password" is no longer available out-of-the-box with the DSL plugin.

          [https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.jobs.WorkflowJob.parameters]

           

          Likely related to the security hardening:

          [https://github.com/jenkinsci/jenkins/commit/8a9a1b2f7bf72c305597ed5e7121b80f58528c5c#diff-5ad942ec64a4a90effc70dd2aaea13ca]

           

          Configuration via the configure method is likely a possible workaround. But you'd need to encrypt the password as [Secret|https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/util/Secret.java].

           

          This works as expected with Jenkins Core 2.235
          New: Configuring parameter of type "password" is no longer available out-of-the-box with the DSL plugin.

          [https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.jobs.WorkflowJob.parameters]

           

          Likely related to the security hardening:

          [https://github.com/jenkinsci/jenkins/commit/8a9a1b2f7bf72c305597ed5e7121b80f58528c5c#diff-5ad942ec64a4a90effc70dd2aaea13ca]

           

          Configuration via the configure method is likely a possible workaround, but you'd need to encrypt the password as [Secret|https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/util/Secret.java].

           

          This works as expected with Jenkins Core 2.235
          Daniel Spilker made changes -
          Link New: This issue is related to JENKINS-57435 [ JENKINS-57435 ]

          If you do not need to set a default value, this could probably be fixed by moving the default value from the @DataBoundConstructor (aka mandatory parameter) to a @DataBoundSetter (aka optional parameter).

          Daniel Spilker added a comment - If you do not need to set a default value, this could probably be fixed by moving the default value from the @DataBoundConstructor (aka mandatory parameter) to a @DataBoundSetter (aka optional parameter).
          Daniel Spilker made changes -
          Assignee Original: Daniel Spilker [ daspilker ] New: Grigor Lechev [ mooncrosser ]
          Daniel Spilker made changes -
          Component/s New: core [ 15593 ]

          Grigor Lechev added a comment -

          For my personal usecase I'm not using default values, so this solution is fine with me.

          Grigor Lechev added a comment - For my personal usecase I'm not using default values, so this solution is fine with me.

            mooncrosser Grigor Lechev
            mooncrosser Grigor Lechev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: