ant icon indicating copy to clipboard operation
ant copied to clipboard

Hide sensitive data

Open bigstinky86 opened this issue 5 years ago • 0 comments

Sometime it is needed to hide sensitive data from appearance in logs but save the rest ssh command to verify. Output suppressing is a good way to hide whole command but not only sensitive data.

This changes allow to set placeholders in SSH command and replace them right before executing. It shows command without sensitive data and executes it with proper data.

The output will look like

[sshexec] Connecting to localhost:22
[sshexec] cmd : echo ::username::--::password::--::username:: >> ant_test_hide

But file will contain all the passed data

SomeUser--SOmePass--SomeUser

sshexec task was called

<sshexec host="${host}"
               username="${username}"
               keyfile="${user.home}/.ssh/id_rsa"
               trust="true"
               command="echo ::username::--::password::--::username:: >> ant_test_hide"
               hideSensitive="true"
               bindSensitive="username=SomeUser|password=SOmePass"
               sensitiveDelimiter="|"
               placeholderBracket="::"/>

bigstinky86 avatar Apr 09 '20 07:04 bigstinky86