HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/sos/report/plugins/__pycache__/vault.cpython-38.pyc
U

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)ZsysmgmtZsecurity)rc
Cs�d}|�|�zlt|d��X}|����D]D}|s2q(|�d�}|d��dkr(|d�d�}|jdd	|id
�q(W5QRXWn4tk
r�}z|�d||f�W5d}~XYnXdS)N� /var/snap/vault/common/vault.hcl�r�=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_cfgZcf�lineZwordsr	�error�r�:/usr/lib/python3/dist-packages/sos/report/plugins/vault.py�setups"

��zVault.setupcCs|�ddd�dS)Nrz(password\s?=\s?).*z\1******)Zdo_file_sub)rrrr�postproc0s
�zVault.postprocN)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofiles�services�packagerrrrrrrsrN)Zsos.report.pluginsrrrrrrr�<module>s