o id@s&ddlmZmZGdddeeZdS))Plugin UbuntuPluginc@s4eZdZdZdZdZdZdZdZddZ dd Z d S) VaultzThe Vault plugin collects the current status of the vault snap on a Ubuntu machine. It will collect logs from journal, vault status and configuration z3Manage access to secrets and protect sensitive datavault)sysmgmtsecurity)rc Csd}||zCt|d3}|D]"}|sq|d}|ddkr6|dd}|jdd |id qWdWdS1sCwYWdStyf}z|d ||fWYd}~dSd}~ww) N /var/snap/vault/common/vault.hclr=rapi_addrz" z vault status VAULT_ADDR)envzCould not open conf file %s: %s) add_copy_specopenread splitlinessplitstripadd_cmd_outputIOError _log_error)self vault_cfgcflinewordsr errorr:/usr/lib/python3/dist-packages/sos/report/plugins/vault.pysetups,   & z Vault.setupcCs|ddddS)Nrz(password\s?=\s?).*z\1******) do_file_sub)rrrrpostproc0s zVault.postprocN) __name__ __module__ __qualname____doc__ short_desc plugin_nameprofilesservicespackager r"rrrrrs rN)sos.report.pluginsrrrrrrrs