diff options
author | Corentin LABBE <clabbe@baylibre.com> | 2018-07-04 14:45:58 +0200 |
---|---|---|
committer | Corentin LABBE <clabbe@baylibre.com> | 2018-07-23 16:20:48 +0200 |
commit | d42030d39800b930634dba1efafcf43959c40205 (patch) | |
tree | dd9bc68db2a8e763fc1032503a85ec9342568185 /lava-master/scripts | |
parent | 0f09e5c9b89cee21a6ee39db9daf8e17525dd493 (diff) |
Handle ZMQ auth
This patch add support for using ZMQ auth.
Basicly adding "zmq_auth: True" to a master is sufficient to enable it.
Since "ZMQ certificates" are using a custom format (vs X509 classic), we need to use the custom generator.
For helping with that a temporary docker is generated which handle generating thoses files.
Diffstat (limited to 'lava-master/scripts')
-rwxr-xr-x | lava-master/scripts/setup.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lava-master/scripts/setup.sh b/lava-master/scripts/setup.sh index 6ab0663..c7807dc 100755 --- a/lava-master/scripts/setup.sh +++ b/lava-master/scripts/setup.sh @@ -118,3 +118,12 @@ do lava-server manage devices add --device-type $devicetype --worker $worker $devicename || exit $? done done + +if [ -e /etc/lava-dispatcher/certificates.d/$(hostname).key ];then + echo "INFO: Enabling encryption" + sed -i 's,.*ENCRYPT=.*,ENCRYPT="--encrypt",' /etc/lava-server/lava-master || exit $? + sed -i 's,.*MASTER_CERT=.*,MASTER_CERT="--master-cert /etc/lava-dispatcher/certificates.d/$(hostname).key_secret",' /etc/lava-server/lava-master || exit $? + sed -i 's,.*ENCRYPT=.*,ENCRYPT="--encrypt",' /etc/lava-server/lava-logs || exit $? + sed -i 's,.*MASTER_CERT=.*,MASTER_CERT="--master-cert /etc/lava-dispatcher/certificates.d/$(hostname).key_secret",' /etc/lava-server/lava-logs || exit $? +fi +exit 0 |