Azure-sdk-for-js: set container acl - start + expiry

Created on 20 Aug 2019  路  6Comments  路  Source: Azure/azure-sdk-for-js

  • Package Name: @azure/storage-blob
  • Package Version: 10.4.0
  • Operating system: MacOS Mojave
  • [x] nodejs

    • version: v10.16.0

      Describe the bug

      For set container ACLs, there is a behavior discrepancy.

      When using az cli, the older node client azure-storage, as well as the Azure portal UI, I am able to set access policies that look like such:

{
    id: 'testpolicy',
    accessPolicy: { permission: 'rwd' }
}

I can set only start dates, only expiry dates, or no dates.

Through the @azure/storage-blob client, when attempting to set ACL without defining explicit start and expiry dates, I get this node error:

    TypeError: Cannot read property 'toISOString' of undefined

To Reproduce

const acl = {
    id: 'testpolicy',
    accessPolicy: { permission: 'rwd' }
}

await containerURL.setAccessPolicy(Aborter.none, '', acl, {});

Client will throw TypeError.

Expected behavior
Start + Expiry dates should not throw errors if unset.

Mgmt Service Attention Storage bug customer-reported

Most helpful comment

10.4.1 was published into npm.

All 6 comments

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage

@JianqinWang Start and Expiry are defined as required parameters in V10. Will double confirm.

Will be fixed in 10.4.1

thanks!

10.4.1 was published into npm.

thanks!

Was this page helpful?
0 / 5 - 0 ratings