jitsi-meet.cfg.lua 4.5 KB

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