Skip to content

Unable to use autounsealing with Azure, ManagedIdentityCredential authentication failed #56

@needsupport911

Description

@needsupport911

Describe the bug
After updating from version 2.0.1 to 2.2.1(and 2.2.2), Openbao cannot log in to Azure anymore with Managed Identity.

To Reproduce
Azure steps:

Provision Azure Key Vault
Configure Federated Identity Credential
Assign Key Vault permissions to identity

Kubernetes steps:

Install Openbao on Azure Kubernetes Services
Add pod label azure.workload.identity/use: "true"
Add service account annotation: azure.workload.identity/client-id: "managed-identity-client-id"
Configure raft with seal seal "azurekeyvault" {} https://openbao.org/docs/configuration/seal/azurekeyvault/
Restart Openbao server

Error message

Error parsing Seal configuration: error fetching Azure Key Vault wrapper key information: ManagedIdentityCredential authentication failed. ManagedIdentityCredential authentication failed. the requested identity isn't assigned to this resource
GET http://169.254.169.254/metadata/identity/oauth2/token
--------------------------------------------------------------------------------
RESPONSE 400 Bad Request
--------------------------------------------------------------------------------
{
  "error": "invalid_request",
  "error_description": "Identity not found"
}
--------------------------------------------------------------------------------
To troubleshoot, visit https://aka.ms/azsdk/go/identity/troubleshoot#managed-id

Expected behavior
Openbao uses Azure Workload Identity to authenticate to Azure.

Environment

  • Kubernetes version: 1.31.2
    • Distribution or cloud vendor (OpenShift, EKS, GKE, AKS, etc.): AKS
  • openbao-helm version: tested on 2.2.1 and 2.2.2

Chart values:

server:
  serviceAccount:
    annotations:
      azure.workload.identity/client-id: "SET_BY_ARGOCD"
  extraLabels:
    azure.workload.identity/use: "true"
  extraEnvironmentVars:
    VAULT_SEAL_TYPE: "SET_BY_ARGOCD"
    VAULT_AZUREKEYVAULT_VAULT_NAME: "SET_BY_ARGOCD"
    VAULT_AZUREKEYVAULT_KEY_NAME: "SET_BY_ARGOCD"

Additional context
Found similar topic which has been resolved in Hashicorp issues:
hashicorp/vault#29717

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions