matrix-org / matrix-org/matrix-spec

We need to re-consider splitting users into alias & underlying opaque ID (SPEC-152)

Open
#63 8 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Identity-Service feature p1 room-vNext
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

Back when we defined rooms as split between aliases and IDs, there was a discussion over also splitting users between aliases and IDs too. At the time, the argument for doing so was "for symmetry", which didn't cut it, but we're starting to see concrete reasons why this could be a good thing to do. This bug is intended to gather together reasons to do so.

  • We can use alias->ID api to also handle canonicalising case as per SYN-109 rather than SPEC-62
  • We get email-style aliasing for free, allowing easy consolidation of various accounts to point at One True Account, and avoid having to support multiple accounts in clients
  • We could use it for horizontal scaling, HA, and decentralising user accounts in general - replicating a single user account over multiple servers
  • We could use it as the basis for a portability/account migration system.

Obviously the risks include:

  • Another waste-of-time holy war over how to present aliases to users in UI as they're a many:one mapping. Needless to say, I suggest we just present them like email addresses (which are after all also many:one, effectively)
  • Lots of security challenges in terms of which accounts are allowed to reside on which HSes, and how you prevent phishing attacks, and how you encrypt user data to protect them sufficiently.

If this idea went ahead, I suggest we adopt a syntax like:

@​matthew:matrix.org <-- user alias
^opaque_id:matrix.org <-- user id

I suggest using ^ as the sigil, as it doesn't escape in URLs, doesn't mean anything else, and is easily visually recognisable.

Yes, this would be a major backwards-incompatible change to the event format if we start shoving ^'s everywhere - so we need to decide to do so sooner than later if we are.

I suggest we consider using public key fingerprint as the opaque ID for the user (if this makes any sense at all).

(Imported from https://matrix.org/jira/browse/SPEC-152)

(Reported by @ara4n)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the references to SPEC-152, SYN-109, and SPEC-62, then assess the proposed alias and opaque-ID model, including its security and compatibility implications. Done would require a decided direction and a sufficiently defined specification for user syntax, account mapping, and migration or backwards compatibility.

Written by the indexing model from the issue text.

Assessment

Domain
distributed-systems, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.