|
|
|
@ -1,9 +1,12 @@ |
|
|
|
|
admins = { "{{ .Env.JICOFO_AUTH_USER }}@{{ .Env.XMPP_AUTH_DOMAIN }}" } |
|
|
|
|
plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom" } |
|
|
|
|
http_default_host = "{{ .Env.XMPP_DOMAIN }}" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool }} |
|
|
|
|
{{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" }} |
|
|
|
|
{{ $JWT_ASAP_KEYSERVER := .Env.JWT_ASAP_KEYSERVER | default "" }} |
|
|
|
|
{{ $JWT_ALL_EMPTY := .Env.JWT_ALLOW_EMPTY | default "0" | toBool }} |
|
|
|
|
{{ $JWT_AUTH_TYPE := .Env.JWT_AUTH_TYPE | default "token" }} |
|
|
|
|
|
|
|
|
|
{{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") .Env.JWT_ACCEPTED_ISSUERS }} |
|
|
|
|
asap_accepted_issuers = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_ISSUERS) }}" } |
|
|
|
@ -16,11 +19,15 @@ asap_accepted_audiences = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_AU |
|
|
|
|
VirtualHost "{{ .Env.XMPP_DOMAIN }}" |
|
|
|
|
{{ if $ENABLE_AUTH }} |
|
|
|
|
{{ if eq $AUTH_TYPE "jwt" }} |
|
|
|
|
authentication = "token" |
|
|
|
|
authentication = "{{ $JWT_AUTH_TYPE }}" |
|
|
|
|
app_id = "{{ .Env.JWT_APP_ID }}" |
|
|
|
|
app_secret = "{{ .Env.JWT_APP_SECRET }}" |
|
|
|
|
allow_empty_token = false |
|
|
|
|
{{ else if eq $AUTH_TYPE "ldap" }} |
|
|
|
|
allow_empty_token = {{ if $JWT_ALL_EMPTY }}true{{ else }}false{{ end }} |
|
|
|
|
{{ if $JWT_ASAP_KEYSERVER }} |
|
|
|
|
asap_key_server = "{{ .Env.JWT_ASAP_KEYSERVER }}" |
|
|
|
|
{{ end }} |
|
|
|
|
|
|
|
|
|
{{ else if eq $AUTH_TYPE "ldap" }} |
|
|
|
|
authentication = "cyrus" |
|
|
|
|
cyrus_application_name = "xmpp" |
|
|
|
|
allow_unencrypted_plain_auth = true |
|
|
|
|