@@ -20,8 +20,8 @@ class ValueBackend(ABC):
20
20
- Values are strings that may be encrypted depending on the backend
21
21
"""
22
22
23
- def __init__ (self , auth_config : Dict [str , str ]) -> None :
24
- """Initialize the backend with authentication configuration.
23
+ def __init__ (self , auth_config : Dict [str , str ], backend_config : Dict [ str , str ] = None ) -> None :
24
+ """Initialize the backend with authentication and backend configuration.
25
25
26
26
Args:
27
27
auth_config: Authentication configuration for the backend.
@@ -30,12 +30,16 @@ def __init__(self, auth_config: Dict[str, str]) -> None:
30
30
- 'file': Use configuration file
31
31
- 'direct': Use direct credentials
32
32
- 'managed_identity': Use cloud managed identity
33
+ backend_config: Optional backend-specific configuration.
34
+ This can contain additional settings specific to the backend implementation.
35
+ Defaults to None, which will be treated as an empty dict.
33
36
34
37
Raises:
35
38
ValueError: If the auth_config is invalid
36
39
"""
37
40
self ._validate_auth_config (auth_config )
38
41
self .backend_type = self .__class__ .__name__ .lower ().replace ("backend" , "" )
42
+ self ._backend_config = backend_config or {}
39
43
40
44
def _validate_auth_config (self , auth_config : Dict [str , str ]) -> None :
41
45
"""Validate the authentication configuration.
0 commit comments