Reputation: 17804
I'm trying to send a message to my Azure Servicebus queue using the REST Api in Python (can't use Azure package on Orange PI Zero system, not enough memory to install package...).
Now the example page shows a specifically formatted Authorization
header:
Authorization: SharedAccessSignature sr=your-namespace&sig=Fg8yUyR4MOmXfHfj55f5hY4jGb8x2Yc%2b3%2fULKZYxKZk%3d&se=1404256819&skn=RootManageSharedAccessKey
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...
Upvotes: 4
Views: 1609
Reputation: 136306
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
This is something you will need to compute yourself as it dictates when your SAS token will expire. For example if you want to have your SAS token expire in 15 minutes from when it was created, you will get a date/time value 15 minutes from now, and calculate the number of seconds between that date/time and epoch (Jan 1st, 1970 00:00:00 UTC).
Once you have that value, you will need to compute the signature using the logic described here: https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-sas#generate-a-shared-access-signature-token.
Upvotes: 2