Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Refuse cleartext on my homeserver #2963

Closed
lofidevops opened this issue Mar 8, 2018 · 10 comments
Closed

Refuse cleartext on my homeserver #2963

lofidevops opened this issue Mar 8, 2018 · 10 comments

Comments

@lofidevops
Copy link

lofidevops commented Mar 8, 2018

User story: I am a system administrator setting up a homeserver for strangers. I want to ensure that I never have access to the content of their communication, so they don't need to trust me.

Is it possible to configure Synapse so that my homeserver never handles unencrypted content. I can accept that some so-called metadata may be visible (separate question to find out what that is :)

Scenarios:

In all cases users should be able to connect and chat, without me seeing their messages:

  • @alice:myserver.com talks to @bob:myserver.com
  • @alice:myserver.com talks to @carol:elsewhere.net
  • @alice:myserver.com, @bob:myserver.com and @carol:elsewhere.net chat
  • @alice:myserver.com joins #matrix:matrix.org (a pre-existing unencrypted room) to chat

Notes:

@Half-Shot
Copy link
Collaborator

It seems like you are asking for homeserver-wide policies on state events (and mandating that joined rooms / created rooms contain the state to enable encryption). This is not possible on Synapse and would require quite extensive modifications, and would be somewhat impossible to mandate over federation.

@Half-Shot
Copy link
Collaborator

In theory...you could. A homeserver can infer if a room is encrypted and you could reject a join request on that basis.

For local rooms, you just ensure the room is set to encrypted upon creation (which definitely will screw with bridges/bots)

@lofidevops
Copy link
Author

I've overhauled this ticket to make the requirements clearer, and deleted my previous comments. Is this currently possible? If infeasible on Synapse should I post a similar query on the Dendrite project?

@lofidevops lofidevops changed the title [query] Force all rooms on my homeserver to be encrypted Refuse unencrypted content on my homeserver Mar 9, 2018
@lub
Copy link
Contributor

lub commented Mar 9, 2018

In all cases users should be able to connect and chat, without me seeing their messages:
[...]

  • alice:myserver.com joins #matrix:matrix.org (a pre-existing unencrypted room) to chat

If alice:myserver.com wants to chat in an unencrypted room, you have to store her and other people's unencrypted events. You would have to block most of the matrix network (almost all public rooms) for your users.

This behavior is not Synapse specific and caused by the fact, that federated rooms are decentralized and stored by all (room) member servers.

Edit: Sorry for mentioning you alice.

@lofidevops
Copy link
Author

@lub Thanks for the feedback. Does it make sense to distinguish between "public rooms on other servers" (like #matrix:matrix.org) and "rooms on my server" (like #room:myserver.com)? I guess I could store data that is "public anyway".

@lofidevops lofidevops changed the title Refuse unencrypted content on my homeserver Refuse cleartext on my homeserver Mar 9, 2018
@Half-Shot
Copy link
Collaborator

You would have to block most of the matrix network (almost all public rooms) for your users.

Speaking to @maxidor who spends most of his time with his head in the federation rabbit hole, you can ask for room state without being joined. So you could build a custom synapse that asks whether a room has the crypto flag set (remember, once encrypted a room should never be de-encrypted) and join it that way.

I'm not sure if this will catch every case, and i'm sure you could probably find ways to exploit it but it goes a long way to hitting on what @kwill want's, I think.

@Half-Shot
Copy link
Collaborator

As @lub says though, that leaves you with a tiny fraction of rooms avaliable to you. This would be almost a pure PM server as the vast majority of my (many) rooms that I am in, are plaintext.

@lofidevops
Copy link
Author

In summary, this is not implemented, feasible, but rather limiting in terms of functionality. Specifically, users wouldn't be able to access public-access cleartext rooms.

@rubo77
Copy link
Contributor

rubo77 commented Nov 2, 2018

Where is this overhauled?

I think it is a great idea to completely disallow unencrypted rooms.

@lofidevops
Copy link
Author

@rubo77 This evolved into a discussion with @ara4n with the final idea is expressed at #3269 (Support only E2E or public rooms on my homeserver). In other words, users on homeserver X can create/join E2E rooms or public-access cleartext rooms, but cannot create/join access-controlled cleartext rooms.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants