jitsi-meet.cfg.lua 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. {{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" -}}
  2. {{ $C2S_REQUIRE_ENCRYPTION := .Env.PROSODY_C2S_REQUIRE_ENCRYPTION | default "1" | toBool -}}
  3. {{ $DISABLE_POLLS := .Env.DISABLE_POLLS | default "false" | toBool -}}
  4. {{ $ENABLE_APP_SECRET := .Env.JWT_APP_SECRET | default "false" | toBool -}}
  5. {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool -}}
  6. {{ $ENABLE_AV_MODERATION := .Env.ENABLE_AV_MODERATION | default "true" | toBool -}}
  7. {{ $ENABLE_BREAKOUT_ROOMS := .Env.ENABLE_BREAKOUT_ROOMS | default "true" | toBool -}}
  8. {{ $ENABLE_END_CONFERENCE := .Env.ENABLE_END_CONFERENCE | default "true" | toBool -}}
  9. {{ $ENABLE_GUEST_DOMAIN := and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool) -}}
  10. {{ $ENABLE_JAAS_COMPONENTS := .Env.ENABLE_JAAS_COMPONENTS | default "0" | toBool -}}
  11. {{ $ENABLE_LOBBY := .Env.ENABLE_LOBBY | default "true" | toBool -}}
  12. {{ $ENABLE_RATE_LIMITS := .Env.PROSODY_ENABLE_RATE_LIMITS | default "0" | toBool -}}
  13. {{ $ENABLE_RECORDING := .Env.ENABLE_RECORDING | default "0" | toBool -}}
  14. {{ $ENABLE_RECORDING_METADATA := .Env.PROSODY_ENABLE_RECORDING_METADATA | default "1" | toBool -}}
  15. {{ $ENABLE_SUBDOMAINS := .Env.ENABLE_SUBDOMAINS | default "true" | toBool -}}
  16. {{ $ENABLE_TRANSCRIPTIONS := .Env.ENABLE_TRANSCRIPTIONS | default "0" | toBool -}}
  17. {{ $ENABLE_VISITORS := .Env.ENABLE_VISITORS | default "0" | toBool -}}
  18. {{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "1" | toBool -}}
  19. {{ $ENV := .Env -}}
  20. {{ $GUEST_AUTH_TYPE := .Env.PROSODY_GUEST_AUTH_TYPE | default "jitsi-anonymous" -}}
  21. {{ $JIBRI_RECORDER_USER := .Env.JIBRI_RECORDER_USER | default "recorder" -}}
  22. {{ $JIBRI_XMPP_USER := .Env.JIBRI_XMPP_USER | default "jibri" -}}
  23. {{ $JIGASI_TRANSCRIBER_USER := .Env.JIGASI_TRANSCRIBER_USER | default "transcriber" -}}
  24. {{ $JIGASI_XMPP_USER := .Env.JIGASI_XMPP_USER | default "jigasi" -}}
  25. {{ $JVB_AUTH_USER := .Env.JVB_AUTH_USER | default "jvb" -}}
  26. {{ $JWT_ALLOW_EMPTY := .Env.JWT_ALLOW_EMPTY | default "0" | toBool -}}
  27. {{ $JWT_ASAP_KEYSERVER := .Env.JWT_ASAP_KEYSERVER | default "" -}}
  28. {{ $JWT_AUTH_TYPE := .Env.JWT_AUTH_TYPE | default "token" -}}
  29. {{ $JWT_ENABLE_DOMAIN_VERIFICATION := .Env.JWT_ENABLE_DOMAIN_VERIFICATION | default "false" | toBool -}}
  30. {{ $JWT_TOKEN_AUTH_MODULE := .Env.JWT_TOKEN_AUTH_MODULE | default "token_verification" -}}
  31. {{ $MATRIX_LOBBY_BYPASS := .Env.MATRIX_LOBBY_BYPASS | default "0" | toBool -}}
  32. {{ $MATRIX_UVS_ISSUER := .Env.MATRIX_UVS_ISSUER | default "issuer" -}}
  33. {{ $MATRIX_UVS_SYNC_POWER_LEVELS := .Env.MATRIX_UVS_SYNC_POWER_LEVELS | default "0" | toBool -}}
  34. {{ $PROSODY_AUTH_TYPE := .Env.PROSODY_AUTH_TYPE | default $AUTH_TYPE -}}
  35. {{ $PROSODY_RESERVATION_ENABLED := .Env.PROSODY_RESERVATION_ENABLED | default "false" | toBool -}}
  36. {{ $PROSODY_RESERVATION_REST_BASE_URL := .Env.PROSODY_RESERVATION_REST_BASE_URL | default "" -}}
  37. {{ $PUBLIC_URL := .Env.PUBLIC_URL | default "https://localhost:8443" -}}
  38. {{ $PUBLIC_URL_DOMAIN := $PUBLIC_URL | trimPrefix "https://" | trimSuffix "/" -}}
  39. {{ $RATE_LIMIT_ALLOW_RANGES := .Env.PROSODY_RATE_LIMIT_ALLOW_RANGES | default "10.0.0.0/8" -}}
  40. {{ $RATE_LIMIT_CACHE_SIZE := .Env.PROSODY_RATE_LIMIT_CACHE_SIZE | default "10000" -}}
  41. {{ $RATE_LIMIT_LOGIN_RATE := .Env.PROSODY_RATE_LIMIT_LOGIN_RATE | default "3" -}}
  42. {{ $RATE_LIMIT_SESSION_RATE := .Env.PROSODY_RATE_LIMIT_SESSION_RATE | default "200" -}}
  43. {{ $RATE_LIMIT_TIMEOUT := .Env.PROSODY_RATE_LIMIT_TIMEOUT | default "60" -}}
  44. {{ $STUN_HOST := .Env.STUN_HOST | default "" -}}
  45. {{ $STUN_PORT := .Env.STUN_PORT | default "443" -}}
  46. {{ $TURNS_HOST := .Env.TURNS_HOST | default "" -}}
  47. {{ $TURNS_HOSTS := splitList "," $TURNS_HOST -}}
  48. {{ $TURNS_PORT := .Env.TURNS_PORT | default "443" -}}
  49. {{ $TURN_HOST := .Env.TURN_HOST | default "" -}}
  50. {{ $TURN_HOSTS := splitList "," $TURN_HOST -}}
  51. {{ $TURN_PORT := .Env.TURN_PORT | default "443" -}}
  52. {{ $TURN_TRANSPORT := .Env.TURN_TRANSPORT | default "tcp" -}}
  53. {{ $TURN_TRANSPORTS := splitList "," $TURN_TRANSPORT -}}
  54. {{ $TURN_TTL := .Env.TURN_TTL | default "86400" -}}
  55. {{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}}
  56. {{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}}
  57. {{ $XMPP_GUEST_DOMAIN := .Env.XMPP_GUEST_DOMAIN | default "guest.meet.jitsi" -}}
  58. {{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}}
  59. {{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}}
  60. {{ $XMPP_MUC_DOMAIN_PREFIX := (split "." $XMPP_MUC_DOMAIN)._0 -}}
  61. {{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}}
  62. admins = {
  63. {{ if .Env.JIGASI_XMPP_PASSWORD }}
  64. "{{ $JIGASI_XMPP_USER }}@{{ $XMPP_AUTH_DOMAIN }}",
  65. {{ end }}
  66. {{ if .Env.JIBRI_XMPP_PASSWORD }}
  67. "{{ $JIBRI_XMPP_USER }}@{{ $XMPP_AUTH_DOMAIN }}",
  68. {{ end }}
  69. "focus@{{ $XMPP_AUTH_DOMAIN }}",
  70. "{{ $JVB_AUTH_USER }}@{{ $XMPP_AUTH_DOMAIN }}"
  71. }
  72. unlimited_jids = {
  73. "focus@{{ $XMPP_AUTH_DOMAIN }}",
  74. "{{ $JVB_AUTH_USER }}@{{ $XMPP_AUTH_DOMAIN }}"
  75. }
  76. plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom", "/prosody-plugins-contrib" }
  77. muc_mapper_domain_base = "{{ $XMPP_DOMAIN }}";
  78. muc_mapper_domain_prefix = "{{ $XMPP_MUC_DOMAIN_PREFIX }}";
  79. http_default_host = "{{ $XMPP_DOMAIN }}"
  80. {{ if .Env.TURN_CREDENTIALS -}}
  81. external_service_secret = "{{.Env.TURN_CREDENTIALS}}";
  82. {{- end }}
  83. {{ if or .Env.STUN_HOST .Env.TURN_HOST .Env.TURNS_HOST -}}
  84. external_services = {
  85. {{- if $STUN_HOST }}
  86. { type = "stun", host = "{{ $STUN_HOST }}", port = {{ $STUN_PORT }}, transport = "udp" }
  87. {{- end }}
  88. {{- if $TURN_HOST -}}
  89. {{- range $idx1, $host := $TURN_HOSTS -}}
  90. {{- range $idx2, $transport := $TURN_TRANSPORTS -}}
  91. {{- if or $STUN_HOST $idx1 $idx2 -}},{{- end }}
  92. { type = "turn", host = "{{ $host }}", port = {{ $TURN_PORT }}, transport = "{{ $transport }}", secret = true, ttl = {{ $TURN_TTL }}, algorithm = "turn" }
  93. {{- end -}}
  94. {{- end -}}
  95. {{- end -}}
  96. {{- if $TURNS_HOST -}}
  97. {{- range $idx, $host := $TURNS_HOSTS -}}
  98. {{- if or $STUN_HOST $TURN_HOST $idx -}},{{- end }}
  99. { type = "turns", host = "{{ $host }}", port = {{ $TURNS_PORT }}, transport = "tcp", secret = true, ttl = {{ $TURN_TTL }}, algorithm = "turn" }
  100. {{- end }}
  101. {{- end }}
  102. };
  103. {{- end }}
  104. {{ if and $ENABLE_AUTH (or (eq $PROSODY_AUTH_TYPE "jwt") (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token")) .Env.JWT_ACCEPTED_ISSUERS }}
  105. asap_accepted_issuers = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_ISSUERS) }}" }
  106. {{ end }}
  107. {{ if and $ENABLE_AUTH (or (eq $PROSODY_AUTH_TYPE "jwt") (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token")) .Env.JWT_ACCEPTED_AUDIENCES }}
  108. asap_accepted_audiences = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_AUDIENCES) }}" }
  109. {{ end }}
  110. consider_bosh_secure = true;
  111. consider_websocket_secure = true;
  112. {{ if $ENABLE_XMPP_WEBSOCKET }}
  113. smacks_max_unacked_stanzas = 5;
  114. smacks_hibernation_time = 60;
  115. smacks_max_old_sessions = 1;
  116. {{ end }}
  117. {{ if $ENABLE_JAAS_COMPONENTS }}
  118. VirtualHost "jigasi.meet.jitsi"
  119. modules_enabled = {
  120. "bosh";
  121. "muc_password_check";
  122. }
  123. authentication = "token"
  124. app_id = "jitsi";
  125. asap_key_server = "https://jaas-public-keys.jitsi.net/jitsi-components/prod-8x8"
  126. asap_accepted_issuers = { "jaas-components" }
  127. asap_accepted_audiences = { "jigasi.{{ $PUBLIC_URL_DOMAIN }}" }
  128. {{ end }}
  129. VirtualHost "{{ $XMPP_DOMAIN }}"
  130. {{ if $ENABLE_AUTH }}
  131. {{ if eq $PROSODY_AUTH_TYPE "jwt" }}
  132. {{ if .Env.JWT_SIGN_TYPE }}
  133. signature_algorithm = "{{ .Env.JWT_SIGN_TYPE }}"
  134. {{ end -}}
  135. authentication = "{{ $JWT_AUTH_TYPE }}"
  136. app_id = "{{ .Env.JWT_APP_ID }}"
  137. {{ if $ENABLE_APP_SECRET }}
  138. app_secret = "{{ .Env.JWT_APP_SECRET }}"
  139. {{ end }}
  140. allow_empty_token = {{ $JWT_ALLOW_EMPTY }}
  141. {{ if $JWT_ASAP_KEYSERVER }}
  142. asap_key_server = "{{ .Env.JWT_ASAP_KEYSERVER }}"
  143. {{ end }}
  144. enable_domain_verification = {{ $JWT_ENABLE_DOMAIN_VERIFICATION }}
  145. {{ else if eq $PROSODY_AUTH_TYPE "ldap" }}
  146. authentication = "cyrus"
  147. cyrus_application_name = "xmpp"
  148. allow_unencrypted_plain_auth = true
  149. {{ else if eq $PROSODY_AUTH_TYPE "matrix" }}
  150. authentication = "matrix_user_verification"
  151. app_id = "{{ $MATRIX_UVS_ISSUER }}"
  152. uvs_base_url = "{{ .Env.MATRIX_UVS_URL }}"
  153. {{ if .Env.MATRIX_UVS_AUTH_TOKEN }}
  154. uvs_auth_token = "{{ .Env.MATRIX_UVS_AUTH_TOKEN }}"
  155. {{ end }}
  156. {{ if $MATRIX_UVS_SYNC_POWER_LEVELS }}
  157. uvs_sync_power_levels = true
  158. {{ end }}
  159. {{ else if eq $PROSODY_AUTH_TYPE "hybrid_matrix_token" }}
  160. authentication = "hybrid_matrix_token"
  161. app_id = "{{ .Env.JWT_APP_ID }}"
  162. {{ if $ENABLE_APP_SECRET }}
  163. app_secret = "{{ .Env.JWT_APP_SECRET }}"
  164. {{ end }}
  165. allow_empty_token = {{ $JWT_ALLOW_EMPTY }}
  166. enable_domain_verification = {{ $JWT_ENABLE_DOMAIN_VERIFICATION }}
  167. uvs_base_url = "{{ .Env.MATRIX_UVS_URL }}"
  168. {{ if .Env.MATRIX_UVS_ISSUER }}
  169. uvs_issuer = "{{ .Env.MATRIX_UVS_ISSUER }}"
  170. {{ end }}
  171. {{ if .Env.MATRIX_UVS_AUTH_TOKEN }}
  172. uvs_auth_token = "{{ .Env.MATRIX_UVS_AUTH_TOKEN }}"
  173. {{ end }}
  174. {{ else if eq $PROSODY_AUTH_TYPE "internal" }}
  175. authentication = "internal_hashed"
  176. {{ end }}
  177. {{ else }}
  178. authentication = "jitsi-anonymous"
  179. {{ end }}
  180. ssl = {
  181. key = "/config/certs/{{ $XMPP_DOMAIN }}.key";
  182. certificate = "/config/certs/{{ $XMPP_DOMAIN }}.crt";
  183. }
  184. modules_enabled = {
  185. "bosh";
  186. {{ if $ENABLE_XMPP_WEBSOCKET }}
  187. "websocket";
  188. "smacks"; -- XEP-0198: Stream Management
  189. {{ end }}
  190. "speakerstats";
  191. "conference_duration";
  192. "room_metadata";
  193. {{ if $ENABLE_END_CONFERENCE }}
  194. "end_conference";
  195. {{ end }}
  196. {{ if or .Env.TURN_HOST .Env.TURNS_HOST }}
  197. "external_services";
  198. {{ end }}
  199. {{ if $ENABLE_LOBBY }}
  200. "muc_lobby_rooms";
  201. {{ end }}
  202. {{ if $ENABLE_BREAKOUT_ROOMS }}
  203. "muc_breakout_rooms";
  204. {{ end }}
  205. {{ if $ENABLE_AV_MODERATION }}
  206. "av_moderation";
  207. {{ end }}
  208. {{ if .Env.XMPP_MODULES }}
  209. "{{ join "\";\n \"" (splitList "," .Env.XMPP_MODULES) }}";
  210. {{ end }}
  211. {{ if and $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "ldap") }}
  212. "auth_cyrus";
  213. {{end}}
  214. {{ if $PROSODY_RESERVATION_ENABLED }}
  215. "reservations";
  216. {{ end }}
  217. {{ if $ENABLE_VISITORS }}
  218. "visitors";
  219. {{ end }}
  220. {{- if and $ENABLE_RECORDING_METADATA $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "jwt") $ENABLE_RECORDING }}
  221. "jibri_session";
  222. {{- end }}
  223. }
  224. main_muc = "{{ $XMPP_MUC_DOMAIN }}"
  225. room_metadata_component = "metadata.{{ $XMPP_DOMAIN }}"
  226. {{ if $ENABLE_LOBBY }}
  227. lobby_muc = "lobby.{{ $XMPP_DOMAIN }}"
  228. {{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS }}
  229. muc_lobby_whitelist = { "{{ $XMPP_RECORDER_DOMAIN }}" }
  230. {{ end }}
  231. {{ end }}
  232. {{ if $PROSODY_RESERVATION_ENABLED }}
  233. reservations_api_prefix = "{{ $PROSODY_RESERVATION_REST_BASE_URL }}"
  234. {{ end }}
  235. {{ if $ENABLE_BREAKOUT_ROOMS }}
  236. breakout_rooms_muc = "breakout.{{ $XMPP_DOMAIN }}"
  237. {{ end }}
  238. speakerstats_component = "speakerstats.{{ $XMPP_DOMAIN }}"
  239. conference_duration_component = "conferenceduration.{{ $XMPP_DOMAIN }}"
  240. {{ if $ENABLE_END_CONFERENCE }}
  241. end_conference_component = "endconference.{{ $XMPP_DOMAIN }}"
  242. {{ end }}
  243. {{ if $ENABLE_AV_MODERATION }}
  244. av_moderation_component = "avmoderation.{{ $XMPP_DOMAIN }}"
  245. {{ end }}
  246. c2s_require_encryption = {{ $C2S_REQUIRE_ENCRYPTION }}
  247. {{ if $ENABLE_VISITORS -}}
  248. visitors_ignore_list = { "{{ $XMPP_RECORDER_DOMAIN }}" }
  249. {{ end }}
  250. {{ if .Env.XMPP_CONFIGURATION -}}
  251. {{ join "\n " (splitList "," .Env.XMPP_CONFIGURATION) }}
  252. {{ end -}}
  253. {{ if $ENABLE_GUEST_DOMAIN }}
  254. VirtualHost "{{ $XMPP_GUEST_DOMAIN }}"
  255. authentication = "{{ $GUEST_AUTH_TYPE }}"
  256. modules_enabled = {
  257. {{ if $ENABLE_XMPP_WEBSOCKET }}
  258. "smacks"; -- XEP-0198: Stream Management
  259. {{ end }}
  260. }
  261. c2s_require_encryption = {{ $C2S_REQUIRE_ENCRYPTION }}
  262. {{ if $ENABLE_VISITORS }}
  263. allow_anonymous_s2s = true
  264. {{ end }}
  265. {{ end }}
  266. VirtualHost "{{ $XMPP_AUTH_DOMAIN }}"
  267. ssl = {
  268. key = "/config/certs/{{ $XMPP_AUTH_DOMAIN }}.key";
  269. certificate = "/config/certs/{{ $XMPP_AUTH_DOMAIN }}.crt";
  270. }
  271. modules_enabled = {
  272. "limits_exception";
  273. {{- if and $ENABLE_RECORDING_METADATA $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "jwt") $ENABLE_RECORDING }}
  274. "jibri_session";
  275. {{- end }}
  276. }
  277. authentication = "internal_hashed"
  278. {{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS }}
  279. VirtualHost "{{ $XMPP_RECORDER_DOMAIN }}"
  280. modules_enabled = {
  281. "smacks";
  282. }
  283. authentication = "internal_hashed"
  284. {{ end }}
  285. Component "{{ $XMPP_INTERNAL_MUC_DOMAIN }}" "muc"
  286. storage = "memory"
  287. modules_enabled = {
  288. "muc_hide_all";
  289. "muc_filter_access";
  290. {{ if .Env.XMPP_INTERNAL_MUC_MODULES -}}
  291. "{{ join "\";\n\"" (splitList "," .Env.XMPP_INTERNAL_MUC_MODULES) }}";
  292. {{ end -}}
  293. }
  294. restrict_room_creation = true
  295. muc_filter_whitelist="{{ $XMPP_AUTH_DOMAIN }}"
  296. muc_room_locking = false
  297. muc_room_default_public_jids = true
  298. muc_room_cache_size = 1000
  299. muc_tombstones = false
  300. muc_room_allow_persistent = false
  301. Component "{{ $XMPP_MUC_DOMAIN }}" "muc"
  302. restrict_room_creation = true
  303. storage = "memory"
  304. modules_enabled = {
  305. "muc_meeting_id";
  306. {{ if .Env.XMPP_MUC_MODULES -}}
  307. "{{ join "\";\n \"" (splitList "," .Env.XMPP_MUC_MODULES) }}";
  308. {{ end -}}
  309. {{ if and $ENABLE_AUTH (or (eq $PROSODY_AUTH_TYPE "jwt") (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token")) -}}
  310. "{{ $JWT_TOKEN_AUTH_MODULE }}";
  311. {{ end }}
  312. {{ if and $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "matrix") $MATRIX_UVS_SYNC_POWER_LEVELS -}}
  313. "matrix_power_sync";
  314. {{ end -}}
  315. {{ if and $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token") $MATRIX_UVS_SYNC_POWER_LEVELS -}}
  316. "matrix_affiliation";
  317. {{ end -}}
  318. {{ if and $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token") $MATRIX_LOBBY_BYPASS -}}
  319. "matrix_lobby_bypass";
  320. {{ end -}}
  321. {{ if not $DISABLE_POLLS -}}
  322. "polls";
  323. {{ end -}}
  324. {{ if $ENABLE_SUBDOMAINS -}}
  325. "muc_domain_mapper";
  326. {{ end -}}
  327. {{ if $ENABLE_RATE_LIMITS -}}
  328. "muc_rate_limit";
  329. "rate_limit";
  330. {{ end -}}
  331. {{ if .Env.MAX_PARTICIPANTS }}
  332. "muc_max_occupants";
  333. {{ end }}
  334. "muc_password_whitelist";
  335. }
  336. {{ if $ENABLE_RATE_LIMITS -}}
  337. -- Max allowed join/login rate in events per second.
  338. rate_limit_login_rate = {{ $RATE_LIMIT_LOGIN_RATE }};
  339. -- The rate to which sessions from IPs exceeding the join rate will be limited, in bytes per second.
  340. rate_limit_session_rate = {{ $RATE_LIMIT_SESSION_RATE }};
  341. -- The time in seconds, after which the limit for an IP address is lifted.
  342. rate_limit_timeout = {{ $RATE_LIMIT_TIMEOUT }};
  343. -- List of regular expressions for IP addresses that are not limited by this module.
  344. rate_limit_whitelist = {
  345. "127.0.0.1";
  346. {{ range $index, $cidr := (splitList "," $RATE_LIMIT_ALLOW_RANGES) }}
  347. "{{ $cidr }}";
  348. {{ end }}
  349. };
  350. rate_limit_whitelist_hosts = {
  351. "{{ $XMPP_RECORDER_DOMAIN }}";
  352. }
  353. {{ end -}}
  354. -- The size of the cache that saves state for IP addresses
  355. rate_limit_cache_size = {{ $RATE_LIMIT_CACHE_SIZE }};
  356. muc_room_cache_size = 10000
  357. muc_room_locking = false
  358. muc_room_default_public_jids = true
  359. {{ if .Env.XMPP_MUC_CONFIGURATION -}}
  360. {{ join "\n " (splitList "," .Env.XMPP_MUC_CONFIGURATION) }}
  361. {{ end -}}
  362. {{ if .Env.MAX_PARTICIPANTS }}
  363. muc_access_whitelist = {
  364. "focus@{{ $XMPP_AUTH_DOMAIN }}";
  365. {{- if $ENABLE_RECORDING }}
  366. "{{ $JIBRI_RECORDER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}";
  367. {{- end }}
  368. {{- if $ENABLE_TRANSCRIPTIONS }}
  369. "{{ $JIGASI_TRANSCRIBER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}";
  370. {{- end }}
  371. }
  372. muc_max_occupants = "{{ .Env.MAX_PARTICIPANTS }}"
  373. {{ end }}
  374. muc_password_whitelist = {
  375. "focus@{{ $XMPP_AUTH_DOMAIN }}";
  376. {{- if $ENABLE_RECORDING }}
  377. "{{ $JIBRI_RECORDER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}";
  378. {{- end }}
  379. {{- if $ENABLE_TRANSCRIPTIONS }}
  380. "{{ $JIGASI_TRANSCRIBER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}";
  381. {{- end }}
  382. }
  383. muc_tombstones = false
  384. muc_room_allow_persistent = false
  385. Component "focus.{{ $XMPP_DOMAIN }}" "client_proxy"
  386. target_address = "focus@{{ $XMPP_AUTH_DOMAIN }}"
  387. Component "speakerstats.{{ $XMPP_DOMAIN }}" "speakerstats_component"
  388. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  389. {{- if .Env.XMPP_SPEAKERSTATS_MODULES }}
  390. modules_enabled = {
  391. "{{ join "\";\n \"" (splitList "," .Env.XMPP_SPEAKERSTATS_MODULES) }}";
  392. }
  393. {{- end }}
  394. Component "conferenceduration.{{ $XMPP_DOMAIN }}" "conference_duration_component"
  395. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  396. {{ if $ENABLE_END_CONFERENCE }}
  397. Component "endconference.{{ $XMPP_DOMAIN }}" "end_conference"
  398. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  399. {{ end }}
  400. {{ if $ENABLE_AV_MODERATION }}
  401. Component "avmoderation.{{ $XMPP_DOMAIN }}" "av_moderation_component"
  402. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  403. {{ end }}
  404. {{ if $ENABLE_LOBBY }}
  405. Component "lobby.{{ $XMPP_DOMAIN }}" "muc"
  406. storage = "memory"
  407. restrict_room_creation = true
  408. muc_tombstones = false
  409. muc_room_allow_persistent = false
  410. muc_room_cache_size = 10000
  411. muc_room_locking = false
  412. muc_room_default_public_jids = true
  413. modules_enabled = {
  414. {{ if $ENABLE_RATE_LIMITS -}}
  415. "muc_rate_limit";
  416. {{ end -}}
  417. {{ if .Env.XMPP_LOBBY_MUC_MODULES -}}
  418. "{{ join "\";\n \"" (splitList "," .Env.XMPP_LOBBY_MUC_MODULES) }}";
  419. {{ end -}}
  420. }
  421. {{ end }}
  422. {{ if $ENABLE_BREAKOUT_ROOMS }}
  423. Component "breakout.{{ $XMPP_DOMAIN }}" "muc"
  424. storage = "memory"
  425. restrict_room_creation = true
  426. muc_room_cache_size = 10000
  427. muc_room_locking = false
  428. muc_room_default_public_jids = true
  429. muc_tombstones = false
  430. muc_room_allow_persistent = false
  431. modules_enabled = {
  432. "muc_meeting_id";
  433. {{ if not $DISABLE_POLLS -}}
  434. "polls";
  435. {{ end -}}
  436. {{ if $ENABLE_RATE_LIMITS -}}
  437. "muc_rate_limit";
  438. {{ end -}}
  439. {{ if .Env.XMPP_BREAKOUT_MUC_MODULES -}}
  440. "{{ join "\";\n \"" (splitList "," .Env.XMPP_BREAKOUT_MUC_MODULES) }}";
  441. {{ end -}}
  442. }
  443. {{ end }}
  444. Component "metadata.{{ $XMPP_DOMAIN }}" "room_metadata_component"
  445. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  446. breakout_rooms_component = "breakout.{{ $XMPP_DOMAIN }}"
  447. {{ if $ENABLE_VISITORS }}
  448. Component "visitors.{{ $XMPP_DOMAIN }}" "visitors_component"
  449. auto_allow_visitor_promotion = true
  450. always_visitors_enabled = true
  451. {{ end }}