AKS icon indicating copy to clipboard operation
AKS copied to clipboard

Missing azfilesauthmanager binary prevents managed identity authentication

Open AndreiDoroftei opened this issue 1 year ago • 1 comments

Describe the bug

Azure Files CSI driver v1.34.1 fails to mount volumes using managed identity authentication on AKS 1.34.0 due to missing azfilesauthmanager binary on cluster nodes.

To Reproduce Steps to reproduce the behavior:

  1. Create AKS cluster version 1.34.0 (latest)
  2. Create required role assignment.
  3. Create storage class with mountWithManagedIdentity: "true"
  4. Create PV with managed identity configuration
  5. Create PVC and pod that uses the volume
  6. Observe mount failure due to missing /usr/bin/azfilesauthmanager

Expected behavior Azure Files volumes should mount successfully using managed identity authentication with the latest AKS and CSI driver versions. Link

Environment (please complete the following information):

  • CSI Driver Version: v1.34.1
  • Kubernetes Version: 1.34.0
  • AKS Version: 1.34.0
  • OS: Ubuntu (AKS node image)
  • Install Method: AKS managed CSI driver

Additional context MountVolume.MountDevice failed for volume "test-volume" : rpc error: code = Internal desc = volume(rg-test#testsa#testshare) mount //testsa.file.core.windows.net/testshare on /var/lib/kubelet/plugins/kubernetes.io/csi/file.csi.azure.com/4659f955f2154ecf6b3f12fe71096ae5d6c63b17b54076a9bebcbd3e6c8fcc3d/globalmount failed with setCredentialCache failed for testsa.file.core.windows.net with error: exit status 1, output: [-] Error calling AzAuthenticatorLib: -1 Error getting Kerberos service ticket

Configuration

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: azurefile-csi-mi-test
provisioner: file.csi.azure.com
parameters:
  resourceGroup: rg-test
  storageAccount: testsa
  mountWithManagedIdentity: "true"
  protocol: smb
apiVersion: v1
kind: PersistentVolume
metadata:
  name: test-pv
spec:
  accessModes:
    - ReadWriteMany
  capacity:
    storage: 1Gi
  csi:
    driver: file.csi.azure.com
    volumeHandle: rg-test#testsa#testshare
    volumeAttributes:
      resourceGroup: rg-test
      storageAccount: testsa
      shareName: testshare
      protocol: smb
      mountWithManagedIdentity: "true"
      clientID: "12345678-1234-1234-1234-123456789012"

Investigation Notes

  • CSI driver is configured with --enable-azurefile-proxy=true
  • azurefile-proxy service is running correctly on nodes
  • azurefile-proxy.sock exists at expected location
  • CSI driver attempts to execute /usr/bin/azfilesauthmanager which does not exist
  • Only /usr/bin/azurefile-proxy is available on nodes
  • Managed identity has correct "Storage File Data SMB Share Contributor" role assignment (I have already tried with Storage File Data SMB MI Admin as well)

Question

Is azfilesauthmanager binary supposed to be included in AKS node images when managed identity authentication is enabled for Azure Files CSI driver?

AndreiDoroftei avatar Nov 17 '25 13:11 AndreiDoroftei

Setting the SmbOAuth property on the storage account to true solved the problem. I will close this.

AndreiDoroftei avatar Nov 17 '25 14:11 AndreiDoroftei