2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-21 17:11:58 +00:00

Add a sample script to fetch user/pass info from confluent db

This commit is contained in:
Jarrod Johnson 2022-06-10 14:18:35 -04:00
parent 44cf56857e
commit 0f1581f8f7

10
misc/getpass.py Normal file
View File

@ -0,0 +1,10 @@
import confluent.config.configmanager as cfm
import sys
c = cfm.ConfigManager(None)
cfg = c.get_node_attributes(sys.argv[1], 'secret.*', decrypt=True)
for node in cfg:
for attr in cfg[node]:
val = cfg[node][attr]['value']
if not isinstance(val, str):
val = val.decode('utf8')
print('{}: {}'.format(attr, val))