Sylvain Lahaie Posted March 21, 2021 Report Share Posted March 21, 2021 The question is about the NI Cloud Toolkit for Azure. To open an Azure session I use the VI Open Azure Session.viThe opening parameters consist of a Storage Account Name and an Access Key. For example : Storage Account Name: storidddev2223 AccessKey: VjUz0XdYsr8e+B4Bxtabcdefghkly/123456778902345678923+NftIULBSk4skUA2U2i/Q== This method works We would like to change the identification method for a SAS Token. Is it possible with this toolkit? We tried the following new form of Key Access: Storage Account Name: storidddev2223 AccessKey: BlobEndpoint = https: //storidddev2223.blob.core.windows.net/; QueueEndpoint=https: //storidddev2223.queue.core.windows.net/; FileEndpoint=https://storidddev2223.file.core.windows.net/ ; TableEndpoint=https://storidddev2223.table.core.windows.net/; SharedAccessSignature=sv=2020-02-10&ss=bqt&srt=sco&sp=rwdlacupx&se=2022-03-31T17:31:16Z & st=2021-03-18T17:31:16Z&spr=https&sig=ABCDhijkRjYi7jCCoBBvYsSZ%2FlHAAAbEF9AXYZERbs%3D What is the correct format? Note that the storage account and access key names have been changed for confidentiality purposes. Quote Link to comment
Neil Pate Posted March 22, 2021 Report Share Posted March 22, 2021 (edited) I was able to connect to an Azure IoT hub using a MQTT library and generating my own SAS token based on the following algorithm I found somewhere on a Microsoft site. This is my implementation. I struggled a long time with this until I figured out the Base64 decoding and encoding and URI encoding. For reference this is a typical SAS token (obviously URI and Key have been changed to protect my stuff) The SAS token is then used as the Password like this: Please note I am definitely not an expert here, I figured this out on my own so it is possible I am doing something terribly wrong! Edited March 22, 2021 by Neil Pate Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.