From 07df1f4c4aab9276d02da83e04f434d007c346d7 Mon Sep 17 00:00:00 2001 From: Wout Feys Date: Wed, 31 Jul 2024 14:52:49 +0200 Subject: [PATCH] Use AIKIDO_TOKEN as secret key --- aikido_firewall/background_process/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aikido_firewall/background_process/__init__.py b/aikido_firewall/background_process/__init__.py index b2bd76c46..2d14c2879 100644 --- a/aikido_firewall/background_process/__init__.py +++ b/aikido_firewall/background_process/__init__.py @@ -3,7 +3,7 @@ and listen for data sent by our sources and sinks """ -import secrets +from aikido_firewall.helpers.token import get_token_from_env from aikido_firewall.helpers.logging import logger from aikido_firewall.background_process.comms import ( AikidoIPCCommunications, @@ -20,7 +20,7 @@ def start_background_process(): """ # Generate a secret key : - generated_key_bytes = secrets.token_bytes(32) + secret_key_bytes = str.encode(str(get_token_from_env())) - comms = AikidoIPCCommunications(IPC_ADDRESS, generated_key_bytes) + comms = AikidoIPCCommunications(IPC_ADDRESS, secret_key_bytes) comms.start_aikido_listener()