Azure/azure-storage-node

Feature Request: Add scalability for US Gov tenants

JoeAlanis opened this issue · 3 comments

Which service(blob, file, queue, table) does this issue concern?

Blob

Which version of the SDK was used?

2.10.4 - This specific version is required for SPFX webparts

What's the Node.js/Browser version?

v14.17.6

What problem was encountered?

There are several files in the project that poin to the public uri *.blob.core.windows.net

The main issue is having to refactor to accommodate for US Government tenants. For Blobs, US Gov tenant use *.blob.usgovcloudapi.net.

https://docs.microsoft.com/en-us/azure/azure-government/compare-azure-government-global-azure#guidance-for-developers

| Service category | Service name | Azure Public | Azure Government
| Storage | Blob | *.blob.core.windows.net | *.blob.core.usgovcloudapi.net |  
  | Queue | *.queue.core.windows.net | *.queue.core.usgovcloudapi.net |  
  | Table | *.table.core.windows.net | *.table.core.usgovcloudapi.net |  
  | File | *.file.core.windows.net | *.file.core.usgovcloudapi.net

Steps to reproduce the issue?

N/A

Have you found a mitigation/solution?

Copy and Replace seem to be the only option. I would like to request a that an endpoint constant that can be leveraged so that *.blob.usgovcloudapi.net can be used.

I think I narrowed down the locations here that needed to be manually changed to .blob.usgovcloudapi.net

* var blobService = azure.createBlobServiceWithTokenCredential('https://account.blob.core.windows.net', tokenCredential);

* var blobService = azure.createBlobServiceWithTokenCredential('https://account.blob.core.windows.net', tokenCredential);

The found where I needed to update the constants.js file

var storageDnsSuffix = process.env.AZURE_STORAGE_DNS_SUFFIX || 'core.windows.net';

I think we can close this out. It looks like the only change needs to be done is to the contants.js file

See comment above