Try to tighten Signal bridge security

This commit is contained in:
Slavi Pantaleev 2021-01-22 18:56:08 +02:00
parent 8ec975e3c8
commit f3dd346724
2 changed files with 4 additions and 0 deletions

View File

@ -21,9 +21,11 @@ ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-mautrix-signal-daemon
# Intentional delay, so that the homeserver (we likely depend on) can manage to start. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 ExecStartPre={{ matrix_host_command_sleep }} 5
# We can't use `--read-only` for this bridge.
ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-signal-daemon \ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-signal-daemon \
--log-driver=none \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \
--network={{ matrix_docker_network }} \ --network={{ matrix_docker_network }} \
-v {{ matrix_mautrix_signal_daemon_path }}:/signald:z \ -v {{ matrix_mautrix_signal_daemon_path }}:/signald:z \
{{ matrix_mautrix_signal_daemon_docker_image }} {{ matrix_mautrix_signal_daemon_docker_image }}

View File

@ -24,6 +24,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-signal
--log-driver=none \ --log-driver=none \
--network={{ matrix_docker_network }} \ --network={{ matrix_docker_network }} \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \
--read-only \
{% if matrix_mautrix_signal_container_http_host_bind_port %} {% if matrix_mautrix_signal_container_http_host_bind_port %}
-p {{ matrix_mautrix_signal_container_http_host_bind_port }}:29328 \ -p {{ matrix_mautrix_signal_container_http_host_bind_port }}:29328 \
{% endif %} {% endif %}