Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it crystal clear that you should not run Vector on the same domain as a HS #1977

Closed
ara4n opened this issue Aug 17, 2016 · 14 comments
Closed
Assignees
Labels
P1 S-Critical Prevents work, causes data loss and/or has no workaround Security T-Defect

Comments

@ara4n
Copy link
Member

ara4n commented Aug 17, 2016

And instead your media repo at least should be on a different domain.

@ara4n ara4n added T-Defect P1 S-Critical Prevents work, causes data loss and/or has no workaround Security labels Aug 17, 2016
@erikjohnston
Copy link
Member

Do we also want to add Content-Security-Policy: sandbox headers to responses from media repo?

@azrdev
Copy link

azrdev commented Aug 17, 2016

I'm interested why you shouldn't do that

@ara4n
Copy link
Member Author

ara4n commented Aug 17, 2016

For the same reasons as https://developer.github.com/changes/2014-04-25-user-content-security. We'll ship an updated synapse very shortly (possibly today) with Erik's fix mentioned above to mitigate the risk.

@ara4n
Copy link
Member Author

ara4n commented Aug 26, 2016

synapse 0.17.1 shipped with a mitigation for this.

Meanwhile I've pushed matrix-org/synapse@907486e and efc5462 to recommend that people put HSes on their own domain if at all possible.

@ara4n ara4n closed this as completed Aug 26, 2016
@ara4n
Copy link
Member Author

ara4n commented Aug 26, 2016

This was also mitigated a bit in vector in d3eccc1 ftr.

@anatomism
Copy link

Is this still something to be aware of:

I run Vector and Synapse on the same server. Both proxied through Nginx. Vector on vector.example.com matrix on matrix.example.com. Headers to prevent XSS active. Should I be physically separating matrix and vector, or are we saying complete full domain difference example1.com and example2.com?

@ara4n
Copy link
Member Author

ara4n commented Sep 4, 2016

synapse 0.17.1 makes this much less of a concern, hence not pushing this issue. in general it's good practice to host on separate vhosts anyway, as you are doing. no need for physically separate hosts.

@jooize
Copy link

jooize commented Jan 28, 2017

What is best practice? It's not clear to me. “Much less of a concern” doesn't sound like not a concern at all.

@indolering
Copy link

What is best practice? It's not clear to me. “Much less of a concern” doesn't sound like not a concern at all.

You are sharing cookies if you share a common root domain, so form submission logic is wacky. But as long as long as the sub-domains are different, the SOP is enforced correctly.

@ara4n
Copy link
Member Author

ara4n commented Jan 29, 2017 via email

axelsimon added a commit to axelsimon/synapse that referenced this issue Nov 20, 2018
element-hq/element-web#1977 --> element-hq/element-web#1977
And mention of Vector as a client replaced with Riot.
@eauchat
Copy link

eauchat commented Jun 1, 2019

Hello,

In this thread, you mention (from what I understand) that having Riot and Synapse served in matrix.domain.tld and riot.domain.tld doesn't bring security issues.
I was wondering if the same apply to Synapse serving in domain.tld and riot in riot.domain.tld, since Synapse is then in a parent domain.

Also, it's mentioned that it's better to run Synapse and Riot in different machines (wether physical or virtual).
What are the security implications of running Synapse and Riot on the same machine?

Thank you :)

@fridtjof
Copy link
Contributor

fridtjof commented Jul 8, 2019

I am also interested whether this scenario is okay or not from a security standpoint. The whole domain/XSS part of the web is not exactly my strong suit, so I would also appreciate if you clarified this. Thank you :)

@fdrubigny
Copy link

Good evening,
I'm interested in installing a synapse server and the web element client.
I read this thread and I wonder if I install synapse on 1NDD.com and element on subdomain.1NND.com is it Ok or we really have to separate, if we can server on ndd1 and element on ndd2?
Thank you in advance for your details.
Kind regards.

@jryans
Copy link
Collaborator

jryans commented Jan 26, 2021

Please ask support questions like this in Matrix rooms like #element-web:matrix.org.

@element-hq element-hq locked as resolved and limited conversation to collaborators Jan 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 S-Critical Prevents work, causes data loss and/or has no workaround Security T-Defect
Projects
None yet
Development

No branches or pull requests

10 participants