jitsi-meet.cfg.lua 19 KB

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