服务总线 sas 令牌即使在到期时间后也能正常工作

Service bus sas token working even after the expiry time

我正在研究通过 SAS 令牌访问服务总线。我将“se”刻度值从令牌转换为实际日期时间,发现它是凌晨 1 点,从我观察到的时间算起 1 分钟。这意味着令牌必须在一分钟内过期。我一直在使用上述 Sas 令牌向服务发送消息,并注意到即使在 1 分钟后发送仍在发生。实际过期发生了,6 分钟后抛出“令牌过期”错误。也就是说,它发生在 1:05:00,而不是 1:00:00。服务总线是否添加了默认值,或者我在这里遗漏了什么?

我正在使用 Azure.Messaging.ServiceBus 最新的 .net nuget 包。

SAS 令牌有一定量的时钟偏差,以解决具有不同设置时钟的机器。

我找不到 Azure ServiceBus 的确切允许时间,但 Azure Blob 存储允许其 SAS 令牌中存在 15 分钟的时钟偏差。

remember that you may observe up to 15 minutes of clock skew in either direction on any request.
-- https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview