Enable HTTPS¶
Why HTTPS matters
Web browsers such as Chrome require Drovio Server to be accessed over HTTPS for a user to share their microphone and / or webcam from the web client.
Steps¶
-
Get a certificate, an intermediary certificate and a private key (
.crt/.keyor.pem) from your CA. They are nameddrovioserver.crt,ca.crtanddrovioserver.keyin the following commands. -
On the machine where Drovio Server is deployed, run the following commands. Replace
eUv4ffT4with a password of your own andyour_hostnamewith the hostname the certificate was issued for. The first command deletes the existing keystore so the import starts from a clean file; back it up first if you have one you care about. This is not the SAML keystore, which is a separate file pointed to byusers.auth.saml.keystore.rm /etc/drovio-server/keystore.jks openssl pkcs12 -export -in drovioserver.crt -inkey drovioserver.key \ -certfile ca.crt -out pkcs2.p12 -name your_hostname -password pass:eUv4ffT4 keytool -importkeystore -deststorepass eUv4ffT4 -destkeypass eUv4ffT4 \ -destkeystore /etc/drovio-server/keystore.jks \ -srckeystore pkcs2.p12 -srcstoretype PKCS12 -srcstorepass eUv4ffT4 \ -alias your_hostnameRemove
C:\ProgramData\Drovio\Drovio Server\keystore.jks, then:openssl pkcs12 -export -in drovioserver.crt -inkey drovioserver.key ^ -certfile ca.crt -out pkcs2.p12 -name your_hostname -password pass:eUv4ffT4 keytool -importkeystore -deststorepass eUv4ffT4 -destkeypass eUv4ffT4 ^ -destkeystore "C:\ProgramData\Drovio\Drovio Server\keystore.jks" ^ -srckeystore pkcs2.p12 -srcstoretype PKCS12 -srcstorepass eUv4ffT4 ^ -alias your_hostnameWindows tooling
- Download OpenSSL binaries, e.g. from https://indy.fulgan.com/SSL/.
- The
keytoolcommand is located in the Java JREbinfolder, already installed underC:\Program Files\Java\along with Drovio Server.
-
Change the following fields in the configuration file (or directly from the administration panel), in the
httpsection:"tls": true, "keystore": "/etc/drovio-server/keystore.jks", "keystore_password": "eUv4ffT4", "https_port": 443Setting
https_portmatters: enabling TLS alone leaves the server listening on its default port8090.The keystore password is stored in clear text
settings.confnow holds a secret. Make sure the file is only readable by the account running Drovio Server. -
Restart the Drovio Server service. Unlike most of the configuration, everything that defines the HTTP listener is read once at startup, so a restart is required here. See Start and stop the service for your platform.
-
Check the result, from another machine:
The output must show your certificate and the intermediary certificate. A missing intermediary is the most common mistake: some browsers will still accept the connection while the Drovio app refuses it.
Renewing the certificate¶
The keystore holds a copy of the certificate, not a reference to it, so a renewed certificate has to be imported again: replay step 2 every time, which happens every 90 days with Let's Encrypt.
On Linux, send SIGUSR2 to Drovio Server to apply it: the keystore is reloaded
from disk and the certificate is swapped on the live listener, without dropping a
single connection:
The log line SSL certificate has been reloaded confirms it. A failure is reported
as SSL certificate reloading has failed, and the previous certificate stays in
use.
Scripting the renewal
This makes the renewal fully automatable: have your ACME client run step 2 in its deploy hook, then send the signal. No restart, no maintenance window.
Windows
Signals are not registered on Windows. There, applying a renewed certificate requires restarting the service.
Protocols and cipher suites¶
TLS 1.2 and TLS 1.3 are enabled by default. To restrict them, or to pin a list of
cipher suites, use
http.tls_protocols and http.tls_cipher_suites.