Browse Source

jicofo: fix setting incorrect auth URL scheme for JWT

Saúl Ibarra Corretgé 5 years ago
parent
commit
abf2f73a95
2 changed files with 12 additions and 4 deletions
  1. 1 0
      docker-compose.yml
  2. 11 4
      jicofo/rootfs/defaults/sip-communicator.properties

+ 1 - 0
docker-compose.yml

@@ -115,6 +115,7 @@ services:
         volumes:
             - ${CONFIG}/jicofo:/config:Z
         environment:
+            - AUTH_TYPE
             - ENABLE_AUTH
             - XMPP_DOMAIN
             - XMPP_AUTH_DOMAIN

+ 11 - 4
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 }}