Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document grammar for device IDs #290

Open
jimmycuadra opened this issue May 24, 2018 · 3 comments
Open

Document grammar for device IDs #290

jimmycuadra opened this issue May 24, 2018 · 3 comments
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit

Comments

@jimmycuadra
Copy link
Contributor

The spec is currently missing any definition of the grammar for a device ID. While it is implied that they should just be a random string of characters, at least the following should be explicit:

  • Minimum and maximum character (or byte) lengths
  • Allowed and disallowed characters
  • Any expected patterns, such as starting with a letter followed by N digits

There needs to be some UX consideration beyond considering them opaque byte sequences, since they are displayed visually to users in some cases.

Though not specific to the grammar of the ID, the spec should also address what the scope of uniqueness is for device IDs. Do they need to be universally unique? Or only unique to the user the device belongs to? Or unique to the user's homeserver?

This may be considered part of #174.

@richvdh
Copy link
Member

richvdh commented May 31, 2018

https://matrix.org/docs/spec/intro.html#devices says:

Devices are identified by a device_id, which is unique within the scope of a given user.

beyond that, I'm not sure there is anything here which isn't already covered by #174 (which explicitly mentions device ids)?

@jimmycuadra
Copy link
Contributor Author

Perhaps this is an issue with having important information that exists only in the intro document. I'd expect the intro to explain general concepts of how Matrix works, but that any details useful to an implementer be available within the main document for that API, perhaps with an explicit link to other documents when information would otherwise be duplicated between documents. As is, I would've had to guess to go check the introduction for the information I wanted while looking at the client-server spec, which obviously wasn't something that occurred to me. :}

@turt2live turt2live added the clarification An area where the expected behaviour is understood, but the spec could do with being more explicit label Jul 19, 2018
@joepie91
Copy link

joepie91 commented Apr 28, 2019

What is the current (provisional) guidance on what a device ID should and/or can be, from an "implementing a homeserver" perspective? #174 is about 'completely opaque identifiers', but that clashes with the * wildcard character usage in some device_id fields, so evidently it can't just be any byte sequence.

Even just some practical data on what major clients currently do or allow, would be useful here.

auscompgeek referenced this issue in auscompgeek/matrix-nio Apr 15, 2020
The grammar for device IDs is not documented [1].  In the meantime we
should not assume that device IDs will not contain reserved characters.

[1]: https://github.com/matrix-org/matrix-doc/issues/1257
@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
@neilisfragile neilisfragile mentioned this issue Mar 1, 2022
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit
Projects
None yet
Development

No branches or pull requests

4 participants