From 0f1581f8f7feca67b0737962e4cf3f874d39fed3 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 10 Jun 2022 14:18:35 -0400 Subject: [PATCH] Add a sample script to fetch user/pass info from confluent db --- misc/getpass.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 misc/getpass.py diff --git a/misc/getpass.py b/misc/getpass.py new file mode 100644 index 00000000..c9d19e0b --- /dev/null +++ b/misc/getpass.py @@ -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))