locked
microsoft azure table authentication stringtosign error RRS feed

  • Question

  • I am having a problem with `stringtosign` authentication for azure table pagination query.

    This is the current `stringtosign` im using :

        GET\n\n\nFri, 05 Sep 2014 03:57:11 GMT\n/mystorageaccount/mytablename\nNextPartitionKey:1!20!UmFjZSBNZW1iZXJfNA--\nNextRowKey:1!12!TmFtZV85ODE-

    Is there anything wrong with this `stringtosign` authentication?
    The rest of the Headers are exactly the same as Fiddle. 

    **Example**

        GET /mytablename?NextPartitionKey=1%2120%21UmFjZSBNZW1iZXJfNA--&NextRowKey=1%2112%21TmFtZV85ODE- HTTP/1.1
        Host: mystorageaccount.table.core.windows.net
        x-ms-version: 2014-02-14
        x-ms-date: Fri, 05 Sep 2014 05:49:19 GMT
        Authorization: SharedKey mystorageaccount:GD2w4pqsllzIOixNF/AfFqLkZhYzLpjK67a8OI7j6Go=
        Accept: application/atom+xml
        Accept-Charset: UTF-8
        DataServiceVersion: 3.0;NetFx
        MaxDataServiceVersion: 3.0;NetFx

    I have read through both

     * http://msdn.microsoft.com/library/azure/dd179428.aspx
     * http://msdn.microsoft.com/en-us/library/azure/dd135718.aspx
    Friday, September 5, 2014 6:39 AM

Answers

  • Hi Kai Wu Toh;

    As per the documentation here: http://msdn.microsoft.com/library/azure/dd179428.aspx (2009-09-19 Shared Key Format Section, point #4), you would need to convert all query parameters to lowercase. So your canonicalized resource string should be:
    GET\n\n\nFri, 05 Sep 2014 03:57:11 GMT\n/mystorageaccount/mytablename\nnextpartitionkey:1!20!UmFjZSBNZW1iZXJfNA--\nnextrowkey:1!12!TmFtZV85ODE- 
    

    Give it a try. let me know if you still have further queries.

    Warm regards

    Prasant

    Friday, September 5, 2014 9:13 AM