Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to delete table using storage account SAS with only Read and List permissions does not throw error #21385

Closed
2 of 6 tasks
craxal opened this issue Apr 13, 2022 · 2 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Tables
Milestone

Comments

@craxal
Copy link
Member

craxal commented Apr 13, 2022

  • Package Name: @azure/data-tables
  • Package Version: 13.1.0
  • Operating system: Windows 11
  • nodejs
    • version: 16.13.1
  • browser
    • name/version:
  • typescript
    • version: 4.5.3
  • Is the bug related to documentation in

Describe the bug
When using a storage account SAS with Read and List permissions, attempting to delete a table no longer throws an error, despite the fact that a REST error is returned by the service. This is a regression from previous builds of the SDK.

To Reproduce

  1. Run the following code snippet:
    // Make sure the SAS only has Read and List permissions, such as:
    // sv=2021-04-10&ss=btqf&srt=sco&st=2022-04-13T16%3A32%3A09Z&se=2022-04-14T16%3A32%3A09Z&sp=rl&sig=...
    const table = `testsasdel${process.hrtime.bigint()}`;
    const keyClient = TableClient.fromConnectionString(accounts.cralvordtest02.connectionString, table);
    const sasClient = TableClient.fromConnectionString("<SAS CONNECTION STRING>", table);
    
     try {
         console.log("Creating table...");
         await keyClient.createTable();
    
         console.log("Deleting table...");
         await sasClient.deleteTable();
    
         console.log("...done");
     } catch (error) {
         console.error(error);
     }
  2. Observe the console output.

Expected behavior
A REST error should be output to the console and "...done" should not be output.

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Apr 13, 2022
@azure-sdk azure-sdk added Client This issue points to a problem in the data-plane of the library. needs-team-triage Workflow: This issue needs the team to triage. Tables labels Apr 13, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Apr 13, 2022
@joheredi
Copy link
Member

It looks like we missed re-throwing the exception when the status code is not 404 when migrating to the new tracing version #20399. I'll send out a fix soon

@joheredi joheredi removed the needs-team-triage Workflow: This issue needs the team to triage. label Apr 14, 2022
@joheredi joheredi added this to the [2022] May milestone Apr 14, 2022
@joheredi
Copy link
Member

Fixed with PR #21408

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Tables
Projects
None yet
Development

No branches or pull requests

3 participants