Identifiers
This chapter covers MSST-Net's principal types and identifier system.
Principal Types
In MSST-Net, a principal is the basic unit of identity on the network.
MSST-Net currently supports the following principal types:
- User
- Device
- Room (space)
Each principal has its own identifiers, used for identification, management and access control.
User
A user is a basic principal that identifies all devices associated with the same person.
For authenticated users, the user ID is derived from the MSST Identity and Access System (MSST-IAS) account, so every device logged in to the same account is associated with the same user principal.
For unauthenticated users, the user ID is derived from the current device's key, so the user is normally associated only with that device.
User principals are mainly used to manage the identity relationship between multiple devices in one place.
See: Authentication
Device
A device is a basic principal that identifies a unique client instance.
Each client instance connected to MSST-Net corresponds to its own device principal.
In the current version, MSST-Net's access control uses the device as its smallest unit of control.
Room
A room is a temporary principal that identifies a single Room Mode session.
The room ID (space-{8 hex digits}) is generated at creation time and can be used in access control rules to match current room members.
See: Room Mode
Identifier System
Every principal has three kinds of identifiers:
- ID (unique identifier)
- Mnemonic (readable identifier)
- Display name (presentation identifier)
Each kind of identifier suits different scenarios.
ID
The ID is a principal's unique identifier.
A principal's ID is fixed once created and cannot be changed.
All other identifiers build on the ID.
Format
User ID:
user-{8 hex digits}Device ID:
device-{8 hex digits}Room ID:
space-{8 hex digits}Examples
User ID:
user-1a2b3c4dDevice ID:
device-a7f29b3eRoom ID:
space-7e3a9f12Origin
- The device ID is derived from the first 4 bytes of the SHA-256 hash of the device's public key. The coordinator verifies that the device ID matches the public key, requires the device to prove it holds the matching private key, and binds the first registered public key to the device ID. Clients check this again when they receive other devices' keys; a device whose key doesn't match its ID is ignored
- The user ID is derived from the account for authenticated users, and from the device public key for unauthenticated users (also checked by the coordinator and by other clients)
- The room ID is generated randomly when the room is created
Properties
- Globally unique
- Immutable
- Can be referenced in rules
- Recommended for identifying principals precisely
- Firewall rules always store IDs when saved
Mnemonic
A mnemonic is a principal's human-readable identifier.
Mnemonics are mainly used to simplify references, generate readable names and build rules.
Users can change mnemonics, but their uniqueness depends on the principal type and scope.
Kinds of Mnemonics
MSST-Net currently supports the following kinds of mnemonics:
- User mnemonic
- Device mnemonic
- Combined mnemonic
User Mnemonic
A user mnemonic identifies a user principal.
User mnemonics are globally unique.
Example
abjustProperties
- Globally unique
- Changeable (an authenticated user's mnemonic comes from the account username and is managed by the coordinator; changing it locally has no effect)
- Can be referenced in rules
- Suited for identifying users
Device Mnemonic
A device mnemonic identifies a device principal.
Device mnemonics are only guaranteed to be unique within the same user's scope.
This means:
- Different users can use the same device mnemonic
- Duplicate device mnemonics under the same user trigger conflict resolution
Example
archlinuxThe device mnemonic can be changed on the controller's Settings page (command-line controller: msst-net-cli identity --handle <mnemonic>); if left empty, the device ID is used.
Combined Mnemonic
Because device mnemonics aren't guaranteed to be globally unique, MSST-Net provides combined mnemonics to identify devices uniquely.
A combined mnemonic has the format:
{device}.{user}Where:
- {device} is the device mnemonic
- {user} is the user mnemonic
Combined mnemonics are globally unique.
Example
archlinux.abjustProperties
- Globally unique
- Can be referenced in rules
- Identifies devices uniquely across users
- Generated by combining the user mnemonic and device mnemonic
Conflict Resolution
When mnemonics conflict, the system automatically appends an incrementing number:
example
example-1
example-2Conflict resolution applies to mnemonics within the same scope.
For example:
- User mnemonic conflicts are resolved globally
- Device mnemonic conflicts are resolved within the same user's scope
Format
Mnemonics may only contain:
- Lowercase letters (a-z)
- Digits (0-9)
- Hyphens (-)
The . in a combined mnemonic is used only as a separator.
Mnemonics themselves carry no type prefix.
Uses
Mnemonics are mainly used to:
- Generate human-readable MSST-Net ezPlay hostnames
- Simplify references in rules (resolved to IDs when a rule is created)
- Quickly locate principals
Combined mnemonics are mainly used to:
- Identify devices uniquely
- Reference devices across users
| Type | Globally unique | Changeable | Usable in rules | Main use |
|---|---|---|---|---|
| User mnemonic | Yes | Yes | Yes | Identify users |
| Device mnemonic | No (unique per user) | Yes | Yes | Identify devices |
| Combined mnemonic | Yes | Indirectly | Yes | Identify devices uniquely |
Display Name
A display name is the name a principal shows to others.
Display names are mainly used for UI display and helping people recognize each other.
Display names may repeat and are not guaranteed to be unique.
Properties
- Not guaranteed to be unique
- Changeable
- Cannot be referenced in rules
- Used for UI display (the device display name is shown to other members in a room)
Example
Device display name:
Abjust's PCIf no device display name is set, a default name generated from the user ID is used. For example, with user ID user-1a2b3c4d:
用户1a2b3c4d的设备(This default name is generated by the client and means "User 1a2b3c4d's device".)
The device display name can be changed on the controller's Settings page (command-line controller: msst-net-cli identity --name <name>); changes are synced to the coordinator (if it's temporarily unreachable, they're synced on the next connection).
Identifier Comparison
| Identifier | Unique | Changeable | Usable in rules | Main use |
|---|---|---|---|---|
| ID | Yes | No | Yes | Precise identification |
| Mnemonic | No (conflicts resolved automatically) | Yes | Yes | Simplified references |
| Display name | No | Yes | No | Public display |