Access Azure Table Storage using Shared Access Key in Postman

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ธ.ค. 2024

ความคิดเห็น • 28

  • @mauromi68
    @mauromi68 2 ปีที่แล้ว +1

    great presentation, congrats

  • @JuanNelsonYupanquiLozano
    @JuanNelsonYupanquiLozano ปีที่แล้ว +1

    Thanks for the tutorial!!

  • @GeoffreyHibon
    @GeoffreyHibon ปีที่แล้ว +1

    Excellent!

  • @jojilawerence582
    @jojilawerence582 2 ปีที่แล้ว

    Hi.. I want to fetch a particular entity based on partition key and row key . In that case, how can i form the signature?

  • @memetanoiamemetanoia3650
    @memetanoiamemetanoia3650 2 ปีที่แล้ว +1

    can I do this even if the azure region is not on my current country. worried about the UTC date

    • @raaviblog105
      @raaviblog105  2 ปีที่แล้ว

      Not sure...haven't tried that...you can try and let me also know whether it works or not.

  • @pavankumars8173
    @pavankumars8173 2 ปีที่แล้ว

    I am trying to recreate the same scenario but getting the "ReferenceError: Crypto35 is not defined" error. Please help!

  • @FelixTruong-rt6py
    @FelixTruong-rt6py ปีที่แล้ว

    Can you share curl of access table by Access Keys ? I always get 403

  • @bugcave8100
    @bugcave8100 2 ปีที่แล้ว

    I found you need to add host to headers and move the configuration from headers to authentication tab( key: authenication, value:{{header_authorization, Addto: header}}

  • @anitamadbhavi7514
    @anitamadbhavi7514 ปีที่แล้ว

    What code is there in the "Tests" block in GET operation?? you only showed Headers and Pre-requestScript not showed Tests....!!! plz show that Tests one also

    • @raaviblog105
      @raaviblog105  ปีที่แล้ว

      Sorry I lost the whole collection sometime back. Not sure what tests were there.

    • @raaviblog105
      @raaviblog105  ปีที่แล้ว

      ok...I think this is the code in test block-
      var data = JSON.parse(responseBody);
      pm.environment.set("RowKey", data.value[0].RowKey);
      pm.environment.set("PartitionKey", data.value[0].PartitionKey);
      try it.

    • @raaviblog105
      @raaviblog105  ปีที่แล้ว

      The authentication error you are observing is due to some other reason. Check your pre-request script is correct-
      const storageAccount = pm.environment.get('azure_storage_account');
      const accountKey = pm.environment.get('azure_storage_key');
      const date = new Date();
      const UTCstring = date.toUTCString();
      const dataToEncode = UTCstring + "
      " + `/${storageAccount}${pm.request.url.getPath()}`;
      const encodedData = unescape(encodeURIComponent(dataToEncode));
      var hash = CryptoJS.HmacSHA256(encodedData, CryptoJS.enc.Base64.parse(accountKey));
      var signature = hash.toString(CryptoJS.enc.Base64);
      var auth = "SharedKeyLite " + storageAccount + ":" + signature;
      pm.environment.set("header_authorization", auth);
      pm.environment.set("header_date", UTCstring);

    • @anitamadbhavi7514
      @anitamadbhavi7514 ปีที่แล้ว +1

      @@raaviblog105 Thanks a lot,,.... Executed successfully🥳.....

  • @tushaar9027
    @tushaar9027 2 ปีที่แล้ว

    Hi i am not able to create the signature...can you pleas help me......actually i need to call this from bot framework composer so can't write script like this in that . I am using Shared Key , what needs to be put in CanonicalizedResource basically pm.request.url.path} what should come here

    • @raaviblog105
      @raaviblog105  2 ปีที่แล้ว +1

      pm.request.url.getPath() will have value depending on what operation you are performing. If you are creating table then it will be /Tables...if you are inserting record is already created table then it will be /...say, you created table by name testtable then it will be /testtable...hope that helps.

    • @tushaar9027
      @tushaar9027 2 ปีที่แล้ว +1

      @@raaviblog105 thanks raavi so i am basically tried to query and insert and update the entities in table so in my case /... should suffice right?

    • @raaviblog105
      @raaviblog105  2 ปีที่แล้ว

      Yes..thats right. If not working then share the exported collection...I will have a look at it.

  • @macscope6073
    @macscope6073 3 ปีที่แล้ว

    I followed the tutorial but Iam getting Status:403 Server failed to authorize the request. could you let me know What additonal permissions are required from storage side?

    • @raaviblog105
      @raaviblog105  3 ปีที่แล้ว

      Sorry for late reply. Which authorization scheme you are trying - shared access key or shared access lite? shared access key scheme is little tricky if encoding format is not right then it will show problem.