2
0

jitsi-meet.cfg.lua 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. admins = {
  2. "{{ .Env.JICOFO_AUTH_USER }}@{{ .Env.XMPP_AUTH_DOMAIN }}",
  3. "{{ .Env.JVB_AUTH_USER }}@{{ .Env.XMPP_AUTH_DOMAIN }}"
  4. }
  5. plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom" }
  6. http_default_host = "{{ .Env.XMPP_DOMAIN }}"
  7. {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool }}
  8. {{ $ENABLE_GUEST_DOMAIN := and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool)}}
  9. {{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" }}
  10. {{ $JWT_ASAP_KEYSERVER := .Env.JWT_ASAP_KEYSERVER | default "" }}
  11. {{ $JWT_ALLOW_EMPTY := .Env.JWT_ALLOW_EMPTY | default "0" | toBool }}
  12. {{ $JWT_AUTH_TYPE := .Env.JWT_AUTH_TYPE | default "token" }}
  13. {{ $JWT_TOKEN_AUTH_MODULE := .Env.JWT_TOKEN_AUTH_MODULE | default "token_verification" }}
  14. {{ $ENABLE_LOBBY := .Env.ENABLE_LOBBY | default "0" | toBool }}
  15. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") .Env.JWT_ACCEPTED_ISSUERS }}
  16. asap_accepted_issuers = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_ISSUERS) }}" }
  17. {{ end }}
  18. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") .Env.JWT_ACCEPTED_AUDIENCES }}
  19. asap_accepted_audiences = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_AUDIENCES) }}" }
  20. {{ end }}
  21. VirtualHost "{{ .Env.XMPP_DOMAIN }}"
  22. {{ if $ENABLE_AUTH }}
  23. {{ if eq $AUTH_TYPE "jwt" }}
  24. authentication = "{{ $JWT_AUTH_TYPE }}"
  25. app_id = "{{ .Env.JWT_APP_ID }}"
  26. app_secret = "{{ .Env.JWT_APP_SECRET }}"
  27. allow_empty_token = {{ if $JWT_ALLOW_EMPTY }}true{{ else }}false{{ end }}
  28. {{ if $JWT_ASAP_KEYSERVER }}
  29. asap_key_server = "{{ .Env.JWT_ASAP_KEYSERVER }}"
  30. {{ end }}
  31. {{ else if eq $AUTH_TYPE "ldap" }}
  32. authentication = "cyrus"
  33. cyrus_application_name = "xmpp"
  34. allow_unencrypted_plain_auth = true
  35. {{ else if eq $AUTH_TYPE "internal" }}
  36. authentication = "internal_hashed"
  37. {{ end }}
  38. {{ else }}
  39. authentication = "anonymous"
  40. {{ end }}
  41. ssl = {
  42. key = "/config/certs/{{ .Env.XMPP_DOMAIN }}.key";
  43. certificate = "/config/certs/{{ .Env.XMPP_DOMAIN }}.crt";
  44. }
  45. modules_enabled = {
  46. "bosh";
  47. "pubsub";
  48. "ping";
  49. "speakerstats";
  50. "conference_duration";
  51. {{ if and $ENABLE_LOBBY (not $ENABLE_GUEST_DOMAIN) }}
  52. "muc_lobby_rooms";
  53. {{ end }}
  54. {{ if .Env.XMPP_MODULES }}
  55. "{{ join "\";\n\"" (splitList "," .Env.XMPP_MODULES) }}";
  56. {{ end }}
  57. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "ldap") }}
  58. "auth_cyrus";
  59. {{end}}
  60. }
  61. {{ if and $ENABLE_LOBBY (not $ENABLE_GUEST_DOMAIN) }}
  62. main_muc = "{{ .Env.XMPP_MUC_DOMAIN }}"
  63. lobby_muc = "lobby.{{ .Env.XMPP_DOMAIN }}"
  64. {{ end }}
  65. speakerstats_component = "speakerstats.{{ .Env.XMPP_DOMAIN }}"
  66. conference_duration_component = "conferenceduration.{{ .Env.XMPP_DOMAIN }}"
  67. c2s_require_encryption = false
  68. {{ if $ENABLE_GUEST_DOMAIN }}
  69. VirtualHost "{{ .Env.XMPP_GUEST_DOMAIN }}"
  70. authentication = "anonymous"
  71. c2s_require_encryption = false
  72. {{ if $ENABLE_LOBBY }}
  73. modules_enabled = {
  74. "muc_lobby_rooms";
  75. }
  76. main_muc = "{{ .Env.XMPP_MUC_DOMAIN }}"
  77. lobby_muc = "lobby.{{ .Env.XMPP_DOMAIN }}"
  78. {{ end }}
  79. {{ end }}
  80. VirtualHost "{{ .Env.XMPP_AUTH_DOMAIN }}"
  81. ssl = {
  82. key = "/config/certs/{{ .Env.XMPP_AUTH_DOMAIN }}.key";
  83. certificate = "/config/certs/{{ .Env.XMPP_AUTH_DOMAIN }}.crt";
  84. }
  85. authentication = "internal_hashed"
  86. {{ if .Env.XMPP_RECORDER_DOMAIN }}
  87. VirtualHost "{{ .Env.XMPP_RECORDER_DOMAIN }}"
  88. modules_enabled = {
  89. "ping";
  90. }
  91. authentication = "internal_hashed"
  92. {{ end }}
  93. Component "{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}" "muc"
  94. storage = "memory"
  95. modules_enabled = {
  96. "ping";
  97. {{ if .Env.XMPP_INTERNAL_MUC_MODULES }}
  98. "{{ join "\";\n\"" (splitList "," .Env.XMPP_INTERNAL_MUC_MODULES) }}";
  99. {{ end }}
  100. }
  101. muc_room_locking = false
  102. muc_room_default_public_jids = true
  103. Component "{{ .Env.XMPP_MUC_DOMAIN }}" "muc"
  104. storage = "memory"
  105. modules_enabled = {
  106. "muc_meeting_id";
  107. {{ if .Env.XMPP_MUC_MODULES }}
  108. "{{ join "\";\n\"" (splitList "," .Env.XMPP_MUC_MODULES) }}";
  109. {{ end }}
  110. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") }}
  111. "{{ $JWT_TOKEN_AUTH_MODULE }}";
  112. {{ end }}
  113. }
  114. muc_room_cache_size = 1000
  115. muc_room_locking = false
  116. muc_room_default_public_jids = true
  117. Component "focus.{{ .Env.XMPP_DOMAIN }}"
  118. component_secret = "{{ .Env.JICOFO_COMPONENT_SECRET }}"
  119. Component "speakerstats.{{ .Env.XMPP_DOMAIN }}" "speakerstats_component"
  120. muc_component = "{{ .Env.XMPP_MUC_DOMAIN }}"
  121. Component "conferenceduration.{{ .Env.XMPP_DOMAIN }}" "conference_duration_component"
  122. muc_component = "{{ .Env.XMPP_MUC_DOMAIN }}"
  123. {{ if $ENABLE_LOBBY }}
  124. Component "lobby.{{ .Env.XMPP_DOMAIN }}" "muc"
  125. storage = "memory"
  126. restrict_room_creation = true
  127. muc_room_locking = false
  128. muc_room_default_public_jids = true
  129. {{ end }}