Fabian Deutsch has submitted this change and it was merged.

Change subject: process: Add a masking log
......................................................................


process: Add a masking log

Previously there was no way to mask out parts of a command which was
run. This could lead to situations where sensitive informations like
passwords/usernames/addresses/etc. were exposed. To prevent this
situation now a context manager is available to hide sensitive
informations in command calls.

Example:

>>> import process
>>> pw = "secret"
>>> with masked([pw]):
...     process.call(["app", "--user", "foo", "--password", pw])

In that example only
["app", "--user", "foo", "--password", "<masked>"]
will get logged.

Change-Id: I013e79b006c24e475f8f021c76a5156520145bfd
Signed-off-by: Fabian Deutsch <[email protected]>
---
M src/ovirt/node/utils/process.py
1 file changed, 42 insertions(+), 6 deletions(-)



-- 
To view, visit http://gerrit.ovirt.org/22122
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I013e79b006c24e475f8f021c76a5156520145bfd
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
node-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/node-patches

Reply via email to