LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Embedded Webservice Configuration

Dear all,

 

I am working on a SSL implementation of the embedded webserver provided by LabVIEW (2020 SP1 - Windows 10), and have a few questions about it.

The final application should work on a computer, on which a connexion to the internet is not garantied. This means the computer can have only connexion to private network, on same submask. The idea is to provide an embedded webserver to be able to manage the application from another computer, phone or tablet in the same submask.

1) Start/Stop embedded webserver
Question: Is it possible to start/stop the embedded Webserver in the Runtime environment.

 

The Application/Property note "webserver ON/OFF" acts on the NI Web Server, not on the embedded web server. Also in an Executable. As well as the  Application/Property note "New start" does not work in executables, only in development environment.

 

2) Load private Key by the embedded webserver
Question: Is it possible to load the web server certificate without publishing the companion private key.


<VirtualHost :8003>

SSLCertificateFile "Resource\cert\JMmsInputPad.cer"

SSLCertificateKeyFile "Resource\cert\JMmsInputPad.key"

</VirtualHost>

                In the configuration file for the embedded web server, the private key file path has to be provided. This means, that the private key file has to be really present on the computer hard disk, which is not really safe. How is it possible to load a certificate without specifying a private key? This means, for example, is it possible to load a certificate containing a private key inside? Or to specify only the certificate and the private key is loaded from the same place, but without specifying? This will be a first step. The better solution would be to load the certificate chain and the key information from a secured storage and to inject it (by manually web server start)  in the webserver. Similarly to the TLS functionality (“Add private key to TLS configuration.vi”).

 

3) http to https traffic redirection
Question: Which entry in the embedded webserver configuration file is mandatory to ensure http to https traffic redirection?

Similarly, to e.g. https://linuxize.com/post/redirect-http-to-https-in-apache/.

 

4) Web server configuration file documentation

Question : Where can I find a documentation to the entries in the web server configuration file (niembeddedws.conf or other webserver configuration files)?

 

Thank you in advance

0 Kudos
Message 1 of 5
(1,004 Views)

Hi all,

 

It would be great if the would be an answer to this question above. I am doing something similar and I am experiencing problems with deploying my LabVIEW executable when SSL is active. Whithout SSL everything works just fine but when I activate SSL then the web service is no longer available whe the executable is running. One of my guesses was tha there must be something in the .config file that went wrong.

Greets

0 Kudos
Message 2 of 5
(362 Views)

Dear all,

 

I tried the solution suggested by this post: 

SSL TLS Support - NI Community

which proposes using Stunnel to change your HTTP requests them into HTTPS.

 

That works.

 

It would be good if this would work out the box for the embedded server in LabVIEW, though.

 

Greets

0 Kudos
Message 3 of 5
(337 Views)

Here my Answer to theses questions:
1) I use some rendez-vous to synchronise the start of the webserver and the main application

2) Using .NET DLL I produce self-signed certificates. 

3) I have checked both http and https in the build option, so that both are available. I reject non https request

4) No documentation available. Only try process....

0 Kudos
Message 4 of 5
(329 Views)

Hi AdelinaL,

 

in my case I have the following scenario:

 

- The webserver starts only after a flag has been set from the configuration of the main application.

- I have own generated certificates where I am the CA as well

- When I use the HTTP option, the webserver works

- If I usen both HTTP and HTTPS option, then the server does not work

- If I use HTTPs only, the server would no work either.

 

I was thinking that there might be a problem with my certificates but with stunnel everything works so far.

0 Kudos
Message 5 of 5
(316 Views)