-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Azure Key Vault auto-unseal fails when authenticating from an Azure instance with more than one MSI #7115
Comments
Hello! I'm following on your comment about I admit I'm not too familiar with auto-unsealing in Azure, but I do notice the example configuration you shared is missing any mention of |
Hello - we haven't heard back in some time. If you have more information please let us know! Otherwise I'll be closing this issue next week, approximately Tuesday, March 10th 2020. |
Hello - I missed the March 10th cut-off for closing this, but seeing how we've passed it without any reply, I'm going to go ahead and close it now. Please let us know if you do find more information. Thanks! |
Hey; sorry for the late response but this is still an issue. I've been working around it for a few months but ran into it again when attempting to set up an Azure secrets engine to replicate some of the same functionality we provide with the AWS secrets engine on AWS. @catsby I'm not including
The issue is that this fallback only works with system-assigned managed identities (and maybe if the virtual machine in question only has one user-assigned managed identity, I haven't dug around in the code to confirm). If you've assigned multiple user-assigned managed identities to a single virtual machine, Azure requires you to specify the
Vault does not appear to use the specified [0] https://www.vaultproject.io/docs/secrets/azure/#authentication |
hashicorp/vault-plugin-auth-azure#29 may fix it actually. What's the expected ETA on reviewing and releasing a build with those commits? |
New PR for the fix: hashicorp/vault-plugin-auth-azure#33 |
@catsby can you reopen this or should I create another issue? |
@null-route does this hashicorp/vault-plugin-auth-azure#33 fix your issue? |
@narayan-iyengar I think it should, but I'm not sure. I haven't tested it yet. |
ok cool. I think we are going merge the above PR. If you still see an issue please reopen or create a new issue |
@narayan-iyengar when will a version of the azure auth plugin containing that change be included in a Vault release? |
Oh, I see it got added to the 1.4.X milestone, so hopefully soon. |
@catsby it seems the issue is still present in Vault v1.10.0:
I think that the linked change is going to fix it eventually: hashicorp/go-kms-wrapping#97 |
Can someone please re-open this issue as it is still present? In addition, can someone review my bug-fix PR in the dependent go module so as to open a subsequent PR here with a bump to Thank you in advance 😃 |
We're suffering from the same issue on v1.11.2 as well. For us we enabled Insights on an AKS instance to help triage an issue, but it then broke Vault's auto-unsealing from AKV with the "Multiple user assigned identities exist" error. We attempted to set To fix it, we had to disable Insights on the cluster (we used Terraform to do so), and then we had to manually restart each VM in the VMSS for the cluster to get the auto-unseal working again (ie: only one user assign identity) - as simply disabling Insights wasn't enough. Is there any word on when this will get fixed? As I can only imagine we'll face this issue again in the future. |
Hi @Badgerati! My PR on the dependent module was merged (hashicorp/go-kms-wrapping#97) and was back-ported to branch for Vault 1.11.x releases (hashicorp/go-kms-wrapping#104). I am still waiting for it to be consumed by Vault with a PR to In my opinion, this bug here should be re-opened as it was closed without fixing the issue. @cipherboy is the one who is looking at this issue so we can only wait for his actions :) |
+1 |
Hi sorry all -- I didn't get permissions to tag this in time for 1.11.4, so I'll have to revisit for 1.11.5. In the mean time, 1.12.0-RC1 is out with this fix definitely in that release, and the GA should be around the corner. Thanks again @skatsaounis for the PR and sorry for dropping the ball on the 1.11.x backport. Pinging @sgmiller to get a new tag of go-kms-wrapping for 1.11.5... |
@cipherboy Failed to pull image "hashicorp/vault:1.12.0-RC1": rpc error: code = NotFound desc = failed to pull and unpack image "docker.io/hashicorp/vault:1.12.0-RC1": failed to resolve reference "docker.io/hashicorp/vault:1.12.0-RC1": docker.io/hashicorp/vault:1.12.0-RC1: not found |
never mind, image is actualy 1.12.0-rc1 |
I confirm that 1.12.0-rc1 is working when multiple MSI are available on the node. if we could please add that to 1.11.X it would be great. thanks |
@sgmiller can you help us to have this on 1.11.5? |
For anyone who is wondering. This issue is not yet fixed in 1.11.5 or 1.11.6. |
Describe the bug
Azure Key Vault auto-unseal fails when using MSI authentication from an instance with more than one service identity.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Vault would attempt the retrieve credentials for the desired identity by using the provided client_id. Instead, it errors out with:
I believe this is because it's making a call to
auth.NewMSIConfig()
, which does not support the use of multiple MSIs. It might make sense to make the client_id a required value and instead callGetMSI()
:Environment:
vault status
): 1.1.1vault version
): 1.1.1Vault server configuration file(s):
The text was updated successfully, but these errors were encountered: