Mask passwords in exceptions and error messages
Mask passwords in exceptions and error messages

When a ProcessExecutionError is thrown by processutils.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.

Cherry-pick from review.openstack.org/109417
Partial-Bug: #1343604

Change-Id: I9741dcdebdb4bed295ddc5ec4c4b117fffcfe88c

mmnelemane/nova,whitepages/nova,Juniper/nova,shail2810/nova,CloudServer/nova,belmiromoreira/nova,devendermishrajio/nova_test_latest,maelnor/nova,fnordahl/nova,devendermishrajio/nova,mahak/nova,redhat-openstack/nova,belmiromoreira/nova,sebrandon1/nova,watonyweng/nova,orbitfp7/nova,Tehsmash/nova,angdraug/nova,kimjaejoong/nova,phenoxim/nova,Metaswitch/calico-nova,takeshineshiro/nova,JioCloud/nova_test_latest,badock/nova,BeyondTheClouds/nova,j-carpentier/nova,bigswitch/nova,NeCTAR-RC/nova,jianghuaw/nova,sebrandon1/nova,yatinkumbhare/openstack-nova,alaski/nova,hanlind/nova,mandeepdhami/nova,mahak/nova,JioCloud/nova,bgxavier/nova,tealover/nova,ted-gould/nova,silenceli/nova,tangfeixiong/nova,cloudbase/nova,mikalstill/nova,j-carpentier/nova,gooddata/openstack-nova,double12gzh/nova,cloudbase/nova-virtualbox,projectcalico/calico-nova,phenoxim/nova,cernops/nova,sebrandon1/nova,gooddata/openstack-nova,tianweizhang/nova,ted-gould/nova,rahulunair/nova,barnsnake351/nova,openstack/nova,orbitfp7/nova,shail2810/nova,joker946/nova,JianyuWang/nova,felixma/nova,isyippee/nova,tudorvio/nova,jianghuaw/nova,nikesh-mahalka/nova,dims/nova,zzicewind/nova,vmturbo/nova,felixma/nova,zaina/nova,raildo/nova,blueboxgroup/nova,vladikr/nova_drafts,tudorvio/nova,cernops/nova,ruslanloman/nova,LoHChina/nova,mgagne/nova,noironetworks/nova,devendermishrajio/nova_test_latest,badock/nova,TwinkleChawla/nova,alvarolopez/nova,NeCTAR-RC/nova,Stavitsky/nova,Stavitsky/nova,affo/nova,rajalokan/nova,cernops/nova,CEG-FYP-OpenStack/scheduler,edulramirez/nova,alaski/nova,thomasem/nova,CloudServer/nova,cyx1231st/nova,whitepages/nova,CCI-MOC/nova,dawnpower/nova,klmitch/nova,klmitch/nova,eayunstack/nova,Francis-Liu/animated-broccoli,alvarolopez/nova,affo/nova,MountainWei/nova,JioCloud/nova,Tehsmash/nova,varunarya10/nova_test_latest,alexandrucoman/vbox-nova-driver,Yusuke1987/openstack_template,akash1808/nova,openstack/nova,zzicewind/nova,openstack/nova,double12gzh/nova,scripnichenko/nova,Yusuke1987/openstack_template,MountainWei/nova,devendermishrajio/nova,mgagne/nova,mikalstill/nova,isyippee/nova,rahulunair/nova,kimjaejoong/nova,tangfeixiong/nova,barnsnake351/nova,ruslanloman/nova,eonpatapon/nova,fnordahl/nova,cloudbase/nova,bgxavier/nova,tealover/nova,bigswitch/nova,jianghuaw/nova,zhimin711/nova,berrange/nova,edulramirez/nova,gooddata/openstack-nova,petrutlucian94/nova,iuliat/nova,adelina-t/nova,projectcalico/calico-nova,berrange/nova,maelnor/nova,mahak/nova,vmturbo/nova,klmitch/nova,iuliat/nova,vmturbo/nova,rajalokan/nova,cyx1231st/nova,blueboxgroup/nova,hanlind/nova,Juniper/nova,zaina/nova,rajalokan/nova,tianweizhang/nova,akash1808/nova,rajalokan/nova,mandeepdhami/nova,apporc/nova,Juniper/nova,akash1808/nova_test_latest,raildo/nova,vmturbo/nova,jeffrey4l/nova,zhimin711/nova,petrutlucian94/nova,noironetworks/nova,yosshy/nova,JianyuWang/nova,joker946/nova,akash1808/nova_test_latest,angdraug/nova,watonyweng/nova,rahulunair/nova,klmitch/nova,thomasem/nova,scripnichenko/nova,adelina-t/nova,redhat-openstack/nova,mikalstill/nova,eonpatapon/nova,yosshy/nova,dims/nova,TwinkleChawla/nova,Juniper/nova,jianghuaw/nova,silenceli/nova,jeffrey4l/nova,takeshineshiro/nova,cloudbase/nova,CEG-FYP-OpenStack/scheduler,nikesh-mahalka/nova,alexandrucoman/vbox-nova-driver,BeyondTheClouds/nova,apporc/nova,gooddata/openstack-nova,cloudbase/nova-virtualbox,CCI-MOC/nova,eayunstack/nova,dawnpower/nova,varunarya10/nova_test_latest,JioCloud/nova_test_latest,vladikr/nova_drafts,LoHChina/nova,hanlind/nova,yatinkumbhare/openstack-nova,Metaswitch/calico-nova,Francis-Liu/animated-broccoli,mmnelemane/nova,BeyondTheClouds/nova