feat: Add config option for a default ACL on room creation #1691
No reviewers
Labels
No labels
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
Wont fix
old/ci/cd
old/rust
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
continuwuation/continuwuity!1691
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "eve/ackduck:I775"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This allows for rooms to be created with a m.room.server_acl event by
default. This event can be thought of as part of the initial_state
events, although it is not provided by the client.
Implements #775
This pull request...
Pull request checklist:
mainbranch, and the branch is named something other thanmain.myself, if applicable. This includes ensuring code compiles.
@ -774,0 +779,4 @@////// ACLs in existing rooms will not be updated automatically. This is not/// a substitute for moderation bots.pub default_room_acl_allow: Option<Vec<String>>,An empty list is not the same thing as no list being provided, as en empty allow list disallows all servers. Hence the
Option.A couple concerns regarding footguns, otherwise this is good
@ -433,0 +437,4 @@if let Some(allow_list) = services.server.config.default_room_acl_allow.clone() {server_initial_state.push(PduBuilder::state(String::new(), &RoomServerAclEventContent {allow_ip_literals: true,allow: allow_list,Probably want to guard against people forgetting to allow-list the local server or no servers (empty array)
Good idea. I've added a check to the config validation that makes sure the configured default ACL doesn't self-ban the homeserver.
@ -433,0 +444,4 @@server_initial_state.push(PduBuilder::state(String::new(), &RoomServerAclEventContent {allow_ip_literals: true,allow: vec!["*".to_owned()],deny: deny_list,Probably want to guard against people deny-listing the local server or all servers (
*)d17c54c844fab3411b2efab3411b2e52fd90239752fd90239726011408aa@ -760,6 +760,28 @@ pub struct Config {#[serde(default = "default_default_room_version")]pub default_room_version: RoomVersionId,/// A default allow value for the Access Control List when creating a roomThis should probably end in a period
@ -763,0 +770,4 @@/// a substitute for moderation bots.pub default_room_acl_allow: Option<Vec<String>>,/// A default deny value for the Access Control List when creating a roomSame here
26011408aab231210797b231210797652f525352