通过 Azure 门户获取的服务总线 SAS 令牌的时间戳是多少?
What is the timestamp of a Servicebus SAS token obtained via Azure Portal?
我正在尝试使用 Python 中的 REST Api 向我的 Azure 服务总线 queue 发送消息(不能在 Orange PI 零系统上使用 Azure 包,不能足够的内存来安装包...)。
现在 example page 显示特定格式的 Authorization
header:
Authorization: SharedAccessSignature sr=your-namespace&sig=Fg8yUyR4MOmXfHfj55f5hY4jGb8x2Yc%2b3%2fULKZYxKZk%3d&se=1404256819&skn=RootManageSharedAccessKey
如何从 Azure 门户获取我的 SAS 令牌的 se
(“令牌即时到期”:reference)值?它只显示“主要”/“次要”键...
How do I obtain the se ("Token expiry instant": reference) value for
my SAS token from the Azure Portal? It only shows
"Primary"/"Secondary" key
这是您需要自己计算的内容,因为它指示您的 SAS 令牌何时到期。例如,如果您想让 SAS 令牌在创建后的 15 分钟内过期,您将在 15 分钟后获得一个 date/time 值,并计算该 date/time 和纪元之间的秒数(1970 年 1 月 1 日 00:00:00 UTC)。
获得该值后,您将需要使用此处描述的逻辑计算签名:https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-sas#generate-a-shared-access-signature-token。
我正在尝试使用 Python 中的 REST Api 向我的 Azure 服务总线 queue 发送消息(不能在 Orange PI 零系统上使用 Azure 包,不能足够的内存来安装包...)。
现在 example page 显示特定格式的 Authorization
header:
Authorization: SharedAccessSignature sr=your-namespace&sig=Fg8yUyR4MOmXfHfj55f5hY4jGb8x2Yc%2b3%2fULKZYxKZk%3d&se=1404256819&skn=RootManageSharedAccessKey
如何从 Azure 门户获取我的 SAS 令牌的 se
(“令牌即时到期”:reference)值?它只显示“主要”/“次要”键...
How do I obtain the se ("Token expiry instant": reference) value for my SAS token from the Azure Portal? It only shows "Primary"/"Secondary" key
这是您需要自己计算的内容,因为它指示您的 SAS 令牌何时到期。例如,如果您想让 SAS 令牌在创建后的 15 分钟内过期,您将在 15 分钟后获得一个 date/time 值,并计算该 date/time 和纪元之间的秒数(1970 年 1 月 1 日 00:00:00 UTC)。
获得该值后,您将需要使用此处描述的逻辑计算签名:https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-sas#generate-a-shared-access-signature-token。