[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title vikas Mishra commented on JENKINS-36456 Re: Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs) Thank you Bruno. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title Bruno P. Kinoshita closed an issue as Not A Defect Jenkins / JENKINS-36456 Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs) Change By: Bruno P. Kinoshita Status: Resolved Closed Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title Jeffrey Nelson commented on JENKINS-36456 Re: Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs) Thanks Bruno - this also really helped me out! Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title Rick Liu commented on JENKINS-36456 Re: Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs) thank you Bruno for your support Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title Bruno P. Kinoshita commented on JENKINS-36456 Re: Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs) So in the end there is no easy way to integrate the plug-in in a transparent way to users. Users that want to use the global parameters defined in the Mask Password Plug-in need to implement the logic in their scripts. I followed the logic in the plug-in code (in special this part). And here's one way to get it to work. import com.michelin.cio.hudson.plugins.maskpasswords.*; SVN_ROOT = "https://server.com/svn/root" // getting global masked password... maskPasswordsConfig = MaskPasswordsConfig.getInstance() varPasswordPairs = maskPasswordsConfig.getGlobalVarPasswordPairs() // default to empty build_password = '' // check if we have a global pair with that password varPasswordPairs.each { pair -> if (pair.getVar().equals("build_password")) { // this will use Jenkins' Secret class to decrypt it... build_password = pair.password } } if ( SVN_FOLDER.endsWith("/trunk") ){ return ["N/A"] } else { def SVN_LIST_URL = "${SVN_ROOT}/${SVN_FOLDER}" //def SVN_CMD_ARG = "svn ls --username build --password ${build_password} --non-interactive ${SVN_LIST_URL}" //def SVN_CMD_OUT = SVN_CMD_ARG.execute().text //def SVN_SELECTION_LIST = SVN_CMD_OUT.split('/\n').toList().sort().reverse() // Just for test, as it would be hard to share an example calling user+pass from a repo def SVN_SELECTION_LIST = [build_password] return SVN_SELECTION_LIST } Simplified the script a little bit as it would be too hard to provide an example that worked. But in summary, you have to get that password value programmatically in Groovy. Added a tutorial for this integration here: http://biouno.org/tutorials/active-choices/using-masked-passwords-with-the-active-choices-plugin Add Comment
[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title Bruno P. Kinoshita stopped work on JENKINS-36456 Change By: Bruno P. Kinoshita Status: In Progress Open Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title Bruno P. Kinoshita resolved as Not A Defect Jenkins / JENKINS-36456 Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs) Change By: Bruno P. Kinoshita Status: Open Resolved Resolution: Not A Defect Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title Bruno P. Kinoshita commented on JENKINS-36456 Re: Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs) Righto, coming back to this issue now. Set up a job again with the instructions provided in the issue description. I get a build_password is not defined for the Groovy script. The Mask Password Plugin has a build wrapper, that uses the build_password. It is not available to any parameters, only during build time. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title Bruno P. Kinoshita started work on JENKINS-36456 Change By: Bruno P. Kinoshita Status: Open In Progress Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title Bruno P. Kinoshita commented on JENKINS-36456 Re: Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs) Moving priority to low, as the behaviour of the plug-in is not really broken. We need to work to support this plug-in. The work involved is not trivial, but doable. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title Bruno P. Kinoshita updated an issue Jenkins / JENKINS-36456 Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs) Change By: Bruno P. Kinoshita Priority: Major Minor Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title Bruno P. Kinoshita commented on JENKINS-36456 Re: Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs) So the plug-in actually stores the value with the build. In your config.xml you can see something like: var="MYPASS" password="657KFHBDRzTNus4oc4hDs8aLP1ymBEorhgagswsCTRI="/> Then when you execute the job, it takes care to mask password in the console, and also inject the right value. The problem is that what you have is not really a parameter, as normal parameters in Jenkins. But even if we changed it to be a parameter, it is not clear if you would be able to use the parameter. I believe its value would still be encrypted. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title Bruno P. Kinoshita commented on JENKINS-36456 Re: Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs) Hi, Just tried with a password field, where the default value is set to 123. Here's what I get in the plug-in code while debugging: PASS=657KFHBDRzTNus4oc4hDs8aLP1ymBEorhgagswsCTRI= Then tried using a Masked password, with the Mask Password Plug-in, but unfortunately I couldn't really understand how it works. I installed the plug-in, but in the global configuration, I could only find a way to enable that for "Active Choices Parameter", and not for each parameter type as in the description. Then I created a global mask password MYPASS, with value 123. But still could not see it in the env vars, nor as parameter. Then, in the job, configured a masked parameter, again MYPASS with value 123. I can successfully see that in the console output if I try to echo it, instead of the value, it displays . But it is not available for the parameter. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title Bruno P. Kinoshita commented on JENKINS-36456 Re: Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs) Interesting use case! Never tried accessing a masked password with Groovy in Jenkins. Adding it to the next development cycle. Thanks for reporting it Rick Liu Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-36456) Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs)
Title: Message Title Rick Liu created an issue Jenkins / JENKINS-36456 Active Choices Reactive Parameter can't access Mask Passwords (Global name/password pairs) Issue Type: Bug Assignee: Bruno P. Kinoshita Attachments: Selection_007.png, Selection_008.png Components: active-choices-plugin, mask-passwords-plugin Created: 2016/Jul/05 10:19 PM Environment: Ubuntu 14.04 x86_64 OpenJDK 7u101-2.6.6 Jenkins 2.11 Active Choices Plug-in 1.4 Mask Passwords Plugin 2.8 Priority: Major Reporter: Rick Liu Under "Manage Jenkins / Configure System", I configured "Mask Passwords - Parameters to automatically mask" for: Active Choices Reactive Reference Parameter Active Choices Reactive Parameter Active Choices Parameter and created one "Mask Passwords - Global name/password pairs" for: build_password In Jenkins job configuration, I have an "Active Choices Reactive Parameter" using Groovy script and tries to use that global variable ${build_password}: if ( SVN_FOLDER.endsWith("/trunk") ){ return ["N/A"] } else { def SVN_LIST_URL = "${SVN_ROOT}/${SVN_FOLDER}" def SVN_CMD_ARG = "svn ls --username build --password ${build_password} --non-interactive ${SVN_LIST_URL}" def SVN_CMD_OUT = SVN_CMD_ARG.execute().text def SVN_SELECCTION_LIST = SVN_CMD_OUT.split('/\n').toList().sort().reverse() return SVN_SELECCTION_LIST }