-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read\Write Connection ID VIs have private scope #20
Comments
Hi @salomaogh , Those methods are protected because accessing them can change the state of the connection object instance. It will never be exposed directly to prevent leaky abstractions that change the behaviour of the class. To do what you want, you would extend the TCP connection class and implement the overrides to offer TLS support. Fortunately, this had been done already. 😀 https://github.com/LabVIEW-Open-Source/MQTT-Connection-SecuredTCP https://www.vipm.io/package/labview_open_source_project_lib_mqtt_securedtcp_connection/ Check out the SecuredTCP package on VIPM and you should find examples in the palette on how to use the extended methods to register your certificates or use the password field to transmit the token. This video might help too: P.S. the reason it is not supported in the base package is because it supports LV2013. The TLS nodes were added in LV2020, so the secured extension is also >=LV2020. |
Hello Mr. Normandin, Thank you for the prompt response: I have watched your insightfull video multiple times in depth. Unfortunately i do not have any additional information about Hostname and Server X.509 certificate to pass into the "Configure Secured TCP Client" VI, because i use the SAS Authentification method to generate the password and the DPS Assigned Hub for me. All information i have is about DPS hostname, port 8883, username, password and Client ID (picture below). When i use MQTT Explorer to connect with IOT Central, i also do not need any certificate. I just check the "encryption" option and that's it. Mr. Pate did not need to add any certificate here too, when he modified the VI: Cheers, |
Thank you Mr Normandin. I will check it out. Cheers. |
Hello Mr. Normandin, I had to made some changes on the "onConnection" VI to make sure that the connection with IOT Central worked. I have added an optional control flag "CA Signed Server Certificate?" to circumvent the first statement condition, wired the flag to the "load OS trusted CAs?" parameter in the new "TLS Configuration" VI and then added a condition to check if the certificates paths are valid. However the newly created flag could not be set as a control terminal, due to class error. It seems like other VI must have this flag, even if this does not make sense. I am not sure if this is a reasonable solution, though. I am no expert in the subject. Do you have any thoughts or ideas? Here is the result: Cheers, |
Hello,
I am trying to connect with Azure IOT Central through a SAS Token Authentication (generated by other means) and have managed to do it with this library (https://github.com/mradziwo/mqtt-LabVIEW) following the steps of Mr. Pate in this forum topic (https://lavag.org/topic/21615-azure-iot-mqtt/). However, when i try to establish the TLS communication with IOT Central without the need of a certificate file with the Labview Open Source MQTT library, Labview presents the message: "This VI cannot access the referenced item in protected scope". It is possible to add this feature or unlock the VIs? Here is a screenshot of a Subscriber example.
The text was updated successfully, but these errors were encountered: