element-hq / element-meta

Shared/meta documentation and project artefacts for Element clients
72 stars 12 forks source link

Option to disable automatic e2ee setup #2246

Open byteplow opened 9 months ago

byteplow commented 9 months ago

Your use case

What would you like to do?

Disable e2ee setup, for all clients on out home server. (Including cross signing and secure backup setup)

Why would you like to do it?

We do not want to use e2ee by default as it is too complicated for most of our users. Even if we disable it via the .well-known/matrix/client, the e2ee setup is still required. The e2ee setup is still complicated to understand and intimidates or annoys users. For element web, the desired effect can be achieved by setting "force_disable" e2ee. However, we still want our users to be able to choose to use e2ee encryption.

How would you like to achieve it?

By setting an option such as disable_e2ee_setup in the .well-known/matrix/client. Clients should skip e2ee setup. Clients should not skip e2ee setup when the user is in e2ee rooms.

For element clients based on the react-sdk, this feature could be implemented by evaluating the new option in shouldSkipSetupEncryption().

For ios and android there are also options to disable e2ee setup: auto_enable_cross_signing and auto_enable_backups. Im not sure if setting these would be enough. As android and ios do not support force_disable e2ee.

Have you considered any alternatives?

Alternatively, we are considering building patched clients, but being able to configure it for all for all clients on our home server would be better.

Additional context

I would like to implement this if you are interested in merging it. Perheps I would need a pointer to where to implement this for the rust-sdk. As im not sure if I would know the right place to override EncryptionSettings. Probably matrix-sdk::ClientBuilder:build()