summaryrefslogtreecommitdiffstats
path: root/lava-slave
diff options
context:
space:
mode:
authorkhilman <khilman@users.noreply.github.com>2018-07-23 09:32:40 -0500
committerGitHub <noreply@github.com>2018-07-23 09:32:40 -0500
commitef276f04512f1808ae7e9fbb2e3b904855486462 (patch)
tree28b055619917fbc254a59586bc6e47d84cf0bf2f /lava-slave
parent45f76344b4278f1ecf9956f3a81bfe11cd525c43 (diff)
parentd42030d39800b930634dba1efafcf43959c40205 (diff)
Merge pull request #33 from montjoie/zmq_auth
Zmq auth
Diffstat (limited to 'lava-slave')
-rw-r--r--lava-slave/Dockerfile2
-rwxr-xr-xlava-slave/scripts/setup.sh8
-rw-r--r--lava-slave/zmq_auth/.empty0
3 files changed, 10 insertions, 0 deletions
diff --git a/lava-slave/Dockerfile b/lava-slave/Dockerfile
index a5b0148..4bd14b4 100644
--- a/lava-slave/Dockerfile
+++ b/lava-slave/Dockerfile
@@ -86,6 +86,8 @@ RUN ssh-keygen -q -f /root/.ssh/id_rsa
RUN cat /root/.ssh/id_rsa.pub > /root/.ssh/authorized_keys
COPY lava-screen.conf /root/
+COPY zmq_auth/ /etc/lava-dispatcher/certificates.d/
+
EXPOSE 69/udp 80
CMD /start.sh
diff --git a/lava-slave/scripts/setup.sh b/lava-slave/scripts/setup.sh
index bf91c7a..e696e57 100755
--- a/lava-slave/scripts/setup.sh
+++ b/lava-slave/scripts/setup.sh
@@ -91,3 +91,11 @@ do
fi
done
done
+
+if [ -e /etc/lava-dispatcher/certificates.d/$(hostname).key ];then
+ echo "INFO: Enabling encryption"
+ sed -i 's,.*ENCRYPT=.*,ENCRYPT="--encrypt",' /etc/lava-dispatcher/lava-slave
+ sed -i "s,.*SLAVE_CERT=.*,SLAVE_CERT=\"--slave-cert /etc/lava-dispatcher/certificates.d/$(hostname).key_secret\"," /etc/lava-dispatcher/lava-slave
+ sed -i "s,.*MASTER_CERT=.*,MASTER_CERT=\"--master-cert /etc/lava-dispatcher/certificates.d/$LAVA_MASTER.key\"," /etc/lava-dispatcher/lava-slave
+fi
+exit 0
diff --git a/lava-slave/zmq_auth/.empty b/lava-slave/zmq_auth/.empty
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lava-slave/zmq_auth/.empty