Parcourir la source

feat(jigasi): Adds trusted domains option.

damencho il y a 1 an
Parent
commit
cae1e40
2 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 1 0
      docker-compose.yml
  2. 7 0
      jigasi/rootfs/defaults/sip-communicator.properties

+ 1 - 0
docker-compose.yml

@@ -362,6 +362,7 @@ services:
             - JIBRI_PENDING_TIMEOUT
             - JIGASI_BREWERY_MUC
             - JIGASI_SIP_URI
+            - JIGASI_TRUSTED_DOMAINS
             - JVB_BREWERY_MUC
             - JVB_XMPP_AUTH_DOMAIN
             - JVB_XMPP_INTERNAL_MUC_DOMAIN

+ 7 - 0
jigasi/rootfs/defaults/sip-communicator.properties

@@ -12,6 +12,8 @@
 {{ $SHUTDOWN_REST_ENABLED := .Env.SHUTDOWN_REST_ENABLED | default "false" | toBool -}}
 {{ $DISABLE_SIP := .Env.JIGASI_DISABLE_SIP | default "false" | toBool -}}
 {{/* assign env from context, preserve during range when . is re-assigned */}}
+{{ $TRUSTED_DOMAIN_LIST := .Env.JIGASI_TRUSTED_DOMAINS | default "" -}}
+{{ $TRUSTED_DOMAINS := splitList "," $TRUSTED_DOMAIN_LIST -}}
 {{ $ENV := .Env -}}
 
 net.java.sip.communicator.impl.protocol.SingleCallInProgressPolicy.enabled=false
@@ -180,3 +182,8 @@ org.jitsi.jigasi.DEFAULT_JVB_ROOM_NAME={{ .Env.JIGASI_SIP_DEFAULT_ROOM }}
 {{ end }}
 
 org.jitsi.jigasi.MUC_SERVICE_ADDRESS={{ $XMPP_MUC_DOMAIN }}
+
+# when checking other participants whether they are jibri/jigasi we can also check the the domain they use for connecting
+{{ if $TRUSTED_DOMAIN_LIST }}
+org.jitsi.jigasi.TRUSTED_DOMAINS=[ {{ range $index, $element := $TRUSTED_DOMAINS }}{{ if gt $index 0 }},{{ end }}"{{ $element }}"{{ end}} ]
+{{ end }}