I recently started experimenting with Credentials Binding with a Pipeline 
script passing a user-password credential down to a *sh*/*bat *step inside 
a *node* block, with the secret values masked perfectly in the log. (The 
step just executed some Groovy that *println System.getenv()'d* the 
protected env variable.) In fact the masking worked so well I had to add 
some equality tests against the value to ensure that the secret value was 
indeed the right value.

Maybe my use case was different than JENKINS-24805.

On Monday, April 25, 2016 at 4:54:14 AM UTC-7, Ant Weiss wrote:
>
> Hi all,
> thanks for your inputs.
> In fact I implemented this with Credentials Binding plugin and it worked 
> great - masking the passwords as it should.
>
> On Monday, April 25, 2016 at 12:55:14 PM UTC+3, Harry G. wrote:
>>
>> Please note: Credentials Binding works, but currently it is not possible 
>> to mask passwords in the log with this solution.
>> https://issues.jenkins-ci.org/browse/JENKINS-24805
>> A PR from Cloudbees is in work, but not finished
>>
>> https://groups.google.com/forum/#!msg/jenkinsci-users/GgX3RSckVlI/LU8IqzqoMwAJ
>>
>> Until this is done, the only way to mask passwords in the log is 
>> EnvInject or MaskPassword Plugin (with their respective backdraws).
>> You could possibly externalize parts of your pipeline to a freestyle job 
>> and use them.
>>
>> Official doc suggests to turn off log (set +x), if you can do this 
>> reliably for all relevant jobs:
>>
>> https://cloudbees.zendesk.com/hc/en-us/articles/203802500-Injecting-Secrets-into-Jenkins-Build-Jobs
>> If you have several people working on build jobs/scripts I would 
>> discourage from doing this.
>>
>> Am Sonntag, 24. April 2016 16:33:22 UTC+2 schrieb Daniel Beck:
>>>
>>>
>>> > On 24.04.2016, at 14:24, Ant Weiss <[email protected]> wrote: 
>>> > 
>>> > What is the right way to do this when wrting pipeline DSL scripts? 
>>> > 
>>>
>>> Credentials and Credentials Binding Plugin: 
>>>
>>> https://wiki.jenkins-ci.org/display/JENKINS/Credentials+Binding+Plugin 
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/094f4375-e30b-474a-88f3-a81d1899eb75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to