Linux VM: Mount smb volumes with credentials in key vault

Ed Greenberg 1 Reputation point
2023-03-09T13:29:53.2866667+00:00

Using Ubuntu 20.04 on Azure VM. I currently mount my smb volumes using a reference to /etc/smbcredentials/filename.cred. It would be better if I could get the credentials from my key vault. I can't figure out how to do this. Any ideas?

Thanks, Ed

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,135 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,196 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,721 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Kristoffer 11 Reputation points
    2023-03-10T10:18:20.7633333+00:00

    There are several ways to do this,

    The simplest way is using the System Assigned identity of the Ubuntu VM in Azure,

    Allow that user ID access to the key-vault secrets.

    Store the credentials in the key-vault

    Use a script to retrieve and use the KV secret as credentials to mount the volume