Azure / Azure/Azurite

SAS with access policy doesn't work, if permissions is not set in access policy

Open
#1,856 0 comments 0 reactions 1 assignee Claimed by @EmmaZhu View on GitHub
Dominant language
TypeScript
Stars
2.3k
Forks
393
Avg merge
1d 20h
Merged PRs (30d)
36

Description

Can be reproed with following code with JS/TS SDK:

```

const id = "unique-id";
await containerClient.setAccessPolicy(undefined, [
{
accessPolicy: {
expiresOn: tmr,
startsOn: now,
},
id,
},
]);

const blobSAS = generateBlobSASQueryParameters(
{
containerName,
permissions: ContainerSASPermissions.parse("racwdl"),
identifier: id,
},
sharedKeyCredential as StorageSharedKeyCredential
);

const sasClient = `${blobClient.url}?${blobSAS}`;
const blobClientWithSAS = new BlobClient(sasClient, newPipeline(new AnonymousCredential()));

await blobClientWithSAS.getProperties();
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.