From abf2f73a95b1569198c55fb61453739e348ebd18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 7 May 2020 22:29:52 +0200 Subject: [PATCH] jicofo: fix setting incorrect auth URL scheme for JWT --- docker-compose.yml | 1 + .../rootfs/defaults/sip-communicator.properties | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 311de31..5c9d0f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -115,6 +115,7 @@ services: volumes: - ${CONFIG}/jicofo:/config:Z environment: + - AUTH_TYPE - ENABLE_AUTH - XMPP_DOMAIN - XMPP_AUTH_DOMAIN diff --git a/jicofo/rootfs/defaults/sip-communicator.properties b/jicofo/rootfs/defaults/sip-communicator.properties index c37bd2c..1412e2b 100644 --- a/jicofo/rootfs/defaults/sip-communicator.properties +++ b/jicofo/rootfs/defaults/sip-communicator.properties @@ -10,10 +10,6 @@ org.jitsi.jicofo.jibri.PENDING_TIMEOUT={{ .Env.JIBRI_PENDING_TIMEOUT }} org.jitsi.jicofo.jigasi.BREWERY={{ .Env.JIGASI_BREWERY_MUC}}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }} {{ end }} -{{ if .Env.ENABLE_AUTH | default "0" | toBool }} -org.jitsi.jicofo.auth.URL=XMPP:{{ .Env.XMPP_DOMAIN }} -{{ end }} - {{ if .Env.JICOFO_RESERVATION_REST_BASE_URL }} org.jitsi.impl.reservation.rest.BASE_URL={{ .Env.JICOFO_RESERVATION_REST_BASE_URL }} {{ end }} @@ -21,3 +17,14 @@ org.jitsi.impl.reservation.rest.BASE_URL={{ .Env.JICOFO_RESERVATION_REST_BASE_UR {{ if .Env.JICOFO_ENABLE_HEALTH_CHECKS | default "0" | toBool }} org.jitsi.jicofo.health.ENABLE_HEALTH_CHECKS=true {{ end }} + +{{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool }} +{{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" }} + +{{ if $ENABLE_AUTH }} + {{ if eq $AUTH_TYPE "jwt" }} +org.jitsi.jicofo.auth.URL=EXT_JWT:{{ .Env.XMPP_DOMAIN }} + {{ else }} +org.jitsi.jicofo.auth.URL=XMPP:{{ .Env.XMPP_DOMAIN }} + {{ end }} +{{ end }}