Skip to content

Auth rules: behaviour unclear if no power level event is cited as an auth event #1098

Open
@DMRobertson

Description

@DMRobertson

Link to problem area: https://spec.matrix.org/v1.2/rooms/v9/#authorization-rules and also https://spec.matrix.org/v1.2/client-server-api/#mroompower_levels

Issue
The auth rules say:

INFO: Power levels are inferred from defaults when not explicitly supplied. For example, mentions of the sender’s power level can also refer to the default power level for users in the room.

I think this is talking about the situation where the auth rules need to lookup the power level of @alice:alice.com from some state map, but Alice does not have an explicit power level.

What happens if the event E under consideration does not cite an auth event of type m.room.power_levels?

Options that spring to mind:

  1. Reject E outright (making an exception for the initial bit of room state added after the room is created).
  2. Look for a power levels event in the auth chain of E, rather than just E itself. (But perhaps this need not exist---what then?)
  3. Use the default power levels given in the C-S spec as the intended power levels when there is no such power level event in the room.
    • If this is the case, the wording in the C-S spec is unhelpful. It reads

      if the room contains no m.room.power_levels event [...]

      but it's possible that the room contains an m.room.power_levels event somewhere else in the DAG---it's just that one hasn't been cited as an auth_event here.

The wording of the INFO box in the auth rules makes me think option 3 is intended. Can anyone confirm or refute?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-S2SServer-to-Server API (federation)clarificationAn area where the expected behaviour is understood, but the spec could do with being more explicit

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions