HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //proc/1233/cwd/lib/python3/dist-packages/sos/report/plugins/__pycache__/vault.cpython-310.pyc
o

i��d�@s&ddlmZmZGdd�dee�ZdS)�)�Plugin�UbuntuPluginc@s4eZdZdZdZdZdZdZdZdd�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�security)rc
Cs�d}|�|�zCt|d��3}|����D]"}|sq|�d�}|d��dkr6|d�d�}|jdd	|id
�qWd�WdS1sCwYWdStyf}z|�d||f�WYd}~dSd}~ww)N� /var/snap/vault/common/vault.hcl�r�=r�api_addr�z" zvault status�
VAULT_ADDR)�envzCould not open conf file %s: %s)	�
add_copy_spec�open�read�
splitlines�split�strip�add_cmd_output�IOError�
_log_error)�self�	vault_cfg�cf�line�wordsr�error�r�:/usr/lib/python3/dist-packages/sos/report/plugins/vault.py�setups,

���&�	���zVault.setupcCs|�ddd�dS)Nrz(password\s?=\s?).*z\1******)�do_file_sub)rrrr�postproc0s
�zVault.postprocN)�__name__�
__module__�__qualname__�__doc__�
short_desc�plugin_name�profiles�services�packager r"rrrrrsrN)�sos.report.pluginsrrrrrrr�<module>s