mimi.havenmessenger.com status
Generated when this hub was deployed, from the interop repository at ffb52bf681db.
Revision
- Running
ffb52bf681db6c4a47f80745c0c2dc1dfb60a185- Deployed
- 2026-11-24T23:48:10Z
- Directory
- https://mimi.havenmessenger.com/.well-known/mimi-protocol-directory
What changed
No previous deployment is recorded here; the changelog's unreleased entries:
mimihubd: a tracked room's Commit is checked against the room's tree as well as its list (room-policy-04 §8.1.2). Each client it adds is a client of a user listed after it; a user it takes off the list keeps no client in the group; a client of a user who stays listed is removed by that user, as its own client (canRemoveOwnClient), by a Remove it commits or proposes or a SelfRemove, or by a member whose role holdscanKick; and a client's new leaf (an Update, or the committer's) names the same user as its old one. A seeding bundle's tree holds only clients of the users the room lists after its Commit. A listed user with no client stays valid.mimi-core: the room policy decode carriescanRemoveOwnClient(room-policy-04 §8.1.2, registry value 0x0003). A role that lists it may remove a client of its own without changing the participant list.- The hub daemon is renamed from
mimi-hubdtomimihubd: the crate and binary, the Debian package with its systemd unit, user and paths (/etc/mimihubd,/var/lib/mimihubd), the release assets and the container image (ghcr.io/havenmessenger/mimihubd; the old image keeps its tags). Themimihubdpackage replacesmimi-hubd: apt removes the old one and leaves its configuration and state in place. To carry them over, move/etc/mimi-hubdto/etc/mimihubdand/var/lib/mimi-hubdto/var/lib/mimihubd, renamemimi-hubd.tomlandmimi-hubd.envtomimihubd.*, update the paths the configuration names, give the files to themimihubduser (/etc/mimihubdstaysroot:mimihubd0750), thensystemctl enable --now mimihubd. mimihubd:MIMI_OUTBOUND_PROXYtakes credentials,http://user:secret@host:port, for aCONNECTproxy that requires them. They are sent asProxy-Authorization: Basicon eachCONNECT, and never appear inDebug, a configuration error or the startup line; an error about the setting no longer quotes its value.mimihubd: throughMIMI_OUTBOUND_PROXYthe hub no longer resolves a peer's name. TheCONNECTnames the host and port, and the proxy resolves it and checks the addresses, so a hub with no resolver of its own can reach peers. The peer's certificate is still checked against the host. Without a proxy nothing changes.mimihubd: a room's seed is stored all or nothing. Its group, tracking record, room policy, participant list, operational policy, room metadata and kept GroupInfo are written as one SQLite transaction, so a store failure partway no longer leaves a tracked room missing its policy or list. Store writes that must be atomic run inside a savepoint (SqliteStore::atomically), which nests: the participant list keeps its own all-or-nothing and now composes into the seed's.mimihubd: a room's seed checks theroom_metadataits GroupContext carries as an update's is checked: it must decode within bounds and name the room being seeded, and is then kept as the room's metadata, as the room's policy and participant list are. Before, an update's RoomMetaData naming another room was refused but a seed's was not read at all, and a seeded room had no metadata until an update set it. DIV-15 has the rule.mimihubd: a Partial GroupInfo whose GroupInfo had the ratchet tree between two other extensions is rebuilt and checked. mls-rs with its GREASE feature signsexternal_pub, the tree, then a GREASE extension, and the hub tried the tree only at the two ends, so such a Commit was refused. The hub now tries every place in the list, the ends first, one at a time, up to 16 extensions (only the ends past that).mimi-core:TreeAt::Before(index)andPartialGroupInfo::extension_count. DIV-12 has the rule.mimihubd: consent on the client lane (protocol-07 §8). A user grants or revokes a requesting user's access to their KeyPackages (consent), asks a user for theirs or cancels (requestConsent), lists the requests made of them (consentRequests) and the grants they hold (consentReceived), and opts out (optOut: their KeyPackages withdrawn and their consent cleared). A grant to a user of another provider is sent to it asupdateConsent. Four policy settings cover what the draft leaves to the provider:consent_provider_grants,consent_revoke_notifies,consent_kept_at_opt_out(all off) andconsent_request_days(30). DIV-19 has the rule.mimihubd: a room hosted here that the hub keeps no ratchet tree for no longer takes changes the hub cannot authorize. Its first Commit, and any participant-list or room-policy change to it, is taken only with a bundle carrying a Full GroupInfo and the full ratchet tree, which seed the tree; otherwise it is refused (notAllowed, saying what is needed). A seed such a Commit needs is checked before anything changes, and the Commit's changes are authorized for its committer, the GroupInfo's signer, which must be the member that sent it. Before, such a room applied every change with no check of who made it. The policy's newuntracked_roomssetting keeps that behaviour as"accept"; the default is"refuse". DIV-10 has the rule.mimihubd: a room created by another provider's client could not be seeded: the group lists its creator from its creation, which no Commit carries, so the hub's list and the group's never matched and the Commit carrying the tree was refused. The list before a new room's first Commit is now its creator.mimihubd:keyMaterialon the provider path is taken only from a peer whose proof authenticates the requester's provider, or the provider hosting the room the request names (the room's hub, protocol-07 §5.2); otherwise403 not-permitted. Before, any peer could name any requester, and a request passed the consent gate for any requester ever granted. The path's user and the body'stargetUsermust now be the same user (400 malformed-requestotherwise): consent was read for the body's and the KeyPackage taken for the path's. The provider path's hourly limit of 5 for one target user is now counted per requesting provider (the domain the peer proved), not per the requester a request names, which is the peer's choice; a refused request is not counted. DIV-6 has what stays open: any peer can name any requester by naming a room on its own domain.mimi-core:partial_group_info, thePartialGroupInfoof draft-ietf-mls-ratchet-tree-options §4: read, written, split from a GroupInfo by its committer, and rebuilt into the GroupInfo it stands for from the GroupContext, confirmation tag, signer leaf and tree its receiver holds.mimihubd: a tracked room's Commit with a Partial GroupInfo is checked as one with a Full GroupInfo is. The hub rebuilds the GroupInfo from its group after the Commit (with the tree after it, when the Partial says the GroupInfo carries one) and refuses the Commit (invalidProposal) unless the committer signed it. Before, a Partial GroupInfo was taken unchecked. DIV-12 has where the rebuild departs from the draft's letter.mimi-core: aPartialGroupInfoOptionpayload is written and read raw, as protocol-07 §5.3 writes it, its end found by decoding thePartialGroupInfo; it no longer carries a<V>length prefix, and one that does not decode is refused. This changes the wire: a bundle written with the prefix does not decode. Thehb-03-partial-group-infovector now carries thePartialGroupInfoofhb-01's GroupInfo.mimihubd: the client lane serveskeyMaterial(a client's signedKeyMaterialRequest, checked to be the user's own) and acts on rooms on another hub:submitMessage,updateandkeyMaterialfor such a room are sent to the room's hub as this provider, as protocol-07 §3.4 and §5.2 have a member provider do. keyMaterial on the lane is limited per user and per user and target. On the provider path, a keyMaterial request whose{targetUser}is the URI of a user here (as this hub's own forwarding sends it) now finds the KeyPackages published for that user.mimi-core:KeyMaterialRequest::signandsignature_verifies, for its §5.2 signature overKeyMaterialRequestTBS.mimihubd: a last-resort KeyPackage (draft-ietf-mls-extensions §6.4, marked by its client) is handed out only when no one-time KeyPackage is left, and by default once, then deleted like any other, as protocol-07 §5.2 has it ("Keying material provided from one response MUST NOT be provided in any other response").MIMI_LAST_RESORT_REUSE=truekeeps it to be handed out again, with itsKeyPackageRefstill routing every Welcome sent for it (DIV-23). A user has one, the newest replacing the one before, and the per-user cap never evicts it. The client lane'skeyPackageCountsays how many one-time KeyPackages are left and whether a last-resort one is.mimihubd: on the provider path, one requester may make at most 5keyMaterialrequests an hour for one target user, as on the client lane; past that the hub answers 429 with the new problem typekey-material-rate-limited.mimihubd: a user of this provider has one KeyPackage pool, whether published for or claimed by name or by URI; a store that kept some under the URI joins them to the name when it opens.mimihubd:updateConsentis recorded only from the provider of its target user and for a requester of this provider, andrequestConsentonly from the provider of its requester and for a target of this provider, as protocol-07 §5.7 has them. Before, any peer could send a grant naming one of this hub's users as the target, which the KeyPackage consent gate then honoured. Every answer is unchanged (201 / 202), so none says what was recorded.mimihubd: a Commit that would seed a room's tree may not change what the hub holds for the room. Its GroupInfo's GroupContext must carry the room's policy (roles_list and base room policy), its operational policy, and its participant list as the hub's list after the Commit; otherwise it is refused and nothing changes. Before, a seed took the group's components as the room's state and cleared those the group lacked, so a lane room's creator could drop the deployment's role checks and external-Commit refusal by creating its group without them. The client lane'screateRoomnow answers the room'screator_roleandcomponentsfor the client to start its group with. The neutral lane profile's member role may now leave (its own change to 0, which RemoveSelf alone does not grant).browser-jsnow builds the library for wasm32-unknown-unknown: it also turns on getrandom'sjsfeature, which the virtual clients' reuse guard needs in a browser. CI checks that build.- openmls moves to its main branch as of 2026-11-18, the commit
Cargo.tomlpins. Withextensions-draft(mimihubd), commit staging now enforces every AppDataUpdate list rule of draft-ietf-mls-extensions-10 §4.7: one Remove per component, no Remove together with an Update, and no Remove of a component with no data; Update, Remove and SelfRemove proposals are listed in ascending leaf order; and the component operation label is "MLS Component" (§4.1), which only SafeEncrypt/SafeDecrypt use and nothing here calls. The VC-01 cross-check reruns at the new commit with the same values. - A script,
scripts/render_status_page.py, renders a deployment's status page when the hub is deployed: the revision it runs and the one before, the changelog entries and commits between them, the drafts and per-section status fromdocs/mimi/CONFORMANCE.md, the divergences, the problem types, the deployment's own settings files, and the test vectors with their SHA-256 for download, plus the same facts as JSON. It reads only the checkout, which must be at the named revision with no local changes, and writes a static page with no script.--self-testruns in CI. docs/reasons.toml: why each refusal is given. One row per problem type, per refusal a protocol answer carries (notAllowed,notAuthorized,noConsent, ...) and per MLS check a client in a room reports, each naming the specification and section it rests on with that section's sentence quoted, or saying the behaviour is this code's own and naming the divergence. The status page renders it and fails when a problem type has no row.- An example,
mimihubd/examples/probe_bodies.rs, makes the bodies a peer probe sends to a live hub, fresh each run: aSubmitMessageRequestfrom a named sender, a KeyPackage for a named user, and the notifyFanoutMessagecarrying a Welcome that adds that KeyPackage's holder. Each is an openmls object encoded with the types the hub decodes. - A room takes every message its members may send, however many arrive within the delivery lifetime. An accepted application message is no longer also queued under the room's own URI, a queue nothing read: it filled to its cap of 256 within the delivery lifetime and then refused every sender in the room, though each member read their own queue. Fan-out alone queues the message, for each other local member and each other provider with a participant. A message that is empty or larger than one queued item is still refused (
notAllowed) and reaches no one. A message whose fan-out fails on a store error is answered as the hub's own failure (500internal-error, on the wire and on the client lane;SubmitMessageResponsehas no code for it), never as accepted. - A client lane (
MIMI_LANE_BIND_ADDR, off by default): a separate TLS listener on which a provider's client-facing service acts for one of this hub's users at a time, by an RFC 9421 signature taggedmimi-client-lane. The user publishes and withdraws their KeyPackages, reads and acknowledges their queued Welcomes and messages, creates rooms hosted here, sends messages and sends updates to them. What a created room starts with (its room policy, the creator's role, whether it allows external Commits) is the deployment's, fromMIMI_LANE_ROOM_POLICY, by default a neutral profile that refuses external Commits; the client names none of it. On the lane a user speaks only for themself: a leave removes only them, an external Commit joins only them, and a GroupInfo that seeds a room's tree is signed by them. On the provider path a peer no longer speaks for a user of this hub in a room change, even when its proof names this hub's domain: a leave removing one, an external Commit joining one, or a seeding GroupInfo signed by one is refused. A local extension, not a MIMI route (DIV-19). - One local member whose queue refuses an item (full: 256 messages or 32 Welcomes, or the item out of bounds) no longer stops fan-out to the others: that member is skipped and logged, and every other local member still gets the Commit, Welcome, held proposal, application message or followed room's message. A member's items (a held proposal and the ones beside it) are queued all or none, so no member holds part of a bundle. Only a queue's refusal skips a member; any other store error still fails the fan-out. The fan-out log line counts the members skipped.
submitMessage(/mimi/pl/submitMessage/{roomId}) takes a message only from a peer submitting as a user of a domain its proof authenticates: never as a user of this provider, and not as a third provider's user. A refused message is answerednotAllowedand is neither stored nor fanned out.- The JSON lane's deposits,
/mimi/v1/submitMessage?recipient=and/mimi/v1/welcome/ingest?recipient=, take an item only for a user of a domain the peer's proof authenticates (403 otherwise). A user of this provider's queues are filled only by this hub's own fan-out and its operator. - On the provider path a peer acts only for users of the provider its proof names: it publishes KeyPackages only for them (
/mimi/v1/keyMaterial/ingest?user=), and pulls only what is queued for them (/mimi/v1/welcomeand/mimi/v1/message). A user of this provider, by bare name or by URI, takes KeyPackages from no peer, and what is queued for one is read by no peer. The operator's loopback listener gainsoperator/keyMaterial,operator/welcomeandoperator/messagefor this provider's users;examples/seed_table.shpublishes there. - mimihubd can export traces and metrics over OTLP/HTTP to an OpenTelemetry collector: per peer provider, how many requests each way, with what status or failure and how long they took. Built with the
otlpfeature (off in a source build, on in the release binary and .deb) and on only whenMIMI_OTLP_ENDPOINTnames a collector, which must behttpsor loopbackhttp. A record carries the route template, never a path value, user or room. Besides the outbound client, the exporter is the one connection the hub opens, and only to the operator's collector. - Every refusal mimihubd answers with an HTTP error status carries an RFC 9457 problem body (
application/problem+json) on each of its listeners: a type named by its anchor indocs/problems.mdfor each condition a peer can act on, andhttp-errorfor any other status. Error bodies were empty or text written for a log; the text is gone from the answers, and no problem body names a user, a client or a room. - mimihubd keeps a room's ratchet tree once a Commit's bundle gives it one (a Full GroupInfo and a full ratchet tree), after checking who sent it; a tracked room's Commits are verified against the tree with openmls and refused when they do not apply, and its held proposals are queued in the group. The hub records which provider seeded each room and logs every Commit the tree refuses. The operator's listener gains
untrackRoom. mimihubd depends on openmls withextensions-draft. - For a tracked room, mimihubd authorizes each participant-list change for its proposer (room-policy-04 §8.1): the committer for a change carried by value, the leaving member for a held leave. One's own leave needs
canRemoveSelf; any other change to one's own role is refused untilcanChangeOwnRoleis built. A tracked room's policy and list are taken from its GroupContext when it is seeded, a Commit adding a firstroles_listis refused (room-policy PR #52), and the operator'sroomPolicy,memberRoleandaddParticipantanswer 409 for it. - mimi-core:
Capability::RemoveSelf(canRemoveSelf,0x0006) andRoomPolicy::authorize_self_removal. - mimihubd has an outbound client for requests to other providers: https only, to the peer's domain or a subdomain; the hub's certificate as the client certificate; every resolved address checked against the special ranges before connecting, and the connection made to that address. New settings
MIMI_OUTBOUND_ALLOW,MIMI_OUTBOUND_PROXYandMIMI_PEER_TRUST.MIMI_SERVER_CERTneeds theclientAuthextended key usage for it. - mimihubd has an outbox for fan-out to other providers, delivered by a worker in order per room and provider, with retries and no expiry, and a peer directory lookup (
MIMI_PEERSfor a peer's base). The operator's listener gainsoutboxanddropOutbox.MIMI_CLIENT_CERT/MIMI_CLIENT_KEYset the outbound client certificate apart from the server's. - mimihubd fans out what it accepts for a room it hosts to the other providers with a participant: Commits (to the participants before and after), the Welcome in a Commit's bundle (by the provider recorded for its KeyPackageRef, else the added user's), held leave proposals with their
moreProposals, and application messages. Local members now get a room's Commits and held proposals in their queue too. mimi-core'sFanoutMessagegains a constructor per kind. - mimihubd forwards keyMaterial for another provider's user to that provider, for a room it hosts and from a participant who may add participants, and records each returned KeyPackage's provider for routing its Welcome. Any other such request is answered
noConsent; a failing peer is502. - mimihubd delivers what another hub fans out for a room it hosts to this provider's members of that room: a Welcome makes the users it names members here, and the Commits, proposals and application messages that follow are queued for them, each message once. A message for a room with no member here is answered
404with the new problemno-local-member;remote-room-not-delivered(422) is retired. - mimihubd signs every request it sends with the provider's DNS-published key when
MIMI_SIGNING_KEYandMIMI_SIGNING_SELECTORare set (RFC 9421, as draft-atwood-mimi-provider-auth §5 profiles it, with a nonce), and then presents a client certificate only whenMIMI_CLIENT_CERTnames one. Inbound,Fromis required on every peer request and must name a domain its proof authenticates; a signature's nonce is refused the second time within its window; the policy settingrequire_nonce_on_key_materialrefuses a signed keyMaterial request without one. - A client can join a room by external Commit where the room allows it (protocol-07 §5.6): mimihubd keeps each tracked room's
mls_operational_policy(mimi-core reads the whole component) and its last Full GroupInfo, servesPOST /groupInfo/{roomId}(the answer encrypted to the requester and signed with the hub's own MLS key,MIMI_HUB_MLS_KEY), and accepts an external Commit from a joiner the room's roles admit (canAddOwnClient,canOpenJoin), never while proposals are held. A change to the operational policy needscanChangeMlsOperationalPolicies. The hub policy gainsexternal_commit_when_unset. mimi-core reads an external Commit (new_member_commit, itsExternalInit) and gains the groupInfo wire types. - For a tracked room, a change to the
roles_listneedscanChangeRoleDefinitionsand a change to thebase_room_policycanChangeRoomMembershipStyle, in the committer's role (room-policy-04 §8.6); until now any participant could make them.
Conformance
Per section of the drafts below, what this repository implements and what it does not build yet. Hand-maintained from the code; a row that says "not built yet" names the entry in DIVERGENCES.md that explains it. A deployment's own choices (which ciphersuites it accepts, who identifierQuery finds) are settings, described in mimihubd/README.md, not rows here.
Status words. Implemented: the code does it, with tests. Partly: the code does part of it; the row says which part. Not built yet: the code does not do it. Client: the requirement falls on a client; the library supplies the mechanism and a client calls it.
Drafts
| Draft | Revision |
|---|---|
draft-ietf-mimi-protocol | -07 |
draft-ietf-mimi-content | -10 (reads and writes -09 peers, DIV-17) |
draft-ietf-mimi-room-policy | -04 |
draft-ietf-mls-extensions | -10 (AppDataUpdate) |
draft-ietf-mls-virtual-clients | -01 |
Transport and directory (protocol-07 §4.1, §5.1)
| ID | § | Requirement | Status | Where |
|---|---|---|---|---|
| T1 | 4.1 | Inter-provider requests over HTTPS | Implemented | mimihubd/src/tls.rs: the peer listener serves TLS only |
| T2 | 4.1 | Target provider in Host | Partly | Not compared with this hub's domain (DIV-16) |
| T3 | 4.1 | Source provider in From | Partly | Checked against the certificate when present, not required (DIV-16) |
| T4 | 4.1 | Mutually authenticated TLS | Implemented | Client certificate from the CA bundle, or a DNS-key request signature (provider_auth.rs); any CA may name any provider (DIV-16) |
| T5 | 5.1 | Publish /.well-known/mimi-protocol-directory | Implemented | Provider::directory; also on a plain listener of its own |
Key material (protocol-07 §5.2)
| ID | § | Requirement | Status | Where |
|---|---|---|---|---|
| K1 | 5.2 | Each KeyPackage returned at most once | Implemented | store.rs claim is one atomic statement |
| K2 | 5.2 | Never serve expired key material | Implemented | Claim filters on expiry in the same statement |
| K3 | 5.2 | Hub associates KeyPackageRef with the target provider | Implemented | associate_claimed_keypackage |
| K4 | 5.2 | Provider associates KeyPackageRef with its local client | Implemented | publish_key_package |
| K5 | 5.2 | Refuse a KeyPackage or Welcome in a ciphersuite the provider does not accept, before decoding it | Implemented | src/gate.rs; the accepted list is the policy's mls_ciphersuites |
Room state and update (protocol-07 §5.3, §7.5)
| ID | § | Requirement | Status | Where |
|---|---|---|---|---|
| R1 | 5.3, 7.5 | Participant-list changes as an AppDataUpdate (mimiParticipantList) | Implemented | src/commit_wire.rs, src/participant_list.rs; also read from the 0xF7A0 compatibility carrier (DIV-15) |
| R2 | 5.3, 7.5 | Removing an active user together with the MLS Remove | Client | The library's update codec; the client builds the Commit |
| R3 | 5.3 | Hub refuses a removed participant's messages, Commits and proposals (except Remove and SelfRemove) | Implemented | Provider::authorize_sender on submitMessage |
| W4 | 5.3 | update (HandshakeBundle) wire codec | Partly | One room-changing proposal per Commit, with or without Add and Remove (DIV-10); a tracked room's Commit is verified against its ratchet tree; the Commit is not stored or relayed |
| W11 | 5.3 | A room-policy change is an AppDataUpdate for a room-policy component | Implemented | roles_list and base_room_policy (DIV-15) |
Messages and fan-out (protocol-07 §5.4, §5.5)
| ID | § | Requirement | Status | Where |
|---|---|---|---|---|
| M1 | 5.4 | An application message is an MLS PrivateMessage | Client | The hub relays it opaque |
| M2 | 5.4 | sendingUri is an active participant | Implemented | Provider::authorize_sender |
| M3 | 5.5 | Fan out to every provider with active participants | Implemented | Commits, held proposals and application messages, through the outbox (DIV-5) |
| M4 | 5.5 | Route a Welcome by the KeyPackageRef it carries | Implemented | By the provider recorded when the hub forwarded keyMaterial for that KeyPackage, else the added user's domain (DIV-5) |
| M5 | 5.5 | A duplicate notify is answered 201, byte-exact | Implemented | The notify_seen ledger |
| M6 | 5.4, 5.5 | Store and deliver a PrivateMessage once | Implemented | submitMessage, message |
| W9 | 5.5 | notify is accepted only from the room's hub | Implemented | notify_source.rs |
GroupInfo and join (protocol-07 §5.6)
| ID | § | Requirement | Status | Where |
|---|---|---|---|---|
| G1 | 5.6 | Hub checks the joiner's authorization before returning GroupInfo | Implemented | Signature, the credential's provider, and who may join (canAddOwnClient, canOpenJoin); joining codes and preauthorization not built (DIV-1) |
| G2 | 5.6 | GroupInfoResponse encrypted and signed by the hub | Implemented | EncryptWithLabel to the request's key, signed by MIMI_HUB_MLS_KEY as hub_sender (DIV-1) |
| G3 | 5.6 | An external Commit is accepted where the room allows it | Implemented | Tracked rooms; refused while proposals are held (no externalProposals staple, DIV-1) |
| G4 | 5.6 | The room's operational policy (room-policy-04 §7.1) is kept and external_commit_allowed enforced | Implemented | Other fields kept, not enforced; changes need canChangeMlsOperationalPolicies (DIV-18) |
Consent (protocol-07 §5.7)
| ID | § | Requirement | Status | Where |
|---|---|---|---|---|
| C1 | 5.7 | Accept and process requestConsent | Implemented | process_request_consent; answered 202 on the wire lane (W12) |
| C2 | 5.7 | Accept and process updateConsent (grant, revoke) | Implemented | process_update_consent |
| C3 | 5.2, 5.7 | KeyPackage access gated by consent | Implemented | keypackage_access, default deny |
Discovery (protocol-07 §5.8)
| ID | § | Requirement | Status | Where |
|---|---|---|---|---|
| W6 | 5.8 | identifierQuery over the wire lane | Partly | One Handle or Nick query per request; other identifier types not built yet (DIV-4). Who it finds is the policy's identifier_discovery |
Abuse reports and assets (protocol-07 §5.9, §5.10)
| ID | § | Requirement | Status | Where |
|---|---|---|---|---|
| A1 | 5.10.2 | Hub checks a downloadUrl host belongs to a peer provider | Not built yet | DIV-3 |
| A2 | 5.10.3 | OHTTP gateway for asset download | Not built yet | DIV-3 |
| A3 | 5.9 | reportAbuse with an attached AbusiveMessage | Not built yet | Metadata-only reports are accepted (DIV-8, DIV-9) |
Wire framing (protocol-07 §5, TLS presentation language)
| ID | § | Requirement | Status | Where |
|---|---|---|---|---|
| W1 | 5.4 | submitMessage | Implemented | src/protocol_wire.rs, /mimi/pl/submitMessage/{roomId} |
| W2 | 5.7 | requestConsent, updateConsent | Implemented | /mimi/pl/requestConsent, /mimi/pl/updateConsent |
| W3 | 5.2 | keyMaterial | Implemented | /mimi/pl/keyMaterial/{targetUser} |
| W5 | 5.5 | notify (receiving) | Implemented | /mimi/pl/notify/{roomId}: a Welcome makes its users members here, and what follows is queued for them (DIV-5) |
| W7 | 5.1 | The directory names the wire endpoints | Implemented | Provider::directory |
| W8 | 2 | TLS presentation language as the wire encoding | Implemented | The /mimi/pl/* routes |
| W10 | 7.5 | Participant-list indices are positions; added users appended | Implemented | src/participant_list.rs |
| W12 | 5.7, 10.6 | Consent answered 202 (422 for an operation the route does not take); wire bodies labelled application/mimi-protocol | Implemented | mimihubd/src/http.rs |
Content (content-10)
| ID | § | Requirement | Status | Where |
|---|---|---|---|---|
| F1 | 4.1 | Per-message salt from a CSPRNG | Implemented | src/content.rs |
| F2 | 6.1 | Deterministic CBOR, no indefinite length | Implemented | src/content.rs |
| F3 | 6.2 | Extension keys int or text of at most 255 octets, valid UTF-8 | Implemented | validate_extensions |
| F4 | 6.3 | NestedParts at most 4 deep | Implemented | validate_nesting |
| F5 | 7.1 | Receive application/mimi-content, text/plain, text/markdown;variant=GFM-MIMI | Client | The codec reads all three |
| F6 | 4.5 | Decrypt external content | Client | src/external.rs; the caller supplies the AEAD |
| F7 | 7.1.1 | GFM-MIMI without raw HTML or autolinks | Client | validate_gfm_mimi_nohtml |
| F8 | 9.3 | Only the original sender edits or retracts a message | Client | authorize_replacement, which a receiving client calls |
| F9 | 4.5 | Encrypt external content | Client | src/external.rs; the caller supplies the AEAD |
| F10 | 4.1 | The 7-element container with a flat NestedPart | Implemented | src/content.rs |
Room policy (room-policy-04)
| ID | § | Requirement | Status | Where |
|---|---|---|---|---|
| P1 | 3 | One role at a time; role 0 no-role, role 1 banned | Implemented | src/room_policy.rs; a ban into role 1 needs role 1 defined |
| P2 | 3, 8.6 | A role-list change is not in the same Commit as a participant-list change | Implemented | check_changes |
| P3 | 5 | Fixed membership, max_clients, max_users | Partly | Kept, not enforced on a Commit (DIV-15) |
| P4 | 8.1 | Who may make a role change (authorized_role_changes, canBan, ...) | Implemented for tracked rooms | Each change authorized for its proposer, canRemoveSelf for one's own leave; canChangeOwnRole, counts and Removes without a list change not built yet; untracked rooms not checked (DIV-15) |
| P7 | 8.6 | Who may change the room's roles, base policy and operational policy | Implemented for tracked rooms | canChangeRoleDefinitions, canChangeRoomMembershipStyle, canChangeMlsOperationalPolicies for the proposer (DIV-15, DIV-18) |
| P5 | 8.3 | Hub enforces canSendMessage | Implemented | authorize_sender, by the sender's role |
| P6 | 9 | One stored policy is the authority at each check | Implemented | room_policy table |
Virtual clients (mls-virtual-clients-01 §5-§6)
| ID | § | Requirement | Status | Where |
|---|---|---|---|---|
| VC1 | 5.2 | The five per-epoch virtual-client secrets | Implemented | src/virtual_clients.rs |
| VC2 | 5.6.1 | Small-Space PRP (FF1, AES-128, radix 2) | Implemented | small_space_prp_encrypt |
| VC3 | 5.6.2 | reuse_guard, and recovering the sender's leaf | Implemented | compute_reuse_guard |
| VC4 | 5.6.3 | generation_id | Implemented | compute_generation_id |
| VC5 | 6.2, 6.3 | Join the emulation group externally; removal advances the epoch | Implemented | The conformance tests, against an emulation group only |
Divergences
Where this code departs from the drafts, and why. The full text: DIVERGENCES.md.
- DIV-1 GroupInfo and external-commit join: built for rooms whose tree the hub keeps
A client can join a room by external Commit (protocol-07 §5.6), as the drafts describe and as mimid does it (
mimihubd/src/external_join.rs,group_info_endpoint.rs):- Whether the room allows it: its
mls_operational_policycomponent'sexternal_commit_allowed(DIV-18). A room with no such component follows MLS, where an external join is possible; a deployment can refuse those rooms instead (external_commit_when_unset = "deny"in the hub policy). - Who may join: a listed participant whose role holds
canAddOwnClient(a new client of its user), or an unlisted user when role 0 holdscanOpenJoin, whose external Commit then adds that user, and only that user, to the participant list. A room with no roles has no role checks (room-policy PR #52: "A room that has noroles_listhas no role-based restrictions."). Preauthorized users are not read and joining codes are refused: not built yet. - **
POST /groupInfo/{roomId}**: the request'sSignWithLabelmust verify, its BasicCredential must name a user of the provider the request's proof authenticates, and the user must be one who may join. The answer is the room's last Full GroupInfo, its tree as afullRatchetTreeOption and the proposals held for the epoch with the time each was accepted,EncryptWithLabeled to the request's key with the room ID as context, and signed by the hub's own MLS key (MIMI_HUB_MLS_KEY) ashub_sender, credentialmimi://<hub domain>. Every refusal isnotAuthorized, the code §5.6 has; a room this hub does not host is404, as mimid answersnoSuchRoom. A hub with no MLS key answers every requestnotAuthorized. Mark's proposedexternalJoinNotAllowedcode is not used until a draft defines it. - The GroupInfo kept is the Full one the room's last accepted Commit (or the bundle that seeded it) carried, and only while the room allows external Commits. After a Commit with a Partial GroupInfo or none, none is kept until the next Full one: a Partial one is rebuilt to check the Commit (DIV-12), not kept.
- **An external Commit on
update** is verified against the room's tree like any other (openmlsPublicGroup), and is refused (notAllowed, with the reason) when the user its new leaf names is not of the provider whose proof came with the request (the leaf is signed by the joiner's own key, so nothing else ties that user to a provider), when the room does not allow it, when its joiner may not join, when it changes anything but its joiner's own entry in the list, when proposals are held for the epoch, or when the hub keeps no tree for the room (an untracked room refuses every external Commit, since nothing could verify it). - **No
externalProposalsstaple**: §5.5 lets the hub re-issue, as its own external proposals, the held proposals an external Commit invalidates. That needs the hub listed in each group'sexternal_senders, which groups do not do, so this hub refuses an external Commit while proposals are held instead, as mimid does, and itsexternalProposalsis always empty.
- Whether the room allows it: its
- DIV-2 CLOSED: the accepted ciphersuites are a setting
The accept-gates refuse a KeyPackage, Welcome or GroupInfo in a ciphersuite outside the accepted list before the bytes reach openmls. The list is the deployment's (
mls_ciphersuitesin the policy file,mimihubd/README.md); by default it is every suite the crypto provider implements, and the directory lists the same suites.- DIV-3 Assets and OHTTP transport
Not supported. v1 is messaging-only: text content over the wire and JSON lanes, no binary asset transfer, no OHTTP relay path (
§5.10).- DIV-4
identifierQueryanswers a single Handle or Nick query only: other identifier types not built yet Who a query can find is the deployment's setting (
identifier_discovery,mimihubd/README.md). On the TLS-PL wire lane the answer is anIdentifierResponse, as §5.8 has it, always HTTP 200 (notFound means the request was acceptable and nothing matched, so the code in the body says the outcome): a user the hub answers for issuccesswith the user's URI on this provider; every other answer is the samenotFoundbody, byte for byte, whether the user is outside the setting, does not exist, or the request could not be decoded or evaluated. The JSON lane answers with the bare status (200 or 404, no body).- DIV-5 fan-out to other providers, and what is not delivered yet
For a room it hosts, the hub fans out what it accepts (protocol-07 §5.5;
mimihubd/src/fanout.rs): each local participant gets the message in its queue, and each other provider with a participant gets one FanoutMessage in the outbox, which a worker posts to that provider'snotify.- DIV-6 client-asserted identity is not bound to an authenticated channel
This reference hub authenticates the transport peer via mTLS (an allowlisted certificate), never the individual end-user identity inside a request body. The three wire routes that carry a claimed identity have different answers, not one shared gap:
- **
submitMessage**:sendingUriis unverified by this hub, and that is not a gap. RFC 9420's own delivery-service trust model does not expect the DS to verify a message's signature or hold group state - that is the receiving member's responsibility, checked against the sender's leaf credential inside the actual MLS group. This hub relaying an unverifiedsendingUriclaim matches the spec's own DS posture rather than diverging from it. - **
keyMaterial**: the requester is bound to the peer. The provider path takes aKeyMaterialRequestonly from a peer whose proof authenticates the provider of itsrequestingUser(never this provider: a peer does not speak for this provider's users), or the provider hosting the room the request names, the room's hub, through which §5.2 sends every request ("MUST be sent via the hub provider of whatever room they will be used in"); otherwise403 not-permitted. The path's user and the body'stargetUsermust be the same user, since the KeyPackage is taken for the one and consent is read for the other; otherwise400 malformed-request. What stays open is the room clause, at its full width: any authenticated peer can name any requester by naming a room on its own domain, since the target's provider cannot tell whether that room exists. It follows from §5.2, which has the target's provider hear the request from the room's hub, and from a BasicCredential, which binds the request's signature key to no one; there is no fix inside protocol-07. A consent scoped to a room narrows it, and that is the granting user's choice. What the binding does close is a peer naming a requester of another provider for a room on that provider or on a third one. The provider-path rate limit is therefore counted on what is proven, the peer's domain, as well as on the requester (DIV-23). UnlikesubmitMessage, the draft's ownKeyMaterialRequest(§5.2) carries a self-signed identity claim (requesterSignatureKey/requesterCredential/keyMaterialRequestSignature) - a real mechanism, not an invented one. This hub checks the credential's embedded identity against the claimedrequestingUserand logs the outcome, but never refuses a request over a mismatch, and does not verify the signature itself (the exact signed-content scope isn't confirmed against primary source, and this check is diagnostic only - nothing gates on it). This is a deliberate testing-phase choice, not a settled production security posture. A self-signed credential has no external trust root without a persistent identity registry, and this hub'sKeyPackagestore is a one-time-claim object for the add flow, not one - there is nothing durable here to pin a claimed identity's genuine key against. Requiring a match before serving would functionally refuse any identity this hub has not already interacted with, defeating the point of testing interop with new peers. A production/GA federation policy (rate-limiting repeated unverified claims, or a real persistent identity-key registry) should be revisited before general availability. A request for another provider's user is forwarded as received (DIV-5): this hub does not check its signature and cannot sign one, so the target provider checks it, and a KeyPackage is claimed from another provider only for a requester whose client signs the request. - **
consent**:ConsentEntry(§5.7) carries no signature field at all in the draft - no self-signed mechanism exists here for this hub to check even if it wanted to. This may be a genuine gap in the draft itself rather than an implementation gap; worth raising with the WG rather than inventing a private signing convention unilaterally.
- **
- DIV-7 the directory document - CLOSED
§5.1 defines a directory whose top-level keys are the endpoint URLs. This hub's
directory()now publishes those flat, draft-shaped keys (absolute HTTPS URLs) for the six endpoints it wire-routes, alongside the pre-existingendpoints(JSON compat lane) andwireEndpoints(TLS-PL lane, relative paths) nesting, kept as additive non-standard keys for existing consumers. A client that looks for a root-levelkeyMaterialkey per the draft now finds one.- DIV-8
reportAbuseis bounded to metadata-only reports; asset download is not implemented reportAbuse(§5.9) has a v1 wire handler (POST /mimi/pl/reportAbuse/{roomId}) that accepts and storesreportingUser/allegedAbuserUri/reasonCode/notein the configured provider store. A report attaching one or moreAbusiveMessageentries is refused (decode error, not silently dropped): validating anAbusiveMessagerequires recalculating itsFrankagainst this hub's own key material, which this codebase does not build (DIV-9). This hub takes no automated action on an accepted report - it is a stored record only, matching the draft's own text ("the response code only indicates if the abuse report was accepted, not if any specific automated or human action was taken").- DIV-9
SubmitMessageResponseomits thefrankfield, andreportAbusecannot validate a franked message §5.4.1
server_frankframing is not yet built. The wire form'soptional Frank frankpresence tag is encoded as absent, so adding a real value later is additive. Closing this divergence needs computingserver_frankfrom a client-suppliedfrank_aadand this hub's ownhub_key(an HMAC-style commitment scheme, per §5.4.1's description and its comparison to the Facebook franking design), plus the receiver-side verification the draft describes. The implementation does not compute or verifyserver_frank;SubmitMessageResponsetherefore omitsfrank, andreportAbuserejects attachedAbusiveMessagevalues rather than accepting them unverified.- DIV-10 CLOSED for room updates by Commit; four operations have no wire route of their own
update(§5.3) applies a Commit carrying participant-list changes, room-policy changes, or both (one change per policy component; a roles_list never beside a participant-list change), with or withoutAddandRemoveproposals, and a member's leave through proposals the next Commit includes by reference.roomPolicy,memberRole,addParticipantandauthorizeSenderhave no wire route of their own: on the wire they are what anupdatedoes.- DIV-11 CLOSED for
consent_extensions;update's fields stay opaque ConsentEntry.consent_extensions(§5.7) is decoded into the realdraft-ietf-mls-extensions§4.6AppDataDictionaryshape: a run ofComponentData { uint16 component_id; opaque data<V>; }entries, sorted and unique bycomponent_id(the draft's own MUST), wrapped in one outer length-prefixed window.id_request_extensions/id_response_extensions(§5.8) andabuse_extensions(§5.9, the sameAppDataDictionarytype) stay opaque length-prefixed blobs - the decoder consumes these fields without interpreting or retaining their contents, since nothing here produces or consumes those specific fields.update'sRatchetTreeOptionfield (§5.3) also stays opaque, for the same reason as the rest ofupdate's codec: no live accept-path exists yet. The wire vectors fill it with a real option (see DIV-12), not filler bytes, so a decoder that reads it is not thrown by them. AFullGroupInfoOptionis read raw and suite-gated; aPartialone is read raw too (DIV-12).- DIV-18 the operational policy component: kept, two flags enforced
mls_operational_policy(0x0024, room-policy-04 §7.1,OperationalParameters) is read whole (mimi-core/src/operational_parameters.rs) and kept per room whose tree the hub keeps: from the GroupContext when the room is seeded, and from an AppDataUpdate in a Commit. Where -04 leaves a type undefined it is read as MLS defines the name:WireFormatsas aWireFormat(uint16),ContentTypeas MLS's (uint8),ComponentIDas mls-extensions-10 has it (uint16),MediaTypeas its §6.2.2 struct, andunit64asuint64.PendingProposalPolicy'sextensionarm names no enum value, so onlyunspecified,immediate_commitandrandom_delayare read.- DIV-12 a
PartialGroupInfo is rebuilt at the hub, its tree tried at each place in the list §5.3 writes the
GroupInfoOptionpayload raw: aGroupInfoforfull, aPartialGroupInfoforpartial, each ending where its own structure ends, withratchetTreeOptionfollowing. Both are written and read that way here. AFullpayload's end is found by decoding it as an openmlsVerifiableGroupInfo, and it is suite-gated at decode; aPartialpayload's by decoding it withmimi_core::partial_group_info(draft-ietf-mls-ratchet-tree-options §4), and it is not suite-gated, since it carries no ciphersuite.- DIV-13 an exhausted client is answered with
partialSuccess When a user has no key material left (no unexpired one-time KeyPackage, and no last-resort one, which by default is handed out once, DIV-23), the
keyMaterialresponse carries user statuspartialSuccesswith one client entry whose status iskeyMaterialExhausted. §5.2 definespartialSuccessas key material for at least one client, so a response with no successful client does not fit it, and the draft gives no user code for "known user, nothing left to issue":noCompatibleMaterialis defined as no client able to supply material compatible with the request's required capabilities, which is a different condition.partialSuccessis used because the user is known and a client was enumerated; the choice is a judgment call on a point the draft leaves open, and is not treated as settled. The decoder accepts the response as sent. It refuses the combinations §5.2 rules out:successwith a client that is notsuccess,successorpartialSuccesswith no client, and a client list under any user status other thansuccess,partialSuccessandnoCompatibleMaterial. Every other combination of user and client statuses is read and written back unchanged.- DIV-15 three room-policy components are read; the other ten are refused
updatereads a participant-list change from either of two carriers: an AppDataUpdate (mls-extensions-10 §4.7, proposal type0x0008as its §7.2.1 suggests) addressed to component0x0022(participant_list, protocol-07 §10.3), or the custom proposal of the private type0xF7A0(mimiParticipantList). Both carry the draft'sParticipantListUpdateencoding and are applied the same way.0xF7A0is a compatibility carrier for clients that do not yet send the change as an AppDataUpdate, and is to be removed once they do. The openmls release this crate pins (0.9.2) is built without itsextensions-draftfeature and cannot read an AppDataUpdate, socommit_wirereads the proposals window itself and rewrites an AppDataUpdate to the0xF7A0form for reading only; the bytes of the Commit are never changed. A fanned-out Commit or proposal reaching/notifyis refused before it is read (see below).- DIV-16 a certificate names the provider domains it carries, and any CA in the client bundle may issue any name
Protocol-07 §4.1 has the TLS certificates presented in the handshake authenticate the source and target provider domains (RFC 6125). This hub's mTLS listener accepts a client certificate only if it chains to a CA in
MIMI_CLIENT_CA; the request handlers then see the end-entity certificate, and/notify/{roomId}(§5.5) is accepted only when that certificate is valid for the room's hub, the domain in the authority of the room URI. A certificate is valid for a domain when adNSNamesubject alternative name matches it, exactly or by a leftmost wildcard label; the common name is not read. The same question gates the JSON-lane/mimi/v1/notify, which takes aroomquery for it.- DIV-17 content-10: what
mimi-corereads and writes against content-09 peers The content codec follows draft-ietf-mimi-content-10. Its examples are the instance documents already held for -09: the draft's text caught up with them (the reaction's heart is U+2764 and its in-reply-to ID is the one in the table), so there is no new vector to add and every one still reads and writes byte for byte.
- DIV-19 the client lane is a local extension
MIMI specifies provider-to-provider traffic and leaves how a provider's own clients reach it to the provider. This hub serves one such path, the client lane (
mimihubd/README.md, "The client lane"), on its own listener, for a provider whose client-facing service authenticates its users and signs each request for one of them. Nothing on it is a MIMI route or changes one: rooms, Commits, proposals and application messages it carries go through the same checks as on the provider path, with the user as the requester. A peer cannot reach it, and the operator's routes stay on their own loopback listener.- DIV-21 several participant-list updates in one Commit: the order their additions are appended in
protocol-07 §7.5 says every
ParticipantListUpdatein a Commit indexes the list as it stood before the Commit ("This holds even when a commit contains more than one ParticipantListUpdate. Removing one entry does not shift the indices of the other removals."), and that a Commit whose updates touch one user twice is not valid. It does not say in which order two updates' added participants are appended. This hub, andmimi_core::participant_list::merge_updates, which a client of this repository uses too, append them in the order the Commit's AppDataUpdate proposals for the participant list come in, the order draft-ietf-mls-extensions §4.7 hands a component's updates to the application. A client that appends them in another order computes another list, and so a GroupContext that differs from the Commit's.- DIV-22 the neutral lane profile's admins cannot leave; a deployment's profile may let them
room-policy-04 §8.1.2 authorizes
canRemoveSelfby the holder's role'sauthorized_role_changes"entry where from_role_index matches its current role", whose targets contain zero, andcanRemoveParticipantby the entry whose from_role_index matches the removed user's role. Both read the same entry, so a role that may leave from role 2 may also remove other holders of role 2 when it holdscanRemoveParticipant. The neutral profile (client_lane_rooms.rs) lets a member leave (role 3 has an entry 3 → 0 and nocanRemoveParticipant) and does not give the admin role an entry 2 → 0, so under it an admin cannot remove another admin and cannot leave either: an admin leaves by first being changed to a member by another admin (the entry 2 → 3), and the room's last admin cannot. A deployment whose admins should leave writes the entry 2 → 0 in its own profile (MIMI_LANE_ROOM_POLICY), and with it its admins may also remove one another, as §8.1.2 reads; the neutral profile keeps the narrower rule as its default.- DIV-23 with
MIMI_LAST_RESORT_REUSE=true, a last-resort KeyPackage is handed out more than once protocol-07 §5.2 says of the key material a
keyMaterialrequest claims: "The keying material is designed for use in a single room and may not be reused", and, normatively, "Keying material provided from one response MUST NOT be provided in any other response." By default this hub follows it: a last-resort KeyPackage is handed out once and deleted, like any other. A deployment may setMIMI_LAST_RESORT_REUSE=true(off by default), and then the hub hands a user's last-resort KeyPackage out more than once, so twokeyMaterialresponses, for two rooms or two requesters, carry the same KeyPackage. That breaks §5.2's MUST NOT, which makes no exception for a last-resort KeyPackage; the setting is a deployment's choice of RFC 9420 §16.8's MAY over it.
Problem types
Every refusal this hub answers with an HTTP error status carries an RFC 9457 problem body whose type is one of these.
no-local-member404: Not delivered: no member of the room hereThe answer to a
notify(protocol-07 §5.5) that carries a Commit, proposals or an application message for a room hosted on another hub when no user of this provider is a member of that room. A user becomes a member when the room's hub sends this provider a Welcome naming one of the user's KeyPackages. The message is not recorded, so the samenotifysent again gets the same answer; the sender should drop the delivery rather than retry it.malformed-request400: The request could not be readAny endpoint, for a body, path or query it cannot read: a wire body that does not decode as the endpoint's request, a JSON body that is not JSON, a query parameter missing, a path segment that is not a room URI, or a room this hub does not host where the endpoint needs one it does. Also what axum answers with 400 for a request it rejects before a handler runs. Fix the request; sending it again unchanged gets the same answer.
material-not-accepted400: The KeyPackage or Welcome is not acceptedkeyMaterial/ingestandwelcome/ingest: the KeyPackage or Welcome does not decode, is under a ciphersuite this hub does not accept, or fails the gate's other checks. Nothing is stored. Do not retry the same bytes.message-not-queued400: The message was not queuedThe JSON lane's
submitMessage: the store's bounds refuse the message (empty, too large, a recipient it does not keep a queue for, or a full queue). A full queue may drain; anything else is the same on retry.client-not-authenticated401: The client lane request is not authenticatedThe client lane's gate: no lane signature, one that does not verify with a key in the lane's key file, a missing or reused nonce, a signature older than 30 seconds or made before the hub started, or a
mimi-client-userthat is not a user of this provider. The hub logs which; the body does not say. Only the provider's own client-facing service can retry, with a fresh signature.client-rate-limited429: Too many client lane requests for this userThe client lane takes a bounded number of requests per user per minute, a backstop to the client-facing service's own limits. Retry after a minute.
key-material-rate-limited429: Too many keyMaterial requests for this targetA
keyMaterialrequest on the provider path (protocol-07 §5.2) from a requesting provider that has already asked for the same target user's KeyPackages the most times the hub takes in an hour (5, as for one user on the client lane). The requesting provider is the domain the peer's proof authenticated. The requester a request names is not counted: it is only a name the peer chose, and counting it would let one peer spend the budget of another provider's users. A target's KeyPackages are spent by being claimed, and a reused last-resort one (DIVERGENCES DIV-23) is the same each time, so the hub bounds how often they can be claimed. Retry after an hour.not-authenticated403: The requesting provider is not authenticatedThe provider-auth gate (no certificate and no valid signature, a signature that does not verify, a refused nonce) and the
Fromcheck (a header naming a provider the request's proof does not authenticate). The hub logs which; the body does not say. Retry only with a valid proof of the provider the request is from.not-permitted403: The requesting provider may not do thiskeyMaterial/ingestpublishing KeyPackages for a user of another provider: only that provider may. Do not retry.not-the-rooms-hub403: Not from the room's hubnotify(protocol-07 §5.5) from a provider that is not the hub of the room the path names. Do not retry: only the room's hub sends a notify for it.sender-not-allowed403: The sender may not send in this roomauthorizeSender: the sender may not send in the room. The answer changes only when the room's list or policy does.not-found404: Not foundNothing answers the request: a route this listener does not serve, no KeyPackage or queued message or Welcome for the user named, an identifier that is not found (
identifierQuery), or an operator'suntrackRoomfor a room with no tree. One body for all of them, byte for byte, so it says nothing about which (DIV-4). Nothing to retry unless what was asked for has since been published.room-not-hosted404: The room is not hosted heregroupInfo(protocol-07 §5.6) for a room this hub does not host; mimid answers this casenoSuchRoom. Ask the room's own hub.method-not-allowed405: Method not allowedA route asked with a method it does not take. The
Allowheader is kept. Use a method theAllowheader names.room-is-tracked409: The room is changed by CommitThe operator's
roomPolicy,memberRoleandaddParticipantfor a room whose ratchet tree the hub keeps: its list and policy are its group's, changed by Commit (DIV-10). Change the room by Commit, or untrack it first.body-too-large413: The request is too largeA body larger than the endpoint takes. Do not retry the same body.
wrong-operation422: Wrong consent operationrequestConsentwith an entry whose operation is notrequestorcancel, orupdateConsentwith one that is notgrantorrevoke(protocol-07 §5.7). Send it to the other endpoint.internal-error500: The hub failedThe hub's own failure, such as its store. Retry later.
upstream-failed502: Another provider did not answerkeyMaterialfor a user of another provider: the hub forwards it, and that provider could not be reached or answered with something this hub cannot read. Also when this hub has no outbound client to forward with. Retry later.http-errorthe answer's own: The request was refusedAny other error status, when no type above applies: for example 415 for a JSON endpoint asked without
Content-Type: application/json. The HTTP status says why.remote-room-not-delivered422: Not delivered: the room is hosted on another hubRetired. This hub delivers messages for rooms on other hubs to their members here, and answers
no-local-memberwhen there are none. The text below is what this answer meant while it was used.
Reasons
Why each refusal is given, and the sentence of the specification it rests on. Where the behaviour is this code's own, the row says so and names the divergence that explains it.
| Reason | Seen as | Rests on | Why |
|---|---|---|---|
not-authenticated | problem not-authenticated, 403 | draft-ietf-mimi-protocol-07 §4.1The TLS connection underlying the HTTPS connection MUST be mutually authenticated. The certificates presented in the TLS handshake MUST authenticate the source and target provider domains, according to [RFC6125]. DIV-16 | The request carries no proof of the provider it comes from: no client certificate and no valid request signature, or a From header naming a provider the proof does not authenticate. |
client-not-authenticated | problem client-not-authenticated, 401 | local DIV-19 | A client lane request whose signature does not verify with a configured key, is older than 30 seconds, reuses a nonce, or names a user who is not on this provider. |
client-rate-limited | problem client-rate-limited, 429 | local DIV-19 | More client lane requests for one user in a minute than the hub takes. |
key-material-rate-limited | problem key-material-rate-limited, 429 | RFC 9420 §16.8To prevent such a denial-of-service attack, the KeyPackage publication system SHOULD rate-limit KeyPackage requests, especially if not authenticated. DIV-23 | More keyMaterial requests from one requesting provider for one target user in an hour than the hub takes. |
no-consent | keyMaterial answer noConsent | draft-ietf-mimi-protocol-07 §5.2noConsent indicates that the requester does not have consent to fetch key material for the target user. The target provider can use this response as a catch all and in place of other status codes such as userUnknown if desired to preserve the privacy of its users. | The target user has not consented to this requester, or the hub does not say whether the user exists. |
material-not-accepted | problem material-not-accepted, 400 | local DIV-2 | A KeyPackage or Welcome that does not decode, uses a ciphersuite this deployment does not accept, or fails the hub's other checks; its credential must name the user it is published for. |
not-permitted | problem not-permitted, 403 | local | A provider acting for a user it does not serve: publishing their KeyPackages, or reading or filling their queue; only a user's own provider may. |
upstream-failed | problem upstream-failed, 502 | local | The hub forwarded a request to another provider, which could not be reached or answered with something the hub cannot read. |
update-not-allowed | update answer notAllowed | draft-ietf-mimi-protocol-07 §5.3notAllowed indicates that some type of policy or authorization prevented the hub provider from accepting the UpdateRequest. | The room's policy or the proposer's role does not allow this change. |
update-invalid-proposal | update answer invalidProposal | draft-ietf-mimi-protocol-07 §5.3invalidProposal indicates that at least one proposal is invalid. A list of invalidProposals is provided in the response. | At least one proposal in the update is not valid for the room as the hub holds it. |
participant-list-user-touched-twice | update answer invalidProposal; reported by a client in the room | draft-ietf-mimi-protocol-07 §7.5A single commit is not valid if it contain any combination of Participant list updates that operate on (add, remove, or change the role of) the same user in the participant list more than once. | Two participant-list updates in one Commit, which all index the list before it, add, remove or change the role of the same user. |
seed-changes-room-state | update answer notAllowed; reported by a client in the room | local DIV-19 | The first Commit with a full GroupInfo and ratchet tree seeds the room's tree, and its GroupContext must carry the room's policy, operational policy and participant list as the hub holds them after the Commit. A lane room's are the deployment's profile, which createRoom answers; a seed with others would replace them. |
app-data-component-not-read | update answer invalidProposal; reported by a client in the room | draft-ietf-mls-extensions-10 §4.7An AppDataUpdate proposal is invalid if its component_id references a component that is not known to the application, or if it specifies the removal of state for a component_id that has no state present. DIV-15 | A Commit changes an app data component this implementation does not know; DIV-15 lists the ones it does. join_links is among those it refuses: its update is a list of removals and additions, and how one applies is an open question upstream (mimi-room-policy issue 30). |
roles-change-with-participant-change | update answer notAllowed; reported by a client in the room | draft-ietf-mimi-room-policy-04 §3Changing Role definitions is sufficiently disruptive, that an update to this component is not valid if it appear in the same commit as any Participant List change. | A Commit changes the roles_list and the participant list together. |
first-roles-list-by-commit | update answer notAllowed; reported by a client in the room | mimi-room-policy pull request 52 (open), commit ffd0e96A Commit that adds a roles_list to a group that has none is invalid. DIV-15 | A room whose group was created without a roles_list cannot get its first one by Commit; draft-ietf-mimi-room-policy-04 does not say this, the open pull request does. |
room-is-tracked | problem room-is-tracked, 409 | local DIV-10 | An operator change to the list or policy of a room whose ratchet tree the hub keeps; that room changes by Commit. |
submit-not-allowed | submitMessage answer notAllowed | draft-ietf-mimi-protocol-07 §5.4notAllowed indicates that some type of policy or authorization prevented the hub provider from accepting the SubmitMessageRequest. This could include nonsensical inputs such as an MLS epoch more recent than the hub's. | The sender may not send in this room, or the message is empty or larger than one queued item. |
sender-not-allowed | problem sender-not-allowed, 403 | draft-ietf-mimi-room-policy-04 §8.3canSendMessage - the holder can send instant messages to the room. | The sender is not an active participant whose role holds canSendMessage. |
message-not-queued | problem message-not-queued, 400 | local | The JSON lane's submitMessage: the message is empty, too large, for a recipient the hub keeps no queue for, or the queue is full. |
not-the-rooms-hub | problem not-the-rooms-hub, 403 | draft-ietf-mimi-protocol-07 §5.5A provider that receives a /notify/{roomId} request MUST verify that the source provider authenticated by the transport layer (see Section 4.1) corresponds to the hub of roomId. If it is not, the receiving provider MUST reject the request and MUST NOT process, store, or forward any FanoutMessage it carries. | A notify for a room from a provider that is not that room's hub. |
no-local-member | problem no-local-member, 404 | local DIV-5 | A notify for a room hosted elsewhere when no user of this provider is a member of it; nothing is recorded, so a retry gets the same answer. |
remote-room-not-delivered | problem remote-room-not-delivered, 422 (retired) | local DIV-5 | Retired: the answer to a message for a room on another hub while this hub did not yet deliver those. |
group-info-not-authorized | groupInfo answer notAuthorized | draft-ietf-mimi-protocol-07 §5.6notAuthorized indicates that the requester was not authorized to access the GroupInfo. DIV-1 | The requester may not have this room's GroupInfo. |
room-not-hosted | problem room-not-hosted, 404 | draft-ietf-mimi-protocol-07 §5.6noSuchRoom indicates that the requested room does not exist. If the hub does not want to reveal if a room ID does not exist it can use notAuthorized instead. | A groupInfo request for a room this hub does not host; ask the room's own hub. |
wrong-operation | problem wrong-operation, 422 | draft-ietf-mimi-protocol-07 §5.7A requestConsent whose consentOperation is not request or cancel gets a 422 Unprocessable Content response. | A consent entry sent to the endpoint for the other operations. |
not-found | problem not-found, 404 | local DIV-4 | Nothing answers the request; one body for every case, so it says nothing about which. |
malformed-request | problem malformed-request, 400 | local | A body, path or query the endpoint cannot read. |
body-too-large | problem body-too-large, 413 | local | A body larger than the endpoint takes. |
method-not-allowed | problem method-not-allowed, 405 | local | A method the route does not take; the Allow header names the ones it does. |
http-error | problem http-error, the answer's own status | local | Any other error status, such as 415 for a JSON endpoint asked without a JSON content type. |
internal-error | problem internal-error, 500 | local | The hub's own failure, such as its store; never reported as accepted. |
leaf-lifetime | reported by a client in the room | RFC 9420 §7.3If instead the LeafNode appears in a message being received by the client, e.g., a Proposal, a Commit, or a ratchet tree of the group the client is joining, it is RECOMMENDED that the client verifies that the current time is within the range of the lifetime field. | A leaf in a received Proposal, Commit or joining tree is outside its lifetime; RFC 9420 recommends this check on receipt and requires it only for what a client sends. |
Settings
None given.
Test vectors
The test vectors in this revision, for download. Beside each, the sources that compile it in (include_str! or include_bytes!); a dash means none does.
| File | Bytes | SHA-256 | Opened by |
|---|---|---|---|
content-fixtures/alternative.cbor | 141 | 48605b74d1b7436f75ce01e24645416f703613c58c144bc0580c55ed7b2693bc | - |
content-fixtures/attachment.cbor | 221 | e16a4c9c87c1299ca78c264aea848b369da3c50f0613143ad7bddc374ba6d2c3 | - |
content-fixtures/fixtures.txt | 913 | fec34d228e5499f4484089aef456213c8b2fe3efbb12c82560c3c69cfe2e5c3b | - |
content-fixtures/reply.cbor | 104 | 4679ff39c150294cfae10aeffb3ff34b88a42418bd8003957dfb344337a31c4f | - |
joint-ietf127-mls-vectors.json | 20506 | 2e7e94e9e7188ca2f733d8764c4bd117275f5bbfc6eebcbd201be4aceee32a4f | mimihubd/src/http_update_tests.rs, mimihubd/src/http_update_tracked_tests.rs, tests/joint_ietf127_vectors_replay.rs |
joint-ietf127-vectors.json | 14161 | 21af265f50c7d03e40ddd694ffd56bf00c1f20dc4a8b3a76a6466823a62751dd | tests/joint_ietf127_vectors_replay.rs |
protocol07-vectors.json | 47078 | e223a9ebb3737fae4645fd19c49d059053aa352702ad3946cfdf6adfc0674ec2 | mimihubd/src/http_update_tests.rs, tests/fanout_app_data_update.rs, tests/protocol07_vectors_replay.rs |
vc-01-vectors.json | 7058 | 43a55a806e462d1be48931d89d92517565a5d38d8da84f11a8b2d2ead6b8c1c3 | tests/vc_vectors_replay.rs |
The same facts as JSON: status.json.