-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Faster joins: incoming federation requests during resync may be incorrectly rejected #13288
Comments
(or just rely on the list of servers we get during the join dance) |
Note that if we send out an event (as per #12997) we must respond to |
This is a very valid point. (I also think this is an interoperability landmine; it would be good for the spec to be very clear about what exactly a homeserver needs to be able to answer when sending an event! — I don't see anywhere where it says the sending homeserver has to be able to produce the We could track which events are
This sounds like it might be nasty, because we can't retroactively create an error code that non-MSC2706-implementing homeservers will understand. Maybe this is OK anyway though, because other homeservers have to treat us as potentially malicious and they need to be equipped to handle strange error responses from us by falling back to other servers as appropriate.
Note that this can fall out of sync with reality. This is probably still OK If a new server joins the room and we receive the event, we can handle that. |
Given that we can't conclusively track the set of servers in the room (because we will always have to have this indeterminate state arising from a server's user leaving the room and us not knowing if it was the last user for their server), it seems like it would be simplest to just not bother (in cases where that's acceptable — answering queries for event sending auth purposes is a different matter and may need special casing so that we accept relevant queries from the servers that we send our events to, such as This makes it tempting to indeed just define an error code that says 'can't auth you right now'. Since our server must still be syncing with another server to be successful, then it follows that there must be another server available to answer the remote homeserver's query. Either that, or the room is scuppered since we'll never be able to complete the state sync. If we want to, we can later enhance this by answering queries where we can and where the membership of the requesting remote homeserver is determinate. However, requesting homeservers need to be able to cope with uncooperative homeservers anyway, so they should already have logic to try against other homeservers. I suggest that we just let them re-use that, for simplicity. #12997 will then unfortunately have to gain some special casing, probably along the lines of 'we will answer relevant |
Here's a thought: can we modify partial-state joins so that we can keep track of which servers are in the room? How about changing, in the MSC3706 spec,
to
Both of these are abstract interpretations of the set of users in the room — in the sense that they tell you something useful about the set of users in the room, but only the latter is updatable (or at least it seems that way to me): |
This was somewhat shot down: when we complete our join after doing a partial join, we may find that unrejected events should become rejected and some rejected events may become unrejected. In other words, we may accept some events which it turns out we should have not. I wonder if it's actually OK to send our own events into the current list of hypothesised joined servers — it seems to me that the most important aspect is that the user is aware, but will this actually be the case? If we're basing the server memberships on a list received out-of-band from the room's state, it doesn't hold that the user will see joined members for all the servers in the room. (is this right?) |
but... in that particular case, we know the list of servers we sent the event to, so can't we just use the same list to decide whether they are allowed to |
@reivilibre points out that this runs the risk of us divulging room content to a server that has since left the room, but also makes a good suggestion for how to avoid this: ensure that all events that we create during the room resync are maintained in a fork of the DAG starting at our join. |
If a remote server sends us a federation request (such as
get_missing_events
, or requesting a space summary) during a state resync, we may well reject that request due to not thinking the remote server is in the room.Possibly we need to define some return code to say "sorry, can't auth you right now".
The text was updated successfully, but these errors were encountered: