1
0
This commit is contained in:
Jon Michael Aanes 2024-10-20 18:42:57 +02:00
parent 3b92357186
commit 726981a881
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA

View File

@ -66,10 +66,10 @@ ENV_KEY_PREFIX = 'ENV_KEY_PREFIX'
ENV_KEY_SECRETS_DIRECTORY = 'SECRETS_DIRECTORY' ENV_KEY_SECRETS_DIRECTORY = 'SECRETS_DIRECTORY'
ENV_KEY_VAULT_URL = 'VAULT_URL' ENV_KEY_VAULT_URL = 'VAULT_URL'
ENV_KEY_VAULT_TOKEN = 'VAULT_TOKEN' #noqa: S105 ENV_KEY_VAULT_TOKEN = 'VAULT_TOKEN' # noqa: S105
ENV_KEY_VAULT_MOUNT_POINT = 'VAULT_MOUNT_POINT' ENV_KEY_VAULT_MOUNT_POINT = 'VAULT_MOUNT_POINT'
ENV_KEY_PASS_FOLDER = 'PASS_STORE_SUBFOLDER' #noqa: S105 ENV_KEY_PASS_FOLDER = 'PASS_STORE_SUBFOLDER' # noqa: S105
DEFAULT_SECRETS_DIRECTORY = Path('secrets') DEFAULT_SECRETS_DIRECTORY = Path('secrets')
@ -126,7 +126,11 @@ class SecretLoader:
), 'Prefix must not end with _ (this will be added automatically)' ), 'Prefix must not end with _ (this will be added automatically)'
# Setup secrets path # Setup secrets path
self.secret_folder = Path(self.hardcoded.get(ENV_KEY_SECRETS_DIRECTORY) or self._load_or_none_env(ENV_KEY_SECRETS_DIRECTORY) or DEFAULT_SECRETS_DIRECTORY) self.secret_folder = Path(
self.hardcoded.get(ENV_KEY_SECRETS_DIRECTORY)
or self._load_or_none_env(ENV_KEY_SECRETS_DIRECTORY)
or DEFAULT_SECRETS_DIRECTORY,
)
# Setup pass # Setup pass
self.pass_folder = self._load_or_none(ENV_KEY_PASS_FOLDER) self.pass_folder = self._load_or_none(ENV_KEY_PASS_FOLDER)