Skip to content

OperationBlobSASPermission not requiring "r" permission for a number of operations #2299

@qc00

Description

@qc00

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

blob (but others might also be wrong)

Which version of the Azurite was used?

master

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

npm

What's the Node.js version?

irrelevant

What problem was encountered?

Per Azure docs calling GET on a container requires the SAS token to have "r" permission; however, Azurite code does not enforce that:

OPERATION_BLOB_SAS_BLOB_PERMISSIONS.set(
Operation.Container_GetProperties,
new OperationBlobSASPermission()
);
OPERATION_BLOB_SAS_BLOB_PERMISSIONS.set(
Operation.Container_GetPropertiesWithHead,
new OperationBlobSASPermission()
);

In fact, it's not enforcing the permission for a lot of operations.

Steps to reproduce the issue?

Have you found a mitigation/solution?

Patching the source code.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions