Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide password for win_psexec module #231

Merged
merged 5 commits into from
Jul 9, 2021

Conversation

quadzz
Copy link
Contributor

@quadzz quadzz commented Apr 16, 2021

SUMMARY

According to #43 - we do not want to show password when executing win_psexec. This change allows user to explicitly show it (for example when testing) while hiding the password by default

Fixes #43

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

win_psexec

ADDITIONAL INFORMATION

Added new parameter log_password

@jborean93
Copy link
Collaborator

Personally I think we should just mask the password all the time, there's very little reason why people should see the password returned back in the argument command.

@quadzz
Copy link
Contributor Author

quadzz commented May 24, 2021

@jborean93 yes I definitely agree.
That's why I included an additional parameter log_password which actually shows password, since someone may want to show the password (e.g. when debugging)
Otherwise it's always replaced with "PASSWORD_REPLACED" string.

@jborean93
Copy link
Collaborator

I'm saying that the password should be escaped all the time, there's no need for it to show up in the logs. The only other issue is the code needs to be adjusted so that it can replace passwords that contain " in them as the argument conversion will transform test"ing to test\"ing.

@jborean93 jborean93 merged commit 834a0db into ansible-collections:main Jul 9, 2021
@jborean93
Copy link
Collaborator

I'm hoping to get this into the next community.windows release so I've added some changes on top of yours to fit my last comment. Thanks for your work on this.

@quadzz quadzz deleted the 43_winpsexec branch July 10, 2021 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

win_psexec module is exposing password to output
2 participants