Skip to content

Fix logic issue with MSI auth#844

Merged
ianhelle merged 1 commit intomainfrom
msi-auth-patch
Apr 22, 2025
Merged

Fix logic issue with MSI auth#844
ianhelle merged 1 commit intomainfrom
msi-auth-patch

Conversation

@FlorianBracq
Copy link
Collaborator

Fix an issue with the MSI authentication.

For a workflow with:

  • authentication to the end resource with application secret stored in a keyvault
  • authentication to the keyvault with a managed identity

For the first pass (to authenticate against the KV) the value "client_id" is not set and properly retrieved from the environment.
However, once the creds are retrieved from the KV, an msi connection is also attempted with the client_id from the keyvault.

This fix aims to prevent that issue, and is more consistent with what was previously implemented:

    msi_kwargs = kwargs.copy()
     if AzureCredEnvNames.AZURE_CLIENT_ID in os.environ:
         msi_kwargs["client_id"] = os.environ[AzureCredEnvNames.AZURE_CLIENT_ID]

@ianhelle ianhelle merged commit 7e4494d into main Apr 22, 2025
10 checks passed
@ianhelle ianhelle deleted the msi-auth-patch branch April 22, 2025 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants