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:
parent
44cf56857e
commit
0f1581f8f7
10
misc/getpass.py
Normal file
10
misc/getpass.py
Normal 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))
|
Loading…
Reference in New Issue
Block a user