How do you setup shared access signature with more

2019-07-23 19:39发布

Can you setup shared access signature with more than 1 year expiration to avoid setup calls in Windows azure?

var signature = blob.GetSharedAccessSignature(new SharedAccessPolicy()
        {
            SharedAccessStartTime = null,
            SharedAccessExpiryTime =
               DateTime.Now.AddMinutes(expireMinutes), //expire time is restricted at azure to 1hr
            Permissions = SharedAccessPermissions.Read //readonly for now
        });

It does not let me set more than 1 hr.

标签: azure blob
1条回答
Animai°情兽
2楼-- · 2019-07-23 20:27

Those kinds of Shared Access Signatures have a maximum duration of one hour to minimize the impact of a leak (because they can't be revoked). You want a "container-level access policy" to set a longer (or infinite) expiration, and those can be revoked at any time.

查看更多
登录 后发表回答