This specification provides a way to request invite tokens to a MUC room in order to invite users whose address is unknown to a member-only Multi-User Chat (XEP-0045) [1] room.
Supporting entities MUST advertise the urn:xmpp:muc-token-invite:0
Service Discovery (XEP-0030) [2] feature.
An entity may request a token from a Multi-User Chat (XEP-0045) [1] service by sending an iq of type set
containing a <request>
element in the urn:xmpp:muc-token-invite:0
namespace.
The MUC room MUST reply to the request with a <token>
element in the urn:xmpp:muc-token-invite:0
namespace, containing the token as text node. The token MUST be an opaque string but does not need to be unique within a room.
Implementations MUST reply an error ot type auth/forbidden if the requesting entity isn't allowed to generate a token.
It is possible to create tokens that may be used only a specific number of times to grant users affiliations, and/or may have an expiry time.
To constrain the token to a number of times after which it expires, the counter
attribute (xs:unsignedInt) can be used in the <request>
element.
To constrain the token to a time limit, the delay
attribute (xs:unsignedInt) can be used in the <request>
element.
if both attributes are combined, whichever constraint is reached first expires the token.
The reply from the service MUST contain at least the requested delay
and counter
attributes. Requested values for these attributes MAY be altered by the server. This may be useful to implement a default server policy (maximum time, and/or counter). Values returned indicate current values that apply to the issued token.
Services may want to automatically limit issued tokens even with the request doesn't have any. In the following example, the MUC service enforces a maximum time limit of a week as a policy.
Integration with Mediated Invites or Direct MUC Invitations (XEP-0249) [3] is not described in this document as invite tokens generated this way may not be used when the invitee's address is known.
Clients may include generated tokens in the password
parameter of a URI as such:
Receiving entities will follow the usual flow of joining password protected-rooms.
When a token is used by a participant who doesn't have any affiliation, a server MUST give them an affiliation level of member
.
If an expired token is used by someone who isn't affiliated yet, the room MAY additionally include in the presence error an <expired-token/>
element in the urn:xmpp:muc-token-invite:0
namespace, as a sibling of the <not-authorized/>
element.
It is possible for room participants to list tokens by sending an iq of type get
containing a <tokens/>
element in the urn:xmpp:muc-token-invite:0
namespace.
The room MUST reply with all tokens that the participant is allowed to revoke, each listed in <token>
elements within a <tokens>
wrapper element. Individual token elements MUST contain updated attibute values, that is, if a token has been issued with counter
set to 5 and has been used twice (2), listing tokens at this point will show this specific token with a counter attribute value of 3.
It is possible to revoke a token early by sending an iq containing a <revoke>
element in the urn:xmpp:muc-token-invite:0
namespace, with the token as the text node. The room MUST then reply successfully with an empty iq.
If the user is unauthorized to issue tokens, the room should reply with an iq error type auth/forbidden. If the user is unauthorized to revoke the specified token, or if the token doesn't exist, the room should reply with an iq error of type cancel/item-not-found.
Tokens may be added to bookmark storage by receiving entities and as such implementing MUC rooms SHOULD ignore tokens provided during join when a user is already affiliated with the room. In this case, if a counter was attached it SHOULD NOT be decremented.
Tokens with no constraint are not equivalent to passwords. A token is only required to be supplied once as opposed to passwords, which need to be specified at every join independently of user affiliation.
The Using a token section describes a way for clients to know they may have used an invalid token by adding an error specific to this document. It is likely that tokens aren't stored indefinitely but rather removed from storage not long after they expire, which makes it hard for MUC services to distinguish between a password for the room before configuration change, and an expired token. This specification assumes that it was an expired token as the room isn't password protected.
Possible extensions to this spec could include broadcasting information about the inviter in a new participant's join presence, as well as issuing tokens with specific affiliations and/or Hats (XEP-0317) [4].
None?
None?
Leaking tokens may lead to inviting unwelcomed people to a room. Token limits and revocations provide users a way to reduce harm in such a case. A service SHOULD also enforce a reasonable maximum value as a time or usage constraint (24h, a week, a year, etc.).
Issuing tokens may be locked down by service operators, or by room administrators via the muc#roomconfig_allowinvites
Multi-User Chat (XEP-0045) [1] configuration option.
It is RECOMMENDED that room moderators be able to list and revoke tokens generated by every other participant.
None.
None.
This document in other formats: XML PDF
This XMPP Extension Protocol is copyright © 1999 – 2024 by the XMPP Standards Foundation (XSF).
Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.
## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.
This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).
The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <https://xmpp.org/community/> for a complete list.
Errata can be sent to <editor@xmpp.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. XEP-0045: Multi-User Chat <https://xmpp.org/extensions/xep-0045.html>.
2. XEP-0030: Service Discovery <https://xmpp.org/extensions/xep-0030.html>.
3. XEP-0249: Direct MUC Invitations <https://xmpp.org/extensions/xep-0249.html>.
4. XEP-0317: Hats <https://xmpp.org/extensions/xep-0317.html>.
Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/
First draft.
@report{buquet2023xepxxxx, title = {MUC Token Invite}, author = {Buquet, Maxime}, type = {XEP}, number = {xxxx}, version = {0.0.1}, institution = {XMPP Standards Foundation}, url = {https://xmpp.org/extensions/xep-xxxx.html}, date = {2023-08-15/2023-08-15}, }
END