0

I have two storage accounts. One supports Secure transfer and the other is normal storage account.

I want to check in java which storage require secure storage transfer. So that I can put a check in code to use storage connection string using https:// or http://.

EdChum
  • 376,765
  • 198
  • 813
  • 562
Abhishek
  • 471
  • 1
  • 4
  • 12

2 Answers2

1

You will need to use Azure Management Libraries for Java for that purpose. Using this SDK, you will need to list storage accounts in your Azure Subscription.

Each storage account object should have a property called enableHttpsTrafficOnly that will tell you if you can connect to your storage account using https only (when the value is true) or if you can connect to your storage account using either https or http (when the value is false).

Unfortunately I haven't worked with this library hence not able to post the code.

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
0

If you want to check whether your Azure storage account enables "Secure transfer required", you can use PowerShell to check it. For more details, please https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/storage/common/storage-require-secure-transfer.md.

Connect-AzAccount -Tenant "you tenant id"
Get-AzStorageAccount | Select ResourceGroupName,StorageAccountName, EnableHttpsTrafficOnly
Md Farid Uddin Kiron
  • 16,817
  • 3
  • 17
  • 43