Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
d9f44fd0
Unverified
Commit
d9f44fd0
authored
3 years ago
by
Denis Kasak
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Clarify security note regarding the domain Synapse is hosted on. (#9221)
parent
dcbfec91
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.rst
+35
-11
35 additions, 11 deletions
README.rst
changelog.d/9221.doc
+1
-0
1 addition, 0 deletions
changelog.d/9221.doc
with
36 additions
and
11 deletions
README.rst
+
35
−
11
View file @
d9f44fd0
...
@@ -149,21 +149,45 @@ For details on having Synapse manage your federation TLS certificates
...
@@ -149,21 +149,45 @@ For details on having Synapse manage your federation TLS certificates
automatically, please see `<docs/ACME.md>`_.
automatically, please see `<docs/ACME.md>`_.
Security
N
ote
Security
n
ote
=============
=============
Matrix serves raw user
generat
ed data in some APIs - specifically the `content
Matrix serves raw
,
user
-suppli
ed data in some APIs -
-
specifically the `content
repository endpoints
<https://matrix.org/docs/spec/client_server/latest.html#get-matrix-media-r0-download-servername-mediaid>
`_.
repository endpoints`_.
Whilst we have tried to mitigate against possible XSS attacks (e.g.
.. _content repository endpoints: https://matrix.org/docs/spec/client_server/latest.html#get-matrix-media-r0-download-servername-mediaid
https://github.com/matrix-org/synapse/pull/1021) we recommend running
matrix homeservers on a dedicated domain name, to limit any malicious user generated
content served to web browsers a matrix API from being able to attack webapps hosted
on the same domain. This is particularly true of sharing a matrix webclient and
server on the same domain.
See https://github.com/vector-im/riot-web/issues/1977 and
Whilst we make a reasonable effort to mitigate against XSS attacks (for
https://developer.github.com/changes/2014-04-25-user-content-security for more details.
instance, by using `CSP`_), a Matrix homeserver should not be hosted on a
domain hosting other web applications. This especially applies to sharing
the domain with Matrix web clients and other sensitive applications like
webmail. See
https://developer.github.com/changes/2014-04-25-user-content-security for more
information.
.. _CSP: https://github.com/matrix-org/synapse/pull/1021
Ideally, the homeserver should not simply be on a different subdomain, but on
a completely different `registered domain`_ (also known as top-level site or
eTLD+1). This is because `some attacks`_ are still possible as long as the two
applications share the same registered domain.
.. _registered domain: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-2.3
.. _some attacks: https://en.wikipedia.org/wiki/Session_fixation#Attacks_using_cross-subdomain_cookie
To illustrate this with an example, if your Element Web or other sensitive web
application is hosted on ``A.example1.com``, you should ideally host Synapse on
``example2.com``. Some amount of protection is offered by hosting on
``B.example1.com`` instead, so this is also acceptable in some scenarios.
However, you should *not* host your Synapse on ``A.example1.com``.
Note that all of the above refers exclusively to the domain used in Synapse's
``public_baseurl`` setting. In particular, it has no bearing on the domain
mentioned in MXIDs hosted on that server.
Following this advice ensures that even if an XSS is found in Synapse, the
impact to other applications will be minimal.
Upgrading an existing Synapse
Upgrading an existing Synapse
...
...
This diff is collapsed.
Click to expand it.
changelog.d/9221.doc
0 → 100644
+
1
−
0
View file @
d9f44fd0
Clarify security note regarding hosting Synapse on the same domain as other web applications.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment