diff --git a/src/config_manager.py b/src/config_manager.py index b114c34..02a8607 100644 --- a/src/config_manager.py +++ b/src/config_manager.py @@ -7,8 +7,6 @@ logger = logging.getLogger(__name__) -REDACTED_KEYS = ("key", "token") - class ConfigManager(Singleton): def __init__(self, config_path: str = "", config_override_path: str = ""): @@ -141,7 +139,7 @@ def redact(config: dict) -> dict: redacted_config[key] = ConfigManager.redact(value) else: redacted_config[key] = value - for redacted_key in REDACTED_KEYS: + for redacted_key in consts.REDACTED_KEYS: if redacted_key in key: redacted_config[key] = "XXXXX" break diff --git a/src/consts.py b/src/consts.py index c2cc2a9..d93189f 100644 --- a/src/consts.py +++ b/src/consts.py @@ -60,6 +60,8 @@ class AppSource(Enum): # Vk consts VK_POST_LINK = "https://vk.com/{group_alias}?w=wall-{group_id}_{post_id}" +# List of keys whose values need to be hidden +REDACTED_KEYS = ("key", "token", "id", "hash", "session") # Report enum class ReportPeriod(Enum):