|
|
@ -2,26 +2,29 @@ admins = { "{{ .Env.JICOFO_AUTH_USER }}@{{ .Env.XMPP_AUTH_DOMAIN }}" } |
|
|
|
plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom" } |
|
|
|
plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom" } |
|
|
|
http_default_host = "{{ .Env.XMPP_DOMAIN }}" |
|
|
|
http_default_host = "{{ .Env.XMPP_DOMAIN }}" |
|
|
|
|
|
|
|
|
|
|
|
{{ if and (.Env.ENABLE_AUTH | default "0" | toBool) (.Env.JWT_ENABLE_TOKEN_AUTH | default "0" | toBool) .Env.JWT_ACCEPTED_ISSUERS }} |
|
|
|
{{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool }} |
|
|
|
|
|
|
|
{{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" }} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") .Env.JWT_ACCEPTED_ISSUERS }} |
|
|
|
asap_accepted_issuers = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_ISSUERS) }}" } |
|
|
|
asap_accepted_issuers = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_ISSUERS) }}" } |
|
|
|
{{ end }} |
|
|
|
{{ end }} |
|
|
|
|
|
|
|
|
|
|
|
{{ if and (.Env.ENABLE_AUTH | default "0" | toBool) (.Env.JWT_ENABLE_TOKEN_AUTH | default "0" | toBool) .Env.JWT_ACCEPTED_AUDIENCES }} |
|
|
|
{{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") .Env.JWT_ACCEPTED_AUDIENCES }} |
|
|
|
asap_accepted_audiences = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_AUDIENCES) }}" } |
|
|
|
asap_accepted_audiences = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_AUDIENCES) }}" } |
|
|
|
{{ end }} |
|
|
|
{{ end }} |
|
|
|
|
|
|
|
|
|
|
|
VirtualHost "{{ .Env.XMPP_DOMAIN }}" |
|
|
|
VirtualHost "{{ .Env.XMPP_DOMAIN }}" |
|
|
|
{{ if .Env.ENABLE_AUTH | default "0" | toBool }} |
|
|
|
{{ if $ENABLE_AUTH }} |
|
|
|
{{ if .Env.JWT_ENABLE_TOKEN_AUTH | default "0" | toBool }} |
|
|
|
{{ if eq $AUTH_TYPE "jwt" }} |
|
|
|
authentication = "token" |
|
|
|
authentication = "token" |
|
|
|
app_id = "{{ .Env.JWT_APP_ID }}" |
|
|
|
app_id = "{{ .Env.JWT_APP_ID }}" |
|
|
|
app_secret = "{{ .Env.JWT_APP_SECRET }}" |
|
|
|
app_secret = "{{ .Env.JWT_APP_SECRET }}" |
|
|
|
allow_empty_token = false |
|
|
|
allow_empty_token = false |
|
|
|
{{ else if .Env.ENABLE_LDAP_AUTH | default "0" | toBool }} |
|
|
|
{{ else if eq $AUTH_TYPE "ldap" }} |
|
|
|
authentication = "cyrus" |
|
|
|
authentication = "cyrus" |
|
|
|
cyrus_application_name = "xmpp" |
|
|
|
cyrus_application_name = "xmpp" |
|
|
|
allow_unencrypted_plain_auth = true |
|
|
|
allow_unencrypted_plain_auth = true |
|
|
|
{{ else }} |
|
|
|
{{ else if eq $AUTH_TYPE "internal" }} |
|
|
|
authentication = "internal_plain" |
|
|
|
authentication = "internal_plain" |
|
|
|
{{ end }} |
|
|
|
{{ end }} |
|
|
|
{{ else }} |
|
|
|
{{ else }} |
|
|
@ -38,14 +41,14 @@ VirtualHost "{{ .Env.XMPP_DOMAIN }}" |
|
|
|
{{ if .Env.XMPP_MODULES }} |
|
|
|
{{ if .Env.XMPP_MODULES }} |
|
|
|
"{{ join "\";\n\"" (splitList "," .Env.XMPP_MODULES) }}"; |
|
|
|
"{{ join "\";\n\"" (splitList "," .Env.XMPP_MODULES) }}"; |
|
|
|
{{ end }} |
|
|
|
{{ end }} |
|
|
|
{{ if .Env.ENABLE_LDAP_AUTH | default "0" | toBool }} |
|
|
|
{{ if and $ENABLE_AUTH (eq $AUTH_TYPE "ldap") }} |
|
|
|
"auth_cyrus"; |
|
|
|
"auth_cyrus"; |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
c2s_require_encryption = false |
|
|
|
c2s_require_encryption = false |
|
|
|
|
|
|
|
|
|
|
|
{{ if and (.Env.ENABLE_AUTH | default "0" | toBool) (.Env.ENABLE_GUESTS | default "0" | toBool) }} |
|
|
|
{{ if and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool) }} |
|
|
|
VirtualHost "{{ .Env.XMPP_GUEST_DOMAIN }}" |
|
|
|
VirtualHost "{{ .Env.XMPP_GUEST_DOMAIN }}" |
|
|
|
authentication = "anonymous" |
|
|
|
authentication = "anonymous" |
|
|
|
c2s_require_encryption = false |
|
|
|
c2s_require_encryption = false |
|
|
@ -81,3 +84,4 @@ Component "{{ .Env.XMPP_MUC_DOMAIN }}" "muc" |
|
|
|
|
|
|
|
|
|
|
|
Component "focus.{{ .Env.XMPP_DOMAIN }}" |
|
|
|
Component "focus.{{ .Env.XMPP_DOMAIN }}" |
|
|
|
component_secret = "{{ .Env.JICOFO_COMPONENT_SECRET }}" |
|
|
|
component_secret = "{{ .Env.JICOFO_COMPONENT_SECRET }}" |
|
|
|
|
|
|
|
|
|
|
|