
Synapse: Python/Twisted로 작성된 Matrix 홈서버.
element-hq/synapse <https://github.com/element-hq/synapse>_ 에서 적극적으로 유지 관리되고 있습니다.Synapse는 Matrix.org 재단의 일환으로 2019년부터 2023년까지 개발된 오픈소스 Matrix <https://matrix.org/>_ 홈서버입니다. Matrix.org 재단은 Synapse 유지보수에 자원을 할당할 수 없으며, 이 프로젝트는 Element가 계속 개발하고 있습니다 <https://github.com/element-hq/synapse>. 또한 다른 Matrix 홈서버 <https://matrix.org/ecosystem/servers/> 중에서 선택할 수도 있습니다.
자세한 내용은 Synapse와 Dendrite의 미래 <https://matrix.org/blog/2023/11/06/future-of-synapse-dendrite/>_ 블로그 게시물을 참조하세요.
=========================================================================
간단히 말해, Matrix는 인터넷 통신을 위한 개방형 표준으로, 연합(federation), 암호화 및 VoIP를 지원합니다. Matrix.org는 Matrix 프로젝트의 목표 <https://matrix.org/docs/guides/introduction>_ 에 대해 더 많은 내용을 다루고 있으며, 공식 사양 <https://spec.matrix.org/>_ 에서 기술적 세부 사항을 설명합니다.
.. contents::
Synapse 문서에는 Synapse 설치 방법 <https://matrix-org.github.io/synapse/latest/setup/installation.html>_ 이 설명되어 있습니다. Docker 이미지 <https://matrix-org.github.io/synapse/latest/setup/installation.html#docker-images-and-ansible-playbooks>_ 또는 Matrix.org의 Debian 패키지 <https://matrix-org.github.io/synapse/latest/setup/installation.html#matrixorg-packages>_ 를 사용하는 것을 권장합니다.
.. _federation:
Synapse는 설치 후 동작을 사용자 정의할 수 있는 다양한 구성 옵션 <https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html>_ 을 제공합니다. 연합(federation)을 위해 Synapse를 구성하는 방법 <https://matrix-org.github.io/synapse/latest/federate.html>_ 에 대한 추가 세부 정보도 있습니다.
.. _reverse-proxy:
Synapse 앞에 nginx <https://nginx.org/en/docs/http/ngx_http_proxy_module.html>, Apache <https://httpd.apache.org/docs/current/mod/mod_proxy_http.html>, Caddy <https://caddyserver.com/docs/quick-starts/reverse-proxy>, HAProxy <https://www.haproxy.org/> 또는 relayd <https://man.openbsd.org/relayd.8>_ 와 같은 리버스 프록시를 두는 것이 좋습니다. 이렇게 하면 Synapse를 root 권한으로 실행할 필요 없이 Matrix 클라이언트에 기본 https 포트(443)를 노출할 수 있다는 장점이 있습니다. 구성에 대한 자세한 내용은 리버스 프록시 문서 <https://matrix-org.github.io/synapse/latest/reverse_proxy.html>_ 를 참조하세요.
Synapse 업그레이드 지침은 업그레이드 노트_ 에 있습니다. 일부 Synapse 버전에서는 업그레이드에 추가 단계가 필요할 수 있으므로 이 지침을 반드시 확인하세요.
.. _업그레이드 노트: https://matrix-org.github.io/synapse/develop/upgrade.html
Synapse는 Python 및 PostgreSQL과 같은 여러 플랫폼 종속성을 사용하며, 지원되는 업스트림 버전을 따르는 것을 목표로 합니다. 자세한 내용은 폐기 정책(deprecation policy) <https://matrix-org.github.io/synapse/latest/deprecation_policy.html>_ 을 참조하세요.
Matrix는 일부 API에서 원시 사용자 제공 데이터를 제공합니다. 특히 콘텐츠 저장소 엔드포인트(content repository endpoints)_ 가 그렇습니다.
.. _콘텐츠 저장소 엔드포인트: https://matrix.org/docs/spec/client_server/latest.html#get-matrix-media-r0-download-servername-mediaid
XSS 공격을 완화하기 위해 합리적인 노력(예: CSP_ 사용)을 기울이고 있지만, Matrix 홈서버는 다른 웹 애플리케이션을 호스팅하는 도메인에 호스팅되어서는 안 됩니다. 이는 특히 Matrix 웹 클라이언트 및 웹메일과 같은 민감한 애플리케이션과 도메인을 공유하는 경우에 적용됩니다. 자세한 내용은 https://developer.github.com/changes/2014-04-25-user-content-security 를 참조하세요.
.. _CSP: https://github.com/matrix-org/synapse/pull/1021
이상적으로 홈서버는 단순히 다른 서브도메인이 아니라 완전히 다른 등록된 도메인(registered domain)_ (최상위 사이트 또는 eTLD+1이라고도 함)에 있어야 합니다. 두 애플리케이션이 동일한 등록된 도메인을 공유하는 한 일부 공격_ 이 여전히 가능하기 때문입니다.
.. _등록된 도메인: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-2.3
.. _일부 공격: https://en.wikipedia.org/wiki/Session_fixation#Attacks_using_cross-subdomain_cookie
예를 들어 설명하자면, Element Web 또는 기타 민감한 웹 애플리케이션이 A.example1.com 에 호스팅되어 있는 경우 Synapse는 example2.com 에 호스팅하는 것이 이상적입니다. 대신 B.example1.com 에 호스팅하면 어느 정도 보호되므로 일부 시나리오에서도 허용됩니다. 그러나 Synapse를 A.example1.com 에 호스팅해서는 안 됩니다.
위의 모든 사항은 Synapse의 public_baseurl 설정에 사용되는 도메인에만 해당됩니다. 특히 해당 서버에 호스팅된 MXID에 언급된 도메인과는 관련이 없습니다.
이 조언을 따르면 Synapse에서 XSS가 발견되더라도 다른 애플리케이션에 미치는 영향이 최소화됩니다.
새 Synapse 설치를 시험해 보는 가장 쉬운 방법은 웹 클라이언트에서 연결하는 것입니다.
로컬 머신에서 Synapse 테스트 인스턴스를 실행하지 않는 경우, 일반적으로 클라이언트에서 성공적으로 연결하려면 먼저 TLS 지원을 활성화해야 합니다. 자세한 내용은 TLS 인증서 <https://matrix-org.github.io/synapse/latest/setup/installation.html#tls-certificates>_ 를 참조하세요.
시작하는 쉬운 방법은 각각 https://app.element.io/#/login 또는 https://app.element.io/#/register 에서 Element를 통해 로그인하거나 등록하는 것입니다. 로그인할 서버를 matrix.org 에서 Homeserver URL https://<server_name>:8448 (리버스 프록시를 사용하는 경우 https://<server_name> )로 변경해야 합니다. 다른 클라이언트를 선호하는 경우, 클라이언트 목록 <https://matrix.org/ecosystem/clients/>_ 을 참조하세요.
모든 것이 잘 진행되면 최소한 로그인, 방 생성, 메시지 전송이 가능할 것입니다.
.. _client-user-reg:
기본적으로 Matrix 클라이언트를 통한 새 사용자 등록은 비활성화되어 있습니다. 활성화하려면:
등록 구성 섹션 <https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#registration>_ 에서 homeserver.yaml 에 enable_registration: true 를 설정합니다.
그런 다음 다음 중 하나를 수행합니다:
a. CAPTCHA <https://matrix-org.github.io/synapse/latest/CAPTCHA_SETUP.html>_ 를 설정하거나,
b. homeserver.yaml 에 enable_registration_without_verification: true 를 설정합니다.
특히 홈서버가 공용 인터넷에 노출된 경우 CAPTCHA 사용을 강력히 권장합니다. CAPTCHA가 없으면 누구나 홈서버에 자유롭게 계정을 등록할 수 있습니다. 이는 공격자가 나머지 Matrix 연합을 대상으로 스팸봇을 생성하는 데 악용될 수 있습니다.
새 사용자 이름은 server_name 과 계정 생성 시 지정하는 로컬 파트(localpart)로 구성됩니다. 이름은 다음 형식을 취합니다::
@localpart:my.domain.name
("at localpart on my dot domain dot name"으로 발음)
로그인할 때와 마찬가지로 "Custom server"를 지정해야 합니다. 'User name' 입력란에 원하는 localpart 를 입력합니다.
관리자 FAQ <https://matrix-org.github.io/synapse/latest/usage/administration/admin_faq.html>_ 에는 일반적인 문제를 처리하는 팁이 포함되어 있습니다. 자세한 내용은 Synapse의 광범위한 문서 <https://matrix-org.github.io/synapse/latest/>_ 를 참조하세요.
Synapse 설치 또는 관리에 대한 추가 지원이 필요하면 커뮤니티 지원 방 |room|_ (필요한 경우 matrix.org 계정 사용)에서 문의하세요. GitHub 이슈는 지원 요청이 아닌 버그 리포트 및 기능 요청에만 사용합니다.
.. |room| replace:: #synapse:matrix.org
.. _room: https://matrix.to/#/#synapse:matrix.org
.. |docs| replace:: docs
.. _docs: docs
ID 서버는 이메일 주소 및 기타 제3자 ID(3PID)를 Matrix 사용자 ID에 매핑하고, 매핑을 생성하기 전에 3PID의 소유권을 확인하는 역할을 합니다.
계정이나 자격 증명이 저장되는 곳이 아닙니다. 이들은 홈서버에 있습니다. ID 서버는 단지 제3자 ID를 Matrix ID에 매핑하기 위한 것입니다.
이 프로세스는 보안에 매우 민감합니다. Matrix 계정에 가입하거나 3PID 데이터를 수집하기가 너무 쉬우면 스팸 위험이 명백히 존재하기 때문입니다. 장기적으로는 이를 관리하기 위한 분산 시스템을 구축하기를 희망하지만(matrix-doc #712 <https://github.com/matrix-org/matrix-doc/issues/712>), 그때까지 Matrix 생태계에서 신뢰할 수 있는 ID 관리 역할은 알려진 신뢰할 수 있는 생태계 파트너 클러스터에 위임됩니다. 이들은 순전히 3PID 로그인을 인증 및 추적하고 최종 사용자 공개 키를 게시하는 역할을 하는 'Matrix ID 서버'(예: Sydent <https://github.com/matrix-org/sydent>)를 운영합니다.
Sydent의 자체 복사본을 호스팅할 수 있지만, 이렇게 하면 이메일 주소를 통해 Matrix 생태계의 다른 사용자에게 도달할 수 없게 되고, 사용자가 나를 찾는 것도 차단됩니다. 따라서 현재로서는 중앙 집중식 ID 서버인 https://matrix.org 또는 https://vector.im 을 사용하는 것이 좋습니다.
다시 강조하자면: ID 서버는 계정에 이메일 주소를 연결하거나 이메일 주소를 통해 다른 사용자에게 초대를 보내기로 선택한 경우에만 사용됩니다.
커뮤니티의 Synapse 기여를 환영합니다!
시작하기 가장 좋은 곳은 기여자 가이드 <https://matrix-org.github.io/synapse/latest/development/contributing_guide.html>_ 입니다. 이는 더 큰 문서 <https://matrix-org.github.io/synapse/latest>_ 의 일부로, Synapse 개발자와 관리자를 위한 정보를 포함합니다. 개발자는 특히 다음에 관심을 가질 수 있습니다:
Synapse의 데이터베이스 스키마 <https://matrix-org.github.io/synapse/latest/development/database_schema.html>_,Synapse 구현 세부 사항에 대한 참고 사항 <https://matrix-org.github.io/synapse/latest/development/internal_documentation/index.html>_, 및git 사용 방법 <https://matrix-org.github.io/synapse/latest/development/git.html>_.이 모든 것과 함께, Matrix에서 개발자 커뮤니티에 참여하세요:
#synapse-dev:matrix.org <https://matrix.to/#/#synapse-dev:matrix.org>_, 실제 사람들이 있습니다!
.. |support| image:: https://img.shields.io/matrix/synapse:matrix.org?label=support&logo=matrix :alt: (get support on #synapse:matrix.org) :target: https://matrix.to/#/#synapse:matrix.org
.. |development| image:: https://img.shields.io/matrix/synapse-dev:matrix.org?label=development&logo=matrix :alt: (discuss development on #synapse-dev:matrix.org) :target: https://matrix.to/#/#synapse-dev:matrix.org
.. |documentation| image:: https://img.shields.io/badge/documentation-%E2%9C%93-success :alt: (Rendered documentation on GitHub Pages) :target: https://matrix-org.github.io/synapse/latest/
.. |license| image:: https://img.shields.io/github/license/matrix-org/synapse :alt: (check license in LICENSE file) :target: LICENSE
.. |pypi| image:: https://img.shields.io/pypi/v/matrix-synapse :alt: (latest version released on PyPi) :target: https://pypi.org/project/matrix-synapse
.. |python| image:: https://img.shields.io/pypi/pyversions/matrix-synapse :alt: (supported python versions) :target: https://pypi.org/project/matrix-synapse