Sindbad~EG File Manager

Current Path : /lib/python3.6/site-packages/sos/report/plugins/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/sos/report/plugins/__pycache__/vault.cpython-36.opt-1.pyc

3

�f�@s&ddlmZmZGdd�dee�ZdS)�)�Plugin�UbuntuPluginc@s4eZdZdZdZdZdZdZd
Zdd�Z	dd	�Z
d
S)�Vaultz�The 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 data�vault�sysmgmt�securitycCs�d}|j|�ytt|ddd��\}xT|j�j�D]D}|s8q.|jd�}|dj�dkr.|djd	�}|jd
d|id�q.WWdQRXWn4tk
r�}z|jd
||f�WYdd}~XnXdS)Nz /var/snap/vault/common/vault.hcl�rzUTF-8)�encoding�=r�api_addr�z" zvault statusZ
VAULT_ADDR)�envzCould not open conf file %s: %s)	Z
add_copy_spec�open�read�
splitlines�split�stripZadd_cmd_output�IOErrorZ
_log_error)�selfZ	vault_cfg�cfile�lineZwordsr�error�r�/usr/lib/python3.6/vault.py�setups

zVault.setupcCs|jddd�dS)Nz /var/snap/vault/common/vault.hclz(password\s?=\s?).*z\1******)Zdo_file_sub)rrrr�postproc0szVault.postprocN)rr)r)r)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesZservices�packagerrrrrrrsrN)Zsos.report.pluginsrrrrrrr�<module>s

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists