Loading ...
Sorry, an error occurred while loading the content.

Invalid SAS URL's generated

Expand Messages
  • Zia Khan
    The problem I emailed you about yesterday has been solved, see below. Gaurav, works for a company that makes the best products for managing
    Message 1 of 1 , May 31 12:55 AM
    • 0 Attachment
      The problem I emailed you about yesterday has been solved, see below. Gaurav, works for a company that makes the best products for managing Azure:
      http://www.cerebrata.com/
       
       
      From: gmantri@...
      Date: Wed, 30 May 2012 18:44:19 +0100
      Subject: RE: Invalid SAS URL's generated


      I think I know why this is happening. It seems there's a bug in Node.js library for Windows Azure.

       

      Based on the documentation regarding creating Shared Access Signature (http://msdn.microsoft.com/en-us/library/windowsazure/hh508996.aspx), the validity period must be specified in one of the following formats (from that page itself):

       

       


      The signedstart and signedexpiry fields must be expressed as UTC times and must adhere to a valid ISO 8061 format. Supported ISO 8061 formats include the following:

      ·         YYYY-MM-DD 

      ·         YYYY-MM-DDThh:mmTZD 

      ·         YYYY-MM-DDThh:mm:ssTZD 

      For the date portion of these formats, YYYY is a four-digit year representation, MM is a two-digit month representation, and DD is a two-digit day representation. For the time portion, hh is the hour representation in 24-hour notation, mm is the two-digit minute representation, and ss is the two-digit second representation. A time designator T separates the date and time portions of the string, while a time zone designator TZD specifies a time zone.

       

      What essentially it tells you is that you can only have up to seconds precision when it comes to specifying these dates. However if you look at the values for “st” & “se” querystring parameters in the URL generated by Node.js library, it is including milliseconds there as well. I believe the problem is with format function (line 22) here which adds milliseconds: https://github.com/WindowsAzure/azure-sdk-for-node/blob/master/lib/util/iso8061date.js.

       

      I was able to reproduce this error in Cloud Storage Studio by changing the code to include milliseconds in my start and expiry dates.

       

      Hope this helps.

       

      Thanks

       

      Gaurav

       

    Your message has been successfully submitted and would be delivered to recipients shortly.