When a ProcessExecutionError is thrown by processutils.ssh_execute(),
the exception may contain information such as password. Upstream
applications that just log the message (as several appear to do)
could inadvertently expose these passwords to a user with read access to
the log files. It is therefore considered prudent to invoke
strutils.mask_password() on the command, stdout and stderr in the
exception. A test case has been added (to oslo-incubator) in order to
ensure that all three are properly masked.
An earlier commit (853d8f9897f8563851441108a9be26b10908c076) failed
to address ssh_execute(). This change set addresses ssh_execute.
Reviewed: https:/ /review. openstack. org/126047 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=8e7d6a60ff9 2df19aceb097256 6b48992eee18b4
Committed: https:/
Submitter: Jenkins
Branch: master
commit 8e7d6a60ff92df1 9aceb0972566b48 992eee18b4
Author: Tristan Cacqueray <email address hidden>
Date: Fri Oct 3 19:53:42 2014 +0000
Mask passwords in exceptions and error messages
When a ProcessExecutio nError is thrown by processutils. ssh_execute( ), mask_password( ) on the command, stdout and stderr in the
the exception may contain information such as password. Upstream
applications that just log the message (as several appear to do)
could inadvertently expose these passwords to a user with read access to
the log files. It is therefore considered prudent to invoke
strutils.
exception. A test case has been added (to oslo-incubator) in order to
ensure that all three are properly masked.
An earlier commit (853d8f9897f856 3851441108a9be2 6b10908c076) failed
to address ssh_execute(). This change set addresses ssh_execute.
OSSA is aware of this change request.
Change-Id: Ie0caf32469126d d9feb44867adf27 acb6e383958
Closes-Bug: #1377981