HEX
Server: Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System: Linux ns565604.ip-54-39-133.net 4.18.0-553.50.1.el8_10.x86_64 #1 SMP Tue Apr 15 08:09:22 EDT 2025 x86_64
User: greer489 (1034)
PHP: 8.3.19
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/sos/report/plugins/__pycache__/vault.cpython-36.pyc
3

-�_g��@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.WWdQRXWn8tk
r�}z|jd
|�d|���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 z: )	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�postproc/szVault.postprocN)rr)r)r)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesZservices�packagerrrrrrrsrN)Zsos.report.pluginsrrrrrrr�<module>s