Enabling SSL for Infoworks VM

Assumption iw_home = /opt/infoworks

NOTE To configure SSL, Infoworks user must be a sudo user.

Create certificates directory

Create /opt/infoworks/certificates:

cd /opt/infoworks
mkdir -p certificates
cd certificates

Generate Certificates (Self-signed)

  1. Download the script to generate certificates at /opt/infoworks/certificates location:

cd /opt/infoworks/certificates
wget
https://iw-saas-setup.s3.us-west-2.amazonaws.com/gen_ssl_cert.sh
  1. Make it executable.

chmod +x gen_ssl_cert.sh
  1. Use this script to generate certificates for the machine’s DNS using the following command:

dns=$(hostname -A)
./gen_ssl_cert.sh $dns

Configuration changes

Changes in platform.conf.template

vi /opt/infoworks/resources/nginx-portable/conf/infoworks/platform.conf.template
  1. Change listen ${PROXY_SERVER_PORT}; to listen ${PROXY_SERVER_PORT} ssl;.

  2. Add the following command:

ssl_certificate /opt/infoworks/certificates/$dns.crt;
ssl_certificate_key /opt/infoworks/certificates/$dns.key;
# ssl_dhparam /opt/infoworks/certificates/dhparam.pem;
  1. In the above command, replace $dns with the value of $dns from the above commands, that is, dns=$(hostname -A).

Changes in nginx.conf

vi /opt/infoworks/resources/nginx-portable/conf/nginx.conf

Line 1:

user infoworks;

Uncomment, and change nobody to infoworks.

Changes in conf.properties

vi conf.properties

Commands:

internal_ip=$(echo $(hostname -i)|grep -Eo "(\\b[0-9]{1,3}\.){3}[0-9]{1,3}\\b"|head -1)
internal_ip_delimited=$(echo "${internal_ip}" | sed -e 's/[]$.*[\^]/\\&/g' )
alias=$(echo $(hostname -A))
fqdn=$(echo $(hostname -f))
cp /opt/infoworks/conf/conf.properties /opt/infoworks/conf/conf.properties.bkp
sed -i "s/$internal_ip_delimited/$alias/g" /opt/infoworks/conf/conf.properties
sed -i "s/$fqdn/$alias/g" /opt/infoworks/conf/conf.properties


sed -i "s/proxy_server_scheme\=http/proxy_server_scheme\=https/g" /opt/infoworks/conf/conf.properties
sed -i "s/proxy_server_port\=3000/proxy_server_port\=443/g" /opt/infoworks/conf/conf.properties


/opt/infoworks/bin/stop.sh all && /opt/infoworks/bin/start.sh all
/opt/infoworks/bin/start.sh ingestion

Infoworks UI

Open infoworks UI at https://internal_ip.

  Last updated