xenoslib 0.1.29.21__tar.gz → 0.1.29.23__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xenoslib-0.1.29.21/xenoslib.egg-info → xenoslib-0.1.29.23}/PKG-INFO +1 -1
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib/about.py +1 -1
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib/extend.py +12 -4
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23/xenoslib.egg-info}/PKG-INFO +1 -1
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/LICENSE +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/README.md +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/setup.cfg +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/setup.py +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib/__init__.py +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib/__main__.py +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib/base.py +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib/dev.py +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib/linux.py +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib/mail.py +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib/mock.py +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib/onedrive.py +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib/win_trayicon.py +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib/windows.py +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib.egg-info/SOURCES.txt +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib.egg-info/dependency_links.txt +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib.egg-info/requires.txt +0 -0
- {xenoslib-0.1.29.21 → xenoslib-0.1.29.23}/xenoslib.egg-info/top_level.txt +0 -0
|
@@ -253,8 +253,9 @@ class ConfigLoader(SingletonWithArgs):
|
|
|
253
253
|
raise KeyError("Missing required Vault configuration in config.yml")
|
|
254
254
|
|
|
255
255
|
self.vault_client = hvac.Client(url=vault_url, namespace=vault_space, timeout=45)
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
self.vault_client.auth.approle.login(
|
|
257
|
+
role_id=vault_role_id, secret_id=self.vault_secret_id
|
|
258
|
+
)
|
|
258
259
|
except Exception as e:
|
|
259
260
|
self.vault_client = None
|
|
260
261
|
raise Exception(f"Failed to initialize Vault client: {str(e)}")
|
|
@@ -324,6 +325,11 @@ class ConfigLoader(SingletonWithArgs):
|
|
|
324
325
|
try:
|
|
325
326
|
vault_path = self._raw_config[section]["vault_path"]
|
|
326
327
|
vault_key = self._raw_config[section][f"{key_name}@vault"]
|
|
328
|
+
vault_namepsace = self._raw_config[section].get("vault_namespace")
|
|
329
|
+
if vault_namepsace:
|
|
330
|
+
self.vault_client.adapter.namespace = vault_namepsace
|
|
331
|
+
else:
|
|
332
|
+
self.vault_client.adapter.namespace = self._raw_config["vault"]["space"]
|
|
327
333
|
data = self.vault_client.secrets.kv.read_secret_version(
|
|
328
334
|
path=vault_path, mount_point="kv", raise_on_deleted_version=True
|
|
329
335
|
)
|
|
@@ -374,5 +380,7 @@ if __name__ == "__main__":
|
|
|
374
380
|
|
|
375
381
|
# This will only work if you provide a valid Vault secret ID
|
|
376
382
|
# and hvac package is installed
|
|
377
|
-
config_with_vault = ConfigLoader("config.yml", vault_secret_id=os.getenv("
|
|
378
|
-
|
|
383
|
+
config_with_vault = ConfigLoader("config.yml", vault_secret_id=os.getenv("VAULT_SECRET_ID"))
|
|
384
|
+
|
|
385
|
+
print("With Vault:", config_with_vault.test.test)
|
|
386
|
+
print("With Vault:", config_with_vault["cis"]["cis_client_id"])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|