LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to access LabVIEW Web Service through HTTPS

Note: You can also refer to the Securing Web Services with SSL Knowledge Base article

 

Hi all,

 

I have developed a simple LabVIEW Web Service (a GET API) and published it. By default, the API is accessible through HTTP on port 8080. But I would like to access the API through HTTPS, so I did below actions,

  • Tools -> Options -> Web Server -> 'Configure Web Application Server'
  • Open Web Server Configuration -> Under 'Application Web Server' open Advanced
  • Create a 'Virtual host' -> enable 'SSL' and configure the LabVIEW default certificate file and port '8081'
  • Restart the computer

Now when I try to access the API, it is accessible but not secure. Looks like the digital certificate is not authorized. I am not sure how to authorize it? Open for suggestions.

 

You can access the API here "https://www.boringengineer.tk:8081/VoiceService/GetMessage"

 

Note:

  • I used 'letsencrypt.org' to get a certificate for my machine 
  • My machine is an AWS EC2 running on the cloud
Navin Subramani | CLA, CTA | boring engineer
0 Kudos
Message 1 of 8
(5,785 Views)

I used stunnel for that.

 

It takes any\all (configurable) ports\connections and changes it from http to https and\or vice versa. It can do the same for FTP, etc.

0 Kudos
Message 2 of 8
(5,739 Views)

Have the same issue with https://bionichaos.com/IEEG_2.html vs. http://bionichaos.com/IEEG_2.html that works perfectly well. The same CA certificate doesn't seem to work for the Web VI on the same page. Any chance to resolve this without a third party tool? 

yura_beno_0-1664356840565.png

Any advice would be great, thank you!

0 Kudos
Message 3 of 8
(3,775 Views)

Do you have the CA trust chain for your certificate? You can try adding that to your certificate after the client certificate. I believe there is a way to add CA trust certificates to the CA bundle NI uses but I don't recall where that file is located. Trying to find it now.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 8
(3,758 Views)

I have to read more about CA trust chains but the certificate seem to work okay on the main site, surprisingly excluding its public IP https://60.242.13.176:8081/Bionichaos/HTTP_iEEG_16Chan_V_1_2?offset=0&count=1 so use a non secure http://60.242.13.176:8002/Bionichaos/HTTP_iEEG_16Chan_V_1_2?offset=0&count=1 for now. I tried many different certificates already...

Is it possible to host LV webservices directly on IIS10 just so the functional CA certificate works on the entire service? Tried copying C:\ProgramData\National Instruments\WebServices\aws\Bionichaos to C:\inetpub\wwwroot\Bionichaos_Default Web Server\  but not able to access the webservice on the same domain https://bionichaos.com/

LabVIEW Web Services FAQ - NI Is it safe to assume that the contents of this folder would be the same as bionichaos.lvws zip file that I couldn't find?

Any suggestions would be greatly appreciated.

yura_beno_1-1664454589086.png

 

0 Kudos
Message 5 of 8
(3,724 Views)

Just noticed that the SSL certificate is disappearing from http://localhost:3582/web-config/manage-ssl after reboot, any ideas why?

yura_beno_0-1664623986709.png

Thank you in advance

 

0 Kudos
Message 6 of 8
(3,698 Views)

Do you mean this folder? C:\Program Files (x86)\National Instruments\Shared\nicurl

0 Kudos
Message 7 of 8
(3,645 Views)

Or is it \National Instruments\certstore\server_certs

Still trying to find how to add a whole certificate chain

web-config/manage-ssl will only take a single .cer file 

yura_beno_0-1669544346123.png

 

0 Kudos
Message 8 of 8
(3,423 Views)