Discussion:
How to specify a password parameter in Java task
Al Le
2017-02-24 18:52:39 UTC
Permalink
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: user-***@ant.apache.org
For additional commands, e-mail: user-***@ant.apache.org
Stefan Bodewig
2017-02-25 14:34:14 UTC
Permalink
Post by Al Le
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: user-***@ant.apache.org
For additional commands, e-mail: user-***@ant.apache.org
Jan Matèrne (jhm)
2017-02-27 09:32:55 UTC
Permalink
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-----
Gesendet: Samstag, 25. Februar 2017 15:34
Betreff: Re: How to specify a password parameter in Java task
Post by Al Le
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: user-***@ant.apache.org
For additional commands, e-mail: user-***@ant.apache.org

Continue reading on narkive:
Loading...