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

Filter out returned data from modules if it came from a parameter marked as no_log #12792

Closed
abadger opened this issue Oct 16, 2015 · 4 comments
Labels
feature This issue/PR relates to a feature request. P2 Priority 2 - Issue Blocks Release
Milestone

Comments

@abadger
Copy link
Contributor

abadger commented Oct 16, 2015

Modules can have parameters marked as no_log. That way you can give, for instance, a clear text password string and ansible won't log it in the list of parameters that it sent to a module. However, it doesn't currently remove it from output of the module. We should be able to look at all the strings we were given as values in parameters listed as no_log and then check for their presence in the output. If the values are present, then remove them from the output.

@abadger abadger added this to the v2 milestone Oct 16, 2015
@abadger abadger added feature_idea P2 Priority 2 - Issue Blocks Release labels Oct 16, 2015
@bcoca
Copy link
Member

bcoca commented Oct 16, 2015

basically a filter function we need to call from exit_json and fail_json

@abadger
Copy link
Contributor Author

abadger commented Oct 16, 2015

Perhaps it would make sense to also have heuristic_log_sanitize() run the filter.

@bcoca
Copy link
Member

bcoca commented Oct 16, 2015

i forgot we had that already, yes, seems perfect expansion of that function

@abadger
Copy link
Contributor Author

abadger commented Oct 21, 2015

See also c2d188b for the first half of this change.

@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_idea labels Mar 2, 2018
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue/PR relates to a feature request. P2 Priority 2 - Issue Blocks Release
Projects
None yet
Development

No branches or pull requests

3 participants