Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support multiple user managed identities #132

Merged

Conversation

fabiomatavelli
Copy link
Contributor

@fabiomatavelli fabiomatavelli commented Aug 17, 2021

Hey guys,

This PR solves the issue of login to Azure when running on a VM with multiple User Assigned MSI IDs.
I've upgraded the tokenprovider_msi.go to use the most recent Azure Active Directory Login NewServicePrincipalTokenFromManagedIdentity method instead of the deprecated NewServicePrincipalTokenFromMSI.

Now, when this case happens, the user needs to specify the client_id parameter.

Co-authored-by: @eduardolmedeiros
Closes #64 #144

@fabiomatavelli fabiomatavelli requested a review from a team as a code owner August 17, 2021 16:29
@jasonwbarnett
Copy link
Contributor

jasonwbarnett commented Sep 22, 2021

I'd love if this was merged so I can just rebase #143 over this PR

@nywilken nywilken force-pushed the fix/multiple-managed-user-identities branch from 5dced0e to 10eb611 Compare January 28, 2022 14:09
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabiomatavelli apologies for the delayed review here. The changes look great. I rebased your branch onto the latest master and added a few small changes to before merging. Once all goes green I will merge in the changes.

Thanks for the contribution.

@nywilken
Copy link
Contributor

The rebased triggered the linter to check all of the files modified (even those not in the PR). Those lint errors existed already and will be handled separately.

@nywilken nywilken added the bug label Jan 28, 2022
@nywilken nywilken merged commit 1b23225 into hashicorp:main Jan 28, 2022
@nywilken
Copy link
Contributor

I'd love if this was merged so I can just rebase #143 over this PR

Hi @jasonwbarnett thanks for tracking this change and apologies for the delay. Please let me know if you need help with getting your changes working after the rebase. Quickly looking at the PR it looks like you might've figured out the answer to some of your questions so I will check back once rebased to see how I can help push things forward on your end. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Azure-arm: packer fails to login to Azure when running on a VM with multiple User Assigned MSI IDs
3 participants