Giter Site home page Giter Site logo

[BUG] When using Azurite and the connection string is incorrect, TableAsyncClient operation does not finish about azure-sdk-for-java HOT 3 OPEN

taisuke-fujimoto avatar taisuke-fujimoto commented on June 26, 2024
[BUG] When using Azurite and the connection string is incorrect, TableAsyncClient operation does not finish

from azure-sdk-for-java.

Comments (3)

alzimmermsft avatar alzimmermsft commented on June 26, 2024

Thanks for reporting this @taisuke-fujimoto.

Looking through the stack trace something seems a bit off here, nothing you did just something I noticed, where createTable is attempting to deserialize the response as XML but the documentation for the REST API says it should be JSON:

https://learn.microsoft.com/rest/api/storageservices/create-table#json-version-2013-08-15-and-later-1

If possible, could you get a capture of what Azurite is returning for a response when this API is called.

from azure-sdk-for-java.

taisuke-fujimoto avatar taisuke-fujimoto commented on June 26, 2024

@alzimmermsft
Captured from Azurite debug log.

  • request
    2024-06-04T03:12:51.029Z d72b49e6-8202-42cb-8b8a-2b0414591db9 info: TableStorageContextMiddleware: RequestMethod=POST RequestURL=http://127.0.0.1/devstoreaccount1/Tables RequestHeaders:{"host":"127.0.0.1:10002","date":"Tue, 04 Jun 2024 03:12:50 GMT","authorization":"SharedKeyLite devstoreaccount1:cq445rmWGNkGen9sV2RWNEmyLeiGi4kAsyMhyk24ELw=","x-ms-version":"2020-12-06","prefer":"return-no-content","content-type":"application/json;odata=nometadata","dataserviceversion":"3.0","x-ms-client-request-id":"f3601329-d7f5-4b22-9994-474088931aac","accept":"application/json;odata=minimalmetadata","user-agent":"azsdk-java-azure-data-tables/12.4.0 (17.0.6; Windows 11; 10.0)","content-length":"20"} ClientIP=172.17.0.1 Protocol=http HTTPVersion=1.1
    
  • response
    2024-06-04T03:12:51.039Z d72b49e6-8202-42cb-8b8a-2b0414591db9 error: ErrorMiddleware: Set HTTP body: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Error>\n  <Code>AuthorizationFailure</Code>\n  <Message>Server failed to authenticate the request. Make sure the value of the Authorization header is formed correctly including the signature.\nRequestId:d72b49e6-8202-42cb-8b8a-2b0414591db9\nTime:2024-06-04T03:12:51.035Z</Message>\n</Error>"
    2024-06-04T03:12:51.040Z d72b49e6-8202-42cb-8b8a-2b0414591db9 info: EndMiddleware: End response. TotalTimeInMS=12 StatusCode=403 StatusMessage=Forbidden Headers={"server":"Azurite-Table/3.30.0","x-ms-error-code":"AuthorizationFailure","x-ms-request-id":"d72b49e6-8202-42cb-8b8a-2b0414591db9","x-ms-version":"2024-05-04","content-type":"application/xml"}
    

Even with the latest version of Azurite (3.30.0), the response when an authentication error occurs is XML.

from azure-sdk-for-java.

alzimmermsft avatar alzimmermsft commented on June 26, 2024

Thanks for sharing that @taisuke-fujimoto.

@jairmyree, @vcolin7 could you follow-up and do a comparison of the behavior when using the Tables service instead of Azurite. If the behaviors are different we can follow-up with Azurite to be consistent with the service, if the behaviors are the same we'll need to investigate further as this would mean that the service returns different error formats on authentication issues vs invalid request issues.

from azure-sdk-for-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.