Ver a proveniência

Add some variables for controlling `x_forwarded` settings for Synapse listeners

pull/4577/head
Slavi Pantaleev há 5 meses
ascendente
cometimento
d8eed6bfd3
3 ficheiros alterados com 20 adições e 4 eliminações
  1. +16
    -0
      roles/custom/matrix-synapse/defaults/main.yml
  2. +3
    -3
      roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2
  3. +1
    -1
      roles/custom/matrix-synapse/templates/synapse/worker.yaml.j2

+ 16
- 0
roles/custom/matrix-synapse/defaults/main.yml Ver ficheiro

@@ -135,10 +135,22 @@ matrix_synapse_ext_s3_storage_provider_data_path: "{{ matrix_synapse_ext_s3_stor


matrix_synapse_container_client_api_port: 8008 matrix_synapse_container_client_api_port: 8008


# Controls the `x_forwarded` setting for the "Insecure HTTP listener (Client API)".
# We default this to `true`, because such insecure HTTP listeners are most likely behind a reverse-proxy (that handles TLS).
matrix_synapse_container_client_api_x_forwarded: true

matrix_synapse_container_federation_api_tls_port: 8448 matrix_synapse_container_federation_api_tls_port: 8448


# Controls the `x_forwarded` setting for the "TLS-enabled federation listener".
# We default this to `false`, because TLS-enabled listeners are likely to be exposed directly (instead of being behind a reverse-proxy).
matrix_synapse_container_federation_api_tls_x_forwarded: false

matrix_synapse_container_federation_api_plain_port: 8048 matrix_synapse_container_federation_api_plain_port: 8048


# Controls the `x_forwarded` setting for the "Insecure federation listener".
# We default this to `true`, because such insecure HTTP listeners are most likely behind a reverse-proxy (that handles TLS).
matrix_synapse_container_federation_api_plain_x_forwarded: true

# The base container network. It will be auto-created by this role if it doesn't exist already. # The base container network. It will be auto-created by this role if it doesn't exist already.
matrix_synapse_container_network: '' matrix_synapse_container_network: ''


@@ -838,6 +850,10 @@ matrix_synapse_manhole_enabled: false
# Enable support for Synapse workers # Enable support for Synapse workers
matrix_synapse_workers_enabled: false matrix_synapse_workers_enabled: false


# Controls the `x_forwarded` setting for the main `http` listener for Synapse workers.
# We default this to `true`, because such insecure HTTP listeners are most likely behind a reverse-proxy (that handles TLS).
matrix_synapse_worker_listeners_http_main_x_forwarded: true

# Specifies worker configuration that should be used when workers are enabled. # Specifies worker configuration that should be used when workers are enabled.
# #
# The possible values (as seen in `matrix_synapse_workers_presets`) are: # The possible values (as seen in `matrix_synapse_workers_presets`) are:


+ 3
- 3
roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 Ver ficheiro

@@ -298,7 +298,7 @@ listeners:
tls: true tls: true
bind_addresses: ['::'] bind_addresses: ['::']
type: http type: http
x_forwarded: false
x_forwarded: {{ matrix_synapse_container_federation_api_tls_x_forwarded | to_json }}


resources: resources:
- names: {{ matrix_synapse_federation_listener_resource_names|to_json }} - names: {{ matrix_synapse_federation_listener_resource_names|to_json }}
@@ -311,7 +311,7 @@ listeners:
tls: false tls: false
bind_addresses: ['::'] bind_addresses: ['::']
type: http type: http
x_forwarded: true
x_forwarded: {{ matrix_synapse_container_client_api_x_forwarded | to_json }}


resources: resources:
- names: {{ matrix_synapse_http_listener_resource_names|to_json }} - names: {{ matrix_synapse_http_listener_resource_names|to_json }}
@@ -324,7 +324,7 @@ listeners:
tls: false tls: false
bind_addresses: ['::'] bind_addresses: ['::']
type: http type: http
x_forwarded: true
x_forwarded: {{ matrix_synapse_container_federation_api_plain_x_forwarded | to_json }}


resources: resources:
- names: {{ matrix_synapse_federation_listener_resource_names|to_json }} - names: {{ matrix_synapse_federation_listener_resource_names|to_json }}


+ 1
- 1
roles/custom/matrix-synapse/templates/synapse/worker.yaml.j2 Ver ficheiro

@@ -46,7 +46,7 @@ worker_listeners:
{% if http_resources|length > 0 %} {% if http_resources|length > 0 %}
- type: http - type: http
bind_addresses: ['::'] bind_addresses: ['::']
x_forwarded: true
x_forwarded: {{ matrix_synapse_worker_listeners_http_main_x_forwarded | to_json }}
port: {{ matrix_synapse_worker_details.port }} port: {{ matrix_synapse_worker_details.port }}
resources: resources:
- names: {{ http_resources|to_json }} - names: {{ http_resources|to_json }}


Carregando…
Cancelar
Guardar