Federation allow list #673

Open
Jade wants to merge 4 commits from JadedBlueEyes/federation-allow-list into main
Owner

This adds an allowed_remote_server_names. When empty, all remote servers are allowed. When set, servers not in the list are treated the same as forbidden_remote_server_names.

This additionally makes these options apply to remote media fetching and remote room directory fetching.

Not sure if ignoring messages from servers not in the allow-list is the best behaviour - it may result in some unexpected behaviour in cases like #672, where users are in a room with a non-allowed user via an allowed user. Perhaps this should be a separate option?

Unfortunately, the example config won't regenerate for me.
Tested and appears to work well (matrix-limited-federation.pissing.dev, only allows pissing.dev)

A useful enhancement for this and related options may be glob matching, or reading from a policy room. Out of scope for this, though.

This adds an `allowed_remote_server_names`. When empty, all remote servers are allowed. When set, servers not in the list are treated the same as `forbidden_remote_server_names`. This additionally makes these options apply to remote media fetching and remote room directory fetching. Not sure if ignoring messages from servers not in the allow-list is the best behaviour - it may result in some unexpected behaviour in cases like #672, where users are in a room with a non-allowed user via an allowed user. Perhaps this should be a separate option? Unfortunately, the example config won't regenerate for me. Tested and appears to work well (`matrix-limited-federation.pissing.dev`, only allows `pissing.dev`) A useful enhancement for this and related options may be glob matching, or reading from a policy room. Out of scope for this, though.
Author
Owner

Rebased on the latest main, but I haven't tested config live reload with this as it's not a feature I use

Rebased on the latest main, but I haven't tested config live reload with this as it's not a feature I use
nex added the
Inherited
Priority
Unknown
labels 2025-04-14 23:38:40 +00:00
Jade referenced this pull request from a commit 2025-04-19 22:33:20 +00:00
Jade referenced this pull request from a commit 2025-04-19 22:36:43 +00:00
Jade referenced this pull request from a commit 2025-04-19 22:38:02 +00:00
This pull request has changes conflicting with the target branch.
  • conduwuit-example.toml
  • src/api/client/directory.rs
  • src/api/client/membership.rs
  • src/api/client/message.rs
  • src/core/config/mod.rs
  • src/service/federation/mod.rs
  • src/service/media/mod.rs
  • src/service/media/remote.rs
  • src/service/sending/mod.rs
  • src/service/services.rs
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin JadedBlueEyes/federation-allow-list:JadedBlueEyes/federation-allow-list
git checkout JadedBlueEyes/federation-allow-list

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout main
git merge --no-ff JadedBlueEyes/federation-allow-list
git checkout JadedBlueEyes/federation-allow-list
git rebase main
git checkout main
git merge --ff-only JadedBlueEyes/federation-allow-list
git checkout JadedBlueEyes/federation-allow-list
git rebase main
git checkout main
git merge --no-ff JadedBlueEyes/federation-allow-list
git checkout main
git merge --squash JadedBlueEyes/federation-allow-list
git checkout main
git merge --ff-only JadedBlueEyes/federation-allow-list
git checkout main
git merge JadedBlueEyes/federation-allow-list
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: continuwuation/continuwuity#673
No description provided.