Particle Webhooks - Azure Event Hubs

Hi,

In the presentation https://www.hackster.io/pjdecarlo/hands-on-lab-particle-photon-weather-station-in-azure the author uses a SAS key for authorization to Event Hubs.Instead of using a SAS key I want to use a SAS token (generated from the SAS key). What should be changed in the azure_sas_token part?

Thanks.
Guy

Hi @gdillen,

The token used by azure needs to be constantly regenerated with an up-to-date timestamp, so you’d need to be constantly destroying / re-generating the hook. By setting up a key / key_name you still get full control over what bus you can send messages to, and still revoke access, etc, etc.

I hope that helps!
Thanks,
David

Hi David,

Ok thanks. But when using the key_name/key generated in the Azure Portal when you want to revoke one user from sending message to EH means that all users who are still allowed for sending messages needs to update their hooks with a new generated key. At the contrary with an SAS token, where you can define the lifetime of the token when you generate it, you don’t have this problem: you only need to revoke this particular token.
So I don’t understand if the lifetime is in the generated token why this (a SAS token) can’t be used?
Thanks.
Guy