From ee72deaa58fd647cf098c6b56740b85c59f6b881 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rajmund=20Hru=C5=A1ka?= <rajmund.hruska@cesnet.cz>
Date: Fri, 11 Nov 2022 11:14:44 +0100
Subject: [PATCH] Remove secret from clients export
---
warden_server/warden_server.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/warden_server/warden_server.py b/warden_server/warden_server.py
index d66294d..51b8cb5 100755
--- a/warden_server/warden_server.py
+++ b/warden_server/warden_server.py
@@ -1633,7 +1633,11 @@ class WardenHandler(ObjectBase):
@expose(read=True)
@json_wrapper
def getClients(self):
- return {"clients": self.db.get_clients()}
+ clients = self.db.get_clients()
+ clients_dict = [c._asdict() for c in clients]
+ for c in clients_dict:
+ del c['secret']
+ return {"clients": clients_dict}
@expose(read=True)
@json_wrapper
--
GitLab