create a storage account along with file share and using security protocols using Python SDK

suresh Reddy 41 Reputation points
2024-04-12T11:01:58.1633333+00:00

We want to create a storage account along with file share and using security protocols using Azure Python SDK or teraform.

And we are able to create a storage account along with file share manually from Azure portal and we able to apply the Security protocols for that no issue but issue is only with when creating Azure Python SDK or Teraform.

============================================================================================

File share gets the protocol settings from default file services originally created with storage account which is incorrect for us

We need reference for create file service with correct protocol setting and not for file shares as file shares inherits protocol setting from default file services

Below is the expected protocol setting for default fileservices :

protocolSettings: {

smb: {

authenticationMethods: 'Kerberos'

channelEncryption: 'AES-128-GCM;AES-256-GCM'

kerberosTicketEncryption: 'AES-256'

versions: 'SMB3.1.1'

}

}

Actually gets created with incorrect protocol settings :

protocolSettings: {

smb: {}

}

Could you please confirm is the compatible to create a file share securtiy protocal using Python SDK ?

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,715 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sumarigo-MSFT 43,801 Reputation points Microsoft Employee
    2024-04-15T07:17:54.53+00:00

    @suresh Reddy Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    The protocol settings for the file service (such as SMB settings) are typically set after the storage account has been created.

     So once the Azure file storage account is created, You need to call the set_file_service_properties() function to set SMBProperties :

     azure.storage.file.fileservice.FileService class | Microsoft Learn

    User's image

    More info File Services - Set Service Properties REST API.

    Please let us know if you have any further queries. I’m happy to assist you further.    


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.