[node-patches] Change in ovirt-node[master]: process: Add a masking log

fabiand at fedoraproject.org fabiand at fedoraproject.org
Wed Jan 29 08:17:34 UTC 2014


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 <fabiand at fedoraproject.org>
---
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 <fabiand at fedoraproject.org>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the node-patches mailing list