jitsi-meet.cfg.lua 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. admins = { "{{ .Env.JICOFO_AUTH_USER }}@{{ .Env.XMPP_AUTH_DOMAIN }}" }
  2. plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom" }
  3. http_default_host = "{{ .Env.XMPP_DOMAIN }}"
  4. {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool }}
  5. {{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" }}
  6. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") .Env.JWT_ACCEPTED_ISSUERS }}
  7. asap_accepted_issuers = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_ISSUERS) }}" }
  8. {{ end }}
  9. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") .Env.JWT_ACCEPTED_AUDIENCES }}
  10. asap_accepted_audiences = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_AUDIENCES) }}" }
  11. {{ end }}
  12. VirtualHost "{{ .Env.XMPP_DOMAIN }}"
  13. {{ if $ENABLE_AUTH }}
  14. {{ if eq $AUTH_TYPE "jwt" }}
  15. authentication = "token"
  16. app_id = "{{ .Env.JWT_APP_ID }}"
  17. app_secret = "{{ .Env.JWT_APP_SECRET }}"
  18. allow_empty_token = false
  19. {{ else if eq $AUTH_TYPE "ldap" }}
  20. authentication = "cyrus"
  21. cyrus_application_name = "xmpp"
  22. allow_unencrypted_plain_auth = true
  23. {{ else if eq $AUTH_TYPE "internal" }}
  24. authentication = "internal_plain"
  25. {{ end }}
  26. {{ else }}
  27. authentication = "anonymous"
  28. {{ end }}
  29. ssl = {
  30. key = "/config/certs/{{ .Env.XMPP_DOMAIN }}.key";
  31. certificate = "/config/certs/{{ .Env.XMPP_DOMAIN }}.crt";
  32. }
  33. modules_enabled = {
  34. "bosh";
  35. "pubsub";
  36. "ping";
  37. {{ if .Env.XMPP_MODULES }}
  38. "{{ join "\";\n\"" (splitList "," .Env.XMPP_MODULES) }}";
  39. {{ end }}
  40. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "ldap") }}
  41. "auth_cyrus";
  42. {{end}}
  43. }
  44. c2s_require_encryption = false
  45. {{ if and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool) }}
  46. VirtualHost "{{ .Env.XMPP_GUEST_DOMAIN }}"
  47. authentication = "anonymous"
  48. c2s_require_encryption = false
  49. {{ end }}
  50. VirtualHost "{{ .Env.XMPP_AUTH_DOMAIN }}"
  51. ssl = {
  52. key = "/config/certs/{{ .Env.XMPP_AUTH_DOMAIN }}.key";
  53. certificate = "/config/certs/{{ .Env.XMPP_AUTH_DOMAIN }}.crt";
  54. }
  55. authentication = "internal_plain"
  56. Component "{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}" "muc"
  57. modules_enabled = {
  58. "ping";
  59. {{ if .Env.XMPP_INTERNAL_MUC_MODULES }}
  60. "{{ join "\";\n\"" (splitList "," .Env.XMPP_INTERNAL_MUC_MODULES) }}";
  61. {{ end }}
  62. }
  63. storage = "memory"
  64. muc_room_cache_size = 1000
  65. Component "{{ .Env.XMPP_MUC_DOMAIN }}" "muc"
  66. storage = "memory"
  67. modules_enabled = {
  68. {{ if .Env.XMPP_MUC_MODULES }}
  69. "{{ join "\";\n\"" (splitList "," .Env.XMPP_MUC_MODULES) }}";
  70. {{ end }}
  71. {{ if .Env.JWT_ENABLE_TOKEN_AUTH | default "0" | toBool }}
  72. "token_verification";
  73. {{ end }}
  74. }
  75. Component "focus.{{ .Env.XMPP_DOMAIN }}"
  76. component_secret = "{{ .Env.JICOFO_COMPONENT_SECRET }}"