HEX
Server: LiteSpeed
System: Linux cp4.porkbun.com 5.14.0-611.20.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jan 14 06:35:04 EST 2026 x86_64
User: vxblllubpkafjsjw (1110)
PHP: 8.4.19
Disabled: NONE
Upload Files
File: //usr/lib/python3.9/site-packages/sos/report/plugins/__pycache__/vault.cpython-39.pyc
a

�>�h��@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}|�|�z�t|ddd��b}|����D]D}|s6q,|�d�}|d��dkr,|d�d	�}|jd
d|id�q,Wd�n1s�0YWn:ty�}z"|�d
|�d|���WYd}~n
d}~00dS)N� /var/snap/vault/common/vault.hcl�rzUTF-8)�encoding�=r�api_addr�z" zvault statusZ
VAULT_ADDR)�envzCould not open conf file z: )	Z
add_copy_spec�open�read�
splitlines�split�stripZadd_cmd_output�IOErrorZ
_log_error)�selfZ	vault_cfg�cfile�line�wordsr
�error�r�</usr/lib/python3.9/site-packages/sos/report/plugins/vault.py�setups

�*zVault.setupcCs|�ddd�dS)Nrz(password\s?=\s?).*z\1******)Zdo_file_sub)rrrr�postproc/s
�zVault.postprocN)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesZservices�packagerrrrrrrsrN)Zsos.report.pluginsrrrrrrr�<module>s