From 004a54331046987643dcd086bca396bc1a511890 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 15 Sep 2022 12:23:52 -0400 Subject: [PATCH] Common: Make Credentials.Config a subclass of InfectionMonkeyModelConfig --- monkey/common/credentials/credentials.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/common/credentials/credentials.py b/monkey/common/credentials/credentials.py index dcd011d01..834e16ac3 100644 --- a/monkey/common/credentials/credentials.py +++ b/monkey/common/credentials/credentials.py @@ -4,7 +4,7 @@ from typing import Optional, Union from pydantic import SecretBytes, SecretStr -from ..base_models import InfectionMonkeyBaseModel +from ..base_models import InfectionMonkeyBaseModel, InfectionMonkeyModelConfig from . import LMHash, NTHash, Password, SSHKeypair, Username Secret = Union[Password, LMHash, NTHash, SSHKeypair] @@ -27,7 +27,7 @@ class Credentials(InfectionMonkeyBaseModel): secret: Optional[Secret] """Secret part of credentials, like a password or a hash""" - class Config: + class Config(InfectionMonkeyModelConfig): json_encoders = { # This makes secrets dumpable to json, but not loggable SecretStr: get_plaintext,