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,