mvanella
mvanella

Reputation: 3656

When creating an SAS for an Azure Storage container are there any issues with using utc time for the expiry?

This question may be more along the lines of "With what does Azure Storage compare the expiry time?". I have a controller action in my MVC project that will return an SAS for temporary write permissions to a container.

I am currently setting the SAS expiry time as:

SharedAccessExpiryTime = DateTime.UtcNow.AddMinutes(5)

With what is the expiry time compared and will there be issues if multiple users are in different time zones?

Upvotes: 0

Views: 143

Answers (1)

Joe Giardino
Joe Giardino

Reputation: 364

This is correct, all start / expiry times are in UTCtime. Also be aware of clock skew as the server time may not be identical to the time on your client machine when generating the signature so allow for say 5 minutes to absorb this.

There will be no issues if various users are in different time zones as the signature will be good until the UTC time as evaluated by the server based on time of access.

Upvotes: 1

Related Questions