Quantcast

How to specify a password parameter in Java task

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to specify a password parameter in Java task

Al Le
Hello,

in my ant script, I have a call to the "java" task. The parameters are specified via nested "arg" elements.

One of the parameters is a password; its value is not stored in the script but is calculated by a javascript and saved to an ant property.

When I run the script with the "-v" option that parameter is also written out to console, in clear text. Is it possible to tell ant to not write out the value in clear text but rather to display it as, say, '***'.

Something like <arg value="${myPassword}" isPassword="true"/>

Thanks!
AL

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to specify a password parameter in Java task

Stefan Bodewig
On 2017-02-24, Al Le wrote:

> When I run the script with the "-v" option that parameter is also
> written out to console, in clear text. Is it possible to tell ant to
> not write out the value in clear text but rather to display it as,
> say, '***'.

> Something like <arg value="${myPassword}" isPassword="true"/>

No there is no such capability within Ant.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AW: How to specify a password parameter in Java task

Jan Matèrne (jhm)
You could try to use a custom logger which detects that password and masks
it.
Because Ant can't distinguish if an <arg> is 'just' an argument or a
password, there is no built-in solution.

Jan

> -----Ursprüngliche Nachricht-----
> Von: Stefan Bodewig [mailto:[hidden email]]
> Gesendet: Samstag, 25. Februar 2017 15:34
> An: [hidden email]
> Betreff: Re: How to specify a password parameter in Java task
>
> On 2017-02-24, Al Le wrote:
>
> > When I run the script with the "-v" option that parameter is also
> > written out to console, in clear text. Is it possible to tell ant to
> > not write out the value in clear text but rather to display it as,
> > say, '***'.
>
> > Something like <arg value="${myPassword}" isPassword="true"/>
>
> No there is no such capability within Ant.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email] For additional
> commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...