File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -118,17 +118,21 @@ def _load_config(self, config_path: str) -> dict:
118
118
119
119
def _get_config_from_azure_key_vault (self ):
120
120
"""Extract configuration from Azure Key Vault and set attributes."""
121
+ # Get environment variables
122
+ azure_managed_identity_id = os .getenv (self .azure_managed_identity_id )
123
+ azure_key_vault_name = os .getenv (self .azure_key_vault_name )
124
+
121
125
# Check if all required environment variables are set
122
- if not self . azure_managed_identity_id :
126
+ if not azure_managed_identity_id :
123
127
raise ValueError (f"Environment variable for { self .azure_managed_identity_id } is not set" )
124
- if not self . azure_key_vault_name :
128
+ if not azure_key_vault_name :
125
129
raise ValueError (f"Environment variable for { self .azure_key_vault_name } is not set" )
126
130
127
131
# Create Key Vault URL
128
- key_vault_url = f"https://{ self . azure_key_vault_name } .vault.azure.net/"
132
+ key_vault_url = f"https://{ azure_key_vault_name } .vault.azure.net/"
129
133
130
134
# Create Managed Identity credential
131
- credential = ManagedIdentityCredential (client_id = self . azure_managed_identity_id )
135
+ credential = ManagedIdentityCredential (client_id = azure_managed_identity_id )
132
136
133
137
# Test the managed identity by getting a token
134
138
scope = "https://vault.azure.net/.default"
You can’t perform that action at this time.
0 commit comments