Jump to content

NI Cloud toolkit for Azure


Recommended Posts

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.

 

Link to post

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.

image.png.da5c0d1ace221f1933b64aa97223a4a3.png

 

This is my implementation. I struggled a long time with this until I figured out the Base64 decoding and encoding and URI encoding.

image.png.3b15ade21a3b4c39d681a1b2f8490ea2.png

For reference this is a typical SAS token (obviously URI and Key have been changed to protect my stuff)image.png.ed5588db0dff70333b828e7a660907c2.png

 

The SAS token is then used as the Password like this:

 

image.png.22ff31e5edc0d98359a96868e58ba3e4.png

 

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 by Neil Pate
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.