From: Benjamin Diaz Date: Wed, 30 Jan 2019 16:01:54 +0000 (-0300) Subject: Adds decryption of passwords in vim config block X-Git-Tag: v6.0.0~31 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F7149%2F1;p=osm%2FMON.git Adds decryption of passwords in vim config block Change-Id: Iba064f9fb0dd38511b90410c5073fc13ce8cbeac Signed-off-by: Benjamin Diaz --- diff --git a/osm_mon/server/server.py b/osm_mon/server/server.py index a1e848b..0f17d99 100755 --- a/osm_mon/server/server.py +++ b/osm_mon/server/server.py @@ -84,7 +84,16 @@ class Server: values['vim_password'] = self.common_db.decrypt_vim_password(values['vim_password'], values['schema_version'], values['_id']) + + vim_config_encrypted = ("admin_password", "nsx_password", "vcenter_password") + if 'config' in values: + for key in values['config']: + if key in vim_config_encrypted: + values['config'][key] = self.common_db.decrypt_vim_password(values['config'][key], + values['schema_version'], + values['_id']) self.auth_manager.store_auth_credentials(values) + if message.key == "delete": self.auth_manager.delete_auth_credentials(values)