diff --git a/Dockerfile b/Dockerfile index 1b529dbb..f97e318b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,13 @@ FROM xmppxsf/xeps-base:latest ARG NCORES=1 -ARG TARGETS="html pdf" +ARG TARGETS="html inbox-html inbox-xml pdf xeplist" COPY *.xml xep.* *.css *.xsl *.js *.xsl Makefile /src/ COPY resources/*.pdf /src/resources/ +COPY tools/*.py /src/tools/ +COPY inbox/*.xml inbox/*.ent inbox/*.dtd /src/inbox/ +COPY texml-xsl/*.xsl /src/texml-xsl/ WORKDIR /src RUN OUTDIR=/var/www/html/extensions/ make -j$NCORES $TARGETS diff --git a/Makefile b/Makefile index 8c9773b9..f1ea374b 100644 --- a/Makefile +++ b/Makefile @@ -7,11 +7,34 @@ XMLDEPS=xep.xsd xep.ent xep.dtd ref.xsl $(OUTDIR) TEXMLDEPS=xep2texml.xsl $(OUTDIR)/xmpp.pdf $(OUTDIR)/xmpp-text.pdf XEPDIRS=. inbox HTMLDEPS=xep.xsl $(CSSTARGETS) $(JSTARGETS) -CSSTARGETS=$(OUTDIR)/xmpp.css $(OUTDIR)/prettify.css -JSTARGETS=$(OUTDIR)/prettify.js + +base_CSSTARGETS=xmpp.css prettify.css +CSSTARGETS=$(addprefix $(OUTDIR)/,$(base_CSSTARGETS)) +proto_CSSTARGETS=$(addprefix $(OUTDIR)/inbox/,$(base_CSSTARGETS)) +base_JSTARGETS=prettify.js +JSTARGETS=$(addprefix $(OUTDIR)/,$(base_JSTARGETS)) +proto_JSTARGETS=$(addprefix $(OUTDIR)/inbox/,$(base_JSTARGETS)) + +proto_HTMLDEPS=xep.xsl $(proto_CSSTARGETS) $(proto_JSTARGETS) DO_XELATEX=cd $(OUTDIR); xelatex --interaction=nonstopmode -no-shell-escape "$(notdir $(basename $@)).tex" >/dev/null +xeps=$(wildcard *.xml) +proto_xeps=$(wildcard inbox/*.xml) +all_xeps=$(xeps) $(proto_xeps) + +xep_xmls=$(patsubst %.xml,$(OUTDIR)/%.xml,$(xeps)) +proto_xep_xmls=$(patsubst %.xml,$(OUTDIR)/%.xml,$(proto_xeps)) +all_xep_xmls=$(xep_xmls) $(proto_xep_xmls) + +xep_htmls=$(patsubst %.xml,$(OUTDIR)/%.html,$(xeps)) +proto_xep_htmls=$(patsubst %.xml,$(OUTDIR)/%.html,$(proto_xeps)) +all_xep_htmls=$(xep_htmls) $(proto_xep_htmls) + +xep_pdfs=$(patsubst %.xml,$(OUTDIR)/%.pdf,$(xeps)) +xep_refs=$(patsubst xep-%.xml, $(REFSDIR)/reference.XSF.XEP-%.xml, $(xeps)) +xep_examples=$(patsubst xep-%.xml, $(EXAMPLESDIR)/%.xml, $(xeps)) + .PHONY: help help: @@ -33,17 +56,29 @@ help: .PHONY: all all: html +.PHONY: xeplist +xeplist: $(OUTDIR)/xeplist.xml + .PHONY: html -html: $(patsubst %.xml, $(OUTDIR)/%.html, $(wildcard *.xml)) +html: $(xep_htmls) + +.PHONY: xml +xml: $(xep_xmls) + +.PHONY: inbox-html +inbox-html: $(proto_xep_htmls) + +.PHONY: inbox-xml +inbox-xml: $(proto_xep_xmls) .PHONY: pdf -pdf: $(patsubst %.xml, $(OUTDIR)/%.pdf, $(wildcard *.xml)) +pdf: $(xep_pdfs) .PHONY: refs -refs: $(patsubst xep-%.xml, $(REFSDIR)/reference.XSF.XEP-%.xml, $(wildcard *.xml)) +refs: $(xep_refs) .PHONY: examples -examples: $(patsubst xep-%.xml, $(EXAMPLESDIR)/%.xml, $(wildcard *.xml)) +examples: $(xep_examples) .PHONY: xep-% xep-%: $(OUTDIR)/xep-%.html $(REFSDIR)/reference.XSF.XEP-%.xml $(OUTDIR)/xep-%.pdf $(EXAMPLESDIR)/%.xml; @@ -54,19 +89,33 @@ xep-%.html: $(OUTDIR)/xep-%.html ; .PHONY: xep-%.pdf xep-%.pdf: $(OUTDIR)/xep-%.pdf ; +$(all_xep_xmls): $(OUTDIR)/%.xml: %.xml + cp $< $@ + +$(OUTDIR)/xeplist.xml: $(wildcard *.xml) $(wildcard inbox/*.xml) + ./tools/extract-metadata.py > $@ + $(EXAMPLESDIR)/%.xml: xep-%.xml $(XMLDEPS) examples.xsl $(EXAMPLESDIR) xsltproc --path $(CURDIR) examples.xsl "$<" > "$@" && echo "Finished building $@" $(REFSDIR)/reference.XSF.XEP-%.xml: xep-%.xml $(XMLDEPS) ref.xsl $(REFSDIR) xsltproc --path $(CURDIR) ref.xsl "$<" > "$@" && echo "Finished building $@" -$(OUTDIR)/%.html: %.xml $(XMLDEPS) $(HTMLDEPS) +$(xep_htmls): $(OUTDIR)/xep-%.html: xep-%.xml $(XMLDEPS) $(HTMLDEPS) xmllint --nonet --noout --noent --loaddtd --valid "$<" # Check for non-data URIs ! xmllint --nonet --noout --noent --loaddtd --xpath "//img/@src[not(starts-with(., 'data:'))]" $< 2>/dev/null && true # Actually build the HTML - xsltproc --path $(CURDIR) xep.xsl "$<" > "$@" && echo "Finished building $@" + xsltproc --path $(CURDIR) --param htmlbase "$(if $(findstring inbox,$<),'../','./')" xep.xsl "$<" > "$@" && echo "Finished building $@" + +$(proto_xep_htmls): $(OUTDIR)/inbox/%.html: inbox/%.xml $(XMLDEPS) $(proto_HTMLDEPS) + xmllint --nonet --noout --noent --loaddtd --valid "$<" + # Check for non-data URIs + ! xmllint --nonet --noout --noent --loaddtd --xpath "//img/@src[not(starts-with(., 'data:'))]" $< 2>/dev/null && true + + # Actually build the HTML + xsltproc --path $(CURDIR) --param htmlbase "$(if $(findstring inbox,$<),'../','./')" xep.xsl "$<" > "$@" && echo "Finished building $@" $(OUTDIR)/xmpp.pdf $(OUTDIR)/xmpp-text.pdf: $(OUTDIR) cp "resources/$(notdir $@)" "$@" @@ -92,7 +141,13 @@ $(JSTARGETS): $(OUTDIR) $(CSSTARGETS): $(OUTDIR) cp "$(notdir $@)" "$@" -$(EXAMPLESDIR) $(REFSDIR) $(OUTDIR): +$(proto_JSTARGETS): $(OUTDIR)/inbox + cp "$(notdir $@)" "$@" + +$(proto_CSSTARGETS): $(OUTDIR)/inbox + cp "$(notdir $@)" "$@" + +$(EXAMPLESDIR) $(REFSDIR) $(OUTDIR) $(OUTDIR)/inbox: mkdir -p "$@" .PHONY: clean diff --git a/README.md b/README.md index 4e49c757..7667c5bc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Docker Build Status](https://img.shields.io/docker/build/xmppxsf/xeps.svg)](https://hub.docker.com/r/xmppxsf/xeps/) +[![Build Status](https://img.shields.io/travis/xsf/xeps.svg)](https://travis-ci.org/xsf/xeps) XMPP Extension Protocols (XEPs) ========= @@ -50,4 +51,364 @@ For more information try `make help`. Using Docker ------------ -A full set of HTML and PDFs can be generated inside a docker container, with no dependencies on the host other than Docker itself, and served by nginx in the container. To build the template `make docker`, to run it `make testdocker` (serves on http://localhost:3080), and to stop/delete it afterwards `make stopdocker` +A full set of HTML and PDFs can be generated inside a docker container, with no +dependencies on the host other than Docker itself, and served by nginx in the +container. To build the template `make docker`, to run it `make testdocker` +(serves on http://localhost:3080), and to stop/delete it afterwards `make +stopdocker` + + +Gardening (Issue triaging by non-editors) +----------------------------------------- + +For new PRs, anyone with permission may perform gardening tasks. +The [Go wiki] sumarizes "gardening" as: + +> the background maintenance tasks done to keep the project healthy & growing & +> nice looking. + +In this repo, gardening is mostly triaging issues. +An issue is considered triaged when an editor has been assigned to it. +Untriaged issues that are in need of attention can be found using the following +filter: [`is:open is:pr no:assignee`] + +To triage new issues or PRs: + +- Is the issue a duplicate? Close it (referencing the original issue). +- Is the issue a question and not an issue? Close it, pointing them at the + mailing list or chat room. +- Is the PR a new ProtoXEP? Add the "[ProtoXEP]" label and ensure that the + file is in the "inbox/" tree and does not start with "xep-" (if not, leave a + comment asking for it to be moved). +- Is the issue a specific change to an existing XEP or a few XEPs (eg. not + whitespace changes to many XEPs, use your judgement)? Make sure the title + starts with "XEP-XXXX:" or "XEP-XXXX, XEP-YYYY:". +- Finally, assign an editor (pick one at random, or pick the one with the least + issues already assigned to them; we may re-assign it later so don't feel bad). + The list of active editors can be found here: + https://xmpp.org/about/xsf/editor-team + + +Editor +====== + +The XMPP Extensions Editor (or, for short, XEP Editor) manages the XMPP +extensions process as defined in XMPP Extension Protocols ([XEP-0001]). +In addition, the XEP Editor functions as the XMPP Registrar as defined in XMPP +Registrar Function ([XEP-0053]). +Read those documents first, since this README focuses on mechanics instead of +philosophy or policy. + + +All PRs +------- + +For all PRs, start by ensuring that the IP release has been signed and that CI +has run and no issues were detected before merging. + + +Triaging a PR +------------- + +If the PR is not touching a XEP, this guide does not apply. If the PR touches +multiple XEPs, go through the steps for each XEP and exit at the first which +applies. + +1. Is the PR a ProtoXEP? + + 1. Does the PR touch existing XEPs? Close as [invalid] and ask the Opener + to split the two things. + + 2. Add the [ProtoXEP] and [Ready to Merge] labels. + 3. Stop. + +1. Are the changes *for all XEPs* purely editorial? + + 1. Add the [Editorial Change] and [Ready to Merge] labels. + 2. Stop. + +2. Is the XEP **not** in Experimental state? + + (Changes to Non—Experimental XEPs need approval by the approving body as + defined in the XEP file itself.) + + 1. Add the [Needs Council]/[Needs Board] label. + 2. Put the PR in the [Council Trello] project. + 3. Stop. + +2. Is the XEP in Experimental state and the PR opener is not an author of the + XEP? + + 1. If the issue has not been discussed on the standards list *or* if + the authors have not been involved in the discussion: + + 1. Make sure the standards@ discussion (if it exists) is linked in the + PR. + 2. Add the [Needs Author] label. + 3. Put the PR in the [Editor Trello] project. + 4. Stop. + +3. Mark the PR as [Ready to Merge]. + +Discussions +----------- + +Technical discussions SHOULD NOT happen in the xeps repository. If you see a +discussion evolve into technical (as opposed to editorial) matters, do the +following (I haven’t tried that myself yet, so feel especially free to improve +the process): + +1. Lock the conversation. +2. Copy the technical discussion parts into an email to standards@. My + preferred format for this would be something along the lines of: + + Subject: XEP-1234: [insert PR subject here, or something more appropriate] + + There was some discussion on the xeps repository an XEP-1234, which got + technical. I moved this discussion to standards@ so that the whole + community is aware of the issue and can participate. + + @user1 wrote: + > quote user1 here ... + + @user2 wrote: + > quote user2 here ... + + Remove clearly editorial discussion and mark the removal with ``[…]``. + +3. Add the [Needs List Discussion] label to the PR and link the standards@ + thread you just created. Remove other labels (such as [Needs Author]). + +4. Monitor the thread; when the discussion is resolved, the PR opener will + usually prepare an update. Unlock the conversation to allow editorial + discussion to continue, if needed. Remove the [Needs List Discussion] label + and re-triage the PR as described above. + + **Note:** The locking is mostly used here as a tool to avoid a race + condition, not to exclude people from participating. (It would be + unfortunate if you had to add more comments to your already-sent email.) + Feel free to unlock at some point during the list discussion when you’re + sure that all participants have taken note of the move. + + +General notes on making changes +------------------------------- + +This section has some hints on the python scripts which help you doing the +more tedious tasks of sending emails and properly archiving XEPs. + +*Before* you start working on merging a Pull Request: + +* Ideally, you have the [xep-attic] repository cloned next to the xeps + repository. + +* Before starting to prepare a merge and push, ensure that you have the XEP + metadata up-to-date locally: + + $ make build/xeplist.xml + +* Make a copy of the metadata: + + $ cp build/xeplist.xml tools/old-xeplist.xml + + (avoid putting random XML files in the xeps root directory, the build + tooling might mistake them as XEPs; so we put it somewhere else.) + +*While* you’re working on a Pull Request: + +* Use the lokal docker build to ensure that everything is syntactically + correct. The process is described above in "Using Docker". + +When you have *merged* the Pull Request and the change went through to the +webserver (see also the [Docker Build] to track the build progress): + +* Send out the emails. First ensure that the new metadata is up-to-date: + + $ make build/xeplist.xml + + Check that the emails which will be sent are correct (the ``--dry-run`` + switch prevents the tool from actually sending emails): + + $ ./tools/send-updates.py --dry-run tools/old-xeplist.xml build/xeplist.xml standards@xmpp.org + + (See also the ``--help`` output for more information.) + + Once you’ve verified that the correct emails will be sent, actually send + them using (note the missing ``--dry-run`` flag): + + $ ./tools/send-updates.py tools/old-xeplist.xml build/xeplist.xml standards@xmpp.org + + A few tips: + + 1. You can also test-send them to your own address by replacing + ``standards@xmpp.org`` with your own address. + 2. To avoid having to enter your email account details every time, use a + configuration file. Invoke the tool with ``--help`` for more + information and ask [jonasw]/[@horazont] if things are still unclear. + + If the tool misbehaves, pester [jonasw]/[@horazont] about it. + +* Don’t forget to archive the new versions of the XEPs. If you have the + [xep-attic] cloned next to the xeps repository, you can simply run: + + $ ./tools/archive.py tools/old-xeplist.xml build/xeplist.xml + + Otherwise, you will have to explicitly give the path to the attic: + + $ ./tools/archive.py --attic /path/to/xep-attic/content/ tools/old-xeplist.xml build/xeplist.xml + + (note that the path must point to the ``content`` subdirectory of the + [xep-attic].) + + Don’t forget to commit & push the changes to [xep-attic]. + + +New ProtoXEPs +------------- + +- Make sure the protoxep is in the `inbox/` tree and has a name that does not + start with "xep-" (you may change this or ask the author to change it). +- Make sure the version is `0.0.1` and the status is `ProtoXEP` (you may fix + this or ask the author to fix it). +- You may want to build the protoxep locally and ensure the HTML and PDF look + okay. +- Merge the PR as described in "Merging a PR". Once the email has been sent, + continue here. +- Create a card for the protoxep on the [Council Trello] under "Proposed + Agendums". +- Attach the PR to the card and link the generated HTML. +- Comment on the PR with a link to the card, thanking the author for their + submission and letting them know that their XEP will be voted on within the + next two weeks. +- If the council forgets and doesn't vote on the protoxep, pester them until + they do. +- If the council rejects the XEP, you're done (leave the XEP in the inbox and + inform the author of the councils decision). Otherwise, see + "Promoting a ProtoXEP". + + +Promoting a ProtoXEP +-------------------- + +- It is easiest to start a new branch, in case you screw something up on the + way. +- Once the council approves a ProtoXEP, *copy* it out of the inbox and into the + root, assigning it the next available number in the XEP series. +- Modify the `` element in the XML file to match. +- Set the version to `0.1` and the initials to `XEP Editor: xyz` (replacing + "xyz" with your own initials). +- Remove the `` element from the XML file if it is included. +- Set the status to `Experimental`. +- Add a reference to the XEP in `xep.ent`. +- Make a commit. +- Treat your branch as you would treat a [Ready to Merge] PR in "Merging a PR". + (you don’t need to create another branch though.) + + +Promoting XEPs +-------------- + +Ensure that the following sections exist (if not, ask the author to add them +before promoting the XEP): + +- Security Considerations +- IANA Considerations +- XMPP Registrar Considerations +- XML Schema (for protocol specifications) + +You can also refer to `xep-template.xml` for a recommended list of sections and +whether or not they are required. +For a helpful graph of how XEP promotion works, see [XEP-0001]. + + +Deferring XEPs +-------------- + +Before Deferring XEPs, read the "General notes on making changes" section. + +XEPs get deferred after 12 months of inactivity. There is a tool which handles +that process automatically, if it is invoked regularly. + +First of all, you need an up-to-date ``xeplist.xml``: + + make build/xeplist.xml + +To get a list of XEPs which need to be deferred (without changing anything), +run: + + ./tools/deferrals.py -v + +To apply the deferrals, make a new feature branch and execute: + + ./tools/deferrals.py -m 'initials' + +where you replace ``initials`` with your editor initials so that it is obvious +who made the change (those initials will be used in the revision block). + +This will modify the XEPs in-place. It uses heuristics for incrementing the +version number, finding and inserting the revision block as well as changing +the status. Yes, it involves regular expressions (because we don’t want to +fully re-write the XML to keep the diffs minimal). It is thus vital that you +**use `git diff` to ensure that the changes are sane**. If the changes +are sane, make a commit and merge to master as described in "Merging a PR", +in accordance with the "General notes on making changes". + + +Merging a PR +------------ + +Before Merging a PR, read the "General notes on making changes" section. + +When you get to the point that the PR is [Ready to Merge], do the following: + +1. Create a new branch off master called ``feature/xep-1234`` (if the PR + touches multiple XEPs, I call it ``feature/xep-0678,xep-0789``). + +2. Merge all [Ready to Merge] PRs which affect the XEP(s) into that branch. + +3. Resolve conflicts. + +4. If the PRs introduced multiple revision blocks, squash it down to a single + revision block. Set "XEP Editor (initials)" as author of the revision block + and add the initials of the original PR authors to the changelog entries. + (If that doesn’t make sense to you, you’ll find plenty examples in the + XEPs.) + +5. Ensure that everything builds by performing a full docker build (see above). + + (Once the docker build reaches the point where the XEPs are built, you can + switch branches and work on another PR.) + +6. If the build passes, check that the generated files look sane by running the + docker container. + +7. Merge the PR into master. If you are working on independent changes to + multiple XEPs, you can merge them all in one go. + +8. If you merged multiple things into master, re-do the docker build check. + +9. Push. + +10. Go back to "General notes on making changes". + + + +[XEP-0001]: https://xmpp.org/extensions/xep-0001.html +[XEP-0053]: https://xmpp.org/extensions/xep-0053.html +[Editor Trello]: https://trello.com/b/gwcOFnCr +[Council Trello]: https://trello.com/b/ww7zWMlI +[Needs Council]: https://github.com/xsf/xeps/labels/Needs%20Council +[Needs Board]: https://github.com/xsf/xeps/labels/Needs%20Board +[ProtoXEP]: https://github.com/xsf/xeps/labels/ProtoXEP +[Go wiki]: https://golang.org/wiki/Gardening +[`is:open is:pr no:assignee`]: https://github.com/xsf/xeps/pulls?utf8=%E2%9C%93&q=is%3Aopen%20is%3Apr%20no%3Aassignee%20 +[Needs Author]: https://github.com/xsf/xeps/labels/Needs%20Author +[Ready to Merge]: https://github.com/xsf/xeps/labels/Ready%20to%20Merge +[Needs List Discussion]: https://github.com/xsf/xeps/labels/Needs%20List%20Discussion +[Editorial Change]: https://github.com/xsf/xeps/labels/Editorial%20Change +[xep-attic]: https://github.com/xsf/xep-attic +[Docker Build]: https://hub.docker.com/r/xmppxsf/xeps/builds/ +[@horazont]: https://github.com/horazont/ +[jonasw]: https://wiki.xmpp.org/web/User:Jwi + +[modeline]: # ( vim: set fenc=utf-8 ff=unix spell spl=en textwidth=80: ) diff --git a/all.sh b/all.sh deleted file mode 100755 index 11a2a45c..00000000 --- a/all.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -# for all XEPs, generates HTML files and IETF-style reference, then copies XML file -# usage: ./all.sh - -## LICENSE ## -# -# Copyright (c) 1999 - 2013 XMPP Standards Foundation -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# -## END LICENSE ## - -xeppath=/var/www/vhosts/xmpp.org/extensions - -ls xep-0*.xml > tmp1.txt -sed s/^xep-// tmp1.txt > tmp2.txt -sed s/.xml$// tmp2.txt > nums.txt -rm tmp*.txt - -while read f -do - xsltproc xep.xsl xep-$f.xml > $xeppath/xep-$f.html - xsltproc ref.xsl xep-$f.xml > $xeppath/refs/reference.XSF.XEP-$f.xml - xsltproc examples.xsl xep-$f.xml > $xeppath/examples/$f.xml - ./gen.py $f - cp xep-$f.xml $xeppath/ - ./gen.py $f -done < nums.txt - -rm nums.txt - -xsltproc xep.xsl xep-README.xml > $xeppath/README.html -xsltproc xep.xsl xep-template.xml > $xeppath/template.html - -cp *.dtd $xeppath/ -cp *.ent $xeppath/ -cp *.shtml $xeppath/ -cp *.xsd $xeppath/ - -# END diff --git a/announce.py b/announce.py deleted file mode 100755 index 14eb061b..00000000 --- a/announce.py +++ /dev/null @@ -1,196 +0,0 @@ -#!/usr/bin/env python - -# File: announce.py -# Version: 0.9 -# Description: a script for announcing XEPs -# Last Modified: 2016-10-03 -# Author: Peter Saint-Andre (stpeter@jabber.org) -# License: public domain -# HowTo: ./announce.py xepnum - -## LICENSE ## -# -# Copyright (c) 1999 - 2010 XMPP Standards Foundation -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# -## END LICENSE ## - -# IMPORTS: -# -import glob -import os -from select import select -import smtplib -import socket -from string import split,strip,join,find -import sys -import time -from xml.dom.minidom import parse,parseString,Document - -def getText(nodelist): - thisText = "" - for node in nodelist: - if node.nodeType == node.TEXT_NODE: - thisText = thisText + node.data - return thisText - -# get the seconds in the Unix era -now = int(time.time()) - -# READ IN ARGS: -# -# 1. XEP number - -xepnum = sys.argv[1]; - -xepfile = 'xep-' + xepnum + '.xml' - -# PARSE XEP HEADERS: -# -# - title -# - abstract -# - version -# - date -# - initials -# - remark - -thexep = parse(xepfile) -xepNode = (thexep.getElementsByTagName("xep")[0]) -headerNode = (xepNode.getElementsByTagName("header")[0]) -titleNode = (headerNode.getElementsByTagName("title")[0]) -title = getText(titleNode.childNodes) -abstractNode = (headerNode.getElementsByTagName("abstract")[0]) -abstract = getText(abstractNode.childNodes) -statusNode = (headerNode.getElementsByTagName("status")[0]) -xepstatus = getText(statusNode.childNodes) -typeNode = (headerNode.getElementsByTagName("type")[0]) -xeptype = getText(typeNode.childNodes) -revNodes = headerNode.getElementsByTagName("revision") -revNode = revNodes[0] -versionNode = (revNode.getElementsByTagName("version")[0]) -version = getText(versionNode.childNodes) -dateNode = (revNode.getElementsByTagName("date")[0]) -date = getText(dateNode.childNodes) -initialsNode = (revNode.getElementsByTagName("initials")[0]) -initials = getText(initialsNode.childNodes) -remNode = (revNode.getElementsByTagName("remark")[0]) -# could be

or

diff --git a/inbox/bidi.xml b/inbox/bidi.xml index 71940237..850555b6 100644 --- a/inbox/bidi.xml +++ b/inbox/bidi.xml @@ -1,6 +1,7 @@ + rfc3920bis RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/draft-ietf-saintandre-rfc3920bis>." > %ents; ]> diff --git a/inbox/buddycloud-channels.xml b/inbox/buddycloud-channels.xml index a5cb5976..fe4cb0f1 100644 --- a/inbox/buddycloud-channels.xml +++ b/inbox/buddycloud-channels.xml @@ -8,14 +8,44 @@ ]> -
+
Buddycloud Channels This document describes a profile and conventions for usage of the PubSub protocol in the context of a new type of communication. + &LEGALNOTICE; xxxx ProtoXEP Standards Track Standards Council + + XMPP Core + XEP-0059 + XEP-0060 + XEP-0313 + XEP-0255 + XEP-0107 + + + + NOT_YET_ASSIGNED + + Simon + Tennant + simon@buddycloud.com + simon@buddycloud.com + + + Lloyd + Watkin + lloyd@evilprofessor.co.uk + lloyd@evilprofessor.co.uk + + + Ashley + Ward + ashley.ward@surevine.com + ashley.ward@surevine.com + 0.0.2 2014-04-29 @@ -24,92 +54,8 @@

First draft.

- NOT_YET_ASSIGNED - - This XMPP Extension Protocol is copyright (c) 1999 - 2014 - 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 - shall the XMPP Standards Foundation or the authors of this - Specification be liable for any claim, damages, or other liability, - whether in an action of contract, tort, or otherwise, arising from, - out of, or in connection with the Specification or the - implementation, deployment, or other use of the Specification. ## - - 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 out of the use or inability to use 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 may be found at < - http://xmpp.org/extensions/ipr-policy.shtml - > or obtained by writing to XSF, P.O. Box 1641, Denver, CO 80201 - USA). - - - - XMPP Core - XEP-0059 - XEP-0060 - XEP-0313 - XEP-0255 - XEP-0107 - - - - - Simon - Tennant - simon@buddycloud.com - simon@buddycloud.com - - - Lloyd - Watkin - lloyd@evilprofessor.co.uk - lloyd@evilprofessor.co.uk - - - Ashley - Ward - ashley.ward@surevine.com - ashley.ward@surevine.com -
- +

The Buddycloud project is a set of independently deployable services, that inter-operate to create a rich collaboration service. @@ -188,7 +134,7 @@ - +

Each XMPP domain can have one Buddycloud server that serves user's channels. Buddycloud clients and servers need to be able to discover the authoratative Buddycloud server. find the @@ -196,7 +142,7 @@

To find the correct remote Buddycloud service for a domain, the Buddycloud - server should: + server should:

  1. Use a disco#items query against the XMPP service for the remote Buddycloud domain. @@ -206,7 +152,6 @@ discovery method.
-

The Buddycloud service first sends an items discovery request to the domain @@ -274,12 +219,12 @@

This example delegates all the Buddycloud service to an XMPP component running the Buddycloud named - buddycloud-component.verona.lit + buddycloud-component.verona.lit .

- +

Upon connection to the buddycloud server a user should send a register stanza.

@@ -300,15 +245,16 @@

- +

Node metadata is used to describe the channel to users. All nodes in a channel have the same metadata and permission.

- - using disco-info - with the node specified - using XEP-0060 5.4 Discover Node Metadata + +

- using disco-info + with the node specified - using &xep0060; 5.4 Discover Node Metadata

- set Not sure what - goes here? +

set Not sure what + goes here?

minimum setting/optional recommended fallbacks @@ -401,7 +347,6 @@

Channel owners and moderators can also set the default affiliation for the channel

-

@@ -429,8 +374,6 @@
Channel Type
-

-

@@ -455,7 +398,6 @@
Access Model
-

Buddycloud is designed to be extended with new node and content types. To @@ -523,16 +465,14 @@ - +

Buddycloud adapts XEP-0060's machine-to-machine design goals with logic and presets that work better in a social person-to-person and person-to-group environment. For example, to discourage "glorifying the wicked", the list of banned users is only presented to the channel's moderators.

-

- @@ -544,8 +484,6 @@ - - @@ -665,12 +603,8 @@ -
Property Access modelAnonymous (e.g. web) Banned users
channel name allno no
-

-

- @@ -680,8 +614,6 @@ - - @@ -745,9 +677,7 @@ -
Property ProducerAnonymous (e.g. web) Banned users
change channel name only at creation timeno no
-

A Buddycloud server MUST maintain similar affiliations and permissions for a subscribed @@ -762,7 +692,7 @@

- +

Many of the item use cases follow those from XEP-0060. This section notes the departures from the parent XEP and specific requirements. @@ -864,8 +794,8 @@ ]]> - A retraction message is sent to all online clients, with an Atom tombstone to - replace the deleted post +

A retraction message is sent to all online clients, with an Atom tombstone to + replace the deleted post

@@ -900,7 +830,7 @@ review ; extensions.

- +

The minimal payload for a publish request must be formatted as follows:

@@ -962,11 +892,11 @@ - + +

Posts in Buddycloud can be formed into threads consisting of a parent post - and comments to a maximum thread depth of 1. Posts follow the - ATOM threading specification + and comments to a maximum thread depth of 1. Posts follow the &rfc4685; and utilise the & thread ; namespace with the 'ref' attribute referring to the full global ID of the @@ -992,7 +922,7 @@ ]]> - +

  • parent-item-not-found @@ -1003,7 +933,9 @@ : An attempt to comment on a comment will result in this error response
- + + +

Within a single thread comments can reference other comments or the parent item. This is for the purpose of making a comment to a post further back in the thread. @@ -1052,6 +984,7 @@ +

By making use of the & @@ -1119,13 +1052,13 @@ - +

Buddycloud clients follow XEP-0060 subscription mechanisms for following and unfollowing a channel.

- +

- Buddycloud channels build on XEP-0060's node affiliations. + Buddycloud channels build on XEP-0060's node affiliations.

@@ -1183,10 +1116,9 @@
XEP-0060 AffiliationRECOMMENDED
-

- + @@ -1204,7 +1136,7 @@

- +

The Buddycloud server should make sure that the remote server diff --git a/inbox/cap.xml b/inbox/cap.xml new file mode 100644 index 00000000..92dfd031 --- /dev/null +++ b/inbox/cap.xml @@ -0,0 +1,169 @@ + + +%ents; +]> + + +

+ Atomically Compare-And-Publish PubSub Items + This specification provides a mechanism to atomically Compare-And-Publish items to a PubSub node. + &LEGALNOTICE; + xxxx + ProtoXEP + Standards Track + Standards + Council + + XEP-0030 + XEP-0060 + + + + cap + &flow; + + 0.0.1 + 2017-04-20 + fs +

First draft.

+
+
+ + + +

This specification provides a mechanism to atomically publish + items to a PubSub node depending on the item ID of the node's latest + item. This allows to prevent race conditions and avoids data + loss in certain situations.

+ +
+ + + +

If an entity supports the Compared-And-Publish feature it MUST + advertise the fact by returning a <feature/> with the 'var' + attribute set to 'urn:xmpp:pubsub:cap:0' in response to a &xep0030; + query for information.

+ +
+ + + +

In order to atomically compare-and-publish an item, a client + sends an &IQ; with a 'pubsub' element qualified by the + 'urn:xmpp:pubsub:cap:0' namespace. The element MUST contain the same + attributes and elements as the <publish/> element defined in + &xep0060; and it MUST contain a previd attribute containing + an item ID.

+ +

The PubSub service MUST only publish the item if the node's + latest item ID is equal to the ID found in the 'previd' + attribute.

+ + + + + + + Soliloquy + +To be, or not to be: that is the question: +Whether 'tis nobler in the mind to suffer +The slings and arrows of outrageous fortune, +Or to take arms against a sea of troubles, +And by opposing end them? + + + tag:denmark.lit,2003:entry-32397 + 2003-12-13T18:30:02Z + 2003-12-13T18:30:02Z + + + + + +]]> + + + +

If the 'previd' matched the latest item's ID and if the service + was able to successfully process the request then the protocol + continues as defined in XEP-0060 7.1.2.

+ +
+ + + +

In case the Compare-And-Publish operation failed because the + latest node id is not the same as given in the 'previd' attribute + in the request, the server returns an &IQ; result with 'pubsub' + element qualified by the 'urn:xmpp:pubsub:cap:0' namespace which + contains a <compare-and-publish-failed/> element. The + element MUST have a 'id' attribute with the ID of the lastest + item.

+ + + + + + +]]> + +
+ + + +

All other error cases are handled as specified in + XEP-0060 § 7.1.3

+ +
+ +
+ + + +

This extension protocol does not add any further security + considerations to the ones mentioned in XEP-0060 § + 14..

+ +
+ + + +

This document requires no interaction with the Internet Assigned + Numbers Authority (IANA).

+ +
+ + + +

This specification defines the following XML namespaces:

+
    +
  • urn:xmpp:pubsub:cap:0
  • +
+ + urn:xmpp:pubsub:cap:0 + Indicates support for Compare-And-Publish + XEP-XXXX +]]> + +
+ + +

TODO: Add after the XEP leaves the 'experimental' state.

+ +
+ diff --git a/inbox/carbons.xml b/inbox/carbons.xml index 997b229f..d77b9424 100644 --- a/inbox/carbons.xml +++ b/inbox/carbons.xml @@ -1,6 +1,7 @@ + rfc3921bis RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/draft-ietf-saintandre-rfc3921bis>." > %ents; ]> diff --git a/inbox/cmr.xml b/inbox/cmr.xml index 5b27ad0d..67964291 100644 --- a/inbox/cmr.xml +++ b/inbox/cmr.xml @@ -117,7 +117,7 @@ Examples for balancing algorithms include: -An entity advertises support for this protocol by including the 'urn:xmpp:cmr:0' feature in its service discovery information features as specified in Service Discovery (XEP-0030) or section 6.3 of Entity Capabilities (XEP-0015). +

An entity advertises support for this protocol by including the 'urn:xmpp:cmr:0' feature in its service discovery information features as specified in Service Discovery (XEP-0030) or section 6.3 of Entity Capabilities (XEP-0015).

-If allowed and supported by the server, clients are able to annotate message stanza with a routing hint, that SHOULD affect the used message routing algorithm for the annotated stanza. +

If allowed and supported by the server, clients are able to annotate message stanza with a routing hint, that SHOULD affect the used message routing algorithm for the annotated stanza.

@@ -306,7 +306,7 @@ The CMR state, ie. the used routing algorithm, is identical for every session of

Algorithm Namespace: 'urn:xmpp:cmr:all'

-Deliver to all non-negative resources with share the same maximum priority. And if message type is 'chat', only to those that have opted in to receive chat messages. +

Deliver to all non-negative resources with share the same maximum priority. And if message type is 'chat', only to those that have opted in to receive chat messages.

@@ -314,7 +314,7 @@ Deliver to all non-negative resources with share the same maximum priority. And

Algorithm Namespace: 'urn:xmpp:cmr:mostactive'

-Deliver the message to the "most available" resource or resources, depending on the server's implementation. +

Deliver the message to the "most available" resource or resources, depending on the server's implementation.

@@ -322,7 +322,7 @@ Deliver the message to the "most available" resource or resources, depending on

Algorithm Namespace: 'urn:xmpp:cmr:roundrobin'

-Deliver the message to the next resource selected by a round-robin algorithm. +

Deliver the message to the next resource selected by a round-robin algorithm.

@@ -330,7 +330,7 @@ Deliver the message to the next resource selected by a round-robin algorithm.

Algorithm Namespace: 'urn:xmpp:cmr:weighted'

-Deliver the message to a resource selected by a weighted round-robin algorithm. The weight of a resource is determined by its priority. +

Deliver the message to a resource selected by a weighted round-robin algorithm. The weight of a resource is determined by its priority.

diff --git a/inbox/colors.xml b/inbox/colors.xml new file mode 100644 index 00000000..cd1755cf --- /dev/null +++ b/inbox/colors.xml @@ -0,0 +1,282 @@ + + +%ents; + Red/Green-Blindness"> + Blue-Blindness"> + + +]> + + +
+ Consistent Color Generation + This specification provides a set of algorithms to consistently generate colors given a string. The string can be a nickname, a JID or any other piece of information. All entities adhering to this specification generate the same color for the same string, which provides a consistent user experience across platforms. + &LEGALNOTICE; + xxxx + ProtoXEP + Standards Track + Standards + Council + + + + colors + + Jonas + Wielicki + jonas@wielicki.name + jonas@wielicki.name + + + 0.0.1 + 2017-09-14 + jwi +

First draft.

+
+
+ +

Colors provide a valuable visual cue to recognize text. Recognition of colors works much faster than recognition of text. Together with the length and overall shape of a piece of text (such as a nickname), a color provides a decent amount of entropy to distinguish a reasonable amount of entities.

+
+ +

The color generation mechanism should provide the following features:

+
    +
  • Consistent generation of color across all platforms depending solely on the identifier used as input for the algorithm.
  • +
  • The system should be reasonably fast; it must be possible to, for example, apply it to all roster entries even of very large rosters in reasonable amount of time.
  • +
  • It must be able to provide decent contrast on any background.
  • +
  • The implementation should be stateless and not be complex.
  • +
  • A fallback path for users with common types of &cvds; must be provided.
  • +
  • A fallback path for systems which can only use colors from a restricted palette must be provided.
  • +
+
+ + +

To generate a color from a string of text, the follownig algorithms are applied in order:

+
    +
  1. Generate an angle in the CbCr plane from the text.
  2. +
  3. If enabled, apply configured corrections for &cvds;.
  4. +
  5. Convert the angle to a CbCr pair.
  6. +
  7. If the output device only supports a small palette of colors, map the CbCr value to the closest palette color.
  8. +
  9. If the output device supports RGB output, convert the CbCr pair to an RGB triple.
  10. +
+
+ +

Implementations may colorize the participants of a conversation with an individual color to make them easier to distinguish.

+

In such cases, the color SHOULD be generated as described in the Generating a color section. The input used SHOULD be, in descending order of preference, (a) the name assigned in the roster, (b) the nickname from the conversation, (c) the bare JID.

+
+ +

Implementations may want to show a picture in connection with a contact even if the contact does not have an avatar defined (e.g. via &xep0084;).

+

In such cases, auto-generating an avatar SHOULD happen as follows:

+
    +
  1. Obtain a name for the contact, in descending order of preference, (a) from the roster, (b) by using the nickname from the conversation, (c) by using the bare JID.
  2. +
  3. Generate a color as described in the Generating a color section.
  4. +
  5. Fill an implementation-defined background shape with that color.
  6. +
  7. Render the first character of the name in white or black centered on the square.
  8. +
+
+
+ +
    +
  • Implementations MUST allow the user to turn off any colorization completely.
  • +
  • Implementations MUST implement the &cvd; profiles and MUST allow the user to choose any of these profiles or to disable the correction.
  • +
  • Implementations MUST NOT share the &cvd; correction settings with other entities.
  • +
+
+ + +

Input: An identifier, encoded as octets of UTF-8 (&rfc3269;).

+

Output: Angle in the CbCr plane.

+

Note: The goal of this algorithm is to convert arbitrary text into a scalar value which can then be used to calculate a color. As it happens, the CbCr plane of the YCbCr space determines the color (while Y merely defines the lightness); thus, an angle in the CbCr plane serves as a good scalar value to select a color.

+
    +
  1. Run the input through CRC32 as defined by zlib (TODO: add citation).
  2. +
  3. Take the lower 16 bits and XOR them with the upper 16 bits.
  4. +
  5. Divide the value by 65535 (use float division) and multiply it by 2π (two Pi).
  6. +
+
+ +

Input: Angle in the CbCr plane.

+

Output: Angle in the CbCr plane.

+

Note: This algorithm will re-map the angle to map it away from ranges which can not be distinguished by people with the respective &cvds;.

+ +

Divide the angle by two.

+
+ +

Divide the angle by two and add π/2 (half Pi).

+
+
+ +

Input: Angle in the CbCr plane, from the previous algorithm.

+

Output: Values for Cb and Cr in the YCbCr BT.601 color space in the range from -0.5 to 0.5.

+

Form a vector from the angle and project it to edges of a quad in 2D space with edge length 1 around (0, 0). The resulting coordinates are Cb and Cr:

+ abs(cb)) { + factor = 0.5 / abs(cr); +} else { + factor = 0.5 / abs(cb); +} +cb = cb * factor; +cr = cr * factor; +]]> +
+ +

Input: Values for Cb and Cr in the YCbCr BT.601 color space in the range from -0.5 to 0.5; Value for Y.

+

Output: Values for Red (R), Green (G) and Blue (B) in the RGB color space in the range from 0 to 1.

+

Note: The recommended value for Y is 0.732. See Gamma Correction for a discussion on the choice of Y.

+
    +
  1. Calculate r, g and b according to BT.601:
  2. +
  3. Clip the values of r, g and b to the range from 0 to 1.
  4. +
+
+ +

Input: RGB values for the color to adapt (Ri, Gi, Bi) and for the background color to adapt to (Rb, Gb, Bb), in the range from 0 to 1 each.

+

Output: Values for Red (Rc), Green (Gc) and Blue (Bc) in the RGB color space in the range from 0 to 1.

+
    +
  1. Invert the background color by subtracting the individual channels from 1 each: +
  2. +
  3. Mix the inverted background with the color to adapt, using a mixing factor of 0.2: +
  4. +
+
+ +

Input: Values for Red (R), Green (G) and Blue (B) in the RGB color space in the range from 0 to 1.

+

Output: Values for Cb and Cr in the YCbCr BT.601 color space in the range from -0.5 to 0.5; Value for Y.

+

Calculate Y, Cb and Cr according to BT.601:

+ +
+ +

Input: A set of RGB colors (each component from 0 to 1).

+

Output: A mapping from CbCr pairs (each component from -0.5 to 0.5) to RGB colors.

+

Note: when the algorithm finishes, the mapping maps CbCr values (rounded to two decimal places) to the R, G, B triples which come closest to the desired color and lightness.

+
    +
  1. Create an empty mapping M which maps from pairs of CbCr values to quadruples of Y, R, G and B.
  2. +
  3. For each color R, G, B from the input palette: +
      +
    1. Calculate Y, Cb and Cr from R, G, B as described in RGB to YCbCr.
    2. +
    3. Round Cb and Cr to two decimal places as Cb' and Cr'.
    4. +
    5. If the (Cb', Cr') pair is not in the mapping M yet, or if the Y value of the existing entry is farther away from 0.732 than the new Y value, put the Y, R, G, and B values as value for the (Cb', Cr') pair into the mapping.
    6. +
    +
  4. +
  5. Strip the Y values from the values of mapping M.
  6. +
  7. Return M as the result of the algorithm.
  8. +
+
+ +

Input: A set of colors (the palette) as tuples of Cbp and Crp and a color to map to the closest palette color as Cb and Cr value.

+

Output: A palette color as Cbr and Crr values.

+
    +
  1. For each color as pair Cbp, Crp in the palette, calculate the distance metric: D = sqrt((Cbp-Cb)*(Cbp-Cb) + (Crp-Cr)*(Crp-Cr)).
  2. +
  3. Pick the palette color Cbp, Crp with the smallest distance metric D as result color Cbr, Crr.
  4. +
+

Note: the distance metric is simply the euclidian distance in the CbCr plane.

+
+ +

This section holds test vectors for the different configurations. The test vectors are provided as Comma Separated Values. Strings are enclosed by single quotes ('). The first line contains a header. Each row contains, in that order, the original text, the text encoded as UTF-8 as hexadecimal octets, and the Cb, Cr, Red, Green, and Blue values.

+ + + + + + + + + + +

The used palette can be generated by sampling the RGB cube evenly with six samples on each axis (resulting in 216 colors). The resulting palette is commonly known as the palette of so-called "Web Safe" colors.

+ + + + + + + + + +
+
+
+ + +

An implementation may choose a different value for Y depending on whether the sink for the R, G and B values expects Gamma Encoded or Gamma Decoded values. The recommended default of 0.732 is 0.5 to the power of 0.45, that is, a Gamma Encoded 0.5.

+

Modifications to Y SHOULD NOT be used to correct for bright/dark backgrounds. Implementations SHOULD instead use the algorithm described in Adapting the Color for specific Background Colors for that.

+
+
+ +

As outlined above, implementations MUST offer the &rgblind; and &bblind; corrections as defined in the Corrections for &cvds; section. Users MUST be allowed to choose between:

+
    +
  • disabling all corrections (skip the Corrections for &cvds; step entirely),
  • +
  • applying one of the &cvd; correction profiles and
  • +
  • disabling colorization altogether.
  • +
+

The last option is important for users with monochromatic view.

+

Some sources on the internet indicate that people with &cvds; may profit from having larger areas of color to be able to recognize them. This should be taken into consideration when selecting font weights and line widths for colored parts.

+
+ +

This specification extracts a bit more information from an entity and shows it alongside the existing information to the user. As the algorithm is likely to produce different colors for look-alikes (see &xep0165; for examples) in JIDs, it may add additional protection against attacks based on those.

+

Due to the limited set of distinguishable colors, possible &cvds; and/or use of palettes, entities MUST NOT rely on colors being unique in any context.

+
+ +

This section provides an overview of design considerations made while writing this specification. It shows alternatives which have been considered, and eventually rejected.

+ +

The other common YCbCr variants, BT.709 and BT.2020, do not achieve a brightness across the color space as uniform as BT.601 does. Adapting the Y value for uniform luminosity across the range for CbCr would have complicated the algorithm with little or no gain.

+
+ +

The HSV and HSL color spaces fail to provide uniform luminosity with fixed value/lightness and saturation parameters. Adapting those parameters for uniform luminosity across the hue range would have complicated the algorithm with litte to no gain.

+
+ +

Given a fixed-size and finite palette of colors, it would be possible to ensure that, until the number of entities to color exceeds the number of colors, no color collisions happen.

+

There are issues with this approach when the set of entities is dynamic. In such cases, it is possible that an entity changes its associated color (for example by re-joining a colored group chat), which defeats the original purpose.

+

In addition, more state needs to be taken into account, increasing the complexity of choosing a color.

+
+ +

This specification needs to collapse an arbitrarily long string into just a few bits (the angle in the CbCr plane). To do so, a CRC32 sum is used.

+

An alternative, which may yield better distribution of colors, would have been to use a cryptographic hash function. However, the performance and implementation cost for a cryptographic hash function is considerable compared with a simple CRC32, especially on small (less than 1 kiB) inputs.

+
+
+ +

This document requires no interaction with &IANA;.

+
+ +

This document requires no interaction with the ®ISTRAR;.

+
+ +

Thanks to Daniel Gultsch, Georg Lukas, and Tobias Markmann.

+
+
diff --git a/inbox/decloak.xml b/inbox/decloak.xml index 388b344a..f7ab7336 100644 --- a/inbox/decloak.xml +++ b/inbox/decloak.xml @@ -149,15 +149,20 @@

To signal the type of communication that is desired, the entity that first decloaks MAY include a 'reason' attribute on the <decloak/> element. The following values for the 'reason' attribute are defined:

-
media
-
Presence is requested for a voice and/or video call, e.g. via &xep0167;.
+ +
media
+
Presence is requested for a voice and/or video call, e.g. via &xep0167;.
+
-
text
+ +
text
+
Presence is requested for a plaintext or &xep0071; conversation, e.g. with end-to-end encryption (which requires capabilities to be disclosed).
+
-
Presence is requested for a plaintext or &xep0071; conversation, e.g. with end-to-end encryption (which requires capabilities to be disclosed).
- -
file
-
Presence is requested for one or more file transfers, e.g. via &xep0234; or &xep0095;.
+ +
file
+
Presence is requested for one or more file transfers, e.g. via &xep0234; or &xep0095;.
+

Inclusion of the 'reason' attribute can be interpreted by the receiving client as a signal that communication is about to start; for instance, a call accept/reject dialog could double as a UI for accepting or rejecting a decloaking request.

diff --git a/inbox/distributedmuc.xml b/inbox/distributedmuc.xml index 37403faf..cf5134d6 100644 --- a/inbox/distributedmuc.xml +++ b/inbox/distributedmuc.xml @@ -357,7 +357,7 @@
-

If a MUC service supports distributed rooms, it MUST return a feature of "urn:xmpp:dmuc:0" &NSVER; in response to &xep0030; information requests.

+

If a MUC service supports distributed rooms, it MUST return a feature of "urn:xmpp:dmuc:0" in response to &xep0030; information requests.

diff --git a/inbox/dmuc3.xml b/inbox/dmuc3.xml index 4b287bb3..45099a37 100644 --- a/inbox/dmuc3.xml +++ b/inbox/dmuc3.xml @@ -54,7 +54,7 @@

-

The following is a list of goals for the design of this extension: +

The following is a list of goals for the design of this extension:

  • DMUC should be transparent to the end user
  • DMUC should be transparent to the client program
  • @@ -63,35 +63,33 @@
  • Mirrors of the master room will not communicate directly with each other
  • If the S2S link is broken, it will appear to a user as if other users have left the room
  • Users in the same mirror can communicate with each other until the link is re-established with the master
  • -
  • DMUC will improve upon the &xep0033; concept
  • by eliminating the need for <addresses/> +
  • DMUC will improve upon the &xep0033; concept by eliminating the need for <addresses/>
-

-
master
-
The the actual MUC server
-
mirror
-
A mirror for a master MUC room on another machine
+
master
+
The the actual MUC server
+
mirror
+
A mirror for a master MUC room on another machine

The following JIDs are used in this document.

-
fairfax.tridsys.com
XMPP server where the master MUC room is located
-
conference.fairfax.tridsys.com
MUC service on fairfax.tridsys.com.
-
chatroom@conference.fairfax.tridsys.com
MUC room.
-
kevin@fairfax.tridsys.com
User on fairfax.tridsys.com
-
scott@fairfax.tridsys.com
Another user on fairfax.tridsys.com
-
-
raleigh.tridsys.com
A remote service, connected to fairfax.tridsys.com over constrained link
-
mirror.raleigh.tridsys.com
DMUC service on raleigh.tridsys.com
-
wayne@raleigh.tridsys.com
User on raleigh.tridsys.com
-
keith@raleigh.tridsys.com
Another user on raleigh.tridsys.com
+
fairfax.tridsys.com
XMPP server where the master MUC room is located
+
conference.fairfax.tridsys.com
MUC service on fairfax.tridsys.com.
+
chatroom@conference.fairfax.tridsys.com
MUC room.
+
kevin@fairfax.tridsys.com
User on fairfax.tridsys.com
+
scott@fairfax.tridsys.com
Another user on fairfax.tridsys.com
+
raleigh.tridsys.com
A remote service, connected to fairfax.tridsys.com over constrained link
+
mirror.raleigh.tridsys.com
DMUC service on raleigh.tridsys.com
+
wayne@raleigh.tridsys.com
User on raleigh.tridsys.com
+
keith@raleigh.tridsys.com
Another user on raleigh.tridsys.com

@@ -105,7 +103,7 @@ Support for Distributed MUC in a given server instance SHOULD be determined usin A conforming server MUST respond to disco#info requests.

-To determine if a server or service supports Distributed MUC, the requesting entity SHOULD send a disco#info request to it. +

To determine if a server or service supports Distributed MUC, the requesting entity SHOULD send a disco#info request to it.

%ents; +rfc3920bis RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/draft-ietf-saintandre-rfc3920bis>." > ]> diff --git a/inbox/dsig.xml b/inbox/dsig.xml index 7c415193..4a8215e0 100644 --- a/inbox/dsig.xml +++ b/inbox/dsig.xml @@ -5,6 +5,7 @@ DATETIME RFC 3339: Date and Time on the Internet Timestamps <http://tools.ietf.org/html/rfc3339>." > XMLDSIG XML Signature Syntax and Processing, W3C Recommendation, 10 June 2008 <http://www.w3.org/TR/xmldsig-core/>." > E2EEncrypt End-to-End Object Encryption for the Extensible Messaging and Presence Protocol (XMPP), Miller, M. and P. Saint-Andre, work in progress <http://datatracker.ietf.org/doc/draft-miller-3923bis>." > + rfc3920bis RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/draft-ietf-saintandre-rfc3920bis>." > %ents; ]> diff --git a/inbox/ft-metadata.xml b/inbox/ft-metadata.xml index 2761c6ae..50ddab1e 100644 --- a/inbox/ft-metadata.xml +++ b/inbox/ft-metadata.xml @@ -13,8 +13,8 @@ xxxx ProtoXEP Standards Track - Council Standards + Council XMPP Core XEP-0096 diff --git a/inbox/instant-gaming.xml b/inbox/instant-gaming.xml index f74367d5..3b6c4def 100644 --- a/inbox/instant-gaming.xml +++ b/inbox/instant-gaming.xml @@ -20,6 +20,7 @@
Instant Gaming This document defines an XMPP protocol extension for serverless instant gaming in a one-to-one context. + &LEGALNOTICE; xxxx ProtoXEP Standards Track @@ -53,7 +54,6 @@ tg

First draft.

- &LEGALNOTICE;

diff --git a/inbox/iot-events.xml b/inbox/iot-events.xml index 97905ebf..2de007fd 100644 --- a/inbox/iot-events.xml +++ b/inbox/iot-events.xml @@ -367,7 +367,7 @@ - +

To unsubscribe a subscription, send the unsubscribe element in a request to the Thing with the seqnr sequence number corresponding to the subscription. The Thing responds with an empty response to acknowledge the un-subscription, regardless if the subscription existed or not. @@ -726,4 +726,4 @@ - \ No newline at end of file + diff --git a/inbox/jet.xml b/inbox/jet.xml new file mode 100644 index 00000000..ebcf9e11 --- /dev/null +++ b/inbox/jet.xml @@ -0,0 +1,302 @@ + + + +%ents; +]> + + +

+ Jingle Encrypted Transports + This specification defines a method that allows to use established encryption schemes for end-to-end encryption of Jingle transports. + &LEGALNOTICE; + XXXX + ProtoXEP + Standards Track + Standards + Council + + XEP-0234 + + + + jet + + jingle + http://xmpp.org/schemas/jingle.xsd + + + jingle:errors + http://xmpp.org/schemas/jingle-errors.xsd + + + jingle + + Paul + Schaub + vanitasvitae@riseup.net + vanitasvitae@jabberhead.tk + + + 0.0.1 + 2017-06-12 + vv +

First draft

+
+
+ +

Jingle Encrypted Transports (JET) strives to provide a modular and easily extensible way to wrap Jingle Transports in an additional end-to-end encryption layer. The focus of this specification lays on being modular. It should be possible to extend existing Jingle use scenarios with end-to-end encryption by simply adding a JET element to the negotiation.

+
+ +

JET uses multiple encryption layers, so it is necessary to declare a distinct denomination for the different keys involved.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
DesignationAbbrevationUsage
Transport KeyTK(Symmetric) key that is used to encrypt/decrypt the bytestreams sent/received through Jingle transports. This key encrypts the data two entities want to exchange. Examples for TK can be found under "Ciphers".
Initialization VectorIVInitialization vector that is used together with TK.
Transport SecretTSSerialization of TK and TI.
Envelope ElementEEOutput element of an established end-to-end encryption method when encrypting TS.
+
+ +

Lets assume Romeo wants to initiate an encrypted Jingle session with Juliet. Prior to the Jingle session initiation, an already existing, established and (ideally) authenticated end-to-end encryption session between Romeo and Juliet MUST exist. This session is needed to transfer the Transport Secret from Romeo to Juliet.

+

When this precondition is met, Romeo initially generates a transport key (TK) and associated initialization vector (IV). These will later be used by the sender to encrypt, and respectively by the recipient to decrypt data that is exchanged. This protocol defines a set of usable ciphers from which Romeo might choose. TK and IV are serialized to create the transport secret (TS).

+

Next Romeo uses her established encryption session with Juliet to encrypt TS. The resulting envelope element (EE) will be part of the Jingle session initiation as child of the JET &secret; element.

+

When Juliet receives Romeos session request, she decrypts EE to retrieve TS, from which she can deserialize TK and IV. Now she and Romeo can go on with the session negotiation. Once the session is established, data can be encrypted and exchanged. Both parties MUST keep a copy of TS in cache until the Jingle session is ended.

+
+ +

&xep0234; has the disadvantage, that transmitted files are not encrypted (aside from regular TLS transport encryption), which means that intermediate nodes like XMPP/proxy server(s) have access to the transferred data. Considering that end-to-end encryption becomes more and more important to protect free speech and personal expression, this is a major flaw that needs to be addressed.

+

In order to initiate an encrypted file transfer, the initiator includes a JET &secret; in the Jingle file transfer request.

+ + +

In this scenario Romeo wants to send an encrypted text file over to Juliet. First, he generates a fresh AES-256 transport key and IV. TK and IV are serialized into TS which is then encrypted using Romeos end-to-end-encryption session with Juliet.

+

The resulting envelope element (EE) is sent as part of the security element along with the rest of the jingle stanza over to Juliet.

+ + + + + + 1969-07-21T02:56:15Z + This is a test. If this were a real file... + text/plain + test.txt + + 6144 + w0mcJylzCn+AfvuGdqkty2+KP48= + + + + + + + + BASE64-ENCODED-ENCRYPTED-SECRET + + + + +]]> + +

Juliet decrypts the envelope element (EE) using her session with Romeo to retrieve TS from which she deserializes TK and IV. Both Juliet and Romeo then carry on with the session negotiation as described in &xep0234;. Before Romeo starts transmitting the file, he encrypts it using TK and IV. He then transmitts the encrypted file over to Juliet.

+

When Juliet received the file, she uses the TK and IV to decrypt the received file.

+
+ + +

Juliet might want to request a file transfer from Romeo. This can be the case, when Romeo hosts the file. In order to do so, she sends generates TK and IV, creates TS from those and encrypts TS with an encryption method of her choice to get EE. TK and IV will be used by Romeo to encrypt the requested file before sending it to Juliet.

+ + + + + + w0mcJylzCn+AfvuGdqkty2+KP48= + + + + + + + + BASE64-ENCODED-ENCRYPTED-SECRET + + + + +]]> +
+ + +

&xep0234; defines a way for parties to request ranged transfers. This can be used to resume interrupted transfers etc. In case of an interrupted transfer, the receiving party might be able to decrypt parts of the received file. When requesting a resumption of the transfer, the recipient therefore can use the index of the last successfully decrypted byte of the file as offset in the ranged transfer. Since a resumed transfer takes place in a new session, the old transport secret might no longer be available to either party. For that reason the receiver creates a new TS for the session-initiation. The sending party then encrypts and sends only the requested parts of the file.

+ + + + + + + w0mcJylzCn+AfvuGdqkty2+KP48= + + + + + + + + + BASE64-ENCODED-ENCRYPTED-SECRET + + + + +]]> +
+ +
+ + +

In order to encrypt the transported bytestream, the initiator must transmit a cipher key to the responder. There are multiple options available:

+ + + + + + + + + + + + + + + + + + + + + + +
NamespaceTypeLength (bits)ParametersSerialization
urn:xmpp:ciphers:aes-128-gcm-nopadding:0AES128GCM/NoPadding128BitKey::96BitIV
urn:xmpp:ciphers:aes-256-gcm-nopadding:0AES256GCM/NoPadding256BitKey::96BitIV
+

The column 'serialization' describes, how the key and iv are serialized. "::" means plain concatenation of byte arrays.

+
+ + +

To advertise its support for the Jingle Encrypted Transports, when replying to service discovery information ("disco#info") requests an entity MUST return URNs for any version, or extension of this protocol that the entity supports -- e.g., "urn:xmpp:jingle:jet:0" for this version, or "urn:xmpp:jingle:jet-stub:0" for a stub encryption method &VNOTE;.

+ + +]]> + + + + + +]]> +

In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined in &xep0115;. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.

+
+ + +

The initiator SHOULD NOT use the generated key TK as IV, but instead generate a seperate random IV.

+

Instead of falling back to unencrypted transfer in case something goes wrong, implementations MUST instead abort the Jingle session, informing the user.

+

IMPORTANT: This approach does not deal with metadata. In case of &xep0234;, an attacker with access to the sent stanzas can for example still see the name of the file and other information included in the <file/> element.

+

The responder MUST check, whether the envelope element belongs to the initiator to prevent MitM attacks

+
+ + +

This is only a rough draft and there is still a ton of questions left to be answered. Here is a small non-exhaustive list of things I can think of:

+
    +
  • How exactly are interrupted transfers resumed? How (long) are keys/IVs cached?
  • +
  • May it be desirable to split data into chunks?
  • +
  • Please add to this list :)
  • +
+
+ +
    +
  • Split up the protocol into encryption method specific sub protocols (jet-omemo, jet-ox...)
  • +
+
+
diff --git a/inbox/jingle-ibb.xml b/inbox/jingle-ibb.xml index 9cecae00..5091fbaf 100644 --- a/inbox/jingle-ibb.xml +++ b/inbox/jingle-ibb.xml @@ -1,6 +1,7 @@ + rfc3920bis RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/draft-ietf-saintandre-rfc3920bis>." > %ents; ]> @@ -35,7 +36,7 @@
- The basic flow is as follows. +

The basic flow is as follows.

- Jingle Nodes + Jingle Nodes Thiago Camargo thiago@xmppjingle.com @@ -120,7 +120,7 @@ All signalling, request, response and publishing is done via XMPP, not requiring ]]> -In this example 'montague.lit' XMPP Domain a Relay Service and a Tracker Service. The Relay Service can be contacted in order to retrieve Relay Channels. The Tracker Service can be contacted in order to retrieve its known services. +

In this example 'montague.lit' XMPP Domain a Relay Service and a Tracker Service. The Relay Service can be contacted in order to retrieve Relay Channels. The Tracker Service can be contacted in order to retrieve its known services.

A Jingle Client MAY NOT be satisfied with only one Relay Service entry found. So it keeps the search on the known Tracker Services.

@@ -139,7 +139,7 @@ All signalling, request, response and publishing is done via XMPP, not requiring type='result'> ]]> -In this example 'capulet.lit' returned an empty service list, meaning that it does NOT known ANY Relay or Tracker Services. +

In this example 'capulet.lit' returned an empty service list, meaning that it does NOT known ANY Relay or Tracker Services.

A Jingle Client MAY NOT be satisfied with only one Relay Service entry found. So it keeps the search on his Roster Items until find the desired amount of Relay Services, or while it does NOT exceed a search depth or ANY other Client implementation policy. The Client SHOULD keep a list of visited Tracker Services in order to avoid searching twice in same Service Entity.

@@ -161,7 +161,7 @@ All signalling, request, response and publishing is done via XMPP, not requiring ]]>

In this example 'juliet@capulet.lit/balcony' returned a Relay Service entry that is restricted to its roster. This Service is usable as the requester has 'juliet@capulet.lit/balcony' on its roster. Although, services with policy 'roster' MUST NOT be listed in Tracker Responses expects in Tracker Responses that comes from the Service Entity itself, in this case 'juliet@capulet.lit/balcony'.

-In the presented example 'romeo@montague.lit/orchard' knows that 'juliet@capulet.lit/balcony' provides Relay Service, but if another entity requests 'romeo@montague.lit/orchard' its known services, it MUST NOT include 'juliet@capulet.lit/balcony' as it is a roster restricted entry. +

In the presented example 'romeo@montague.lit/orchard' knows that 'juliet@capulet.lit/balcony' provides Relay Service, but if another entity requests 'romeo@montague.lit/orchard' its known services, it MUST NOT include 'juliet@capulet.lit/balcony' as it is a roster restricted entry.

A Jingle Client with direct access to a public IP can potentially provide the Relay Service becaming itself a Jingle Relay Node. The service can intend to provide a public service, or a restricted services based on user preferences, like buddylist, whitelist, blacklist, domain, etc...

@@ -372,15 +372,9 @@ All signalling, request, response and publishing is done via XMPP, not requiring

Relay Channels auto expires MUST expire on traffic inactivity. The inactivity timeout recommended is 60 seconds.

It is heavily recommended that the Super Node implements throttle:

    -

  • Based on JID, allowing the control of how many concurrent channels an specific JID can have.
  • -

    -

  • Based on JID, allowing the control of how many channel requests an specific JID can request in a time period.
  • -

    -

    -

  • Based on Bandwidth, allowing the control of how much bandwidth a channel can use. The maximum bandwidth SHOULD be included on the candidate element provided by a Super Node on the attribute maxkbps. If no attribute is present, it means that it has no bandwidth control.
  • -

    +
  • Based on Bandwidth, allowing the control of how much bandwidth a channel can use. The maximum bandwidth SHOULD be included on the candidate element provided by a Super Node on the attribute maxkbps. If no attribute is present, it means that it has no bandwidth control. - ]]> + ]]>
diff --git a/inbox/jingle-rtp-codecs.xml b/inbox/jingle-rtp-codecs.xml index a64dfb17..2c7aa8f4 100644 --- a/inbox/jingle-rtp-codecs.xml +++ b/inbox/jingle-rtp-codecs.xml @@ -80,7 +80,7 @@ Good quality; optimized for voice; can be used for wide-band audio. - See &rtpspeex;. + See &rfc5574;. Freely downloadable under a revised BSD license at <http://speex.org/> and commonly deployed on Internet (VoIP) systems; not commonly deployed on non-Internet systems. Designed to be patent-clear. diff --git a/inbox/jingle-rtp-mti.xml b/inbox/jingle-rtp-mti.xml index ea644e13..ae80a77e 100644 --- a/inbox/jingle-rtp-mti.xml +++ b/inbox/jingle-rtp-mti.xml @@ -64,7 +64,7 @@ Good quality; optimized for voice; can be used for wide-band audio. - See &rtpspeex;. + See &rfc5574;. Widely available and freely downloadable under a revised BSD license at <http://speex.org/>. Designed to be patent-free. diff --git a/inbox/jingle-s5b.xml b/inbox/jingle-s5b.xml index b9737fa4..53064496 100644 --- a/inbox/jingle-s5b.xml +++ b/inbox/jingle-s5b.xml @@ -54,7 +54,7 @@ - The basic flow is as follows. +

The basic flow is as follows.

+ rfc3920bis RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/draft-ietf-saintandre-rfc3920bis>." > %ents; ]> diff --git a/inbox/jingle-zrtp.xml b/inbox/jingle-zrtp.xml index 8088e0b8..85058b08 100644 --- a/inbox/jingle-zrtp.xml +++ b/inbox/jingle-zrtp.xml @@ -40,7 +40,7 @@
-

&xep0167; recommends the use of the Secure Real-time Transport Protocol (SRTP) for end-to-end encryption of RTP sessions negotiated using &xep0166;. An alternative approach to end-to-end encryption of RTP traffic is provided by &zrtp;. Although negotiation of ZRTP mainly occurs in the media channel rather than the signalling channel, the ZRTP specification defines one SDP attribute called "zrtp-hash" (this communicates the ZRTP version supported as well as a hash of the Hello message).

+

&xep0167; recommends the use of the Secure Real-time Transport Protocol (SRTP) for end-to-end encryption of RTP sessions negotiated using &xep0166;. An alternative approach to end-to-end encryption of RTP traffic is provided by &rfc6189;. Although negotiation of ZRTP mainly occurs in the media channel rather than the signalling channel, the ZRTP specification defines one SDP attribute called "zrtp-hash" (this communicates the ZRTP version supported as well as a hash of the Hello message).

The SDP format is shown below.

a=zrtp-hash:zrtp-version zrtp-hash-value diff --git a/inbox/json.xml b/inbox/json.xml index 4c754345..f05c4271 100644 --- a/inbox/json.xml +++ b/inbox/json.xml @@ -48,13 +48,11 @@

The following design requirements reflect the need to offer performance as close as possible to standard XMPP-based stanza handling.

-

  1. JSON default character set must be UTF-8
  2. JSON stanza must contain (or retain) all XMPP stanza content and hierarchy
  3. Server must support both XML and JSON content-types.
-

Intent for following use-cases is to support JavaScript-based clients which typically start XMPP-session from HTTP-dialog, and then depending on network environment and run-time support end using BOSH or C2S through Web Sockets.

@@ -69,23 +67,23 @@

Client (and server) implementation needs to take care of using such JSON object format which retains all structure of all XMPP XML stanzas.

-

Following http-header is used to communicate with server using JSON playload: -

+   

Following http-header is used to communicate with server using JSON playload:

+ POST /http-bind HTTP/1.1 Host: httpcm.jabber.org Accept-Encoding: gzip, deflate Content-Type: application/jsonrequest Content-Length: 230 -
-
+    
+    
 HTTP/1.1 200 OK
 Content-Type: application/jsonrequest
 Content-Length: 513
-

+
-

In following example server name is modified so content length is not accurate. Also JSON payload is modified for better clarity of its structure. -

+   

In following example server name is modified so content length is not accurate. Also JSON payload is modified for better clarity of its structure.

+ POST /http-bind HTTP/1.1 Host: httpcm.jabber.org Accept-Encoding: gzip, deflate @@ -106,8 +104,8 @@ Content-Length: 230 "@xmpp" : "urn:xmpp:xbosh" } } } -
-
+
+    
 HTTP/1.1 200 OK
 Content-Type: application/jsonrequest
 Content-Length: 513
@@ -141,140 +139,139 @@ Content-Length: 513
     }
   }
 }
-
+
    -
  • Tag with text value
  • - XMPP-XML:
    +      
  • Tag with text value + XMPP-XML: <tag>txt-value</tag> -
  • - JSON:
    +
    +       JSON:
     { "tag" : "txt-value" }
    -
    -
  • Tag with another tag
  • - XMPP-XML:
    +
    +      
  • Tag with another tag + XMPP-XML: <tag> <tag2>txt-value</tag2> </tag> -
  • - JSON:
    +
    +       JSON:
     { "tag" : {
       "$" : {
         "tag2" : "txt-value" }
       }
     }
    -
    -
  • Multiple text value tags as array
  • - XMPP-XML:
    +
    +      
  • Multiple text value tags as array + XMPP-XML: <tag> <tag2>txt-value1</tag2> <tag2>txt-value2</tag2> </tag> -
  • - JSON:
    +
    +       JSON:
     { "tag" : {
       "$" : {
         "tag2" : [ "txt-value1", "txt-value2" ] }
       }
     }
    -
    -
  • Tag with attribute, no value
  • - XMPP-XML:
    +
    +      
  • Tag with attribute, no value + XMPP-XML: <tag attr="attr-value" /> -
  • - JSON:
    +
    +       JSON:
     { "tag" : { "attr" : "attr-value" } }
    -
    -
  • Tag with multiple attributes as array, no value
  • - XMPP-XML:
    +
    +      
  • Tag with multiple attributes as array, no value + XMPP-XML: <tag attr="attr-value1" attr="attr-value2" /> -
  • - JSON:
    +
    +       JSON:
     { "tag" : {
       "attr" : [ "attr-value1", "attr-value2" ] }
     }
    -
    -
  • Tags as array with unique attributes, no value
  • - XMPP-XML:
    +
    +      
  • Tags as array with unique attributes, no value + XMPP-XML: <tag> <tag2 attr="attr-value1" /> <tag2 attr="attr-value2" /> </tag> -
  • - JSON:
    +
    +       JSON:
     { "tag" : {
       "tag2" : [
         { "attr" : "attr-value1" },
         { "attr" : "attr-value2" } ]
       }
     }
    -
    -
  • Tag with namespace attribute, no value
  • - XMPP-XML:
    +
    +      
  • Tag with namespace attribute, no value + XMPP-XML: <tag xmlns:ns="ns-value" /> -
  • - JSON:
    +
    +       JSON:
     { "tag" : {
       "xmlns" : {
         "@ns" : "attr-value" }
       }
     }
    -
    -
  • Tag with many attributes to namespace, no value
  • - XMPP-XML:
    +
    +      
  • Tag with many attributes to namespace, no value + XMPP-XML: <tag xmlns="root-value" xmlns:ns="ns-value" /> -
  • - JSON:
    +
    +       JSON:
     { "tag" : {
       "xmlns" : {
         "$" : "root-value",
         "@ns" : "attr-value" }
       }
     }
    -
    -
  • Tag with namespace attribute, no value
  • - XMPP-XML:
    +
    +      
  • Tag with namespace attribute, no value + XMPP-XML: <ns:tag attr="attr-value" /> -
  • - JSON:
    +
    +       JSON:
     { "tag" : {
       "$$" : "ns",
       "attr" : "attr-value" }
     }
    -
    -
  • Tag with attribute and text value
  • - XMPP-XML:
    +
    +      
  • Tag with attribute and text value + XMPP-XML: <tag attr="attr-value">txt-value</tag> -
  • - JSON:
    +
    +       JSON:
     { "tag" : {
       "attr" : "attr-value",
       "$" : "txt-value" }
     }
    -
    -
  • Namespace tag with attribute and text value
  • - XMPP-XML:
    +
    +      
  • Namespace tag with attribute and text value + XMPP-XML: <ns:tag attr="attr-value">txt-value</tag> -
  • - JSON:
    +
    +       JSON:
     { "tag" : {
       "$$" : "ns",
       "attr" : "attr-value",
       "$" : "txt-value" }
     }
    -
    +
  • Complex combination
  • -
  • Tag name conversions
  • -

    JSON data is typically converted to JS-object in browser client. Practically this means that tag string name / value string pairs are converted to tag name / value string pairs. Example:

    +      
  • Tag name conversions +

    JSON data is typically converted to JS-object in browser client. Practically this means that tag string name / value string pairs are converted to tag name / value string pairs. Example:

    var s = '{ "key" : "value" }'; var sObj = JSON.parse(s); // sObj = { key : "value" }; var sStr = JSON.stringify(sObj); // sStr = '{"key":"value"}'; -
  • +

    Javascript variable naming doesn't support full colon characters ':'. Intented conversion between JSON and JS-objects is based on native JavaScript class JSON, more spesifically methods JSON.stringify() for converting object to JSON, and JSON.parse() from JSON to object.
    - Because of this namespace definitions are constructed hiearchically and their scope is within tag it is defined. Currently only reserved namespace name is 'xml'.

    + Because of this namespace definitions are constructed hiearchically and their scope is within tag it is defined. Currently only reserved namespace name is 'xml'.

-

diff --git a/inbox/lop.xml b/inbox/lop.xml index b87e499f..6cf31aee 100644 --- a/inbox/lop.xml +++ b/inbox/lop.xml @@ -66,12 +66,12 @@

Linked Process is a protocol for Internet-scale, general-purpose distributed computing. With an implementation of this protocol, any computing device with an Internet connection can contribute computing resources to a user-generated compute cloud. +

  • The term computing device is broad and spans particulars such as cell phones, laptops, desktops, servers, supercomputers, etc. In Linked Process, a computing device is anything that maintains a central processing unit (CPU) that can be programmed to execute any desired computation.
  • The term computing resources is broad and spans particulars such as clock cycles, data sets, software application programming interfaces (APIs), or specialized hardware componets such as cell phone cameras, field-programmable gate array (FPGA) circuits, etc.
  • The term compute cloud is the collection of all Linked Process enabled devices, their resources, and the Linked Process specific software components defined later in this specification.
-

Within the category of computing devices, Linked Process makes a distinction between resource consumers (devices making use of non-local computing resources) and a resource providers (devices offering computing resources)Nothing prevents the same device from being a resource consumer in one context and being a resource provider in another.. Linked Process allows a resource consumer to leverage the computing resources offered by a resource provider in anyway deemed appropriate by the resource consumer. This is accomplished by the resource consumer providing/migrating/sending code (i.e. software instructions) to a computer language interpreter maintained by the resource provider. As such, it is up to the resource consumer to define the instructions to be executed by the provider. Given this architecture, resource providing devices in a Linked Process cloud are general-purpose computing sandboxes (i.e. they can be leveraged for computational ends that are defined by a resource consumer).

@@ -84,18 +84,18 @@ Linked Process was developed to address the following two distributed computing requirements: Internet-scale and general-purpose. These requirements imply yet more requirements which accompany their description below.

    -
  • Internet-scale: it is required that any device with an Internet connection (from a cell phone to a supercomputer) be able provide/contribute and consume/leverage computing resources in a Linked Process cloud.
  • +
  • Internet-scale: it is required that any device with an Internet connection (from a cell phone to a supercomputer) be able provide/contribute and consume/leverage computing resources in a Linked Process cloud.
    • Decentralized: it is required that the computing resources are not necessarily centralized or controlled by any one party.
    • Discoverable: it is required that resource providers be discoverable by resources consumers.
    • Transient: it is required that devices coming online and offline are gracefully incoporated and removed from the cloud.
    • -
    -
  • General-purpose: It is required that consumers be able to utilize provided resources for any desired purpose.
  • +
+
  • General-purpose: It is required that consumers be able to utilize provided resources for any desired purpose.
    • Language-agnostic: it is required that the protocol support the migration of code written in any computer language.
    • Safe: it is required that the execution of consumer code be confined by permissions clearly specified by the resource providerThere is a tradeoff between "general-purpose" and "safety." It is important to ensure that the integrity of resource providers are not compomised due to malicious or poorly written code..
    • Accessible: it is required that computing resources be accessible when permissions allow by ensuring the supported language interpreters provide necessary "low-level" manipulations of such resources.
    • -
    +
  • @@ -161,18 +161,18 @@ A <spawn_vm/> element is wrapped by an <iq/> element. The purpose of <spawn_vm/> is to have a farm create a new virtual machine. It is through a virtual machine that a villein is able to access the computing resources of the physical device that hosts the farm (i.e. the resource provider). A virtual machine will maintain a state throughout a villein "session" with that virtual machine. The only way to alter the state of a virtual machine is through submitting jobs and updating its variable bindingsThis is an important concept to understand. During the life of a virtual machine, the virtual machine has a state that changes as jobs are submitted and bindings are managed. In other words, a virtual machine is not a "one-job" machine..

      -
    • Villein generated <iq type="get"> <spawn_vm/>:
    • +
    • Villein generated <iq type="get"> <spawn_vm/>:
      • xmlns attribute: http://linkedprocess.org/2009/06/Farm#.
      • vm_species attribute: the language of the virtual machine to be spawned (values are implementation dependent).
      • farm_password attribute: the password of the farmThis is an OPTIONAL attribute. Farm passwords are useful for creating private farms in order, for example, to allow "looser" permissions with known villeins. If no password is required (e.g. a public farm), then no farm_password attribute SHOULD be provided..
      • -
      -
    • Farm generated <iq type="result"> or <iq type="error"> <spawn_vm/>:
    • +
    +
  • Farm generated <iq type="result"> or <iq type="error"> <spawn_vm/>:
    • xmlns attribute: http://linkedprocess.org/2009/06/Farm#.
    • vm_id attribute: a farm-internal unique identifier for the newly created virtual machine. This MUST be provided if <iq type="result"/>.
    • vm_species attribute: the species of the newly created virtual machine. This MUST be provided if <iq type="result"/>.
    • -
    • One of these error conditions MUST be provided if <iq type="error"/>.
    • +
    • One of these error conditions MUST be provided if <iq type="error"/>.
      • <species_not_supported/>
      • <farm_is_busy/>
      • @@ -180,8 +180,8 @@
      • <internal_error/>
      • <wrong_farm_password/>
      • if an error occurred, the farm SHOULD provide some implementation specific human-readable information detailing the error in <text/>. Error responses extend the requirements set forth by the Core XMPP specification.
      • -
      -
    +
  • + <submit_job/> element is wrapped by an <iq/> element. The purpose of <submit_job/> is to send code (i.e. expressions, statements, instructions) to a virtual machine for execution (i.e. evaluation, interpretation). The expression SHOULD be respective of the virtual machine's language (i.e. the virtual machine's species). If they are not, then evaluation errors SHOULD occur. The expression submitted through a <submit_job/> stanza can be short (e.g. set a variable value, get a variable value) or long (e.g. define a class/method, execute a long running body of statements). The submitted expression is called a job in Linked Process and is assigned a job_id as specified by the <iq/> id attribute value. That is, the staza id of the <submit_job/> is the job's id.

      -
    • Villein generated <iq type="get"> <submit_job/>:
    • +
    • Villein generated <iq type="get"> <submit_job/>:
      • xmlns attribute: http://linkedprocess.org/2009/06/Farm#.
      • vm_id attribute: the farm-internal unique identifier of the virtual machine.
      • <submit_job/> text body: the expression for the virtual machine to evaluate. If no text body is provided, the expression to be evaluated can be interpreted as a blank string or a null expression. The behavior of such an evaluation is up to the virtual machine implementation.
      • -
      -
    • Farm generated <iq type="result"> or <iq type="error"> <submit_job/>:
    • +
    +
  • Farm generated <iq type="result"> or <iq type="error"> <submit_job/>:
    • xmlns attribute: http://linkedprocess.org/2009/06/Farm#.
    • vm_id attribute: the farm-internal unique identifier of the virtual machine.
    • <submit_job/> text body: the result of the expression evaluated.
    • -
    • One of these error conditions MUST be provided if <iq type="error"/>Note that, according to XMPP Core, it is RECOMMENDED that an <iq type="error"/> return the the query provided by the villein. In the example above, only the tag name is provided without the full body. The reason for this is that for <submit_job/>, the length of the text body of the tag is unrestricted and thus could be a very large piece of code. Thus, returning the original <submit_job/> stanza in the error response could lead to excessive communication overhead..
    • +
    • One of these error conditions MUST be provided if <iq type="error"/>Note that, according to XMPP Core, it is RECOMMENDED that an <iq type="error"/> return the the query provided by the villein. In the example above, only the tag name is provided without the full body. The reason for this is that for <submit_job/>, the length of the text body of the tag is unrestricted and thus could be a very large piece of code. Thus, returning the original <submit_job/> stanza in the error response could lead to excessive communication overhead..
      • <malformed_packet/>
      • <internal_error/>
      • @@ -240,8 +240,8 @@
      • <vm_not_found/>
      • <job_timed_out/>
      • if an error occurred, the farm SHOULD provide some implementation specific human-readable information detailing the error in <text/>. Error responses extend the requirements set forth by the Core XMPP specification.
      • -
      -
    +
  • + <ping_job/> element is wrapped by an <iq/> element. The purpose of <ping_job/> is to determine the status (i.e. progress, state) of a previously submitted <submit_job/> stanza (i.e. job) that has yet to complete.

      -
    • Villein generated <iq type="get"> <ping_job/>:
    • +
    • Villein generated <iq type="get"> <ping_job/>:
      • xmlns attribute: http://linkedprocess.org/2009/06/Farm#.
      • vm_id attribute: the farm-internal unique identifier of the virtual machine.
      • job_id attribute: the job identifier (the job identifier is the stanza identifier of the respective <submit_job/>).
      • -
      -
    • Farm generated <iq type="result"> or <iq type="error"> <ping_job/>:
    • +
    +
  • Farm generated <iq type="result"> or <iq type="error"> <ping_job/>:
    • xmlns attribute: http://linkedprocess.org/2009/06/Farm#.
    • vm_id attribute: the farm-internal unique identifier of the virtual machine.
    • -
    • status attribute: the job's status. This MUST be provided if <iq type="result"/>.
    • +
    • status attribute: the job's status. This MUST be provided if <iq type="result"/>.
      • in_progress: the job is in progress.
      • -
      +
  • job_id attribute: the job identifier for the status being reported.
  • -
  • One of these error conditions MUST be provided if <iq type="error"/>.
  • +
  • One of these error conditions MUST be provided if <iq type="error"/>.
    • <malformed_packet/>
    • <vm_not_found/>
    • <internal_error/>
    • <job_not_found/>
    • if an error occurred, the farm SHOULD provide some implementation specific human-readable information detailing the error in <text/>. Error responses extend the requirements set forth by the Core XMPP specification.
    • -
    - +
  • + @@ -348,26 +348,26 @@ An <abort_job/> element is wrapped by an <iq/> element. The purpose of <abort_job/> is to cancel (i.e. quit, stop, halt) a previously submitted, yet not completed <submit_job/> stanza (i.e. job).

      -
    • Villein generated <iq type="get"> <abort_job/>:
    • +
    • Villein generated <iq type="get"> <abort_job/>:
      • xmlns attribute: http://linkedprocess.org/2009/06/Farm#.
      • vm_id attribute: the farm-internal unique identifier of the virtual machine.
      • job_id attribute: the job identifier (the job identifier is the stanza identifier of the respective <submit_job/>).
      • -
      +
    -
  • Farm generated <iq type="result"> or <iq type="error"> <abort_job/>:
  • +
  • Farm generated <iq type="result"> or <iq type="error"> <abort_job/>:
    • xmlns attribute: http://linkedprocess.org/2009/06/Farm#.
    • vm_id attribute: the farm-internal unique identifier of the virtual machine.
    • -
    • One of these error conditions MUST be provided if <iq type="error"/>.
    • +
    • One of these error conditions MUST be provided if <iq type="error"/>.
      • <malformed_packet/>
      • <vm_not_found/>
      • <internal_error/>
      • <job_not_found/>
      • if an error occurred, the farm SHOULD provide some implementation specific human-readable information detailing the error in <text/>. Error responses extend the requirements set forth by the Core XMPP specification.
      • -
      -
    +
  • + <manage_bindings/> element is wrapped by an <iq/> element. The purpose of <manage_bindings/> is to allow a villein to get and set variables in the variable space of a virtual machine. The definition of the "variable space" is up to the implementation of the virtual machine. In general, this is the set of all global variables for the virtual machine.

      -
    • Villein generated <iq type="get"> or <iq type="set"> <manage_bindings/>:
    • +
    • Villein generated <iq type="get"> or <iq type="set"> <manage_bindings/>:
      • xmlns attribute: http://linkedprocess.org/2009/06/Farm#
      • vm_id attribute: the farm-internal unique identifier of the virtual machine.
      • -
      • <binding/> child tag of <manage_bindings/> for <iq type="get"/>
      • +
      • <binding/> child tag of <manage_bindings/> for <iq type="get"/>
        • name attribute: the name of the variable.
        • -
        -
      • <binding/> child tag of <manage_bindings/> for <iq type="set"/>
      • +
    • +
    • <binding/> child tag of <manage_bindings/> for <iq type="set"/>
      • name attribute: the name of the variable.
      • value attribute: the value of the variable.
      • datatype attribute: the datatype of the variable (specified using XML schema for datatypes).
      • -
      -
    -
  • Farm generated <iq type="result"> or <iq type="error"> <manage_bindings/>:
  • + + +
  • Farm generated <iq type="result"> or <iq type="error"> <manage_bindings/>:
    • xmlns attribute: http://linkedprocess.org/2009/06/Farm#.
    • vm_id attribute: the farm-internal unique identifier of the virtual machine.
    • -
    • <binding/> child tag of <manage_bindings/> for <iq type="get"/>
    • +
    • <binding/> child tag of <manage_bindings/> for <iq type="get"/>
      • name attribute: the name of the variable.
      • value attribute: the value of the variable.
      • -
      -
    • One of these error conditions MUST be provided if <iq type="error"/>.
    • +
  • +
  • One of these error conditions MUST be provided if <iq type="error"/>.
    • <malformed_packet/>
    • <vm_not_found/>
    • @@ -435,8 +435,8 @@
    • <unknown_datatype/>
    • <invalid_value/>
    • if an error occurred, the farm SHOULD provide some implementation specific human-readable information detailing the error in <text/>. Error responses extend the requirements set forth by the Core XMPP specification.
    • -
    - +
  • + @@ -468,11 +468,11 @@ ]]>

    - After the previous <manage_bindings/> stanza has been processed by the virtual machine, it is possible to use the bindings in a statement. For example, in JavaScript + After the previous <manage_bindings/> stanza has been processed by the virtual machine, it is possible to use the bindings in a statement. For example, in JavaScript

    var fact = name + " knows josh and peter"; - will set fact to the value "marko knows josh and peter" as well as make it an accessible binding. +

    will set fact to the value "marko knows josh and peter" as well as make it an accessible binding.

    @@ -490,11 +490,11 @@ ]]>

    - A useful aspect of <manage_bindings/> is that it can be used to track the state of a variable during the execution of a job. For example, suppose the following job is submitted to a JavaScript virtual machine.var x = 1.0; + A useful aspect of <manage_bindings/> is that it can be used to track the state of a variable during the execution of a job. For example, suppose the following job is submitted to a JavaScript virtual machine.

    var x = 1.0; while(true) { x = x + 0.0001; } - This job will continue indefinitely (or until it is timed out by the virtual machine). However, during its execution, it is possible to determine the current state of x using <manage_bindings/>. Each get-based <manage_bindings/> call should return a larger x value. +

    This job will continue indefinitely (or until it is timed out by the virtual machine). However, during its execution, it is possible to determine the current state of x using <manage_bindings/>. Each get-based <manage_bindings/> call should return a larger x value.

    @@ -502,23 +502,23 @@ while(true) { A <terminate_vm/> element is wrapped by an <iq/> element. The purpose of a <terminate_vm/> is to shutdown (i.e. quit, exit, halt) the virtual machine. Upon termination, the virtual machine will lose its state and will no longer be able to be communicated with.

      -
    • Villein generated <iq type="get"> <terminate_vm/>:
    • +
    • Villein generated <iq type="get"> <terminate_vm/>:
      • xmlns attribute: http://linkedprocess.org/2009/06/Farm#.
      • vm_id attribute: the farm-internal unique identifier of the virtual machine.
      • -
      -
    • Farm generated <iq type="result"> or <iq type="error"> <terminate_vm/>:
    • +
    +
  • Farm generated <iq type="result"> or <iq type="error"> <terminate_vm/>:
    • xmlns attribute: http://linkedprocess.org/2009/06/Farm#.
    • vm_id attribute: the farm-internal unique identifier of the virtual machine.
    • -
    • One of these error conditions MUST be provided if <iq type="error"/>.
    • +
    • One of these error conditions MUST be provided if <iq type="error"/>.
      • <malformed_packet/>
      • <vm_not_found/>
      • <internal_error/>
      • if an error occurred, the farm SHOULD provide some implementation specific human-readable information detailing the error in <text/>. Error responses extend the requirements set forth by the Core XMPP specification.
      • -
      -
    +
  • + @@ -928,7 +928,7 @@ while(true) {

    - The following namespaces are defined by Linked Process: +

    The following namespaces are defined by Linked Process:

    • http://linkedprocess.org/2006/06/Farm#
    • http://linkedprocess.org/2006/06/Registry#
    • diff --git a/inbox/mobile.xml b/inbox/mobile.xml index 7cdfeecc..70c62605 100644 --- a/inbox/mobile.xml +++ b/inbox/mobile.xml @@ -1,6 +1,7 @@ + rfc3920bis RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/draft-ietf-saintandre-rfc3920bis>." > %ents; ]> @@ -107,27 +108,27 @@

      As with anything, there are no hard and fast rules. If there were, they might look like these. First, for devices:

      -
      Transmit no data.
      -
      Transmitting costs significant power, and moreover raises the radio state. Not transmitting will allow it to maximize the time spent in the low-cost Idle state.
      -
      If you must transmit, then transmit only a small volume.
      -
      If there is only a small amount of data transmitted - less than 128 octets typically - the radio will only raise to FACH, which is significantly cheaper than DCH.
      -
      If you must transmit, then compress as hard as possible.
      -
      Since individual octets have an associate power - and often financial - cost, it's worth maximizing the compression algorithm, even if the volume of traffic will raise to DCH.
      -
      If you have transmit a lot, then do a lot
      -
      If the radio is raised to DCH anyway, then you may as well go fetch that avatar you were missing, since you're chewing through power anyway.
      -
      If you receive, then transmit
      -
      If your peer raises the radio state, you may as well use it.
      +
      Transmit no data.
      +
      Transmitting costs significant power, and moreover raises the radio state. Not transmitting will allow it to maximize the time spent in the low-cost Idle state.
      +
      If you must transmit, then transmit only a small volume.
      +
      If there is only a small amount of data transmitted - less than 128 octets typically - the radio will only raise to FACH, which is significantly cheaper than DCH.
      +
      If you must transmit, then compress as hard as possible.
      +
      Since individual octets have an associate power - and often financial - cost, it's worth maximizing the compression algorithm, even if the volume of traffic will raise to DCH.
      +
      If you have transmit a lot, then do a lot
      +
      If the radio is raised to DCH anyway, then you may as well go fetch that avatar you were missing, since you're chewing through power anyway.
      +
      If you receive, then transmit
      +
      If your peer raises the radio state, you may as well use it.

      And for servers, similar rules apply:

      -
      Send no data.
      -
      Sending data will cause the handset to be raised out of Idle. This immediately costs massively higher power.
      -
      If you must send, send tiny bits.
      -
      Sending small enough data maximizes the likelyhood that the devices radio will only be raised to FACH levels.
      -
      If you receive, then send anything you have.
      -
      Receiving data indicates that the radio is active - it'll stay active for some time, so sending data doesn't incur the overhead of raising the radio state, and won't increase power drain on the handset.
      -
      If you must send when not receiving, send plenty.
      -
      Sending data will raise the radio's state - unless you can tell this will only raise it to FACH, it's worth sending as much as possible.
      +
      Send no data.
      +
      Sending data will cause the handset to be raised out of Idle. This immediately costs massively higher power.
      +
      If you must send, send tiny bits.
      +
      Sending small enough data maximizes the likelyhood that the devices radio will only be raised to FACH levels.
      +
      If you receive, then send anything you have.
      +
      Receiving data indicates that the radio is active - it'll stay active for some time, so sending data doesn't incur the overhead of raising the radio state, and won't increase power drain on the handset.
      +
      If you must send when not receiving, send plenty.
      +
      Sending data will raise the radio's state - unless you can tell this will only raise it to FACH, it's worth sending as much as possible.

      Finally, protocol designers should aim to minimize any responses required from the handset, and ensure keepalive traffic, if any, fits inside FACH wherever possible.

      diff --git a/inbox/moved.xml b/inbox/moved.xml index a0535d52..d6177881 100644 --- a/inbox/moved.xml +++ b/inbox/moved.xml @@ -2,6 +2,7 @@ + rfc3920bis RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/draft-ietf-saintandre-rfc3920bis>." > %ents; ]> @@ -111,10 +112,10 @@ user@example.com.

      -
      original JID
      -
      user@example.com
      -
      new JID
      -
      user2@example2.com
      +
      original JID
      +
      user@example.com
      +
      new JID
      +
      user2@example2.com

      Because of the ability to spoof the &MOVED; element, the client SHOULD - NOT automatically subscribe to the &MOVED; element target

      . + NOT automatically subscribe to the &MOVED; element target.

      diff --git a/inbox/muc-light.xml b/inbox/muc-light.xml index 92e12c83..3275e62c 100644 --- a/inbox/muc-light.xml +++ b/inbox/muc-light.xml @@ -531,13 +531,12 @@

      The client MAY include initial configuration and occupant list (the list MUST NOT include the creator). The server MAY allow sending incomplete configuration form. In such case the server MUST use default values for missing fields. The server MAY enforce a minimal occupant list length.

      The service MAY either give the creator the 'owner' or 'member' status. In the latter case all users are equal.

      Upon room creation success, the service MUST reply with an empty IQ result.

      -

      The following rules (similar to the ones relevant to the affiliation change request) apply to the occupant list: -

        -
      • 'none' affiliation cannot be used.
      • -
      • All user bare JIDs must be unique
      • -
      • At most one owner can be chosen. In such case the room creator will become "just" a 'member'.
      • -
      -

      +

      The following rules (similar to the ones relevant to the affiliation change request) apply to the occupant list:

      +
        +
      • 'none' affiliation cannot be used.
      • +
      • All user bare JIDs must be unique
      • +
      • At most one owner can be chosen. In such case the room creator will become "just" a 'member'.
      • +

      After the room is created (but before receiving IQ result), new occupants (including creator) receive &MESSAGE; from the room with their affiliations (stanza MUST include only recipient's affiliation) and initial room version. <prev-version /> element MUST NOT be included.

      All changes must be meaningful, e.g. setting member's affiliation to 'member' is considered a bad request.
    • Server MAY allow members to add new members but they still cannot make anyone an 'owner' or remove other users from the room.
    • -

      On success the server will reply with result IQ with all changed items. BEFORE returning the IQ result, the service MUST route a message with affiliation change to all relevant users.

      +

      On success the server will reply with result IQ with all changed items. BEFORE returning the IQ result, the service MUST route a message with affiliation change to all relevant users.

      Newcomers, i.e. users that were not occupants before the change, SHOULD receive only their own affiliation and SHOULD NOT receive <prev-version /> element.

      The notifications must include both the new and old room version (<version /> and <prev-version /> respectively) string (except for the ones directed to users that have been removed from the room).

      The notifications contain a list of items. The item list may be different from the list in IQ set, because some of the changes may require additional operations, e.g. choosing new owner when the old one leaves. Users, that are still in the room after change, will receive full change list. Users, that have been removed from the room with the request, will get only one item: themselves with affiliation 'none'.

      @@ -1007,13 +1006,12 @@

      If the request sender does not have sufficient privileges (but is a room occupant), the service MUST reply with a 'not-allowed' error.

      -

      It occurs in the following cases: -

        -
      • A member tries to change the configuration but the service is not configured to allow it. It does not apply to the subject change, although it has to be performed by sending &MESSAGE; with &SUBJECT;, not configuration &IQ;.
      • -
      • A member tries to change anyone's affiliation to 'none' or 'owner'.
      • -
      • A member tries to change someone's affiliation to 'member' but the service is not configured to allow it.
      • -
      -

      +

      It occurs in the following cases:

      +
        +
      • A member tries to change the configuration but the service is not configured to allow it. It does not apply to the subject change, although it has to be performed by sending &MESSAGE; with &SUBJECT;, not configuration &IQ;.
      • +
      • A member tries to change anyone's affiliation to 'none' or 'owner'.
      • +
      • A member tries to change someone's affiliation to 'member' but the service is not configured to allow it.
      • +

      MUC Light service may be abused by malicious users, e.g. due to replicating single message for every room occupant. The list below contains suggested configurable limits that SHOULD be implemented.

      The service features that might vary depending on specific application are included as well.

      -

      -

        -
      • Maximal count of rooms the user occupies.
      • -
      • Blocking feature enabled/disabled.
      • -
      • XEP-0045 compatibility mode enabled/disabled.
      • -
      • Room creator's initial affiliation: owner/member.
      • -
      • Room configuration may be changed by owner/occupants.
      • -
      • New members can be invited by owner/occupants.
      • -
      • Maximal room size.
      • -
      -

      +
        +
      • Maximal count of rooms the user occupies.
      • +
      • Blocking feature enabled/disabled.
      • +
      • XEP-0045 compatibility mode enabled/disabled.
      • +
      • Room creator's initial affiliation: owner/member.
      • +
      • Room configuration may be changed by owner/occupants.
      • +
      • New members can be invited by owner/occupants.
      • +
      • Maximal room size.
      • +
      diff --git a/inbox/muji.xml b/inbox/muji.xml index 229cd766..3d326411 100644 --- a/inbox/muji.xml +++ b/inbox/muji.xml @@ -49,25 +49,25 @@ -Jingle XEP-0166 is used to negotiate peer to peer media sessions. +

      Jingle XEP-0166 is used to negotiate peer to peer media sessions. Muji is a way to coordinate Jingle sessions between a group of people. -Muji conferences are held in XEP-0045 rooms. +Muji conferences are held in XEP-0045 rooms.

      -A Muji conference has a number of contents, each of which has unique name. +

      A Muji conference has a number of contents, each of which has unique name. content type, and an encoding. Each participant may provide a stream for each content, and communicates which contents they are willing to provide streams for, along with encoding information, in their MUC presence. This serves two purposes. Firstly, so that each participant knows which contents every other participant provides. Secondly, so that there is a global payload type (PT) mapping for the various contents, so that clients only need to encode and -payload each content that they provide once. +payload each content that they provide once.

      -Participants are not required to participate all the contents that are +

      Participants are not required to participate all the contents that are available. For example, a Muji client might choose to only request audio -streams. +streams.

      @@ -75,7 +75,7 @@ streams. Joining a conference is done in two stages. The first step is to declare that preparations are being done to either join or start a muji session inside the MUC. This is indicated by the client sending a presence - stanza to the MUC with a preparing element in muji section. + stanza to the MUC with a preparing element in muji section.

      ]]> - The client MUST then wait until the MUC rebroadcasts its presence message, +

      The client MUST then wait until the MUC rebroadcasts its presence message, after which it MUST wait for all other participants that had a preparing element in their presence to finish preparation. Afterwards it should finish it's own preparation by updating its presence with the contents it wants to - take part in. + take part in.

      ]]> -

      -

      - - When a client adds a payload ID to a content description, it MUST have the +

      When a client adds a payload ID to a content description, it MUST have the same codec name and receiving parameters as the corresponding entries in other participants' payload maps for that content. For instance, if Alice defines a payload type with ID 98, codec Speex and a a clock rate of 8000 @@ -170,7 +167,7 @@ streams.

      Adding a stream follows a process similar to the joining a conference. As a first step an updated presence stanza MUST be send which contains a preparing - element as part of the Muji section. + element as part of the Muji section.

      ]]> - The client MUST then wait until the MUC rebroadcasts its presence message, +

      The client MUST then wait until the MUC rebroadcasts its presence message, after which it MUST wait for all other participants that had a preparing - element in their presence to finish their changes. + element in their presence to finish their changes.

      - Afterwards the client should add the new content to the muji section of its +

      Afterwards the client should add the new content to the muji section of its presence and add the content to all the jingle sessions it had with - participants it shared the content with. + participants it shared the content with.

      ]]> -

      diff --git a/inbox/multi-user_gaming.xml b/inbox/multi-user_gaming.xml index a19cab2a..38652c04 100644 --- a/inbox/multi-user_gaming.xml +++ b/inbox/multi-user_gaming.xml @@ -23,6 +23,7 @@
      Multi-User Gaming This document defines an XMPP protocol extension for multi-user gaming. + &LEGALNOTICE; xxxx ProtoXEP Standards Track @@ -74,7 +75,6 @@ tg

      First draft.

      - &LEGALNOTICE;

      @@ -197,8 +197,8 @@ - Most of the examples in this document use the scenario of Miranda and Ferdinand playing chess in Act V, Scene I of Shakespeare's The Tempest, - represented here as the "island-chess@games.shakespeare.lit" room. The characters are as follows: +

      Most of the examples in this document use the scenario of Miranda and Ferdinand playing chess in Act V, Scene I of Shakespeare's The Tempest, + represented here as the "island-chess@games.shakespeare.lit" room. The characters are as follows:

      @@ -216,7 +216,7 @@ - The following affiliations are defined: +

      The following affiliations are defined:

      1. Member
      2. Owner
      3. @@ -239,10 +239,10 @@

        - Owners are allowed to do what they like (saving/loading, change match options, etc.) +

        Owners are allowed to do what they like (saving/loading, change match options, etc.) except in unmoderated matches. This match type restricts the use of owner privileges to specific room statuses. Users with no affiliation SHALL NOT enter members-only matches. - Besides that, these users have the same privileges as members. + Besides that, these users have the same privileges as members.

      Room NicknameFull JIDAffiliationGame Role
      @@ -275,11 +275,11 @@ - The ways in which a user's affiliation changes are well-defined. +

      The ways in which a user's affiliation changes are well-defined. Sometimes the change results from the user's own action (e.g., registering as a member of the match), whereas sometimes the change results from an action taken by an owner. If a user's affiliation changes, a MUG service implementation MUST change the user's affiliation to reflect the change - and communicate that to all occupants. + and communicate that to all occupants.

      @@ -762,10 +762,10 @@ - It can be useful to invite other users to a room in which one is an occupant. +

      It can be useful to invite other users to a room in which one is an occupant. To do this, a MUG client sends XML of the following form to the &ROOM; itself adding an &INVITE; element for every invitee. - (the reason is OPTIONAL and the message MUST be explicitly or implicitly of type "normal"): + (the reason is OPTIONAL and the message MUST be explicitly or implicitly of type "normal"):

      If the room creation fails because the specified room configuration options violate one or more service policies (e.g., because the password for a password-protected room is blank), - the service MUST return a error. + the service MUST return a <not-acceptable/> error.

      -

      A given deployment MAY wish to redirect users to another medium (e.g., a website) for further stages of registration, rather than allowing in-band registration. The recommended approach is to include only the element rather than the required fields or a data form in the IQ result, as well as a URL encoded using &xep0066;

      +

      A given deployment MAY wish to redirect users to another medium (e.g., a website) for further stages of registration, rather than allowing in-band registration. The recommended approach is to include only the <instructions/> element rather than the required fields or a data form in the IQ result, as well as a URL encoded using &xep0066;

      inbox - Valerian Saliou diff --git a/inbox/nsver.xml b/inbox/nsver.xml index 1039598f..7d89dd1e 100644 --- a/inbox/nsver.xml +++ b/inbox/nsver.xml @@ -13,8 +13,9 @@ Experimental Informational Standards - None - None + + + namespace &dcridland; &stpeter; diff --git a/inbox/s2s-components.xml b/inbox/s2s-components.xml index 75973f9b..e9376fe3 100644 --- a/inbox/s2s-components.xml +++ b/inbox/s2s-components.xml @@ -22,7 +22,7 @@ XEP-0114 XEP-0225 - None + comp-s2s &dcridland; diff --git a/inbox/sasl2.xml b/inbox/sasl2.xml new file mode 100644 index 00000000..555dd37b --- /dev/null +++ b/inbox/sasl2.xml @@ -0,0 +1,216 @@ + + +%ents; +]> + + +
      + Extensible SASL Profile + This document describes a replacement for the SASL profile documented in RFC 6120 which allows for greater extensibility. + &LEGALNOTICE; + XXXX + ProtoXEP + Standards Track + Standards + + XMPP Core + + + + sasl2 + &dcridland; + + 0.0.1 + 2017-02-07 + dwd + +
        +
      • Initial Revision
      • +
      +
      +
      +
      + + +

      While SASL provides an excellent framework that has served us well over the past 18 years, a number of shortcomings in the profile - the syntax binding to XMPP - that is in use.

      +

      This specification addresses a number of shortfalls:

      +
        +
      • Number of round trips
      • +
      • Extensibility
      • +
      • Support for second factor
      • +
      • Support for mandatory password changes
      • +
      +

      The new SASL profile documented herein is primarily a syntactic change to allow extensibility, combined with removal of the (largely) redundant stream restart, and additional results beyond total success or abject failure.

      + +

      Although initiating entities, in general, use SASL, and receiving entities offer it, the SASL specification and common parlance both use "Client " and "Server"; this specification uses Client and Server and assumes C2S links. This is not intended to preclude use of this SASL profile on S2S links. The term "SASL2" is used to mean the new SASL profile specified in this document; however the same RFC 4422 definition of SASL (and SASL profiles) applies.

      +

      Examples often use hypothetical SASL mechanisms and sub-extensions; this specification does not intend to make a position on any particular SASL mechanism, and the Mandatory To Implement mechanisms are unaffected.

      +
      +
      + + + +

      Servers capable of SASL2 offer a stream feature of <mechanisms/>, qualified by the "urn:xmpp:sasl:0" namespace. This in turn contains one or more <mechanism/> elements in the same namespace, and potentially other elements (for example, the <hostname/> element defined within XEP-0233).

      +

      Note that SASL2 is impossible for clients to initiate without at least one mechanism being available, and therefore MUST NOT be offered.

      +

      The feature so advertised, and its child content, SHOULD be stable for the given stream to and from attributes and encryption state, and therefore MAY be cached by clients for later connections.

      +

      The Service Name used by XMPP is unchanged from RFC 6120.

      +
      + +

      In all cases, both Clients and Servers encode SASL exchanges using Base 64 encoding. This SHOULD NOT include any line wrapping or other whitespace. As the form <element/> is equivalent to <element></element>, these both indicate an empty string, which is used to indicate no data (ie, the absence of the data). In order to explicitly transmit a zero-length SASL challenge or response, the sending party sends a single equals sign character ("=").

      +
      + +

      Clients, upon observing this stream feature, initiate the authentication by the use of the <authenticate/> top-level element, within the same namespace. The nature of this element is to inform the server about properties of the final stream state, as well as initiate authentication itself. To achieve the latter, it has a single mandatory attribute of "mechanism", with a string value of a mechanism name offered by the Server in the stream feature, and an optional child element of <initial-response/>, containing a base64-encoded SASL Initial Response.

      +

      On subsequent connections, if a Client has previously cache the stream feature, the Client MAY choose to send it before seeing the stream features - sending it "pipelined" with the Stream Open tag for example.

      + + SW1wcm92ZWQgZW5jYXNwdWxhdGlvbiBvZiBvcHRpb25hbCBTQVNMLUlSIGRhdGE= + + ]]> + +

      In order to provide support for other desired stream states beyond authentication, additional child elements are used. For example, a hypothetical XEP-0198 session resumption element might be included, and/or Resource Binding requests.

      + + + U0FTTC1JUiBlbmNvZGVkIGFsb25nc2lkZSBiaW5kIHJlcXVlc3Q= + + + +]]> + +
      + +

      Server Challenges MAY then be sent. Each Challenge MUST be responded to by a Client in a Client Response. These are not extensible, and contain the corresponding base64 encoded SASL data:

      + + + QmFzZSA2NCBlbmNvZGVkIFNBU0wgY2hhbGxlbmdlIGRhdGE= + + + + + QmFzZSA2NCBlbmNvZGVkIFNBU0wgcmVzcG9uc2UgZGF0YQ== + + ]]> + +
      + +

      At any time while authentication is in progress, neither Client nor Server sends any element (including stanzas) or other data except the top-level elements defined herein. Clients MUST NOT send whitespace, and MUST send only <response/> elements as appropriate or an <abort/> element to immediately cause an error. Servers MUST disconnect Clients immediately if any other traffic is received. Servers are similarly REQUIRED to send no whitespace, and only the <response/> and completion elements from the section below.

      +
      + +

      Authentication may complete in one of three ways. It may complete successfully, in which case the client is authenticated. It may also fail, in which case the client is not authenticated and the stream and session state remain entirely unchanged.

      +

      Finally, it may have completed successfully, but further interaction is required - for example, a password change or second-factor authentication.

      + +

      If the Client is now authenticated, the Server sends a <success/> element, which contains an OPTIONAL <additional-data/> element containing SASL additional data. It also contains a <authorization-identity/> element containing the negotiated identity - this is a bare JID, unless resource binding has occurred, in which case it is a full JID.

      + + + T3B0aW9uYWwgQmFzZSA2NCBlbmNvZGVkIFNBU0wgc3VjY2VzcyBkYXRh + + juliet@montague.example/Balcony/a987dsh9a87sdh + + ]]> +

      Other extension elements MAY also be contained by the <success/> element.

      + + + T3B0aW9uYWwgQmFzZSA2NCBlbmNvZGVkIFNBU0wgc3VjY2VzcyBkYXRh + + juliet@montague.example/Balcony/a987dsh9a87sdh + + + ]]> +

      Any security layer negotiated SHALL take effect after the ">" octet of the closing tag (ie, immediately after "</success>").

      +
      + +

      A <failure/> element is used by the server to terminate the authentication attempt. It MAY contain application-specific error codes, and MAY contain a textual error. It MUST contain one of the SASL error codes from RFC 6120 Section 6.5.

      + + + + This is a terrible example. + + ]]> +
      + +

      A <continue/> element is used to indicate that while the SASL exchange was successful, it is insufficient to allow authentication at this time.

      +

      This can be used to indicate that the Client needs to perform a Second Factor Authentication ("2FA"), or is required to change password. These are conducted as additional SASL mechanisms. Such SASL mechanisms MUST NOT change the authorization identifier, or introduce any security layer. The authorization identifer transmitted during the subsequent <success/>, and any security layer which comes into effect after the eventual <success/>, therefore MUST be that of the first mechanism.

      +

      The element contains a <mechanisms/> element, as defined above as a stream feature, containing suitable mechanisms. It MAY contain an <additional-data/> element, as the <success/> element does.

      +

      Finally, it MAY contain a <text/> element, which can contain human-readable data explaining the nature of the step required.

      + + + T3B0aW9uYWwgQmFzZSA2NCBlbmNvZGVkIFNBU0wgc3VjY2VzcyBkYXRh + + + HOTP-EXAMPLE + TOTP-EXAMPLE + + This account requires 2FA + + ]]> +

      Clients respond with a <next-authenticate/> element, which has a single mandatory attribute of "mechanism", containing the selected mechanism name, and contains an OPTIONAL base64 encoded initial response.

      + + MkZBIG9yIHBhc3N3b3JkIGNoYW5nZSBvciBzb21ldGhpbmc= + + ]]> +
      +
      +
      + + +

      This provides pointers and/or clarifications to the in the order and manner defined in RFC 4422, section 4.

      + +

      The service name SHALL be "xmpp", as defined by RFC 6120.

      +
      + +

      Servers list mechanisms during stream features (See ) and within the <continue/> element (See ).

      +

      TODO: Neither this specification nor RFC 6120 allow clients access to the mechanism list after SASL negotiation...?

      +
      + + +

      Clients initiate using the <authenticate/> top level element (See , and after any <continue/> with the <next-authenticate/> message (See ).

      +
      + +

      See .

      +
      + +

      See .

      +
      +
      + +

      If a Client specifies an authorization string which is non-empty, the identifier is normalized by treating it as a JID, and performing normalization as described in RFC 7622.

      +
      + +

      Clients MAY abort unilaterally by sending <abort/> as specified in .

      +

      Servers MAY abort unliterally by sending <failure/> with the <aborted/> error code as defined in .

      +
      + +

      See .

      +
      + +

      Option (a) is used - any SASL Security Layer is applied first to data being sent, and TLS applied last.

      +
      + +

      Although the <continue/> concept does use multiple SASL sequences, only the first SASL mechanism used is considered an authentication, and only the first can negotiate a security layer.

      +

      In particular, once <success/> has been sent by the server, any further <authenticate/> element MUST result in a stream error.

      +
      +
      + + +

      Relative to the SASL profile documented in RFC 6120, this introduces more data unprotected by any security layer negotiated by SASL itself.

      +
      + + +

      This XEP requires no interaction with &IANA;.

      +
      + + +

      None.

      +
      + + +

      The author wishes to share any credit with many members of the community, including Lance Stout, Ralph Meijer, and Florian Schmaus.

      +
      + +
      diff --git a/inbox/sensors.xml b/inbox/sensors.xml index d661858a..0f387289 100644 --- a/inbox/sensors.xml +++ b/inbox/sensors.xml @@ -244,7 +244,7 @@ Thus, for the meta data, the node id would be UUID_meta and the data value node
      -Adapter publishes device meta data: +

      Adapter publishes device meta data:

      ]]>
      Room Type
      - -
      Attribute @@ -373,11 +372,9 @@ If the meta node is configured to include payloads, the subscribers will receive A serial number or other unique identifier for the physical device
      - -
      Attribute @@ -507,13 +504,11 @@ The tuple (UUID X, transducer id Y) MUST be unique such that a publish operation The accuracy of the values reported by this transducer

      To make it easier for agents to sort through available devices and seonsors, it is desirable for implementations to use a common set of types. The following device types are defined:

      - -
      Type @@ -610,7 +605,6 @@ The tuple (UUID X, transducer id Y) MUST be unique such that a publish operation Other type that isn't listed above
      @@ -618,7 +612,7 @@ The tuple (UUID X, transducer id Y) MUST be unique such that a publish operation SI conventions as shown in the The Unified Code For Units of Measurement.

      -After specifying the units of the transducer device, you can then also specify an SI scalar value as powers of 10. The following example shows how to specify a sensor in centimeters. +After specifying the units of the transducer device, you can then also specify an SI scalar value as powers of 10. The following example shows how to specify a sensor in centimeters.

      ]]> -The following example shows how to specify a sensor in kilograms. +

      The following example shows how to specify a sensor in kilograms.

      ]]> -The following example shows how to specify a sensor in kilowatt-second with a resolution to the nearest 0.1 kWh. +

      The following example shows how to specify a sensor in kilowatt-second with a resolution to the nearest 0.1 kWh.

      ]]> -If no unitScaler value is specified, then a unitScaler of 0 (aka 10**0 = 1) is assumed. +

      If no unitScaler value is specified, then a unitScaler of 0 (aka 10**0 = 1) is assumed.

      -Values for a transducer are published via the data value node: +

      Values for a transducer are published via the data value node:

      ]]> - -
      Attribute @@ -744,7 +737,6 @@ The tuple (UUID X, transducer id Y) MUST be unique such that a publish operation The raw value as seen by the transducer. The rawValue can be used to record a non-unit converted value for record keeping (e.g. a raw ADC value before calibration).

      OPTIONAL: Instead of putting all of the transducer values into a single data value node, an adapter MAY want to break up the transducer values into multiple nodes. For example, an adapter may want to do this for reasons of security (allow some entities to subscribe/publish to transducer Y1 and a different set of entities to subscribe/publish to transducer Y2). @@ -804,7 +796,7 @@ The information in the meta node is used by consumers to determine which node th

      -Values for a transducer can also be set by publishing to the data value node. +

      Values for a transducer can also be set by publishing to the data value node.

      ]]> - -
      Attribute @@ -922,7 +913,6 @@ The tuple (UUID X, transducer id Y) MUST be unique such that a publish operation If the adapter can verify that the raw value is an allowable value for the transducer, it SHOULD allow the raw value to take precedence over the typedValue if provided.

      Actuation takes place as a split-phase operation with an action signal (publish) followed by a completion callback (subscribed message). @@ -1153,12 +1143,11 @@ Event Node ID: 4d4335b5-4134-11e0-9207-0800200c9a66_data ]]> -

      Two things to note: +

      Two things to note:

      1. The tuple ('4d4335b5-4134-11e0-9207-0800200c9a66_data', 'tid1') uniquely identifies the motion sensor for this camera adapter.
      2. It is not relevant to the subscriber of this node (the consumer of information) whether the camera has motion detection built in or whether the adapter is capturing images from the camera and using its own methodology for determining motion.
      -

      To continue this example further, let's assume an agent is subscribed to the data value node and can also publish to the tid2 node which controls the light. In this case, an agent will receive notification that movement was sensed and can take action. @@ -1302,7 +1291,7 @@ If an adapter chooses to publish a subset of transducer data (for example, only the changed values), it is possible for consumers who are off line or recently activated to miss older values. There are a variety of ways to handle this depending on the needs of the -implementor including (but not limited to): +implementor including (but not limited to):

      • Increase the history size of the node in the xmpp server so old entries can be obtained @@ -1317,7 +1306,7 @@ Put infrequent events in their own nodes and use data value node for frequent ev Put frequent events in their own nodes and use data value node for infrequent events
      -If an implementaion chooses to put some transducers values into their own nodes +

      If an implementaion chooses to put some transducers values into their own nodes (instead of putting them all into the data value node), remember that a transducer value MUST appear in either the data value node or its own node, but not both. The meta node indicates to consumers which node they should subscribe to in order to be notified when new data is available for their chosen transducer.

      diff --git a/inbox/sift.xml b/inbox/sift.xml index 37ff3de0..52f6cd7d 100644 --- a/inbox/sift.xml +++ b/inbox/sift.xml @@ -162,10 +162,10 @@
      iq-sift
      -
      The server enables the client to sift all &IQ; stanzas or ones that match the specified criteria.
      -
      message-sift
      -
      The server enables the client to sift all &MESSAGE; stanzas or ones that match the specified criteria.
      -
      presence-sift
      +
      The server enables the client to sift all &IQ; stanzas or ones that match the specified criteria.
      +
      message-sift
      +
      The server enables the client to sift all &MESSAGE; stanzas or ones that match the specified criteria.
      +
      presence-sift
      The server enables the client to sift all &PRESENCE; stanzas or ones that match the specified criteria.
      @@ -175,14 +175,14 @@
      all
      -
      The server shall sift this kind of stanza no matter who the sender is. This is the default.
      -
      local
      -
      The server shall sift this kind of stanza only from entities associated with the same local domain as the user itself (not from remote domains).
      -
      others
      -
      The server shall sift this kind of stanza only from other entities (not from the user itself).
      -
      remote
      -
      The server shall sift this kind of stanza only from entities associated with remote domains (not from the same local domain as the user itself).
      -
      self
      +
      The server shall sift this kind of stanza no matter who the sender is. This is the default.
      +
      local
      +
      The server shall sift this kind of stanza only from entities associated with the same local domain as the user itself (not from remote domains).
      +
      others
      +
      The server shall sift this kind of stanza only from other entities (not from the user itself).
      +
      remote
      +
      The server shall sift this kind of stanza only from entities associated with remote domains (not from the same local domain as the user itself).
      +
      self
      The server shall sift this kind of stanza only from the user itself (not from other entities).
      @@ -193,10 +193,10 @@
      all
      -
      The server shall sift this kind of stanza if the recipient is the bare JID &LOCALBARE; of the user or the full JID &LOCALFULL; of the particular resource. This is the default.
      -
      bare
      -
      The server shall sift this kind of stanza only if the recipient is the bare JID &LOCALBARE; of the user.
      -
      full
      +
      The server shall sift this kind of stanza if the recipient is the bare JID &LOCALBARE; of the user or the full JID &LOCALFULL; of the particular resource. This is the default.
      +
      bare
      +
      The server shall sift this kind of stanza only if the recipient is the bare JID &LOCALBARE; of the user.
      +
      full
      The server shall sift this kind of stanza only if the recipient is the full JID &LOCALFULL; of the particular resource.
      diff --git a/inbox/spim.xml b/inbox/spim.xml index 39d1e232..a3279181 100644 --- a/inbox/spim.xml +++ b/inbox/spim.xml @@ -43,14 +43,14 @@ -

      There are various spim protection methods exist in XMPP: &xep0016;, &xep0158;, &xep0191;, &xep0268; and &xep0275;. But they may not be sufficient enough: +

      There are various spim protection methods exist in XMPP: &xep0016;, &xep0158;, &xep0191;, &xep0268; and &xep0275;. But they may not be sufficient enough:

      • &xep0016; and &xep0191; define blocking mechanism only which is not always appropriate.
      • &xep0158; interacts badly with automated software such as gateways.
      • &xep0268; implies trusted network of servers.
      • &xep0275; concentrates on ranking only.
      - Service administrators might want to deploy server-based spim recognition software to fill in the gaps. However, every automated spim recognition suffers from false positives - situations where a stanza incorrectly qualified as spim. To avoid them, a spim filter doesn't block suspicious stanza, but marks it and sends to a client in a regular manner. A client software doesn't need to interrupt a user when processing such marked stanzas: for example, it may put them silently in "SPAM" folder, so a user can look through them at any time later. Furthermore, a spim filter may take user's experience into account. When a user receives an unsolicited stanza, he or she can mark it as spim. In this case a client software sends an automatic complaint to a server-based spim filter. This specification deals with both cases. Thus, in contrast to &xep0159;, it doesn't introduce any spim blocking techniques. Also, the various spim recognition procedures that may be employed by the server are beyond the scope of this document. +

      Service administrators might want to deploy server-based spim recognition software to fill in the gaps. However, every automated spim recognition suffers from false positives - situations where a stanza incorrectly qualified as spim. To avoid them, a spim filter doesn't block suspicious stanza, but marks it and sends to a client in a regular manner. A client software doesn't need to interrupt a user when processing such marked stanzas: for example, it may put them silently in "SPAM" folder, so a user can look through them at any time later. Furthermore, a spim filter may take user's experience into account. When a user receives an unsolicited stanza, he or she can mark it as spim. In this case a client software sends an automatic complaint to a server-based spim filter. This specification deals with both cases. Thus, in contrast to &xep0159;, it doesn't introduce any spim blocking techniques. Also, the various spim recognition procedures that may be employed by the server are beyond the scope of this document.

      @@ -143,13 +143,12 @@

      A filtering entity SHOULD only add <mark/> or <report/> elements and a receiving entity SHOULD only process those elements if the corresponding stanza envolves an interaction with a human user: subscription requests, messages, conference invites, voice calls, etc. For example, it doesn't make a lot of sense to mark &xep0232; stanzas.

      -

      To avoid obvious false positives and user confusions, a filtering entity SHOULD NOT add <mark/> or <report/> elements to a stanza and a receiving entity SHOULD ignore <mark/> and <report/> elements of a stanza if: +

      To avoid obvious false positives and user confusions, a filtering entity SHOULD NOT add <mark/> or <report/> elements to a stanza and a receiving entity SHOULD ignore <mark/> and <report/> elements of a stanza if:

      • The receiving entity has the sender's subscription information of the type "both", "from" or "to".
      • The receiving entity has pending subscription to the sender, i.e. subscription of type "none" and ask='subscribe'.
      • The receiving entity has sent direct presence to the sender.
      -

      If an entity supports the spim markers, it MUST report that by including a service discovery feature of "urn:xmpp:spim-marker:0" in response to a &xep0030; information request. If an entity supports the spim reports, it MUST report that by including a service discovery feature of "urn:xmpp:spim-report:0" in response to a &xep0030; information request:

      diff --git a/inbox/sxe.xml b/inbox/sxe.xml index ec3885ee..f19c3b11 100644 --- a/inbox/sxe.xml +++ b/inbox/sxe.xml @@ -12,6 +12,7 @@ xxxx ProtoXEP Standards Track + Standards Council XMPP Core @@ -1041,4 +1042,3 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      - diff --git a/inbox/tictactoe-mug.xml b/inbox/tictactoe-mug.xml index 92459775..97f3a8f7 100644 --- a/inbox/tictactoe-mug.xml +++ b/inbox/tictactoe-mug.xml @@ -18,6 +18,7 @@ xxxx ProtoXEP Standards Track + Standards Council XMPP Core @@ -263,29 +264,29 @@

      During the game, players change in turn, each of them MUST send only one move at a time. It MUST possess these attributes: - - - - - - - - - - - - - - - - - - - - - -
      NameTypeDescription
      'id'REQUIREDThe number of the move. First move is 1.
      'row'REQUIREDThe horizontal position of the mark.
      'col'REQUIREDThe vertical position of the mark.

      + + + + + + + + + + + + + + + + + + + + + +
      NameTypeDescription
      'id'REQUIREDThe number of the move. First move is 1.
      'row'REQUIREDThe horizontal position of the mark.
      'col'REQUIREDThe vertical position of the mark.
      xxxx ProtoXEP Standards Track + Standards Council XMPP Core @@ -133,29 +134,29 @@ Furthermore, the &MESSAGE; stanza contains a &TURN; element which in turn contains exactly one &MOVE; element qualified by 'http://jabber.org/protocol/games/tictactoe'. It MUST possess these attributes: - - - - - - - - - - - - - - - - - - - - - -
      NameTypeDescription
      'id'REQUIREDThe number of the move. First move is 1.
      'row'REQUIREDThe horizontal position of the mark.
      'col'REQUIREDThe vertical position of the mark.

      + + + + + + + + + + + + + + + + + + + + + +
      NameTypeDescription
      'id'REQUIREDThe number of the move. First move is 1.
      'row'REQUIREDThe horizontal position of the mark.
      'col'REQUIREDThe vertical position of the mark.
      -SkkdJi88C())oo +

      @@ -164,8 +164,8 @@

      Note: The text that follows assumes that implementors have - read and understood XEP-0050, password - generation algorithms described in &rfc4226; and RFC 6238, + read and understood &xep0050;, password + generation algorithms described in &rfc4226; and &rfc6238;, and randomness requirements described in &rfc4086;, and know about one-time pads and perfect secrecy.

      @@ -173,8 +173,8 @@

      Time-Based One-Time Password (TOTP) algorithm described in - RFC 6238 is an extension of the HMAC-based - One-Time Password (HOTP) algorithm defined in RFC 4226, + &rfc6238; is an extension of the HMAC-based + One-Time Password (HOTP) algorithm defined in &rfc4226;, to support the time-based moving factor. In TOTP, time reference and a time step replaces the counter in the HOTP computation. @@ -431,14 +431,14 @@

    - In each case, the Verifier MAY check Prover's JID right after +

    In each case, the Verifier MAY check Prover's JID right after receiving the first Ad-Hoc command or after a succesful verification - process. + process.

    - If Prover's JID is not approved, the Verifier SHOULD - reply with &forbidden; error message. +

    If Prover's JID is not approved, the Verifier SHOULD + reply with &forbidden; error message.

    - After the a succesful verification the Verifier can, e.g., +

    After the a succesful verification the Verifier can, e.g.,

    • start the wanted process,
    • ask access rights from additional provision servers, diff --git a/inbox/userrating.xml b/inbox/userrating.xml index 3376dbaf..edd6eb9e 100644 --- a/inbox/userrating.xml +++ b/inbox/userrating.xml @@ -55,7 +55,7 @@ - A user may obtain their own rating by sending an IQ-get with no to address and an element qualified by the ‘rating’ namespace. +

      A user may obtain their own rating by sending an IQ-get with no to address and an element qualified by the ‘rating’ namespace.

      ]]> - The server should return an IQ result stanza with element: +

      The server should return an IQ result stanza with <rating/> element:

      ]]>
      - - In installations that run as chat servers, moderation of spam users can be delivered to online users and administrators. Users receiving spam from a bare JID can send an IQ stanza to the server that increases the user rating. + +

      In installations that run as chat servers, moderation of spam users can be delivered to online users and administrators. Users receiving spam from a bare JID can send an IQ stanza to the server that increases the user rating.

      JIDs that are critical to server functionality or admins should have a - permanent of -100 to indicate that they are protected. Should a + permanent <rating/> of -100 to indicate that they are protected. Should a user attempt to report a protected user, the server should send the following:

      @@ -178,7 +178,7 @@ XEP-0191 Blocking Command, or an internal implementation to prevent communication from known spammer accounts.

      -
      +

      OPTIONAL.

      diff --git a/inbox/xep.dtd b/inbox/xep.dtd new file mode 120000 index 00000000..9d3e4e98 --- /dev/null +++ b/inbox/xep.dtd @@ -0,0 +1 @@ +../xep.dtd \ No newline at end of file diff --git a/inbox/xep.ent b/inbox/xep.ent new file mode 120000 index 00000000..bf005c84 --- /dev/null +++ b/inbox/xep.ent @@ -0,0 +1 @@ +../xep.ent \ No newline at end of file diff --git a/inbox/xtls.xml b/inbox/xtls.xml index 985b6b05..6ed9c808 100644 --- a/inbox/xtls.xml +++ b/inbox/xtls.xml @@ -1,6 +1,7 @@ + rfc3920bis RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/draft-ietf-saintandre-rfc3920bis>." > %ents; ]> diff --git a/inxep.py b/inxep.py deleted file mode 100755 index 883b9c5d..00000000 --- a/inxep.py +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/env python - -# File: inxep.py -# Version: 0.1 -# Description: a script for announcing proto-XEPs -# Last Modified: 2004-09-14 -# Author: Peter Saint-Andre (stpeter@jabber.org) -# License: public domain -# HowTo: ./inxep.py filename approver -# (note: do not include extension!) - -## LICENSE ## -# -# Copyright (c) 1999 - 2010 XMPP Standards Foundation -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# -## END LICENSE ## - -# IMPORTS: -# -import glob -import os -from select import select -import smtplib -import socket -from string import split,strip,join,find -import sys -import time -from xml.dom.minidom import parse,parseString,Document - -def getText(nodelist): - thisText = "" - for node in nodelist: - if node.nodeType == node.TEXT_NODE: - thisText = thisText + node.data - return thisText - -# READ in XEP filename (sans extension) - -xepname = sys.argv[1]; -if len(sys.argv) >= 3: - approver = sys.argv[2] -else: - approver = "XMPP Council" - -xepfile = 'inbox/' + xepname + '.xml' - -# PARSE XEP HEADERS: -# -# - title -# - abstract -# - version -# - date -# - initials -# - remark - -thexep = parse(xepfile) -xepNode = (thexep.getElementsByTagName("xep")[0]) -headerNode = (xepNode.getElementsByTagName("header")[0]) -titleNode = (headerNode.getElementsByTagName("title")[0]) -title = getText(titleNode.childNodes) -abstractNode = (headerNode.getElementsByTagName("abstract")[0]) -abstract = getText(abstractNode.childNodes) -statusNode = (headerNode.getElementsByTagName("status")[0]) -xepstatus = getText(statusNode.childNodes) -typeNode = (headerNode.getElementsByTagName("type")[0]) -xeptype = getText(typeNode.childNodes) -revNode = (headerNode.getElementsByTagName("revision")[0]) -versionNode = (revNode.getElementsByTagName("version")[0]) -version = getText(versionNode.childNodes) -dateNode = (revNode.getElementsByTagName("date")[0]) -date = getText(dateNode.childNodes) -initialsNode = (revNode.getElementsByTagName("initials")[0]) -initials = getText(initialsNode.childNodes) -remarkNode = (revNode.getElementsByTagName("remark")[0]) -remark = getText(remarkNode.childNodes) - -# SEND MAIL: -# -# From: editor@xmpp.org -# To: standards@xmpp.org -# Subject: Proposed XMPP Extension: XEP-$xepnum ($title) -# Body: -# The XMPP Extensions Editor has received a proposal for a new XEP. -# -# Title: $title -# -# Abstract: $abstract -# -# URL: https://xmpp.org/extensions/inbox/$xepname.html -# -# The $approver will now consider whether to accept -# this proposal as a full XEP. -# - -fromaddr = "editor@xmpp.org" -# for testing... -# toaddrs = "editor@jabber.org" -# for real... -toaddrs = "standards@xmpp.org" - -thesubject = 'Proposed XMPP Extension: ' + title -introline = 'The XMPP Extensions Editor has received a proposal for a new XEP.' -titleline = 'Title: ' + title -abstractline = 'Abstract: ' + abstract -urlline = 'URL: https://xmpp.org/extensions/inbox/' + xepname + '.html' -actionline = 'The ' + approver + ' will decide in the next two weeks whether to accept this proposal as an official XEP.' - -msg = "From: XMPP Extensions Editor <%s>\r\n" % fromaddr -msg = msg + "To: %s\r\n" % toaddrs -msg = msg + "Subject: %s\r\n" % thesubject -msg = msg + introline -msg = msg + "\r\n\n" -msg = msg + titleline -msg = msg + "\r\n\n" -msg = msg + abstractline -msg = msg + "\r\n\n" -msg = msg + urlline -msg = msg + "\r\n\n" -msg = msg + actionline -msg = msg + "\r\n\n" - -server = smtplib.SMTP('localhost') -server.set_debuglevel(1) -server.sendmail(fromaddr, toaddrs, msg) -server.quit() - -# END diff --git a/texml-xsl/cmp.xsl b/texml-xsl/cmp.xsl new file mode 100644 index 00000000..59ec8a5f --- /dev/null +++ b/texml-xsl/cmp.xsl @@ -0,0 +1,318 @@ + + + + + + + + $Id$ + + + Hummel + Mark + + + 2003 + Mark Hummel + + + + XML Compare + + +
      + Introduction + + This module provides a template for comparing two xml documents. + +
      +
      + +
      + + + + Compare + + + Compare two xml documents and display differences. Two xml documents are defined to be the same if: They have the matching elements and attributes, and that the data in the elements also match. The comparison is order sensitive. + + The element names from the documents at the current depth are compared, followed by their values, then any attribute names and values are compared. The process is applied then to the subtrees of the documents. + + Notes: If there are leaf nodes in one nodeset which don't exist in the other, the value of those 'extra' elements won't appear as a difference. + + + + + + + ns1 + ns2 + + The two nodesets which are to be compared. + + + + + + + Returns the difference between the documents. + + The format of the output is an xml document. A node is added to the result tree for every difference. The node contains the type of difference (e.g element name difference, attribute value difference, etc), the value in the first nodeset and the value in the second nodeset, and the parent node. The indentation level is the depth at which the difference was found relative to the first document. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node[]: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + diff --git a/texml-xsl/date-time.xsl b/texml-xsl/date-time.xsl new file mode 100644 index 00000000..f2c96cff --- /dev/null +++ b/texml-xsl/date-time.xsl @@ -0,0 +1,1447 @@ + + + + + + + $Id$ + + + Diamond + Jason + + + 2004 + Steve Ball + + + 2001 + Jason Diamond + + + + Date/Time Processing + + +
      + Introduction + + This module provides templates for formatting and parsing date/time strings. + + See http://www.tondering.dk/claus/calendar.html for more information on calendars and the calculations this library performs. + +
      +
      + +
      + + + Returns a string with a formatted date/time. + + + The formatted date/time is determined by the format parameter. The default format is %Y-%m-%dT%H:%M:%S%z, the W3C format. + + + + + + + xsd-date-time + + The date-time value in XML Schemas (WXS) format. + If this value is specified, it takes priority over other parameters. + + + + + year + + Year + + + + + month + + Month (1 - 12; January = 1) + + + + + day + + Day of month (1 - 31) + + + + + hour + + Hours since midnight (0 - 23) + + + + + minute + + Minutes after hour (0 - 59) + + + + + second + + Seconds after minute (0 - 59) + + + + + time-zone + + Time zone string (e.g., 'Z' or '-08:00') + + + + + format + + The format specification. + + + + %a + + Abbreviated weekday name + + + + + %A + + Full weekday name + + + + + %b + + Abbreviated month name + + + + + %B + + Full month name + + + + + %c + + Date and time representation appropriate for locale + + + + + %d + + Day of month as decimal number (01 - 31) + + + + + %e + + Day of month as decimal number (1 - 31) + + + + + %H + + Hour in 24-hour format (00 - 23) + + + + + %I + + Hour in 12-hour format (01 - 12) + + + + + %i + + Hour in 12-hour format (1 - 12) + + + + + %j + + Day of year as decimal number (001 - 366) + + + + + %m + + Month as decimal number (01 - 12) + + + + + %n + + Month as decimal number (1 - 12) + + + + + %M + + Minute as decimal number (00 - 59) + + + + + %P + + Current locale's A.M./P.M. indicator for 12-hour clock, uppercase + + + + + %Q + + Current locale's A.M./P.M. indicator for 12-hour clock, uppercase with periods + + + + + %p + + Current locale's A.M./P.M. indicator for 12-hour clock, lowercase + + + + + %q + + Current locale's A.M./P.M. indicator for 12-hour clock, lowercase with periods + + + + + %S + + Second as decimal number (00 - 59) + + + + + %U + + Week of year as decimal number, with Sunday as first day of week (00 - 53) + + + + + %w + + Weekday as decimal number (0 - 6; Sunday is 0) + + + + + %W + + Week of year as decimal number, with Monday as first day of week (00 - 53) + + + + + %x + + Date representation for current locale + + + + + %X + + Time representation for current locale + + + + + %y + + Year without century, as decimal number (00 - 99) + + + + + %Y + + Year with century, as decimal number + + + + + %z + + Time-zone name or abbreviation; no characters if time zone is unknown + + + + + %% + + Percent sign + + + + + + + + + + + + Returns a formatted date/time string. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + % + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [not implemented] + + + + + 0 + + + + + + + + + + 0 + + + + + + + 12 + 0 + + 0 + + + + + + + 12 + + + + + + + + + + [not implemented] + + + + + 0 + + + + + + + + + + 0 + + + + + + + am + pm + + + + + + am + p.m. + + + + + + AM + PM + + + + + + AM + P.M. + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [not implemented] + + + + + [not implemented] + + + + + [not implemented] + + + + + + + + + + + + + + + % + + + + + + + + + + + + + + + + + + + + + + + Calculates the day of the week. + + + Given any Gregorian date, this calculates the day of the week. + + + + + + year + + Year + + + + month + + Month (1 - 12; January = 1) + + + + day + + Day of month (1 - 31) + + + + + + + Returns the day of the week (0 - 6; Sunday = 0). + + + + + + + + + + + + + + + + + + + Calculates the number of days for a specified month. + + + Given any Gregorian month, this calculates the last day of the month. + + + + + + year + + Year + + + + month + + Month (1 - 12; January = 1) + + + + + + + Returns the number of days in given month as a decimal number. + + + + + + + + + + + 29 + 28 + + + + + 30 + 31 + + + + + 30 + 31 + + + + + + + Gets the day of the week's full name. + + + Converts a numeric day of the week value into a string representing the day's full name. + + + + + + day-of-the-week + + Day of the week (0 - 6; Sunday = 0) + + + + + + + Returns a string. + + + + + + + + + Sunday + Monday + Tuesday + Wednesday + Thursday + Friday + Saturday + error: + + + + + + Gets the day of the week's abbreviation. + + + Converts a numeric day of the week value into a string representing the day's abbreviation. + + + + + + day-of-the-week + + Day of the week (0 - 6; Sunday = 0) + + + + + + + Returns a string. + + + + + + + + + Sun + Mon + Tue + Wed + Thu + Fri + Sat + error: + + + + + + Gets the month's full name. + + + Converts a numeric month value into a string representing the month's full name. + + + + + + month + + Month (1 - 12; Januaray = 1) + + + + + + + Returns a string. + + + + + + + + + January + February + March + April + May + June + July + August + September + October + November + December + error: + + + + + + Gets the month's abbreviation. + + + Converts a numeric month value into a string representing the month's abbreviation. + + + + + + month + + Month (1 - 12; Januaray = 1) + + + + + + + Returns a string. + + + + + + + + + Jan + Feb + Mar + Apr + May + Jun + Jul + Aug + Sep + Oct + Nov + Dec + error: + + + + + + Calculates the Julian Day for a specified date. + + + Given any Gregorian date, this calculates the Julian Day. + + + + + + year + + Year + + + + month + + Month (1 - 12; January = 1) + + + + day + + Day of month (1 - 31) + + + + + + + Returns the Julian Day as a decimal number. + + + + + + + + + + + + + + + + + + + Returns a string with a formatted date for a specified Julian Day. + + + Given any Julian Day, this returns a string according to the format specification. + + + + + + julian-day + + A Julian Day + + + + format + + The format specification. See dt:format-date-time for more details. + + + + + + + A string. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Calculates the week number for a specified date. + + + Assumes Monday is the first day of the week. + + + + + + year + + Year + + + + month + + Month (1 - 12; January = 1) + + + + day + + Day of month (1 - 31) + + + + + + + Returns the week number as a decimal number. + + + + + + + + + + + + + + + + + + + + + + + + + + + Take a month by name and return a number which can be used as input to the templates. + + + Input + + + + + + month + + Month as described either by full name or abbreviation. + + + + + + + Return a month as a decimal number. (Jan = 1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return year component of XSD DateTime value. + + + Extract component of XML Schemas DateTime value. + + + + + + xsd-date-time + + A value in XSD DateTime format. + + + + + + + Returns year component. + + + + + + + + + + + + + + + + + + + + + + + + + Return month component of XSD DateTime value. + + + Extract component of XML Schemas DateTime value. + + + + + + xsd-date-time + + A value in XSD DateTime format. + + + + + + + Returns month component. + + + + + + + + + + + + + + + + + + + + + + + + + Return day component of XSD DateTime value. + + + Extract component of XML Schemas DateTime value. + + + + + + xsd-date-time + + A value in XSD DateTime format. + + + + + + + Returns day component. + + + + + + + + + + + + + + + + + + + + + + + + + Return hour component of XSD DateTime value. + + + Extract component of XML Schemas DateTime value. + + + + + + xsd-date-time + + A value in XSD DateTime format. + + + + + + + Returns hour component. + + + + + + + + + + + + + + + + + + + + + + + + + + Return minute component of XSD DateTime value. + + + Extract component of XML Schemas DateTime value. + + + + + + xsd-date-time + + A value in XSD DateTime format. + + + + + + + Returns minute component. + + + + + + + + + + + + + + + + + + + + + + + + + + Return second component of XSD DateTime value. + + + Extract component of XML Schemas DateTime value. + + + + + + xsd-date-time + + A value in XSD DateTime format. + + + + + + + Returns second component. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return timezone component of XSD DateTime value. + + + Extract component of XML Schemas DateTime value. + + + + + + xsd-date-time + + A value in XSD DateTime format. + + + + + + + Returns timezone component. + + + + + + + + Z + + + + + + + + + + + + + + + + - + + + + + + + + + + + +
      diff --git a/texml-xsl/example.xsl b/texml-xsl/example.xsl new file mode 100644 index 00000000..790c6cbe --- /dev/null +++ b/texml-xsl/example.xsl @@ -0,0 +1,90 @@ + + + + + + + + $Id$ + + + Ball + Steve + + + 2001 + Steve Ball + + + + Example Stylesheet + + +
      + Introduction + + This module provides a template for adding stylesheet modules to the XSLT Standard Library. + To add a new module to the library, follow these easy steps: + + + Copy this file and replace its contents with the new module templates and documentation. + + + Copy the corresponding test file in the test directory. Replace its contents with tests for the new module. + + + Add an include element in the stdlib.xsl stylesheet. + + + Add an entry in the test/test.xml file. + + + Add entries in the test/test.xsl stylesheet. + + + Add an entry in the doc/build.xml file. + + + + The example.xsl stylesheet provides a more extensive example. + +
      +
      + +
      + + + Template Example + + + Provides a template for writing templates. Replace this paragraph with a description of your template + + + + + + text + + The example string + + + + + + + Returns nothing. + + + + + + + +
      + diff --git a/texml-xsl/markup.xsl b/texml-xsl/markup.xsl new file mode 100644 index 00000000..dc78c4bf --- /dev/null +++ b/texml-xsl/markup.xsl @@ -0,0 +1,789 @@ + + + + + + $Id$ + + + Ball + Steve + + + 2003 + 2001 + Steve Ball + + + + XML Markup Templates + + +
      + Introduction + + This stylesheet module provides functions for generating literal XML markup. + +
      +
      + +
      + + + Create an XML Declaration + + + This template returns an XML Declaration. Although the XSLT standard provides control over the generation of the XML Declaration, this template may be useful in circumstances where the values must be computed at runtime. + + + + + + version + + Version number. + + + + standalone + + Standalone indication. Must be value "yes" or "no". + + + + encoding + + Character encoding. + + + + + + + Returns an XML Declaration as a string. + + + + + + + + + <?xml version=" + + " + + + + + standalone=" + + " + + + invalid value "" for standalone attribute + + + + + encoding=" + + " + + + ?> + + + + + Create a Document Type Declaration + + + This template returns a Document Type Declaration. Although the XSLT standard provides control over the generation of a Document Type Declaration, this template may be useful in circumstances where the values for the identifiers or the internal subset must be computed at runtime. + + + + + + docel + + The name of the document element. + + + + publicid + + The public identifier for the external DTD subset. + + + + systemid + + The system identifier for the external DTD subset. + + + + internaldtd + + The internal DTD subset. + + + + + + + Returns a Document Type Declaration as a string. + + + + + + + + + + + No document element specified + + + <!DOCTYPE + + + + + + + + + + [ + + ] + + + > + + + + + Create an Element Declaration + + + This template returns an element declaration.. + + + + + + type + + The element type. + + + + content-spec + + The content specification. + + + + + + + Returns an element declaration as a string. + + + + + + + + + element type must be specified + + + content specification must be specified + + + <!ELEMENT + + + + > + + + + Create an Attribute List Declaration + + + This template returns an attribute list declaration. + + + + + + type + + The element type. + + + + attr-defns + + Attribute definitions. + + + + + + + Returns an attribute list declaration as a string. + + + + + + + + + element type must be specified + + + <!ATTLIST + + + + > + + + + Create an Attribute Definition + + + This template returns an attribute definition. + + + + + + name + + The attribute name. + + + + type + + The attribute type. + + + + default + + The attribute default. + + + + + + + Returns an attribute definition as a string. + + + + + + + + + + attribute name must be specified + + + attribute type must be specified + + + attribute default must be specified + + + + + + + + + + + + Create an Entity Declaration + + + This template returns an entity declaration. + If the 'text' parameter is given a value, then an internal entity is created. If either the 'publicid' or 'systemid' parameters are given a value then an external entity is created. It is an error for the 'text' parameter to have value as well as the 'publicid', 'systemid' or 'notation' parameters. + + + + + + name + + The entity name. + + + + parameter + + Boolean value to determine whether a parameter entity is created. Default is 'false()'. + + + + text + + The replacement text. Must be a string. + + + + nodes + + The replacement text as a nodeset. The nodeset is formatted as XML using the as-xml template. If both text and nodes are specified then nodes takes precedence. + + + + publicid + + The public identifier for an external entity. + + + + systemid + + The system identifier for an external entity. + + + + notation + + The notation for an external entity. + + + + + + + Returns an entity declaration as a string. + + + + + + + + + + + + + + entity name must be specified + + + both replacement text and external identifier specified + + + <!ENTITY + + + + % + + + + + + + + + + + + + + + + + + + + + + + + + + + NDATA " + + " + + + > + + + + Quote an Attribute Value + + + This template returns a quoted value. + + + + + + value + + The value to quote. + + + + + + + Returns a quote value as a string. + + + + + + + + + + + + + + + + + < + + &lt; + + + + + + + + + + + + + + " + ' + + + + " + + + " + + &quot; + + + " + + + ' + + ' + + + " + + " + + + + + + Create an External Identifier + + + This template returns an external identifier. + + + + + + publicid + + The public identifier. + + + + systemid + + The system identifier. + + + + + + + Returns an external identifier as a string. + + + + + + + + + + + + + + PUBLIC " + + " + + " + + " + + + + + + + SYSTEM " + + " + + + + + + Create an Entity Reference + + + This template returns an entity reference. + + + + + + name + + The name of the entity. + + + + + + + Returns an entity reference as a string. + + + + + + + & + + ; + + + + + Create a Notation Declaration + + + This template returns a notation declaration. + + + + + + name + + The notation name. + + + + publicid + + The public identifier for the notation. + + + + systemid + + The system identifier for the notation. + + + + + + + Returns a notation declaration as a string. + + + + + + + + + + notation name must be specified + + + external identifier must be specified + + + <!NOTATION + + + + + + + + + > + + + + Create a CDATA Section + + + This template returns a CDATA Section. The XSLT specification provides a mechanism for instructing the XSL processor to output character data in a CDATA section for certain elements, but this template may be useful in those circumstances where not all instances of an element are to have their content placed in a CDATA section. + + + + + + text + + The content of the CDATA section. + + + + + + + Returns a CDATA section as a string. + + + + + + + + CDATA section contains "]]>" + + + <![CDATA[ + + ]]> + + + + Format Nodeset As XML Markup + + + This template returns XML markup. Each node in the given nodeset is converted to its equivalent XML markup. + + BUG: This version may not adequately handle XML Namespaces. + + + + + + nodes + + Nodeset to format as XML. + + + + + + + Returns XML markup. + + + + + + + + + + < + + + + + = + + + + + + + + > + + + + </ + + > + + + /> + + + + + + + + <!-- + + --> + + + <? + + + + ?> + + + + + + + + + + + + + +
      diff --git a/texml-xsl/math.xsl b/texml-xsl/math.xsl new file mode 100644 index 00000000..d1a2b6a8 --- /dev/null +++ b/texml-xsl/math.xsl @@ -0,0 +1,618 @@ + + + + + + + $Id$ + + + Ball + Steve + + + 2004 + 2002 + Steve Ball + + + + Math Module + + +
      + Introduction + + This module provides mathematical functions. +
      +
      + +
      + + + Power + + + Raises a number to a power. + + + + + + base + + The base number. Must be a number. + + + + power + + The power to raise the number to. Must be an integer. + + + + + + + Returns base multiplied by itself power times. If the base or power are not numbers or if the power is fractional then an empty string is returned. + + + + + + + + + + 1 + + + 1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Conversion + + + Converts a hexidecimal value to a decimal value. + + + + + + value + + The hexidecimal number. Must be a number in hexidecimal format. + + + + + + + Returns the value as a decimal string. If the value is not a number then a NaN value is returned. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + 11 + 12 + 13 + 14 + 15 + + + + + Ordinal number + + + Gives the ordinal number of a given counting number. For example, 1 becomes "1st". + + + + + + number + + An integer number. + + + + + + + Returns the number with an ordinal suffix. + + + + + + + + + + + + th + st + nd + rd + th + + + + + + + + Returns an ordinal number + + + This template returns the ordinal number for a given counting number as a word. For example "first" for 1. + Only handles numbers less than 10000000 (ten million). + + + + + + number + + The counting number. + + + + conjunctive + + Whether to add the word "and" to the result, for example "one hundred and first" rather than "one hundred first". Default is "yes". + + + + + + + Returns the ordinal number as a string. + + + + + + + + + + + zeroth + + + + + and + first + + + and + second + + + and + third + + + and + fourth + + + and + fifth + + + and + sixth + + + and + seventh + + + and + eighth + + + and + ninth + + + and + tenth + + + and + eleventh + + + and + twelveth + + + and + thirteenth + + + and + fourteenth + + + and + fifteenth + + + and + sixteenth + + + and + seventeenth + + + and + eighteenth + + + and + nineteenth + + + and + twentieth + + + and + thirtieth + + + and + fortieth + + + and + fiftieth + + + and + sixtieth + + + and + seventieth + + + and + eightieth + + + and + ninetieth + + + + + + + millionth + + + and + + + + thousandth + + + and + + + + hundredth + + + + + + and + + + + + + + + + + + + + + + + + + + + + + + + + + and + + + + + + + + + + + + + + + + + + + + + + + + + + + and + + + + + + + + + + + + + + + and + + + + + + + + + + + + + + + + + Returns a number as a word + + + This template returns the word for a given integer number, for example "one" for 1. + Only handles numbers less than 10000000 (ten million). + + + + + + number + + The counting number. + + + + conjunctive + + Adds the word "and" where appropriate, for example. + + + + + + + Returns the number as a string. + + + + + + + + + + zero + + + minus + + + + + + + + + + + + million + + + + + + million + + + + + + + + + thousand + + + + + + thousand + and + + + + + + + + + hundred + + + + + + hundred + and + + + + + + one + two + three + four + five + six + seven + eight + nine + ten + eleven + twelve + thirteen + fourteen + fifteen + sixteen + seventeen + eighteen + nineteen + twenty + thirty + forty + fifty + sixty + seventy + eighty + ninety + + + + + + + + + + + + +
      + diff --git a/texml-xsl/node.xsl b/texml-xsl/node.xsl new file mode 100644 index 00000000..c8d20b45 --- /dev/null +++ b/texml-xsl/node.xsl @@ -0,0 +1,229 @@ + + + + + + + + $Id$ + + + Ball + Steve + + + 2001 + Steve Ball + + + + Node Templates + + +
      + Introduction + + This stylesheet module provides functions for reporting on or manipulating nodes and nodesets. + +
      +
      + +
      + + + Returns an XPath location path + + + This template returns an XPath location path that uniquely identifies the given node within the document. + + + + + + node + + The node to create an XPath for. If this parameter is given as a nodeset, then the first node in the nodeset is used. + + + + + + + Returns an XPath location path as a string. + + + + + + + + + + + + / + [] + + + + + + /comment() + [] + + + + /processing-instruction() + [] + + + + /text() + [] + + + + / + + + + /namespace:: + + + + /@ + + + + + + + /.. + + + + + + + + Return node type + + + Returns the type of a node as a string. + + + + + + node + + The node to get the type for. If this parameter is given as a nodeset, then the first node in the nodeset is used. + + + + + + + Returns node type as a string. Values returned are: + + + Element + + element + + + + Text Node + + text + + + + Comment + + comment + + + + Processing Instruction + + processing instruction + + + + + + + + + + + + + element + + + text + + + comment + + + processing instruction + + + root + + + namespace + + + attribute + + + + + + Copy Nodes + + + Makes a copy of the given nodes, including attributes and descendants. + + + + + + nodes + + The nodes to copy. + + + + + + + Returns the copied nodes as a result tree fragment. + + + + + + + + + + + + + + + + + + +
      + diff --git a/texml-xsl/stdlib.xsl b/texml-xsl/stdlib.xsl new file mode 100644 index 00000000..22c35ca8 --- /dev/null +++ b/texml-xsl/stdlib.xsl @@ -0,0 +1,340 @@ + + +]> + + + + + + + + + + + + + + + + + + + + XSLT Standard Library + Version &version; + + + + Ball + Steve + + + 2004 + 2002 + Steve Ball + + + + + The XSLT Standard Library, xsltsl, provides the XSLT developer with a set of XSLT templates for commonly used functions. These are implemented purely in XSLT, that is they do not use any extensions. + xsltsl is a SourceForge project. + + + + + + SourceForge Logo + + + Goals of the xsltsl project include: + + + Provision of a high-quality library of XSLT templates, suitable for inclusion by vendors in XSLT processor software products. + + + Demonstration of best practice in XSLT stylesheet development and documentation. + + + Provide examples of various techniques used to develop XSLT stylesheets (ie. a working FAQ). + + + + + + Using The Library + + There are two ways of using the library: + + + Use a local copy of the library. + + + Download the distribution (see below). + + + Unpack the distribution, using either gunzip/tar or unzip. + + + In your stylesheet import or include either the main stylesheet, stdlib.xsl, or the stylesheet module you wish to use, such as string.xsl. This example assumes that the distribution has been extracted into the same directory as your own stylesheet: + + +]]> + + + + + + Import or include either the main stylesheet, or the stylesheet module you wish to use, directly from the library website; http://xsltsl.sourceforge.net/modules/. The modules directory always contains the latest stable release. For example: + + +]]> + + Older versions of the library are available in subdirectories. For example, to access version 1.1 of the library use: + + +]]> + + + + Next, add XML Namespace declarations for the modules you wish to use. For example, to use templates from the string module, your stylesheet should have the following declaration: + + + + +]]> + + Finally, use a template with the call-template element. Most templates require parameters, which are passed using the with-param element. For example: + + + + + a word + another word + + +]]> + + + + + Obtaining The Library + + The XSLT Standard Library is available for download as either: + + + Gzip'd tarball: http://prdownloads.sourceforge.net/xsltsl/xsltsl-&version;.tar.gz + + + Zip file: http://prdownloads.sourceforge.net/xsltsl/xsltsl-&version;.zip + + + + + + Getting Involved + + Contributions to the project are most welcome, and may be in the form of stylesheet modules, patches, bug reports or sample code. Any contributed code must use the LGPL license to be accepted into the library. + + See the SourceForge Project Page http://sourceforge.net/projects/xsltsl/ for information on the development of the project. Bug reports may be submitted here. + + See the project Web Page http://xsltsl.sourceforge.net/ for documentation. + + There are three mailing lists for the project: + + + xsltsl-users@lists.sourceforge.net + + Discussion of the use of xsltsl. + + + + xsltsl-devel@lists.sourceforge.net + + Discussion of the development of xsltsl. + + + + xsltsl-announce@lists.sourceforge.net + + Project announcements. + + + + + + + XML Namespaces + + Apart from the XSLT XML Namespace (http://www.w3.org/1999/XSL/Transform), xsltsl employs a number of XML Namespaces to allow inclusion of the library in developer stylesheets. In addition, documentation is defined in a separate namespace. + Each module is allocated a namespace URI by appending the module name to the URI for the project, http://xsltsl.org/. For example, the string module has the namespace URI http://xsltsl.org/string. + All documentation is written using an extension of DocBook designed for embedding DocBook into XSLT stylesheets. The namespace URI for DocBook embedded in stylesheets is http://xsltsl.org/xsl/documentation/1.0 + + + + Engineering Standards + + In order to maintain a high engineering standard, all modules and contributions to the xsltsl project must adhere to the following coding and documentation standards. Submissions which do not meet (or exceed) this standard will not be accepted. + + + All stylesheets must be indented, with each level indented by two spaces. NB. a simple stylesheet could be used to enforce/fix this. + + + Templates are named using a qualified name (QName). The namespace URI for the template's containing stylesheet is assigned as above. + + + Parameters for templates should use sensible names. Where possible (or if in doubt), follow these conventions: + + + A parameter containing a single node is named node. Where more than one parameter contains a single node, the suffix Node is appended to the parameter name, eg. referenceNode + + + A parameter which potentially contains multiple nodes is named nodes. Where more than one parameter potentially contains multiple nodes, the suffix Nodes is appended to the parameter name, eg. copyNodes + + + A parameter which contains a string value is named text. + + + + + All templates in each stylesheet must be documented. A template is documented as a DocBook RefEntry. + + + Every stylesheet must include a test suite. The test system is in the test subdirectory. See test/test.html for further details. + + + + An example stylesheet has been provided, which acts as a template for new stylesheet modules. + + + + + Related Work + + The EXSLT project is creating a library to standardise extension functions. The XSLT Standard Library is complementary to the EXSLT project. + + + + + Reference Documentation + + Reference documentation is available for each module. + +
      + String Processing + + + + string.xsl + + +
      + +
      + Nodes + + + + node.xsl + + +
      + +
      + Date/Time Processing + + + + date-time.xsl + + +
      + +
      + Mathematics + + + + math.xsl + + +
      + +
      + URI (Uniform Resource Identifier) Processing + + + + uri.xsl + + +
      + +
      + Comparing Nodesets + + + + cmp.xsl + + +
      + +
      + Generating XML Markup + + + + markup.xsl + + +
      + +
      + Presentation Media Support + + + + Scalable Vector Graphics: svg.xsl + + + +
      + +
      + Example + + + + + + example.xsl + + +
      +
      + +
      + +
      diff --git a/texml-xsl/string.xsl b/texml-xsl/string.xsl new file mode 100644 index 00000000..1c7bf74c --- /dev/null +++ b/texml-xsl/string.xsl @@ -0,0 +1,1233 @@ + + + + + + + + $Id$ + + + Ball + Steve + + + 2002 + 2001 + Steve Ball + + + + String Processing + + +
      + Introduction + + This module provides templates for manipulating strings. + +
      +
      + +
      + + + + + + + + + + + + + Make string uppercase + + + Converts all lowercase letters to uppercase. + + + + + + text + + The string to be converted + + + + + + + Returns string with all uppercase letters. + + + + + + + + + + + + + + ß + + + S + S + + + + + + + + + Make string lowercase + + + Converts all uppercase letters to lowercase. + + + + + + text + + The string to be converted + + + + + + + Returns string with all lowercase letters. + + + + + + + + + + + Capitalise string + + + Converts first character of string to an uppercase letter. All remaining characters are converted to lowercase. + + + + + + text + + The string to be capitalised + + + + all + + Boolean controlling whether all words in the string are capitalised. + Default is true. + + + + + + + Returns string with first character uppcase and all remaining characters lowercase. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convert a string to one camelcase word + + + Converts a string to one lowerCamelCase or UpperCamelCase + word, depending on the setting of the "upper" + parameter. UpperCamelCase is also called MixedCase while + lowerCamelCase is also called just camelCase. The template + removes any spaces, tabs and slashes, but doesn't deal with + other punctuation. It's purpose is to convert strings like + "hollow timber flush door" to a term suitable as identifier or + XML tag like "HollowTimberFlushDoor". + + + + + + + text + + The string to be capitalised + + + + upper + + Boolean controlling whether the string becomes an + UpperCamelCase word or a lowerCamelCase word. + Default is true. + + + + + + + Returns string with first character uppcase and all remaining characters lowercase. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + String extraction + + + Extracts the portion of string 'text' which occurs before any of the characters in string 'chars'. + + + + + + text + + The string from which to extract a substring. + + + + chars + + The string containing characters to find. + + + + + + + Returns string. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + String extraction + + + Extracts the portion of string 'text' which occurs after the last of the character in string 'chars'. + + + + + + text + + The string from which to extract a substring. + + + + chars + + The string containing characters to find. + + + + + + + Returns string. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + String extraction + + + Extracts the portion of string 'text' which occurs before the first character of the last occurance of string 'chars'. + + + + + + text + + The string from which to extract a substring. + + + + chars + + The string containing characters to find. + + + + + + + Returns string. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + String substitution + + + Substitute 'replace' for 'with' in string 'text'. + + + + + + text + + The string upon which to perform substitution. + + + + replace + + The string to substitute. + + + + with + + The string to be substituted. + + + + disable-output-escaping + + A value of yes indicates that the result should have output escaping disabled. Any other value allows normal escaping of text values. The default is to enable output escaping. + + + + + + + Returns string. + + + + + + + + no + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Count Substrings + + + Counts the number of times a substring occurs in a string. This can also counts the number of times a character occurs in a string, since a character is simply a string of length 1. + + + + Counting Lines + + + + +]]> + + + + + + text + + The source string. + + + + chars + + The substring to count. + + + + + + + Returns a non-negative integer value. + + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + + String extraction + + Extracts the portion of a 'char' delimited 'text' string "array" at a given 'position'. + + + + + text + + The string from which to extract a substring. + + + + chars + + delimiters + + + + position + + position of the elements + + + + all + + If true all of the remaining string is returned, otherwise only the element at the given position is returned. Default: false(). + + + + + + Returns string. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + String extraction + + Extracts the portion of a 'char' delimited 'text' string "array" at a given 'position' + + + + + text + + The string from which to extract a substring. + + + + chars + + delimiters + + + + position + + position of the elements + + + + + + Returns string. + + + + + + + + + + + + + + + + + + + + + + + + + + + String insertion + + Insert 'chars' into "text' at any given "position' + + + + + text + + The string upon which to perform insertion + + + + position + + the position where insertion will be performed + + + + with + + The string to be inserted + + + + + + Returns string. + + + + + + + + + + + + + + + + + String reversal + + + Reverse the content of a given string + + + + + + text + + The string to be reversed + + + + + + + Returns string. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Format a string + + + Inserts newlines and spaces into a string to format it as a block of text. + + + + + + text + + String to be formatted. + + + + max + + Maximum line length. + + + + indent + + Number of spaces to insert at the beginning of each line. + + + + justify + + Justify left, right or both. Not currently implemented (fixed at "left"). + + + + + + + Formatted block of text. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Find first occurring character in a string + + + Finds which of the given characters occurs first in a string. + + + + + + text + + The source string. + + + + chars + + The characters to search for. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Match A String To A Pattern + + + Performs globbing-style pattern matching on a string. + + + + Match Pattern + + + + +]]> + + + + + + text + + The source string. + + + + pattern + + The pattern to match against. Certain characters have special meaning: + + + * + + Matches zero or more characters. + + + + ? + + Matches a single character. + + + + \ + + Character escape. The next character is taken as a literal character. + + + + + + + + + + Returns "1" if the string matches the pattern, "0" otherwise. + + + + + + + + + + + 1 + + + 1 + + + 0 + + + + + + + + + + + + + + + + + + + + + + 0 + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + 1 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + Create A Repeating Sequence of Characters + + + Repeats a string a given number of times. + + + + + + text + + The string to repeat. + + + + count + + The number of times to repeat the string. + + + + + + + + + + + + + + + + + + + + + + +
      + diff --git a/texml-xsl/svg.xsl b/texml-xsl/svg.xsl new file mode 100644 index 00000000..5eed1f0e --- /dev/null +++ b/texml-xsl/svg.xsl @@ -0,0 +1 @@ + $Id$ Ball Steve 2002 Steve Ball SVG Stylesheet
      Introduction This module provides templates for creating SVG images.
      Aqua-style Button Part of the mechanism to create an Aqua-style button. Include a call to this template in your SVG document's defs element. This template only needs to be included once. Use this in conjunction with svg:aqua-button. The default values for color1, color2 and color3 result in a grey button. prefix A prefix to append to the identifiers used, so that they don't clash with other identifiers. Default: "aqua-". color1 The base colour of the button. Default: "#d9d9d9". color2 A "background" colour for the button. Should be a darker colour than color1. Default: "#a9a9a9". color3 A highlight colour for the button. Should be a lighter colour than color1. Default: "#f9f9f9". Returns SVG result-tree-fragment. Aqua-style Button Part of the mechanism to create an Aqua-style button. Include a call to this template in your SVG document where you want a button to appear. This template can be used many times in a single SVG document. Use this in conjunction with svg:aqua-button-defs. prefix A prefix to append to the identifiers used, so that they don't clash with other identifiers. Default: "aqua-". Returns SVG result-tree-fragment.
      \ No newline at end of file diff --git a/texml-xsl/uri.xsl b/texml-xsl/uri.xsl new file mode 100644 index 00000000..7beed10e --- /dev/null +++ b/texml-xsl/uri.xsl @@ -0,0 +1,580 @@ + + + + + + + + $Id$ + + + Diamond + Jason + + + 2001 + Jason Diamond + + + + URI (Uniform Resource Identifier) Processing + + +
      + Introduction + This module provides templates for processing URIs (Uniform Resource Identifers). +
      +
      + +
      + + + Determines if a URI is absolute or relative. + + + Absolute URIs start with a scheme (like "http:" or "mailto:"). + + + + + + uri + + An absolute or relative URI. + + + + + + + Returns 'true' if the URI is absolute or '' if it's not. + + + + + + + + + + + + + + Gets the scheme part of a URI. + + + The ':' is not part of the scheme. + + + + + + uri + + An absolute or relative URI. + + + + + + + Returns the scheme (without the ':') or '' if the URI is relative. + + + + + + + + + + + + Gets the authority part of a URI. + + + The authority usually specifies the host machine for a resource. It always follows '//' in a typical URI. + + + + + + uri + + An absolute or relative URI. + + + + + + + Returns the authority (without the '//') or '' if the URI has no authority. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets the path part of a URI. + + + The path usually comes after the '/' in a URI. + + + + + + uri + + An absolute or relative URI. + + + + + + + Returns the path (with any leading '/') or '' if the URI has no path. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets the query part of a URI. + + + The query comes after the '?' in a URI. + + + + + + uri + + An absolute or relative URI. + + + + + + + Returns the query (without the '?') or '' if the URI has no query. + + + + + + + + + + + + + + + + + + + Gets the fragment part of a URI. + + + The fragment comes after the '#' in a URI. + + + + + + uri + + An absolute or relative URI. + + + + + + + Returns the fragment (without the '#') or '' if the URI has no fragment. + + + + + + + + + + + + Resolves a URI reference against a base URI. + + + This template follows the guidelines specified by RFC 2396. + + + + + + reference + + A (potentially relative) URI reference. + + + + base + + The base URI. + + + + document + + The URI of the current document. This defaults to the value of the base URI if not specified. + + + + + + + The "combined" URI. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      diff --git a/tools/archive.py b/tools/archive.py new file mode 100755 index 00000000..6e87ea9f --- /dev/null +++ b/tools/archive.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python3 +import pathlib +import shutil +import sys + +import xml.etree.ElementTree as etree + +from datetime import datetime, timedelta + +from xeplib import load_xepinfos, Status + + +def main(): + import argparse + + parser = argparse.ArgumentParser( + description="Show the XEPs which need to be changed to deferred." + ) + + parser.add_argument( + "old", + type=argparse.FileType("rb"), + help="Old XEP list" + ) + + parser.add_argument( + "new", + type=argparse.FileType("rb"), + help="New XEP list" + ) + + parser.add_argument( + "-d", "--xeps-dir", + type=pathlib.Path, + default=pathlib.Path.cwd() / "build", + help="Path to the built XEPs (defaults to ./build)" + ) + + parser.add_argument( + "-a", "--attic", + type=pathlib.Path, + default=pathlib.Path.cwd() / '../xep-attic/content/', + help="Path to the attic (defaults to ../xep-attic/content/)" + ) + + args = parser.parse_args() + + with args.old as f: + old_tree = etree.parse(f) + + old_accepted, _ = load_xepinfos(old_tree) + + with args.new as f: + new_tree = etree.parse(f) + + new_accepted, _ = load_xepinfos(new_tree) + + changed = False + + for xep, new_info in new_accepted.items(): + old_version = old_accepted.get(xep, {}).get("last_revision", {}).get( + "version" + ) + new_version = new_info["last_revision"]["version"] + + if old_version == new_version: + continue + + curr_file = args.xeps_dir / "xep-{:04d}.html".format(xep) + attic_file = args.attic / "xep-{:04d}-{}.html".format(xep, new_version) + + print("XEP-{:04d}:".format(xep), old_version, "->", new_version) + + shutil.copy(str(curr_file), str(attic_file)) + changed = True + + if changed: + print( + "{}: do not forget to commit & push the attic!".format( + sys.argv[0] + ), + file=sys.stderr + ) + else: + print("{}: nothing to do".format(sys.argv[0]), + file=sys.stderr) + + +if __name__ == "__main__": + main() diff --git a/tools/deferrals.py b/tools/deferrals.py new file mode 100755 index 00000000..f2b70a13 --- /dev/null +++ b/tools/deferrals.py @@ -0,0 +1,125 @@ +#!/usr/bin/env python3 +import re + +import xml.etree.ElementTree as etree + +from datetime import datetime, timedelta + +from xeplib import load_xepinfos, Status + + +def get_deferred(accepted): + now = datetime.utcnow().replace(hour=0, minute=0, second=0, microsecond=0) + threshold = now.replace(year=now.year - 1) + + for number, info in sorted(accepted.items()): + if info["status"] == Status.EXPERIMENTAL and "last_revision" in info: + last_update = info["last_revision"]["date"] + if last_update <= threshold: + yield info + + +EXPERIMENTAL_STATUS = "Experimental" +DEFERRED_STATUS = "Deferred" +REVISION_RE = re.compile(r"\s+") +REVISION_TEMPLATE = """ + + {version} + {now:%Y-%m-%d} + XEP Editor ({initials}) + Defer due to lack of activity. + """ + + +def defer_xep(number, last_version, initials): + filename = "xep-{:04d}.xml".format(number) + with open(filename, "r") as f: + xep_text = f.read() + + if EXPERIMENTAL_STATUS not in xep_text: + raise ValueError("cannot find experimental status in XEP text") + + # this is so incredibly evil ... + xep_text = xep_text.replace(EXPERIMENTAL_STATUS, DEFERRED_STATUS, 1) + revision_match = REVISION_RE.search(xep_text) + + version = last_version.split(".") + if len(version) == 1: + version.append("1") + else: + version[1] = str(int(version[1]) + 1) + del version[2:] + + xep_text = ( + xep_text[:revision_match.start()] + + REVISION_TEMPLATE.format( + now=datetime.utcnow(), + version=".".join(version), + initials=initials, + ) + xep_text[revision_match.start():] + ) + + with open(filename, "w") as f: + f.write(xep_text) + f.flush() + + +def main(): + import argparse + + parser = argparse.ArgumentParser( + description="Show the XEPs which need to be changed to deferred." + ) + + parser.add_argument( + "-l", "--xeplist", + type=argparse.FileType("rb"), + default=None, + help="XEP list to use (defaults to ./build/xeplist.xml)" + ) + + parser.add_argument( + "-v", "--verbose", + help="Print additional metadata for deferred XEPs", + action="store_true", + default=False, + ) + + parser.add_argument( + "-m", "--modify", + default=False, + metavar="INITIALS", + help="Modify the to-be-deferred XEPs in-place and use the given " + "INITIALS in the remarks." + ) + + args = parser.parse_args() + + if args.xeplist is None: + args.xeplist = open("./build/xeplist.xml", "rb") + + with args.xeplist as f: + tree = etree.parse(f) + + accepted, _ = load_xepinfos(tree) + deferred = list(get_deferred(accepted)) + + for deferred_info in deferred: + if args.modify: + defer_xep(deferred_info["number"], + deferred_info["last_revision"]["version"], + args.modify) + + if args.verbose: + print( + "XEP-{info[number]:04d}: {info[title]} " + "(last update {info[last_revision][date]:%Y-%m-%d})".format( + info=deferred_info + ) + ) + else: + print(deferred_info["number"]) + + +if __name__ == "__main__": + main() diff --git a/tools/extract-metadata.py b/tools/extract-metadata.py new file mode 100755 index 00000000..fb29f3f6 --- /dev/null +++ b/tools/extract-metadata.py @@ -0,0 +1,217 @@ +#!/usr/bin/env python3 +import pathlib +import sys +import xml.dom.minidom + +import xml.etree.ElementTree as etree + +from xeplib import ( + minidom_find_child, + minidom_find_header, + minidom_get_text, + minidom_children, +) + + +DESCRIPTION = """\ +Extract a list of XEPs with metadata from the xeps repository.""" + +EPILOG = """""" + + +def open_xml(f): + return xml.dom.minidom.parse(f) + + +def extract_xep_metadata(document): + header = minidom_find_header(document) + + latest_revision = minidom_find_child(header, "revision") + if latest_revision is not None: + last_revision_version = minidom_get_text( + minidom_find_child(latest_revision, "version") + ) + last_revision_date = minidom_get_text( + minidom_find_child(latest_revision, "date") + ) + remark_el = minidom_find_child(latest_revision, "remark") + last_revision_remark = None + if remark_el is not None: + remark_children = minidom_children(remark_el) + if len(remark_children) == 1 and remark_children[0].tagName == "p": + last_revision_remark = minidom_get_text(remark_children[0]) + elif len(remark_children) == 0: + last_revision_remark = minidom_get_text(remark_el) or None + + if last_revision_remark is not None: + initials_el = minidom_find_child(latest_revision, "initials") + last_revision_initials = initials_el and minidom_get_text( + initials_el + ) + else: + last_revision_initials = None + else: + last_revision_version = None + last_revision_date = None + last_revision_remark = None + last_revision_initials = None + + status = minidom_get_text(minidom_find_child(header, "status")) + type_ = minidom_get_text(minidom_find_child(header, "type")) + abstract = " ".join(minidom_get_text( + minidom_find_child(header, "abstract") + ).split()) + sig_el = minidom_find_child(header, "sig") + if sig_el is None: + sig = None + else: + sig = minidom_get_text(sig_el) + shortname = minidom_get_text(minidom_find_child(header, "shortname")) + if shortname.replace("-", " ").replace("_", " ").lower() in [ + "not yet assigned", "n/a", "none", "to be assigned", + "to be issued"]: + shortname = None + title = minidom_get_text(minidom_find_child(header, "title")) + + approver_el = minidom_find_child(header, "approver") + if approver_el is not None: + approver = minidom_get_text(approver_el) + else: + approver = "Board" if type_ == "Procedural" else "Council" + + return { + "last_revision": { + "version": last_revision_version, + "date": last_revision_date, + "initials": last_revision_initials, + "remark": last_revision_remark, + }, + "status": status, + "type": type_, + "sig": sig, + "abstract": abstract, + "shortname": shortname, + "title": title, + "approver": approver, + } + + +def text_element(tag, text): + el = etree.Element(tag) + el.text = text + return el + + +def make_metadata_element(number, metadata, accepted, *, protoname=None): + result = etree.Element("xep") + result.append(text_element("number", number)) + result.append(text_element("title", metadata["title"])) + result.append(text_element("abstract", metadata["abstract"])) + result.append(text_element("type", metadata["type"])) + result.append(text_element("status", metadata["status"])) + result.append(text_element("approver", metadata["approver"])) + + if metadata["shortname"] is not None: + result.append(text_element("shortname", metadata["shortname"])) + + if metadata["last_revision"]["version"] is not None: + last_revision = metadata["last_revision"] + revision_el = etree.Element("last-revision") + revision_el.append(text_element("date", last_revision["date"])) + revision_el.append(text_element("version", last_revision["version"])) + if last_revision["initials"]: + revision_el.append(text_element("initials", + last_revision["initials"])) + if last_revision["remark"]: + revision_el.append(text_element("remark", + last_revision["remark"])) + result.append(revision_el) + + if metadata["sig"] is not None: + result.append( + text_element("sig", metadata["sig"]) + ) + + if accepted: + result.set("accepted", "true") + else: + result.set("accepted", "false") + + if protoname is not None: + result.append(text_element("proto-name", protoname)) + + return result + + +def parse_checked_and_print_error(xepfile): + try: + with xepfile.open("rb") as f: + return open_xml(f) + except xml.parsers.expat.ExpatError as exc: + print("{}: {}".format(xepfile, exc), file=sys.stderr) + return None + + +def main(): + import argparse + import sys + + parser = argparse.ArgumentParser( + description=DESCRIPTION, + epilog=EPILOG, + ) + parser.add_argument( + "xepdir", + nargs="?", + type=pathlib.Path, + default=pathlib.Path.cwd(), + help="Directory where the XEP XMLs are. Defaults to current directory." + ) + + args = parser.parse_args() + + tree = etree.Element("xep-infos") + + has_error = False + + for xepfile in args.xepdir.glob("xep-*.xml"): + number = xepfile.name.split("-", 1)[1].split(".", 1)[0] + try: + number = str(int(number)) + except ValueError: + continue + + parsed = parse_checked_and_print_error(xepfile) + if parsed is None: + has_error = True + continue + + tree.append(make_metadata_element( + number, + extract_xep_metadata(parsed), + True, + )) + + for xepfile in (args.xepdir / "inbox").glob("*.xml"): + protoname = xepfile.name.rsplit(".", 1)[0] + + parsed = parse_checked_and_print_error(xepfile) + if parsed is None: + has_error = True + continue + + tree.append(make_metadata_element( + "xxxx", + extract_xep_metadata(parsed), + False, + protoname=protoname + )) + + if has_error: + sys.exit(2) + + sys.stdout.buffer.raw.write(etree.tostring(tree)) + + +if __name__ == "__main__": + main() diff --git a/tools/send-updates.py b/tools/send-updates.py new file mode 100755 index 00000000..7e669288 --- /dev/null +++ b/tools/send-updates.py @@ -0,0 +1,455 @@ +#!/usr/bin/env python3 +import configparser +import getpass +import itertools +import email.message +import os +import smtplib +import sys +import textwrap + +from datetime import datetime + +import xml.etree.ElementTree as etree + +from xeplib import Status, Action, load_xepinfos + + +DESCRIPTION = """\ +Send email updates for XEP changes based on the difference between two \ +xeplist files.""" + +EPILOG = """\ +Configuration file contents: + +[smtp] +host= +port=587 +user= +password= +from=
      + +If user is omitted, anonymous mail sending is attempted. + +If options are missing from the configuration file and the standard input and \ +standard output are a terminal, the script interactively asks for the option \ +values. If no terminal is connected, the script exits with an error instead.""" + + +XEP_URL_PREFIX = "https://xmpp.org/extensions/" + + +MAIL_PROTO_TEMPLATE = """\ +The XMPP Extensions Editor has received a proposal for a new XEP. + +Title: {info[title]} +Abstract: +{info[abstract]} + +URL: {url} + +The {approver} will decide in the next two weeks whether to accept this \ +proposal as an official XEP.""" + + +SUBJECT_PROTO_TEMPLATE = "Proposed XMPP Extension: {info[title]}" + + +MAIL_NONPROTO_TEMPLATE = """\ +Version {info[last_revision][version]} of XEP-{info[number]:04d} \ +({info[title]}) has been released. + +Abstract: +{info[abstract]} + +Changelog: +{changelog} + +URL: {url}""" + + +MAIL_DEFER_TEMPLATE = """\ +XEP-{info[number]:04d} ({info[title]}) has been Deferred because of inactivity. + +Abstract: +{info[abstract]} + +URL: {url} + +If and when a new revision of this XEP is published, its status will be \ +changed back to Experimental. +""" + + +SUBJECT_NONPROTO_TEMPLATE = \ + "{action.value}: XEP-{info[number]:04d} ({info[title]})" + + +def dummy_info(number): + return { + "status": None, + "accepted": False, + "number": number, + } + + +def diff_infos(old, new): + if old["status"] != new["status"]: + if new["status"] == Status.PROTO: + return Action.PROTO + elif old["status"] is None: + return Action.NEW + elif (old["status"] == Status.DEFERRED and + new["status"] == Status.EXPERIMENTAL): + return Action.UPDATE + else: + return Action.fromstatus(new["status"]) + + old_version = old.get("last_revision", {}).get("version") + new_version = new.get("last_revision", {}).get("version") + + if old_version != new_version: + return Action.UPDATE + + return None + + +def wraptext(text): + return "\n".join( + itertools.chain( + *[textwrap.wrap(line) if line else [line] for line in text.split("\n")] + ) + ) + + +def make_proto_mail(info): + kwargs = { + "info": info, + "approver": info["approver"], + "url": "{}inbox/{}.html".format( + XEP_URL_PREFIX, + info["protoname"], + ), + } + + mail = email.message.EmailMessage() + mail["Subject"] = SUBJECT_PROTO_TEMPLATE.format(**kwargs) + mail["XSF-XEP-Action"] = "PROTO" + mail["XSF-XEP-Title"] = info["title"] + mail["XSF-XEP-Type"] = info["type"] + mail["XSF-XEP-Status"] = info["status"].value + mail["XSF-XEP-Url"] = kwargs["url"] + mail["XSF-XEP-Approver"] = kwargs["approver"] + mail.set_content( + wraptext(MAIL_PROTO_TEMPLATE.format(**kwargs)), + "plain", + "utf-8", + ) + + return mail + + +def make_nonproto_mail(action, info): + last_revision = info.get("last_revision") + changelog = "(see in-document revision history)" + if last_revision is not None: + remark = last_revision.get("remark") + initials = last_revision.get("initials") + if remark and initials: + changelog = "{} ({})".format(remark, initials) + + kwargs = { + "info": info, + "changelog": changelog, + "action": action, + "url": "{}xep-{:04d}.html".format( + XEP_URL_PREFIX, + info["number"], + ), + } + + body_template = MAIL_NONPROTO_TEMPLATE + if action == Action.DEFER: + body_template = MAIL_DEFER_TEMPLATE + + mail = email.message.EmailMessage() + mail["Subject"] = SUBJECT_NONPROTO_TEMPLATE.format(**kwargs) + mail["XSF-XEP-Action"] = action.value + mail["XSF-XEP-Title"] = info["title"] + mail["XSF-XEP-Type"] = info["type"] + mail["XSF-XEP-Status"] = info["status"].value + mail["XSF-XEP-Number"] = "{:04d}".format(info["number"]) + mail["XSF-XEP-Url"] = kwargs["url"] + mail.set_content( + wraptext(body_template.format(**kwargs)), + "plain", + "utf-8", + ) + + return mail + + +def get_or_ask(config, section, name, prompt): + try: + return config.get(section, name) + except (configparser.NoSectionError, + configparser.NoOptionError): + return input(prompt) + + +def interactively_extend_smtp_config(config): + try: + host = config.get("smtp", "host") + except (configparser.NoSectionError, + configparser.NoOptionError): + host = input("SMTP server: ").strip() + port = int(input("SMTP port (blank for 587): ").strip() or "587") + user = input( + "SMTP user (leave blank for anon): " + ).strip() or None + if user: + password = getpass.getpass() + else: + password = None + else: + port = config.getint("smtp", "port", fallback=587) + user = config.get("smtp", "user", fallback=None) + password = config.get("smtp", "password", fallback=None) + + try: + from_ = config.get("smtp", "from") + except (configparser.NoSectionError, + configparser.NoOptionError): + from_ = input("From address: ").strip() + + if not config.has_section("smtp"): + config.add_section("smtp") + config.set("smtp", "host", host) + config.set("smtp", "port", str(port)) + if user: + config.set("smtp", "user", user) + if password is None: + password = getpass.getpass() + config.set("smtp", "password", password) + config.set("smtp", "from", from_) + + +def choose(prompt, options, *, + eof=EOFError, + keyboard_interrupt=KeyboardInterrupt): + while True: + try: + choice = input(prompt).strip() + except EOFError: + if eof is EOFError: + raise + return eof + except KeyboardInterrupt: + if keyboard_interrupt is KeyboardInterrupt: + raise + return keyboard_interrupt + + if choice not in options: + print("invalid choice. please enter one of: {}".format( + ", ".join(map(str, options)) + )) + continue + + return choice + + +def make_smtpconn(config): + host = config.get("smtp", "host") + port = config.getint("smtp", "port") + user = config.get("smtp", "user", fallback=None) + password = config.get("smtp", "password", fallback=None) + + conn = smtplib.SMTP(host, port) + conn.starttls() + if user is not None: + conn.login(user, password) + + return conn + + +def make_fake_smtpconn(): + class Fake: + def send_message(self, mail): + print("---8<---") + print(mail.as_string()) + print("--->8---") + + def close(self): + pass + + return Fake() + + +def main(): + import argparse + + parser = argparse.ArgumentParser( + description=wraptext(DESCRIPTION), + epilog=wraptext(EPILOG), + formatter_class=argparse.RawDescriptionHelpFormatter + ) + + parser.add_argument( + "-c", "--config", + metavar="FILE", + type=argparse.FileType("r"), + help="Configuration file", + ) + parser.add_argument( + "-y", + dest="ask_confirmation", + default=True, + action="store_false", + help="'I trust this script to do the right thing and send emails" + "without asking for confirmation.'" + ) + parser.add_argument( + "--no-proto", + dest="process_proto", + default=True, + action="store_false", + help="Disable processing of ProtoXEPs.", + ) + parser.add_argument( + "-n", "--dry-run", + dest="dry_run", + action="store_true", + default=False, + help="Instead of sending emails, print them to stdout (implies -y)", + ) + + parser.add_argument( + "old", + type=argparse.FileType("rb"), + help="Old xep-infos XML file", + ) + parser.add_argument( + "new", + type=argparse.FileType("rb"), + help="New xep-infos XML file", + ) + + parser.add_argument( + "to", + nargs="+", + help="The mail addresses to send the update mails to." + ) + + args = parser.parse_args() + + can_be_interactive = ( + os.isatty(sys.stdin.fileno()) and + os.isatty(sys.stdout.fileno()) + ) + + if args.dry_run: + args.ask_confirmation = False + + if args.ask_confirmation and not can_be_interactive: + print("Cannot ask for confirmation (stdio is not a TTY), but -y is", + "not given either. Aborting.", sep="\n", file=sys.stderr) + sys.exit(2) + + config = configparser.ConfigParser() + if args.config is not None: + config.read_file(args.config) + + with args.old as f: + tree = etree.parse(f) + old_accepted, old_proto = load_xepinfos(tree) + + with args.new as f: + tree = etree.parse(f) + new_accepted, new_proto = load_xepinfos(tree) + + old_xeps = set(old_accepted.keys()) + new_xeps = set(new_accepted.keys()) + + common_xeps = old_xeps & new_xeps + added_xeps = new_xeps - old_xeps + + added_protos = set(new_proto.keys()) - set(old_proto.keys()) + + updates = [] + + for common_xep in common_xeps: + old_info = old_accepted[common_xep] + new_info = new_accepted[common_xep] + + action = diff_infos(old_info, new_info) + if action is not None: + updates.append((common_xep, action, new_info)) + + for added_xep in added_xeps: + old_info = dummy_info(added_xep) + new_info = new_accepted[added_xep] + + action = diff_infos(old_info, new_info) + if action is not None: + updates.append((added_xep, action, new_info)) + + if args.process_proto: + for added_proto in added_protos: + old_info = dummy_info('xxxx') + new_info = new_proto[added_proto] + + action = diff_infos(old_info, new_info) + if action is not None: + updates.append((added_proto, action, new_info)) + + if args.dry_run: + smtpconn = make_fake_smtpconn() + else: + if can_be_interactive: + interactively_extend_smtp_config(config) + + try: + smtpconn = make_smtpconn(config) + except (configparser.NoSectionError, + configparser.NoOptionError) as exc: + print("Missing configuration: {}".format(exc), + file=sys.stderr) + print("(cannot ask for configuration on stdio because it is " + "not a TTY)", file=sys.stderr) + sys.exit(3) + + try: + for id_, action, info in updates: + if action == Action.PROTO: + mail = make_proto_mail(info) + else: + mail = make_nonproto_mail(action, info) + mail["Date"] = datetime.utcnow() + mail["From"] = config.get("smtp", "from") + mail["To"] = args.to + + if args.ask_confirmation: + print() + print("---8<---") + print(mail.as_string()) + print("--->8---") + print() + choice = choose( + "Send this email? [y]es, [n]o, [a]bort: ", + "yna", + eof="a", + ) + + if choice == "n": + continue + elif choice == "a": + print("Exiting on user request.", file=sys.stderr) + sys.exit(4) + + smtpconn.send_message(mail) + finally: + smtpconn.close() + + +if __name__ == "__main__": + main() diff --git a/tools/xeplib.py b/tools/xeplib.py new file mode 100644 index 00000000..93065f78 --- /dev/null +++ b/tools/xeplib.py @@ -0,0 +1,139 @@ +import enum + +import xml.dom.minidom + +from datetime import datetime + + +class Status(enum.Enum): + PROTO = 'ProtoXEP' + EXPERIMENTAL = 'Experimental' + PROPOSED = 'Proposed' + DRAFT = 'Draft' + ACTIVE = 'Active' + FINAL = 'Final' + RETRACTED = 'Retracted' + OBSOLETE = 'Obsolete' + DEFERRED = 'Deferred' + REJECTED = 'Rejected' + DEPRECATED = 'Deprecated' + + @classmethod + def fromstr(cls, s): + if s == "Proto" or s.lower() == "protoxep": + s = "ProtoXEP" + return cls(s) + + +class Action(enum.Enum): + PROTO = "Proposed XMPP Extension" + NEW = "NEW" + DRAFT = "DRAFT" + ACTIVE = "ACTIVE" + FINAL = "FINAL" + RETRACT = "RETRACTED" + OBSOLETE = "OBSOLETED" + DEFER = "DEFERRED" + UPDATE = "UPDATED" + DEPRECATE = "DEPRECATED" + + @classmethod + def fromstatus(cls, status): + return { + Status.EXPERIMENTAL: cls.NEW, + Status.DRAFT: cls.DRAFT, + Status.ACTIVE: cls.ACTIVE, + Status.FINAL: cls.FINAL, + Status.RETRACTED: cls.RETRACT, + Status.OBSOLETE: cls.OBSOLETE, + Status.DEPRECATED: cls.DEPRECATE, + Status.DEFERRED: cls.DEFER, + }[status] + + +def load_xepinfo(el): + accepted = el.get("accepted").lower() == "true" + + info = { + "title": el.find("title").text, + "abstract": el.find("abstract").text, + "type": el.find("type").text, + "status": Status.fromstr(el.find("status").text), + "approver": el.find("approver").text, + "accepted": accepted, + } + + last_revision_el = el.find("last-revision") + if last_revision_el is not None: + last_revision = { + "version": last_revision_el.find("version").text, + "date": datetime.strptime( + last_revision_el.find("date").text, + "%Y-%m-%d", + ), + "initials": None, + "remark": None, + } + + initials_el = last_revision_el.find("initials") + if initials_el is not None: + last_revision["initials"] = initials_el.text + + remark_el = last_revision_el.find("remark") + if remark_el is not None: + last_revision["remark"] = remark_el.text + + info["last_revision"] = last_revision + + sig = el.find("sig") + if sig is not None: + info["sig"] = sig.text + + if accepted: + info["number"] = int(el.find("number").text) + else: + info["protoname"] = el.find("proto-name").text + + return info + + +def load_xepinfos(tree): + accepted, protos = {}, {} + for info_el in tree.getroot(): + info = load_xepinfo(info_el) + if info["accepted"]: + accepted[info["number"]] = info + else: + protos[info["protoname"]] = info + + return accepted, protos + + +def minidom_find_child(elem, child_tag): + for child in elem.childNodes: + if hasattr(child, "tagName") and child.tagName == child_tag: + return child + return None + + +def minidom_find_header(document): + header = minidom_find_child(document.documentElement, "header") + if header is None: + raise ValueError("cannot find
      ") + return header + + +def minidom_get_text(elem): + return "".join( + child.nodeValue + for child in elem.childNodes + if isinstance(child, (xml.dom.minidom.Text, + xml.dom.minidom.CDATASection)) + ) + + +def minidom_children(elem): + return [ + child for child in elem.childNodes + if isinstance(child, (xml.dom.minidom.Element)) + ] diff --git a/xep-0001.xml b/xep-0001.xml index 4b83834f..8679a331 100644 --- a/xep-0001.xml +++ b/xep-0001.xml @@ -219,7 +219,7 @@

      The five XEP types are described in the following sections.

      -

      The approving body for all Standards Track, Informational, and Historical XEPs is the XMPP Council; the approving body for Humorous XEPs in the XMPP Extensions Editor; and the approving body for Procedural XEPs may be either the &BOARD; or the XMPP Council.

      +

      The approving body for all Standards Track, Informational, and Historical XEPs is the XMPP Council; the approving body for Humorous XEPs is the XMPP Extensions Editor; and the approving body for Procedural XEPs may be either the &BOARD; or the XMPP Council.

      This document focuses primarily on Standards Track XEPs since they are the vehicle for defining new protocols, but also discusses the other XEP types.

      A Standards Track XEP defines one of the following:

      @@ -406,7 +406,7 @@ Experimental ----> Proposed ----> Active

      Every XMPP Extension Protocol specification must contain a section entitled "Security Considerations", detailing security concerns or features related to the proposal; in particular, a Standards Track XEP should list the security threats that the protocol addresses and does not address, as well as security issues related to implementation of the protocol and deployment of such implementations. XEP authors should refer to &rfc3552; for helpful information about documenting security considerations and should also confer with the XMPP Extensions Editor and/or XMPP Council regarding this important task.

      -

      Some XMPP Extension Protocols may require interaction with &IANA;. The IANA acts as a clearinghouse to assign and coordinate the use of numerous Internet protocol parameters, such as MIME types and port numbers (e.g., the TCP ports 5222, 5269, and 5280 used by the XMPP developer community are registered with the IANA). Whether or not a XEP requires registration of parameters with the IANA, that fact must be noted and explained in a distinct section of the XEP entitled "IANA Considerations". Registration with the IANA must not occur until the registration has been approbved by the XMPP Council (e.g., by advancement of a XEP to a status of Draft or Active), and must be initiated by the XMPP Registrar in consultation with the XEP author, not by the XEP author directly with the IANA.

      +

      Some XMPP Extension Protocols may require interaction with &IANA;. The IANA acts as a clearinghouse to assign and coordinate the use of numerous Internet protocol parameters, such as MIME types and port numbers (e.g., the TCP ports 5222, 5269, and 5280 used by the XMPP developer community are registered with the IANA). Whether or not a XEP requires registration of parameters with the IANA, that fact must be noted and explained in a distinct section of the XEP entitled "IANA Considerations". Registration with the IANA must not occur until the registration has been approved by the XMPP Council (e.g., by advancement of a XEP to a status of Draft or Active), and must be initiated by the XMPP Registrar in consultation with the XEP author, not by the XEP author directly with the IANA.

      The ®ISTRAR; performs a function similar to the IANA, although limited to the XMPP developer community. It does so by reserving protocol namespaces and by uniquely assigning parameters for use in the context of XMPP protocols (for example, the categories and types used in &xep0030;).

      diff --git a/xep-0030.xml b/xep-0030.xml index ad6bab56..0a6b62cb 100644 --- a/xep-0030.xml +++ b/xep-0030.xml @@ -36,6 +36,12 @@ &pgmillard; &reatmon; &stpeter; + + 2.5rc3 + 2017-10-03 + th +

      XML schema modified so that no ordering is required between disco#info children.

      +
      2.5rc2 2016-10-13 @@ -874,8 +880,20 @@ xmpp:romeo@montague.net?disco;type=get;request=items - - + + + + + + + + + + + + + + diff --git a/xep-0045.xml b/xep-0045.xml index 6a496107..86a4f1f3 100644 --- a/xep-0045.xml +++ b/xep-0045.xml @@ -45,6 +45,22 @@ &stpeter; + + 1.29 + 2017-09-01 + gl + +

      Clarify wording for a client re-syncing to a MUC

      +
      +
      + + 1.28 + 2017-05-31 + gl + +

      Introduce <x/> tag in MUC-PMs to support better Carbon delivery.

      +
      +
      1.27.1 2016-12-03 @@ -1385,6 +1401,7 @@ ]]>

      Before attempting to enter the room, a MUC-compliant client SHOULD first discover its reserved room nickname (if any) by following the protocol defined in the Discovering Reserved Room Nickname section of this document.

      +

      When a MUC service receives an <x/> tagged join stanza from an already-joined client (as identified by the client's full JID), the service should assume that the client lost its synchronization, and therefore it SHOULD send exactly the same stanzas to the client as if it actually just joined the MUC. The server MAY also send a presence update to the other participants according to the received join presence.

      @@ -1903,6 +1920,8 @@

      Since each occupant has its own occupant JID, an occupant can send a "private message" to a selected occupant via the service by sending a message to the intended recipient's occupant JID. The message type SHOULD be "chat" and MUST NOT be "groupchat", but MAY be left unspecified (i.e., a normal message). This privilege is controlled by the "muc#roomconfig_allowpm" room configuration option.

      +

      To allow for proper synchronization of these messages to the user's other clients by &xep0280;, the sending client SHOULD add an <x/> element qualified by the 'http://jabber.org/protocol/muc#user' namespace to the message.

      +

      Note: because this requirement was only added in revision 1.28 of this XEP, receiving entities MUST NOT rely on the existence of the <x/> element on private messages for proper processing.

      I'll give thee a wind. + ]]> -

      The service is responsible for changing the 'from' address to the sender's occupant JID and delivering the message to the intended recipient's full JID.

      +

      The service is responsible for changing the 'from' address to the sender's occupant JID and delivering the message to the intended recipient's full JID. The service SHOULD add the <x/> element if the message does not contain it already.

      I'll give thee a wind. + ]]>

      If the sender attempts to send a private message of type "groupchat" to a particular occupant, the service MUST refuse to deliver the message (since the recipient's client would expect in-room messages to be of type "groupchat") and return a &badrequest; error to the sender:

      diff --git a/xep-0060.xml b/xep-0060.xml index 8c099df9..796a39c3 100644 --- a/xep-0060.xml +++ b/xep-0060.xml @@ -49,6 +49,18 @@ &stpeter; &ralphm; + + 1.13.7 + 2017-08-24 + egp +

      Fix examples using invalid XEP-0082 dates.

      +
      + + 1.13.6 + 2017-06-22 + dg +

      Clarify behaviour of publish-options. Fields must be registered

      +
      1.13.5 2016-12-21 @@ -951,7 +963,7 @@ And by opposing end them? hamlet@denmark.lit - 2003-07-29T22:56Z + 2003-07-29T22:56:10Z Princely Musings (Atom) @@ -2940,11 +2952,11 @@ And by opposing end them? ]]> -

      The <publish-options/> element SHOULD contain a data form (see XEP-0004), whose FORM_TYPE SHOULD be "http://jabber.org/protocol/pubsub#publish-options" (see XEP-0068).

      -

      How the fields are to be handled is up to the the pubsub service, which in the language of XEP-0004 functions as a form-processing entity.

      -

      For example, the service may treat the field as a precondition, in which case the service should proceed as follows:

      +

      The <publish-options/> element MUST contain a data form (see XEP-0004), whose FORM_TYPE MUST be "http://jabber.org/protocol/pubsub#publish-options" (see XEP-0068).

      +

      Fields and their behaviour MUST be registered with the XMPP Registrar. Each field MUST specify whether it defines METADATA to be attached to the item, a per-item OVERRIDE of the node configuration, or a PRECONDITION to be checked against the node configuration. A pubsub service advertising support for publishing options MUST reject publications with unknown fields.

      +

      A field defined as a precondition MUST be processed as follows:

        -
      1. If the node exists and the precondition is not met, then the publish shall fail with a &conflict; error condition and a pubsub-specific condition of <precondition-not-met/>.
      2. +
      3. If the node exists and the precondition is not met, then the publish MUST fail with a &conflict; error condition and a pubsub-specific condition of <precondition-not-met/>.
      4. If the node exists and the precondition is met, then the publish succeeds.
      5. If the node does not exist and the service supports the "auto-create" feature, then the service shall auto-create the node with default configuration in all respects except those specified in the preconditions, and the publish succeeds.
      6. If the node does not exist and the service does not support the "auto-create" feature, then the publish shall fail.
      7. @@ -5513,7 +5525,7 @@ And by opposing end them? http://jabber.org/protocol/pubsub#subscribe_options ... - 2006-02-28T11:59Z + 2006-02-28T11:59:59Z ... @@ -5530,7 +5542,7 @@ And by opposing end them? http://jabber.org/protocol/pubsub#subscribe_options ... - 2006-03-31T23:59Z + 2006-03-31T23:59:59Z ... @@ -6782,6 +6794,7 @@ xmpp:pubsub.shakespeare.lit?pubsub;action=retrieve;node=princely_musings + diff --git a/xep-0065.xml b/xep-0065.xml index da8162d3..0bf7a29c 100644 --- a/xep-0065.xml +++ b/xep-0065.xml @@ -312,18 +312,6 @@ xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> -]]> -

        If the Proxy is unable to act as a StreamHost, the Proxy MUST return an error to the Requester, which SHOULD be ¬allowed;.

        - - - - - ]]>

        If the Proxy is unable to act as a StreamHost, the Proxy MUST return an error to the Requester, which SHOULD be ¬allowed;.

        admin &stpeter; + + 1.2 + 2017-07-15 + XEP Editor: ssw + Fix broken node value in example. + 1.1 2005-08-19 @@ -1613,7 +1619,7 @@ type='set' xml:lang='en'> diff --git a/xep-0234.xml b/xep-0234.xml index 79ddd7e5..5db892d0 100644 --- a/xep-0234.xml +++ b/xep-0234.xml @@ -24,6 +24,23 @@ NOT_YET_ASSIGNED &stpeter; &lance; + + 0.18.3 + 2017-08-24 + ps +

        Make use of <hash-used/> from XEP-0300.

        +
        + + 0.18.2 + 2017-08-23 + editor (jwi) +
          +
        • Fix a date missing its timezone in examples. (egp)
        • +
        • Remove the mention of UTC, timestamps are already properly described in XEP-0082. (egp)
        • +
        • Add missing length attribute to XML schema. (ps)
        • +
        • Fix incorrect XML in examples. (ps)
        • +
        +
        0.18.1 2017-05-20 @@ -327,7 +344,7 @@ text/plain test.txt - 2015-07-26T21:46:00 + 2015-07-26T21:46:00+01:00 6144 w0mcJylzCn+AfvuGdqkty2+KP48= @@ -343,7 +360,7 @@ date - UTC timestamp specifying the last modified time of the file (which MUST conform to the DateTime profile of &xep0082;). + Timestamp specifying the last modified time of the file (which MUST conform to the DateTime profile of &xep0082;). OPTIONAL @@ -354,7 +371,12 @@ hash A hash of the file content, using the <hash/> element defined in &xep0300; and qualifed by the 'urn:xmpp:hashes:2' namespace. Multiple hashes MAY be included for hash agility. - REQUIRED when offering a file, otherwise OPTIONAL + See <hash-used/> + + + hash-used + Alternatively to a <hash/> element, the initiator can also include a <hash-used/> element. This avoids the need to read the file twice to calculate the hash. + Either a <hash/> or a <hash-used/> element MUST be included when offering a file. media-type @@ -377,7 +399,7 @@ OPTIONAL -

        One or more <hash/> elements MUST be present when offering a file, but those elements MAY be empty if the hash has not yet been computed. If there is no computed hash value, the <hash/> element(s) MUST possess an 'algo' attribute specifying which hash algorithm will be used. Once a hash has been calculated by the File Sender, the File Sender SHOULD inform the File Receiver of the hash value as described in Checksum.

        +

        One or more <hash/> elements MUST be present when offering a file, but those elements MAY be empty if the hash has not yet been computed. If there is no computed hash value, the <hash/> element(s) MUST possess an 'algo' attribute specifying which hash algorithm will be used. Once a hash has been calculated by the File Sender, the File Sender SHOULD inform the File Receiver of the hash value as described in Checksum.

        Additional elements MAY be included as children of the <file/> element to provide additional metadata about the file, such as &xep0264;.

        The optional <range/> element MAY possess two attributes:

        @@ -750,7 +772,7 @@ a=file-range:-<(offset + length) | *>]]> text/plain test.txt - 2015-07-26T21:46:00 + 2015-07-26T21:46:00+01:00 6144 w0mcJylzCn+AfvuGdqkty2+KP48= @@ -785,7 +807,7 @@ a=file-range:1024-*]]>

        At any time during the lifetime of the file transfer session, the File Sender can communicate the checksum of the file to the File Receiver.

        This can be done in the session-initiate message if the File Sender already knows the checksum, as shown above in Example 3.

        -

        After the session-initiate message, this can also be done by sending a session-info message containing a <checksum/> element qualified by the 'urn:xmpp:jingle:apps:file-transfer:5' namespace. The <checksum/> element SHOULD contain 'creator' and 'name' attributes sufficient to identitfy the content the checksum belongs to. Additionally, the <checksum/> element MUST contain a <file/> element which MUST contain at least one <hash/> element qualified by the 'urn:xmpp:hashes:2' namespace. Each <hash/> element contains a checksum of the file data produced in accordance with the hashing function specified by the 'algo' attribute, which MUST be one of the functions listed in the &ianahashes;.

        +

        After the session-initiate message, this can also be done by sending a session-info message containing a <checksum/> element qualified by the 'urn:xmpp:jingle:apps:file-transfer:5' namespace. In such a case however, the session-initiate message MUST contain a <hash-used/> element. The <checksum/> element SHOULD contain 'creator' and 'name' attributes sufficient to identitfy the content the checksum belongs to. Additionally, the <checksum/> element MUST contain a <file/> element which MUST contain at least one <hash/> or <hash-used/> element qualified by the 'urn:xmpp:hashes:2' namespace. Each <hash/> element contains a checksum of the file data produced in accordance with the hashing function specified by the 'algo' attribute, which MUST be one of the functions listed in the &ianahashes;.

        - + @@ -904,7 +926,7 @@ a=file-range:1024-*]]> - + @@ -1054,6 +1076,7 @@ a=file-range:1024-*]]> + @@ -1080,7 +1103,7 @@ a=file-range:1024-*]]> -

        Thanks to Diana Cionoiu, Olivier Crête, Viktor Fast, Philipp Hancke, Waqas Hussain, Justin Karneges, Steffen Larsen, Yann Leboulanger, Marcus Lundblad, Robert McQueen, Joe Maissel, Glenn Maynard, Ali Sabil, Sjoerd Simons, Will Thompson, Matthew Wild, and Jiří Zárevúcky for their feedback.

        +

        Thanks to Diana Cionoiu, Olivier Crête, Viktor Fast, Philipp Hancke, Waqas Hussain, Justin Karneges, Steffen Larsen, Yann Leboulanger, Marcus Lundblad, Robert McQueen, Joe Maissel, Glenn Maynard, Ali Sabil, Sjoerd Simons, Will Thompson, Matthew Wild, Paul Schaub and Jiří Zárevúcky for their feedback.

        diff --git a/xep-0278.xml b/xep-0278.xml index f6e9255e..7398e720 100644 --- a/xep-0278.xml +++ b/xep-0278.xml @@ -3,6 +3,8 @@ + + %ents; @@ -14,7 +16,7 @@ This documents specifies how Jingle Clients can interact with Jingle Relay Nodes Services and how XMPP entities can provide, search and list available Jingle Relay Nodes. &LEGALNOTICE; 0278 - Deferred + Experimental Standards Track Standards Council @@ -32,6 +34,12 @@ thiago@xmppjingle.com barata7@gmail.com + + 0.3 + 2017-09-14 + tc +

        Added TURN Credentials Service Support.

        +
        0.2 2011-06-21 @@ -115,6 +123,7 @@ All signalling, request, response and publishing is done via XMPP, not requiring + @@ -194,6 +203,34 @@ All signalling, request, response and publishing is done via XMPP, not requiring ]]>

        After receiving the &CHANNEL; the requester MUST send his stream to 'host' and 'localport' pair and send a &CANDIDATE; containing the 'host' and 'remoteport' values.

        + +

        A Jingle Client can request volative TURN credentials, to be used in cases where connectivity check is a requirement. Like, for example, WebRTC. The concept and mechanism is quite similar to the RFC draft REST API For Access To TURN Services'.

        +

        TURN provides an access control mechanism described in &rfc5389;, where long-term credentials are provided as part of the TURN protocol. Therefore the credentials provided in this Jingle Nodes mechanism are time-limited, but SHOULD be used as long-term credentials, when authentication against a TURN Server. +

        +

        + Note: There is no need to run TURN server or support within a Jingle Relay. This mechanism allows decoupled deployment of distributed TURN Servers, without the requirement of database based authentication. +

        + + + +]]> + + + +]]> +
        @@ -293,7 +330,7 @@ All signalling, request, response and publishing is done via XMPP, not requiring -

        The &SERVICES; element MAY be empty or contain &RELAY; and/or &TRACKER; elements.

        +

        The &SERVICES; element MAY be empty or contain &RELAY;, &STUN; and/or &TRACKER; elements.

        The attributes of the &RELAY; and &TRACKER; element are as follows.

        @@ -323,6 +360,48 @@ All signalling, request, response and publishing is done via XMPP, not requiring
        + +

        The attributes of the &TURN; element are as follows.

        + + + + + + + + + + + + + + + + + + + + + + + + + + +
        AttributeDefinitionInclusion
        ttlThe duration in seconds for which the provided credentials are valid.REQUIRED
        uriThe TURN Server URI.REQUIRED
        usernameThe username to be used on TURN authentication. THe recommended format is a colon-delimited concatenation of expiration timestamp and the requester bare JID.REQUIRED
        passwordThe ppassword to be used on TURN authentication. Is the result of 'base64(hmac(secret_key, username))'. Where 'secret_key' is shared between the TURN server and entity providing the credentials.REQUIRED
        + +

        The duration in seconds for which the provided credentials are valid. The usual and recommended value is 86400 seconds (one day).

        +
        + +

        The TURN Server URI as described in I-D.petithuguenin-behave-turn-uris

        +
        + +

        WebRTC's TURN request uses the 'username' value for its USERNAME and PASSWORD attributes, for the input to the MESSAGE-INTEGRITY hash.

        +
        + +

        Along with 'username', WebRTC's TURN request uses the 'password' value for its USERNAME and PASSWORD attributes, for the input to the MESSAGE-INTEGRITY hash.

        +
        +

        To advertise its support for the Jingle Nodes support, when replying to &xep0030; information requests an entity MUST return URNs for any version of this protocol that the entity supports -- e.g., "http://jabber.org/protocol/jinglenodes" for this version&VNOTE;.

        @@ -342,8 +421,9 @@ All signalling, request, response and publishing is done via XMPP, not requiring to='romeo@montague.lit/orchard' type='result'> - - + + + ]]>
        @@ -356,6 +436,10 @@ All signalling, request, response and publishing is done via XMPP, not requiring Note: This use case is also similar to a Jingle to SIP Interoperability Service.

        + +

        A Jingle Client that uses WebRTC, therefore requiring a TURN Server and its credentials to successfully alocate channels. This specification describes a simple way of discovering TURN Services and retrieving credentials to successfully allocate channels. + This also simplifies deployment and distribution of TURN servers, since its stateless authentication does not require connectivity to database authoriztion services.

        +

        A Jingle Client with STUN support but no TURN support can use Relay Node Services as the fallback candidate instead of a TURN candidate. For instance, after a connectivity check proccess, none of the direct candidates worked. The Client can use the Relay Node Candidate as the fallback candidate(the lowest priority candidate).

        @@ -420,6 +504,13 @@ All signalling, request, response and publishing is done via XMPP, not requiring
        + + + + + + + @@ -435,6 +526,10 @@ All signalling, request, response and publishing is done via XMPP, not requiring type='serviceElementType' minOccurs='0' maxOccurs='unbounded'/> + diff --git a/xep-0286.xml b/xep-0286.xml index c2fcb34c..c8898a72 100644 --- a/xep-0286.xml +++ b/xep-0286.xml @@ -2,11 +2,13 @@ %ents; +LTE Smartphone measurements <http://networks.nokia.com/system/files/document/lte_measurements_final.pdf>"> +A Close Examination of Performance and Power Characteristics of 4G LTE Networks <doi:2307636.2307658>"> ]>
        - Mobile Considerations + Mobile Considerations on LTE Networks This document provides background information for XMPP implementors concerned with mobile devices operating on an LTE cellular network. @@ -30,6 +32,17 @@ dave.cridland@isode.com &sam; + + 0.4.1 + 2017-09-17 + ssw + +
          +
        • Minor editorial fixes.
        • +
        • Remove reference to EXI which has no implementations.
        • +
        +
        +
        0.4.0 2017-01-17 @@ -103,17 +116,17 @@ Compression of XMPP data can be achieved with the DEFLATE algorithm (&rfc1951;) via TLS compression (&rfc3749;) or &xep0138; (which also supports other compression algorithms). - While the security implications of stream compression are beyond the scope - of this document (See the aforementioned RFC or XEP for more info), the - author does not recommend using TLS compression with XMPP (or in general). + A description of the security implications of stream compression is beyond + the scope of this document (See &rfc3749; or &xep0138; for more + information), but the author does not recommend using TLS compression with + XMPP (or in general). If compression must be used, stream level compression should be implemented instead, and the compressed stream should have a full flush - performed on stanza boundaries to help prevent a class of chosen plaintext - attacks which can cause data leakage in compressed streams. + performed on stanza boundaries to help prevent chosen plaintext attacks. While this may mitigate some of the benefits of compression by raising - compression ratios, in a large, real world deployment at HipChat, network - traffic was still observed to decrease by a factor of 0.58 when enabling - &xep0138; with ZLIB compression! + compression ratios, in a large, real world deployment, network traffic was + still observed to decrease by a factor of 0.58 when enabling &xep0138; + with ZLIB compression.

        While the CPU cost of compression may directly translate to higher power @@ -122,13 +135,10 @@ power per bit than 3G networks as will be seen later in this document. However, CPU usage is also not guaranteed to rise due to compression. In the aforementioned deployment of stream compression, a - decrease in CPU utilization by a factor of 0.60 was observed due - to the fact that there were fewer packets that needed to be handled by the - OS (which also takes CPU time), and, potentially more importantly, less - data that needed to be TLS-encrypted (which is a much more CPU-expensive - operation than compression). + decrease in CPU utilization by a factor of 0.60 was observed, + presumably due to reductions in TLS and packet handling overhead. Therefore CPU time spent on compression (for ZLIB, at least; other - algorithms were not tested) should be considered negligable. + algorithms were not tested) can be considered negligable.

        Supporting compression and performming a full flush on stanza boundaries @@ -140,12 +150,10 @@ While the wide spread adoption of LTE has dramatically increased available bandwidth on mobile devices, it has also increased power consumption. According to one study, early LTE devices consumed 5–20% more power - than their 3G counterparts - LTE Smartphone measurements <http://networks.nokia.com/system/files/document/lte_measurements_final.pdf>. + than their 3G counterparts &nokia11;. On some networks that support the legacy SVLTE (Simultaneous Voice and - LTE) instead of the more modern VoLTE (Voice Over LTE) standard, or even - CSFB (Circuit-switched fallback) this number would (presumably) be even - higher. + LTE) or CSFB (Circuit-switched fallback) instead of the more modern VoLTE + (Voice Over LTE) standard, this number would (presumably) be even higher.

        XMPP server and client implementers, bearing this increased power usage in @@ -153,12 +161,11 @@ traffic to minimize network usage. For the downlink, LTE user equipment (UE) utilizes Orthogonal Frequency Division Multiplexing (OFDM), which is - somewhat inefficient - A Close Examination of Performance and Power Characteristics of 4G LTE Networks <http://www.cs.columbia.edu/~lierranli/coms6998-7Spring2014/papers/rrclte_mobisys2012.pdf>. + somewhat inefficient &huang12;. On the uplink side a different technology, Single-carrier frequency division multiple access (SC-FDMA) is used, which is slightly more - efficient than traditional (non linearly-precoded) OFDM, slightly - offsetting the fact that broadcasting requires more power than receiving. + efficient than traditional OFDM, slightly offsetting the fact that + broadcasting requires more power than receiving. LTE UE also implements a Discontinuous reception (DRX) mode in which the hardware can sleep until it is woken by a paging message or is needed to perform some task. @@ -182,14 +189,14 @@ prevent the server from closing the socket.

        - +

        If one is on 3G, transmitting a small amount of data will cause the radio to enter FACH mode which is significantly cheaper than its high power mode. On LTE radios, however, transmitting small amounts of data is vastly - more expensive per bit due to the higher tail-times (the time it takes - for the radio to change state). + more expensive per bit due to the higher tail-time (the time it takes + for the radio to change state) of approximately 11 seconds&huang12;. On LTE radios, one should transmit as much data from the client as possible when the radio is already on (eg. by placing messages in a send queue and executing the queue as a batch when the radio is on). @@ -199,10 +206,8 @@

        These rules also apply to server operators: If the server receives data, - the phones radio is already on therefore you should send any pending - data. - Batching data to be sent and sending it all at once will help reduce - power consumption. + the phones radio is already on, therefore you should flush any pending + data as soon as possible after receiving data from a client.

        @@ -213,7 +218,6 @@ optimizations for them in servers.

        &xep0138; provides stream level compression.

        -

        &xep0322; allows XMPP streams to use the EXI XML format.

        &xep0115; provides a mechanism for caching, and hence eliding, the disco#info requests needed to negotiate optional features. @@ -247,8 +251,8 @@

        This XEP was originally written by Dave Cridland, and parts of his original work were used in this rewrite. - Thanks to Atlassian for allowing me to release hard numbers from their - XMPP compression deployment. + Thanks to Atlassian (HipChat) for allowing me to release numbers from + their XMPP compression deployment.

        diff --git a/xep-0300.xml b/xep-0300.xml index eb5d2404..86d4f227 100644 --- a/xep-0300.xml +++ b/xep-0300.xml @@ -25,11 +25,17 @@ &ksmith; &tobias; - 0.5.2 - 2017-08-20 + 0.5.3 + 2017-10-04 fs

        Clarify textual content of the <hash/> element.

        + + 0.5.2 + 2017-08-21 + ps +

        Add hash-used element

        +
        0.5.1 2017-03-17 @@ -99,6 +105,8 @@

        An XMPP protocol can include more than one instance of the <hash/> element, as long as each one has a different value for the 'algo' attribute:

        2AfMGH8O7UNPTvUVAM9aK13mpCY= 2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU=]]> +

        In certain scenarios it makes sense to communicate the hash algorithm that is used prior to the calculation of the hash value.

        + ]]>

        The value of the 'algo' attribute MUST be one of the values from the &ianahashes; maintained by &IANA;, or one of the values defined in the following table.

        @@ -399,13 +407,21 @@ + + + + + + + + ]]>

        Thanks to Dave Cridland, Waqas Hussain, Glenn Maynard, Remko - Tronçon, Christian Schudt, and Florian Schmaus for their input.

        + Tronçon, Paul Schaub, Christian Schudt, and Florian Schmaus for their input.

        diff --git a/xep-0319.xml b/xep-0319.xml index 26a5712a..870fc548 100644 --- a/xep-0319.xml +++ b/xep-0319.xml @@ -24,6 +24,18 @@ idle &tobias; + + 1.0.2 + 2017-07-17 + egp +

        Make the schema more precise about a date being a xs:dateTime.

        +
        + + 1.0.1 + 2017-05-30 + egp +

        Be precise about the &xep0082; profile used.

        +
        1.0 2015-04-02 @@ -51,7 +63,7 @@

        This protocol describes a way to communicate a user's last interaction time with other XMPP entities over &PRESENCE; stanzas. For the purposes of this document, user interaction here refers to a human end user interacting with her device by means of a keyboard, mouse, touch screen, and so on. Based on this information XMPP clients can display the time a contact went idle or a duration for how long a contact has been idle, thereby allowing end users to estimate the expected responsiveness of their contacts.

        -

        This protocol uses absolute timestamps formatted according to &xep0082;, indicated as value of the 'since' attribute in the <idle/> element.

        +

        This protocol uses absolute timestamps formatted according to the DateTime profile of &xep0082;, indicated as value of the 'since' attribute in the <idle/> element.

        Experience has shown a number of issues with &xep0256;:

        • The use of relative durations is too vague. It requires additional information from &xep0203; to provide a reliable user experience.
        • @@ -98,7 +110,7 @@ - + diff --git a/xep-0321.xml b/xep-0321.xml index caccb092..2e055e2c 100644 --- a/xep-0321.xml +++ b/xep-0321.xml @@ -55,16 +55,16 @@

          This document addresses the following requirements:

          1. Make it possible for remote services or entities to manage user's roster by the same mechanisms that descibed in the &rfc6121;.
          2. -
          3. Provide a way for user to control which services have permission to manage his roster.
          4. +
          5. Provide a way for users to control which services have permission to manage their roster.
          -
            -
          • Remote entity — the entity that wants to modify user's roster.
          • -
          • User — the entity which roster the remote entity wants to have access to.
          • -
          • User's server — the XMPP server User connected to.
          • -
          • Roster — the list of User's contacts as defined in the &rfc6121;.
          • -
          +
          +
          Remote entity
          the entity that wants to modify user's roster.
          +
          User
          the entity which roster the remote entity wants to have access to.
          +
          User's server
          the XMPP server User connected to.
          +
          Roster
          the list of User's contacts as defined in the &rfc6121;.
          +
          @@ -82,7 +82,7 @@ You must have a presence subscription to be able to request remote roster management service. ]]> -

          The user's server SHOULD then generate a form request using &xep0004; to client in order to ask user if he's OK with granting the permission to the remote entity. The "challenge" form field is generated by the server and is used to identify the client's response. The server also MUST immediatly answer to the request IQ.

          +

          The user's server SHOULD then generate a form request using &xep0004; to client in order to ask user if they are OK with granting the permission to the remote entity. The "challenge" form field is generated by the server and is used to identify the client's response. The server also MUST immediatly answer to the request IQ.

          NOTE: if the entity is already granted with the permission, the server SHOULD immediatly answer with a success response and skip querying the user.

          You have tried to modify the item you don't allowed to. ]]>
          - +

          User can ask the server to provide a list of components or servers which have permissions to edit their roster.

          diff --git a/xep-0327.xml b/xep-0327.xml index 8ac2f6b1..4404be69 100644 --- a/xep-0327.xml +++ b/xep-0327.xml @@ -10,7 +10,7 @@ This specification defines an XMPP protocol extension for the third-party control of telephone calls and other similar media sessions. The protocol includes support for session management/signaling, as well as advanced media resources such as speech recognizers, speech synthesizers and audio/video recorders. The protocol serves a different purpose from that of first-party protocols such as Jingle or SIP, and is compatible with those protocols. &LEGALNOTICE; 0327 - Experimental + Deferred Standards Track Standards Council @@ -34,6 +34,12 @@ jdecastro@tropo.com http://tropo.com + + 0.8 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.7 2015-07-15 diff --git a/xep-0329.xml b/xep-0329.xml index becbefe8..a97bdf3e 100644 --- a/xep-0329.xml +++ b/xep-0329.xml @@ -10,7 +10,7 @@ This document specifies a simple extension to existing protocols that allows an entity to request information about files. &LEGALNOTICE; 0329 - Experimental + Deferred Standards Track Standards Council @@ -32,6 +32,12 @@ j.lagrange@jabber.org &lance; + + 0.4 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.3 2016-08-07 diff --git a/xep-0332.xml b/xep-0332.xml index 19ea0d4e..b1273838 100644 --- a/xep-0332.xml +++ b/xep-0332.xml @@ -10,7 +10,7 @@ This specification defines how XMPP can be used to transport HTTP communication over peer-to-peer networks. &LEGALNOTICE; 0332 - Experimental + Deferred 2014-10-21 Standards Track Standards @@ -28,6 +28,12 @@ NOT_YET_ASSIGNED &peterwaher; + + 0.5 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.4 2015-11-09 diff --git a/xep-0333.xml b/xep-0333.xml index ed53d7c1..31c31db6 100644 --- a/xep-0333.xml +++ b/xep-0333.xml @@ -10,7 +10,7 @@ This specification describes a solution of marking the last received, displayed and acknowledged message in a chat. &LEGALNOTICE; 0333 - Experimental + Deferred 2017-03-01 2017-02-22 2017-02-11 @@ -30,6 +30,12 @@ im@spencermacdonald.com im@spencermacdonald.com + + 0.3 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.2.1 2015-10-28 diff --git a/xep-0337.xml b/xep-0337.xml index d74d5dc7..d24b3158 100644 --- a/xep-0337.xml +++ b/xep-0337.xml @@ -10,7 +10,7 @@ This specification provides a common framework for sending events to event logs over XMPP networks. &LEGALNOTICE; 0337 - Experimental + Deferred Standards Track Standards Council @@ -22,6 +22,12 @@ eventlogging &peterwaher; + + 0.3 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.2 2015-11-09 diff --git a/xep-0338.xml b/xep-0338.xml index f9ede675..36e2e5da 100644 --- a/xep-0338.xml +++ b/xep-0338.xml @@ -10,7 +10,7 @@ This specification provides an XML mapping for translating the RFC 5888 SDP Grouping Framework to Jingle &LEGALNOTICE; 0338 - Experimental + Deferred Standards Track Standards Council @@ -21,6 +21,12 @@ NOT_YET_ASSIGNED &fippo; + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2014-01-08 diff --git a/xep-0339.xml b/xep-0339.xml index a473fb52..e1aca960 100644 --- a/xep-0339.xml +++ b/xep-0339.xml @@ -10,7 +10,7 @@ This specification provides an XML mapping for translating the RFC 5766 Source-Specific Media Attributes from SDP to Jingle &LEGALNOTICE; 0339 - Experimental + Deferred Standards Track Standards Council @@ -21,6 +21,12 @@ NOT_YET_ASSIGNED &fippo; + + 0.3 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.2 2015-11-09 diff --git a/xep-0340.xml b/xep-0340.xml index db853c8b..b8ffb840 100644 --- a/xep-0340.xml +++ b/xep-0340.xml @@ -14,7 +14,7 @@ &LEGALNOTICE; 0340 - Experimental + Deferred Standards Track Standards Council @@ -40,6 +40,12 @@ lubo@sip-communicator.org &fippo; + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2014-01-08 diff --git a/xep-0341.xml b/xep-0341.xml index e57326e6..051ffcf6 100644 --- a/xep-0341.xml +++ b/xep-0341.xml @@ -10,7 +10,7 @@ This specification defines an extension to the Rayo protocol (XEP-0327) to provide provision for performing Call Progress Analysis on a call under the control of a Rayo client. &LEGALNOTICE; 0341 - Experimental + Deferred Standards Track Standards Council @@ -28,6 +28,12 @@ ben@langfeld.me http://langfeld.me + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2014-01-14 diff --git a/xep-0342.xml b/xep-0342.xml index 1c722a7d..421dd362 100644 --- a/xep-0342.xml +++ b/xep-0342.xml @@ -10,7 +10,7 @@ This specification defines an extension to the Rayo protocol (XEP-0327) to provide provision for sending and receiving faxcimilies via a call under the control of a Rayo client. &LEGALNOTICE; 0342 - Experimental + Deferred Standards Track Standards Council @@ -29,6 +29,12 @@ ben@langfeld.me http://langfeld.me + + 0.3 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.2 2014-03-13 diff --git a/xep-0343.xml b/xep-0343.xml index 20516aef..05385647 100644 --- a/xep-0343.xml +++ b/xep-0343.xml @@ -15,7 +15,7 @@ This specification defines how to use the ICE-UDP Jingle transport method to send media data using WebRTC DataChannels, so technically uses DTLS/SCTP on top of the Interactive Connectivity Establishment (ICE) methodology, which provides robust NAT traversal for media traffic. &LEGALNOTICE; 0343 - Experimental + Deferred Standards Track Standards Council @@ -31,6 +31,12 @@ Bavendiek bavendiek@dbis.rwth-aachen.de + + 0.3 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.2 2014-07-15 diff --git a/xep-0344.xml b/xep-0344.xml index 69b9e79e..54e264df 100644 --- a/xep-0344.xml +++ b/xep-0344.xml @@ -10,7 +10,7 @@ This specification provides documentation how Server Dialback is used together with Transport Layer Security, and discusses how the security considerations of Dialback are changed by the introduction of TLS and/or DNSSEC. &LEGALNOTICE; 0344 - Experimental + Deferred Standards Track Standards Council @@ -23,6 +23,12 @@ N/A &fippo; &dcridland; + + 0.4 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.3 2015-03-23 diff --git a/xep-0345.xml b/xep-0345.xml index 6bbf40e1..9f132174 100644 --- a/xep-0345.xml +++ b/xep-0345.xml @@ -13,7 +13,7 @@ &LEGALNOTICE; 0345 - Experimental + Deferred Procedural None Board @@ -22,6 +22,12 @@ N/A &dcridland; + + 0.4 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.3 2014-08-04 diff --git a/xep-0346.xml b/xep-0346.xml index 93ec322c..c48c75a6 100644 --- a/xep-0346.xml +++ b/xep-0346.xml @@ -12,7 +12,7 @@ This specification describes a series of conventions that allow the management of form templates and publishing of completed forms. &LEGALNOTICE; 0346 - Experimental + Deferred Standards Track Standards Council @@ -27,6 +27,12 @@ NOT_YET_ASSIGNED &ksmithisode; + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2014-04-10 diff --git a/xep-0347.xml b/xep-0347.xml index d6b9adad..0f30dbbe 100644 --- a/xep-0347.xml +++ b/xep-0347.xml @@ -14,7 +14,7 @@ This specification describes an architecture based on the XMPP protocol whereby Things can be installed and safely discovered by their owners and connected into networks of Things. &LEGALNOTICE; 0347 - Experimental + Deferred Standards Track Standards Council @@ -41,6 +41,12 @@ TBD http://www-rnks.informatik.tu-cottbus.de/~rklauck + + 0.5 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.4.1 2016-08-20 diff --git a/xep-0348.xml b/xep-0348.xml index aeaab22f..fbc5a8bb 100644 --- a/xep-0348.xml +++ b/xep-0348.xml @@ -10,7 +10,7 @@ This specification describes a method whereby a client can sign a form using credentials not related to the current connection. &LEGALNOTICE; 0348 - Experimental + Deferred Standards Track Standards Council @@ -25,6 +25,12 @@ signing-forms &peterwaher; + + 0.3 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.2 2015-11-09 diff --git a/xep-0349.xml b/xep-0349.xml index 21005e40..20ba9d2d 100644 --- a/xep-0349.xml +++ b/xep-0349.xml @@ -10,7 +10,7 @@ This specification describes an extension to the Rayo protocol to support clustering of Rayo servers and their presentation as a unified service. &LEGALNOTICE; 0349 - Experimental + Deferred Standards Track Standards Council @@ -34,6 +34,12 @@ mperez@tropo.com http://tropo.com + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2014-06-18 diff --git a/xep-0350.xml b/xep-0350.xml index 673893e3..f2826c2a 100644 --- a/xep-0350.xml +++ b/xep-0350.xml @@ -10,7 +10,7 @@ This specification defines an XMPP protocol extension for including geolocation data in XEP-0004 data forms. &LEGALNOTICE; 0350 - Experimental + Deferred Standards Track Standards @@ -31,6 +31,12 @@ laukner@gmail.com laukner@jabber.org + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2014-07-03 diff --git a/xep-0351.xml b/xep-0351.xml index ad78c230..3eddf9cb 100644 --- a/xep-0351.xml +++ b/xep-0351.xml @@ -10,7 +10,7 @@ This specification defines a modern efficient way to deliver PubSub notifications. &LEGALNOTICE; 0351 - Experimental + Deferred Standards Track Standards Council @@ -29,6 +29,12 @@ Binary@JRuDevels.org Binary@JRuDevels.org + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2014-08-28 diff --git a/xep-0352.xml b/xep-0352.xml index 41909b31..f561c9ef 100644 --- a/xep-0352.xml +++ b/xep-0352.xml @@ -10,7 +10,7 @@ This document defines a way for the client to indicate its active/inactive state. &LEGALNOTICE; 0352 - Proposed + Experimental 2017-03-28 2017-03-01 2017-02-22 @@ -25,6 +25,12 @@ csi &mwild; + + 0.2.1 + 2017-02-18 + fs +

          Clarify that the CSI state is not restored when the stream is resumed.

          +
          0.2 2015-10-02 @@ -148,6 +154,14 @@ and responds to the ping with a pong --> ]]>
          + +

          After a previous stream was resumed using mechanisms like + &xep0198;, the CSI state is not restored. That is, stream + resumption does not affect the current CSI state, which always + defaults to 'active' for new and resumed streams. Clients wishing + to immediately go to the inactive state should do so after stream + resumption.

          +

          To protect the privacy of users, servers MUST NOT reveal the clients active/inactive state to other @@ -182,4 +196,7 @@ and responds to the ping with a pong --> ]]> + +

          Thanks to Florian Schmaus for his feedback.

          +
          diff --git a/xep-0353.xml b/xep-0353.xml index 69a283f2..43f2ba40 100644 --- a/xep-0353.xml +++ b/xep-0353.xml @@ -10,7 +10,7 @@ This specification provides a way for the initiator of a Jingle session to propose sending an invitation in an XMPP message stanza, thus taking advantage of message delivery semantics instead of sending IQ stanzas to all of the responder's online resources or choosing a particular online resource. &LEGALNOTICE; 0353 - Experimental + Deferred Standards Track Standards Council @@ -22,6 +22,12 @@ jingle-message &fippo; &stpeter; + + 0.3 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.2.0 2014-10-02 diff --git a/xep-0354.xml b/xep-0354.xml index 48afbce9..6e48a73c 100644 --- a/xep-0354.xml +++ b/xep-0354.xml @@ -10,7 +10,7 @@ This specification specifies customizable behavior of RFC 6121 section 8.5.2.1.1 to allow various message routing algorithms (e.g., for load balancing). &LEGALNOTICE; 0354 - Experimental + Deferred Standards Track Standards Council @@ -23,6 +23,12 @@ NOT_YET_ASSIGNED &flow; + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2014-10-15 diff --git a/xep-0355.xml b/xep-0355.xml index 4877fb75..1b681f9a 100644 --- a/xep-0355.xml +++ b/xep-0355.xml @@ -10,7 +10,7 @@ This specification provides a way for XMPP server to delegate treatments for a namespace to an other entity &LEGALNOTICE; 0355 - Experimental + Deferred Standards Track Standards Council @@ -28,6 +28,12 @@ goffi@goffi.org goffi@jabber.fr + + 0.4 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.3 diff --git a/xep-0356.xml b/xep-0356.xml index 4f7458f5..6c54ac0e 100644 --- a/xep-0356.xml +++ b/xep-0356.xml @@ -10,7 +10,7 @@ This specification provides a way for XMPP entities to have a privileged access to some other entities data &LEGALNOTICE; 0356 - Experimental + Deferred Standards Track Standards Council @@ -26,6 +26,12 @@ goffi@goffi.org goffi@jabber.fr + + 0.3 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.2 2015-03-23 diff --git a/xep-0357.xml b/xep-0357.xml index 2303f15e..5de7fc2f 100644 --- a/xep-0357.xml +++ b/xep-0357.xml @@ -23,12 +23,17 @@ push - - Lance - Stout - lancestout@gmail.com - lance@lance.im - + &ksmith; + &lance; + + 0.3 + 2017-08-24 + XEP Editor (jwi) +
            +
          • Use server JID as 'from' address for notifications (hw).
          • +
          • Added Kevin Smith as author (ls).
          • +
          +
          0.2.1 2016-02-16 @@ -189,8 +194,8 @@

          Each PubSub node is a delivery target for the Push Service, which could represent multiple devices for a single user.

          -

          In order to prevent information leaks, each node SHOULD be configured with a 'whitelist' access model so that only trusted entities are able to view or subscribe to published notifications. Furthermore, the 'publish-only' affiliation SHOULD be used to allow acceptable entities (such as the user's bare JID) to publish to the node to trigger notifications.

          -

          Care SHOULD be taken to ensure that publish requests are coming from the user's server and not from other third-party client applications using the full JID of a user. A Push Service MAY opt to only accept or further process publish requests from bare JIDs to ensure that only a user's server is able to publish, but it SHOULD instead use publish options with credentials shared only with the user's server (see Enabling Notifications).

          +

          In order to prevent information leaks, each node SHOULD be configured with a 'whitelist' access model so that only trusted entities are able to view or subscribe to published notifications. Furthermore, the 'publish-only' affiliation SHOULD be used to allow acceptable entities (such as the server JID and the user's bare JID) to publish to the node to trigger notifications.

          +

          Care SHOULD be taken to ensure that publish requests are coming from the user's server and not from other third-party client applications using the full JID of a user. A Push Service MAY opt to only accept or further process publish requests from server JIDs and bare user JIDs to ensure that only a user's server is able to publish, but it SHOULD instead use publish options with credentials shared only with the user's server (see Enabling Notifications).

          @@ -324,7 +329,7 @@

          Other elements MAY be included if relevant for the notification.

          @@ -349,7 +354,7 @@ diff --git a/xep-0358.xml b/xep-0358.xml index 2133deff..bc40bfe8 100644 --- a/xep-0358.xml +++ b/xep-0358.xml @@ -10,7 +10,7 @@ This specification defines an XMPP protocol extension that enables an XMPP entity to advertise the fact that it is willing accept a particular Jingle session request. The protocol is used mainly to inform other entities that a particular file is available for transfer via the Jingle File Transfer protocol defined in XEP-0234. &LEGALNOTICE; 0358 - Experimental + Deferred Standards Track Standards @@ -24,6 +24,12 @@ &fippo; &lance; &stpeter; + + 0.4 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.3 2016-05-24 diff --git a/xep-0359.xml b/xep-0359.xml index 827889a9..db25752c 100644 --- a/xep-0359.xml +++ b/xep-0359.xml @@ -9,7 +9,7 @@
          Unique and Stable Stanza IDs - This specification describes unique and stable IDs for stanzas. + This specification describes unique and stable IDs for messages. &LEGALNOTICE; 0359 Experimental @@ -23,6 +23,17 @@ stanza-id &flow; + + 0.5.0 + 2017-08-23 + dg + +
            +
          • Business rules clarifications
          • +
          • Define stanza-ids for messages only
          • +
          +
          +
          0.4.1 2017-05-20 @@ -94,14 +105,14 @@
          -

          This XEP introduces unique and stable IDs for stanzas, which are beneficial in various ways. For example, they can be used together with &xep0313; to uniquely identify a message within an archive. They are also useful in the context of &xep0045; conferences, as they allow to identify a message reflected by a MUC service back to the originating entity.

          +

          This XEP introduces unique and stable IDs for messages, which are beneficial in various ways. For example, they can be used together with &xep0313; to uniquely identify a message within an archive. They are also useful in the context of &xep0045; conferences, as they allow to identify a message reflected by a MUC service back to the originating entity.

          + by='room@muc.example.com'/> ]]>

          In order to create a &stanza-id; extension element, the creating XMPP entity generates and sets the value of the 'id' attribute, and puts its own XMPP address as value of the 'by' attribute. The value of the 'id' attribute must be unique and stable, i.e. it MUST NOT change later for some reason within the scope of the 'by' value. Thus the IDs defined in this extension MUST be unique and stable within the scope of the generating XMPP entity. It is RECOMMENDED that the ID generating service uses UUID and the algorithm defined in &rfc4122; to generate the IDs.

          @@ -111,7 +122,7 @@

          Typical body text @@ -121,39 +132,39 @@

          Typical body text + by='room@muc.example.com'/> ]]>
            -
          1. XMPP entities, which are routing stanzas, MUST NOT strip any elements qualified by the 'urn:xmpp:sid:0' namespace from message stanzas. They SHOULD however ensure that those elements contain only the attributes defined herein, and take appropriate countermeasures if this is not the case (e.g. removing those attributes).
          2. The values of the 'id' attribute SHOULD be unpredictable.
          3. -
          4. Stanza ID generating entities, which encounter a &stanza-id; element where 'id' is already set and where the 'by' attribute matches their own XMPP address, MUST ignore the existing value of 'id' and override it.
          5. +
          6. Stanza ID generating entities, which encounter a &stanza-id; element where the 'by' attribute matches the 'by' attribute they would otherwise set, MUST delete that element even if they are not adding their own stanza ID.
          7. +
          8. Entities, which are routing stanzas, SHOULD NOT strip any elements qualified by the 'urn:xmpp:sid:0' namespace from message stanzas unless the preceding rule applied to those elements.
          9. Stanzas MUST possess, in the direct child level of the stanza, at most one &stanza-id; extension element with the same XMPP address as value of the 'by' attribute.
          10. Every &stanza-id; extension element MUST have the 'id' attribute and the 'by' attribute set.
          11. Every &stanza-id; and &origin-id; extension element MUST always possess an 'id' attribute and MUST NOT have any child elements or text content.
          12. -
          13. The value of the 'by' attribute MUST be the XMPP address of the entity assigning the unique and stable stanza ID. Note that XMPP addresses are normalized as defined in &rfc6122;
          14. +
          15. The value of the 'by' attribute MUST be the XMPP address of the entity assigning the unique and stable stanza ID. For one-on-one messages the assigning entity is the account. In groupchats the assigning entity is the room. Note that XMPP addresses are normalized as defined in &rfc6122;.
          -

          An entity that follows the business rules, especially the rule on overriding the ID in elements where the by atttribute matches the entities own XMPP address, SHOULD announce the 'urn:xmpp:sid:0' namespace in its disco features allowing other entities to verify that those business rules are properly enforced.

          - An entity that follows the business rules, especially the rule on overriding the ID in elements where the by atttribute matches the 'by' attribute they would otherwise set, SHOULD announce the 'urn:xmpp:sid:0' namespace in its disco features allowing other entities to verify that those business rules are properly enforced.

          + ]]> @@ -167,6 +178,7 @@

          The value of the 'id' attribute should not provide any further information besides the opaque ID itself. Entities observing the value MUST NOT be able to infer any information from it, e.g. the size of the message archive. The value of 'id' MUST be considered a non-secret value.

          +

          Before processing the stanza ID of a message and using it for deduplication purposes or for MAM catchup, the receiving entity SHOULD ensure that the stanza ID could not have been faked, by verifying that the entity referenced in the by attribute does annouce the 'urn:xmpp:sid:0' namespace in its disco features.

          This document requires no interaction with &IANA;.

          diff --git a/xep-0360.xml b/xep-0360.xml index bc8f215a..aca7908f 100644 --- a/xep-0360.xml +++ b/xep-0360.xml @@ -10,7 +10,7 @@ This specification defines the term "Nonza", describing every top level stream element that is not a Stanza. &LEGALNOTICE; 0360 - Experimental + Deferred Standards Track Standards Council @@ -21,6 +21,12 @@ NOT_YET_ASSIGNED &flow; + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2015-07-14 diff --git a/xep-0361.xml b/xep-0361.xml index 406c4c82..cd4bdaca 100644 --- a/xep-0361.xml +++ b/xep-0361.xml @@ -14,7 +14,7 @@ &LEGALNOTICE; 0361 - Experimental + Deferred Informational Standards Council @@ -31,6 +31,12 @@ steve.kille@isode.com steve.kille@isode.com + + 0.3 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.2 2015-07-18 diff --git a/xep-0362.xml b/xep-0362.xml index fec30bcc..1325ec4a 100644 --- a/xep-0362.xml +++ b/xep-0362.xml @@ -10,7 +10,7 @@ This specification provides a means for transporting messages from the Raft consensus algorithm over XMPP. &LEGALNOTICE; 0362 - Experimental + Deferred Standards Track Standards Council @@ -28,6 +28,12 @@ peter@membrey.hk peter@membrey.hk + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2015-08-11 diff --git a/xep-0365.xml b/xep-0365.xml index cbc8f889..096cfb79 100644 --- a/xep-0365.xml +++ b/xep-0365.xml @@ -13,7 +13,7 @@ &LEGALNOTICE; 0365 - Experimental + Deferred Standards Track Standards Council @@ -30,6 +30,12 @@ steve.kille@isode.com steve.kille@isode.com + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2015-09-17 diff --git a/xep-0367.xml b/xep-0367.xml index 70031ace..21d8256f 100644 --- a/xep-0367.xml +++ b/xep-0367.xml @@ -14,7 +14,7 @@ &LEGALNOTICE; 0367 - Experimental + Deferred Standards Track Standards Council @@ -30,6 +30,12 @@ Petchell cpetchell@atlassian.com + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2015-12-15 diff --git a/xep-0369.xml b/xep-0369.xml index 72cf012f..6d8f6113 100644 --- a/xep-0369.xml +++ b/xep-0369.xml @@ -36,6 +36,25 @@ &ksmithisode; &skille; &stpeter; + + 0.9.3 + 2017-07-18 + sek +

          + Remove Legacy MIX Namespace; + Add mix element in message to hold MIX additional information; + Roster Update Clarifications; + Clarify when messages are delivered to clients; + Extend Roster Get to select format; + Ensure that text defining attributes and elements reference the namespace; + Change mix_nick_register to nick-register; + Separate namespace for roster information; + rename jidmap2 to jidmap-visible; + Namespace bump to mix:1; + Correct from in response of join/leave IQs; + Add capability for MIX in client's server; +

          +
          0.9.2 2017-04-03 @@ -434,7 +453,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa
        - + @@ -487,7 +506,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa -

        Each channel participant is represented as an item of the 'urn:xmpp:mix:nodes:participants' channel node. Each item is named by the bare proxy JID of the participant. For example '123456#coven@mix.shakespeare.example' might name the node item associated with participant 'hag66@shakespeare.example'. The nick associated with the user is mandatory and is stored in the item. The nick for each channel participant MUST be different to the nick of other participants. +

        Each channel participant is represented as an item of the 'urn:xmpp:mix:nodes:participants' channel node. Each item is named by the bare proxy JID of the participant. For example '123456#coven@mix.shakespeare.example' might name the node item associated with participant 'hag66@shakespeare.example'. Information is stored in a <participant/> element qualified by the 'urn:xmpp:mix:1' namespace. The nick associated with the user is mandatory and is stored in a <nick/> child element of the <participant/> element. The nick for each channel participant MUST be different to the nick of other participants.

        When a user joins a channel, the user's bare JID is added to the participants node by the MIX service. When a user leaves a channel, they are removed from the participants node. The participants node MUST NOT be directly modified using pubsub. @@ -499,7 +518,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa - + thirdwitch @@ -508,13 +527,13 @@ This approach enables flexible support of multiple clients for a MIX channel pa -

        The JID Map node is used to associate a proxy bare JID to its corresponding real bare JID. The JID Map node MUST have one entry for each entry in the Participants node. This value is added when a user joins the channel and is removed when the user leaves the channel. +

        The JID Map node is used to associate a proxy bare JID to its corresponding real bare JID. It is a PubSub node with the 'node' attribute set to 'urn:xmpp:mix:nodes:jidmap'. The JID Map node MUST have one entry for each entry in the Participants node. This value is added when a user joins the channel and is removed when the user leaves the channel. Each item is identified by proxy bare JID, mapping to the real bare JID. This node is used to give administrator access to real JIDs and participant access to real JIDs in jid-visible channels. This node MUST NOT be modified directly using pubsub. - In JID Visible channels, all participants MAY subscribe to this node. In JID Hidden and JID Maybe Visible channels, only administrators can subscribe. The JID Map node is a permanent node with one item per participant.

        + In JID Visible channels, all participants MAY subscribe to this node. In JID Hidden and JID Maybe Visible channels, only administrators can subscribe. The JID Map node is a permanent node with one item per participant. Information is stored in a <participant/> element qualified by the 'urn:xmpp:mix:1' namespace. The real JID is stored in a <jid/> child element of the <participant/> element.

        - + hecate@mix.shakespeare.example @@ -523,15 +542,14 @@ This approach enables flexible support of multiple clients for a MIX channel pa
        - -

        The JID Maybe Visible Map node is a similar node to the JID Map node that is used in addition to the JID Map Node in JID Maybe Visible channels. All participants may subscribe to and access this node. It uses the same encoding as JID Map node and all participant JIDs MUST be included. Where a participant's preference is to not share the JID, the encoded participant value is the proxy JID. This will enable a user looking up a JID to clearly determine that the user preference is to not share the JID and to clearly distinguish this case from an erroneous proxy JID. +

        The JID Maybe Visible Map node is a similar node to the JID Map node that is used in addition to the JID Map Node in JID Maybe Visible channels. It is a PubSub node with the 'node' attribute set to 'urn:xmpp:mix:nodes:jidmap-visible'. All participants may subscribe to and access this node. It uses the same encoding as JID Map node and all participant JIDs MUST be included. Where a participant's preference is to not share the JID, the encoded participant value is the proxy JID. This will enable a user looking up a JID to clearly determine that the user preference is to not share the JID and to clearly distinguish this case from an erroneous proxy JID.

        - The presence node contains the presence value for clients belonging to participants that choose to publish presence to the channel. A MIX channel MAY require that all participants publish presence. Each item in the presence node is identified by the full proxy JID, and contains the current presence value for that JID. The presence is encoded in the same way as data that would be sent in a presence stanza. The full proxy JID is always used in this node. In MIX it is possible to have a 'presence-less channel' by not using this node. Access Control MAY be set to enforce that for each of the full JIDs in this list, the bare JID MUST be in the participants list. + The presence node contains the presence value for clients belonging to participants that choose to publish presence to the channel. A MIX channel MAY require that all participants publish presence. Each item in the presence node is identified by the full proxy JID, and contains the current presence value for that JID. The presence is encoded in the same way as data that would be sent in a presence stanza using a <presence/> element qualified by the 'jabber:client' namespace. The full proxy JID is always used in this node. In MIX it is possible to have a 'presence-less channel' by not using this node. Access Control MAY be set to enforce that for each of the full JIDs in this list, the bare JID MUST be in the participants list.

        @@ -574,7 +592,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa - urn:xmpp:mix:0 + urn:xmpp:mix:1 Witches Coven @@ -627,7 +645,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa

        - + @@ -654,7 +672,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa - urn:xmpp:mix:0 + urn:xmpp:mix:1 hecate@shakespeare.lit @@ -683,7 +701,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa

        - The MIX specification is built on layered services that have defined errors. This enables the core MIX specification to reflect primarily the successful use case, as in almost all cases the error reporting of the layer service provides what is needed. A message sender MUST be prepared to handle any valid error from the layer services. When a message receiver encounters an error situation, it MUST use the most appropriate layer server error to report this issue back to the sender. For example a message receiver might use the "not authorized" IQ error in response to a MIX disco that is not authorized. Errors for the following layer services need to be handled for MIX: + The MIX specification is built on layered services that have defined errors. This enables the core MIX specification to reflect primarily the successful use case, as in almost all cases the error reporting of the layer service provides what is needed. A message sender MUST be prepared to handle any valid error from the layer services. When a message receiver encounters an error situation, it MUST use the most appropriate layer server error to report this issue back to the sender. For example a receiving entity might use the "not authorized" error in response to a disco query that is not authorized. Errors for the following layer services need to be handled for MIX:

        1. IQ. All of the IQ errors of &rfc6120; MUST be supported.
        2. @@ -726,7 +744,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa ]]> -

          The MIX service then MUST return its identity and the features it supports, which MUST include the 'urn:xmpp:mix:0' feature, and the identity MUST have a category of 'conference' and a type of 'text', as shown in the following example:

          +

          The MIX service then MUST return its identity and the features it supports, which MUST include the 'urn:xmpp:mix:1' feature, and the identity MUST have a category of 'conference' and a type of 'text', as shown in the following example:

          - - + +
          ]]>

          - A MIX service MUST return the 'urn:xmpp:mix:0' feature and MAY return the other features listed here: + A MIX service MUST return the 'urn:xmpp:mix:1' feature and MAY return the other features listed here:

            -
          • 'urn:xmpp:mix:0': This indicates support of MIX, and is returned by all MIX services.
          • -
          • 'urn:xmpp:mix:0#searchable': This is shown in the above example and indicates that a the MIX Service MAY be searched for channels. This presence of this feature can be used by a client to guide the user to search for channels in a MIX service.
          • -
          • 'urn:xmpp:mix:0#create-channel': This is described in Checking for Permission to Create a Channel in support of channel administration. When an end user client needs to create channels, perhaps for short term usage, this feature helps the client to identify an MIX service to use. It enables a configuration where permanent (searchable) channels are placed in one MIX service and clients will be able to create channels in another MIX service which is not searchable.
          • +
          • 'urn:xmpp:mix:1': This indicates support of MIX, and is returned by all MIX services.
          • +
          • 'urn:xmpp:mix:1#searchable': This is shown in the above example and indicates that a the MIX Service MAY be searched for channels. This presence of this feature can be used by a client to guide the user to search for channels in a MIX service.
          • +
          • 'urn:xmpp:mix:1#create-channel': This is described in Checking for Permission to Create a Channel in support of channel administration. When an end user client needs to create channels, perhaps for short term usage, this feature helps the client to identify an MIX service to use. It enables a configuration where permanent (searchable) channels are placed in one MIX service and clients will be able to create channels in another MIX service which is not searchable.

          A MIX service MUST NOT advertise support for &xep0313;, as MAM is supported by the channels and not by the service. A MIX service MUST NOT advertise support for generic &xep0060;, as although MIX makes use of PubSub it is not a generic PubSub service.

          @@ -796,7 +814,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa category='conference' name='A Dark Cave' type='mix'/> - + @@ -850,10 +868,10 @@ This approach enables flexible support of multiple clients for a MIX channel pa + - urn:xmpp:mix:0 + urn:xmpp:mix:1 Witches Coven @@ -893,12 +911,12 @@ This approach enables flexible support of multiple clients for a MIX channel pa - + thirdwitch - + top witch @@ -933,7 +951,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa - + ]]> @@ -943,8 +961,8 @@ This approach enables flexible support of multiple clients for a MIX channel pa -

          A user joins a channel by sending a MIX "join" command. There is no default set of nodes, so the user MUST specify the set of nodes to be subscribed to. To achieve the equivalent service to MUC, a user would subscribe to messages, and presence. - This will lead to the server subscribing the user to each of the requested nodes associated with the channel. The MIX service will also add the user to the participant list by injecting a new item into the "urn:xmpp:mix:nodes:participants" node automatically. +

          A user joins a channel by sending a MIX "join" command. There is no default set of nodes, so the user MUST specify the set of nodes to be subscribed to. To achieve the equivalent service to MUC, a user would subscribe to both messages and presence nodes. A user will typically subscribe to at least the message and/or presence nodes but MAY join and not subscribe to any nodes. The <join/> is a child element of <iq/> element. The <join/> element is qualified by the 'urn:xmpp:mix:1' namespace. The channel is specified by a 'channel' attribute in the <join/> element. The requested nodes are encoded as <subscribe/> child elements of the <join/> element. + The join leads to the server subscribing the user to each of the requested nodes associated with the channel. The MIX service will also add the user to the participant list by injecting a new item into the "urn:xmpp:mix:nodes:participants" node automatically.

          The default MIX model is that only channel participants are allowed to subscribe to nodes. A MIX channel MAY allow non-participant subscription. This will be handled by clients directly subscribing to the desired PubSub nodes.

          @@ -959,7 +977,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa from='hag66@shakespeare.example/UUID-a1j/7533' to='hag66@shakespeare.example' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'> - @@ -977,7 +995,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa from='hag66@shakespeare.example' to='coven@mix.shakespeare.example' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'> - + @@ -991,7 +1009,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa from='coven@mix.shakespeare.example' to='hag66@shakespeare.example' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'> - + @@ -1006,10 +1024,10 @@ This approach enables flexible support of multiple clients for a MIX channel pa - + @@ -1018,7 +1036,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa ]]>

          - If a user cannot be subscribed to one or more of the requested nodes (e.g., because the node does not exist), but can be subscribed to some the response simply lists the nodes successfully subscribed. If none of the nodes requested are successfully subscribed to, an error response is sent indicating the reason that the first node requested was not subscribed to. This error response will also include other nodes requested where subscription failed for the same reason.

          + If a user cannot be subscribed to one or more of the requested nodes (e.g., because the node does not exist), but can be subscribed to some the response simply lists the nodes successfully subscribed. If at least one node is requested and none of the nodes requested are successfully subscribed to, an error response is sent indicating the reason that the first node requested was not subscribed to. This error response will also include other nodes requested where subscription failed for the same reason.

          The following response example shows a successful response to the initial request example where @@ -1029,7 +1047,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa from='hag66@shakespeare.example' to='coven@mix.shakespeare.example' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'> - + @@ -1044,7 +1062,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa - + @@ -1055,14 +1073,14 @@ This approach enables flexible support of multiple clients for a MIX channel pa At the same time the participant MUST be added to the JID Map node, to map from proxy JID to real JID. For a JID Maybe Visible channel, the participant MUST be added to the JID Maybe Visible Map node. The value in this node MUST reflect the user's visibility preference for the channel and MUST be updated to reflect any changes to this preference.

          - A user MAY subsequently modify subscription to nodes in a channel by sending a subscription modification request, as shown in the following example. This modification goes directly from client to MIX channel, as this change does not impact the roster and so does not need any local action. + A user MAY subsequently modify subscription to nodes in a channel by sending a subscription modification request encoded as a <update-subscription/$gt; child element of <iq/> element. The <update-subscription/$gt; element is qualified by the 'urn:xmpp:mix:1' namespace. The requested notes are encoded as <subscribe/> child elements of the <update-subscription/$gt; element with the node name encoded as a 'node' attribute. This modification goes directly from client to MIX channel, as this change does not impact the roster and so does not need any local action. The following example shows subscription modification.

          - + @@ -1071,7 +1089,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa from='coven@mix.shakespeare.example' to='hag66@shakespeare.example/UUID-a1j/7533' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'> - + @@ -1127,12 +1145,12 @@ This approach enables flexible support of multiple clients for a MIX channel pa from='hag66@shakespeare.example' to='coven@mix.shakespeare.example' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'> - + - urn:xmpp:mix:0 + urn:xmpp:mix:1 never @@ -1147,12 +1165,12 @@ This approach enables flexible support of multiple clients for a MIX channel pa from='coven@mix.shakespeare.example' to='hag66@shakespeare.example' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'> - + - urn:xmpp:mix:0 + urn:xmpp:mix:1 never @@ -1167,23 +1185,23 @@ This approach enables flexible support of multiple clients for a MIX channel pa ]]> -

          The client MAY also query the channel in order to find out which user preferences are supported and the options available. This will allow users to set options not specified in the standard, by providing a form template in the result. This query is direct from the client to the MIX channel.

          +

          The client MAY also query the channel in order to find out which user preferences are supported and the options available. This will allow users to set options not specified in the standard, by providing a form template in the result. The request is encoded as a <user-preference/> child element of <iq/>. <user-preference/> is qualified by the 'urn:xmpp:mix:1' namespace. The result is encoded as a form child element in the <user-preference/> element.

          - + - + - urn:xmpp:mix:0 + urn:xmpp:mix:1 @@ -1210,10 +1228,10 @@ This approach enables flexible support of multiple clients for a MIX channel pa from='hag66@shakespeare.example/UUID-a1j/7533' to='coven@mix.shakespeare.example' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'> - + - urn:xmpp:mix:0 + urn:xmpp:mix:1 never @@ -1231,10 +1249,10 @@ This approach enables flexible support of multiple clients for a MIX channel pa from='coven@mix.shakespeare.example' to='hag66@shakespeare.example/UUID-a1j/7533' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'> - + - urn:xmpp:mix:0 + urn:xmpp:mix:1 never @@ -1252,7 +1270,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa
          -

          Users generally remain in a channel for an extended period of time. In particular the user remains as a participant the channel when the user goes offline. Note that this is different to &xep0045;, where the client leaves a room when going offline. So, leaving a MIX channel is a permanent action for a user across all clients. In order to leave a channel, a user sends a MIX "leave" command to the channel. When a user leaves the channel, the user's server will remove the channel from the user's roster. Leave commands are sent indirectly through the user's server, to enable roster removal. Leaving is initiated by a client request, as shown in the following example.

          +

          Users generally remain in a channel for an extended period of time. In particular the user remains as a participant the channel when the user goes offline. Note that this is different to &xep0045;, where the client leaves a room when going offline. So, leaving a MIX channel is a permanent action for a user across all clients. In order to leave a channel, a user sends a MIX "leave" command to the channel. The leave command is encoded as a <leave/> child element of <iq/> element. The <leave/> element is qualified by the 'urn:xmpp:mix:1' namespace, with the channel specified as a 'channel" attribute. When a user leaves the channel, the user's server will remove the channel from the user's roster. Leave commands are sent indirectly through the user's server, to enable roster removal. Leaving is initiated by a client request, as shown in the following example.

          - ]]> @@ -1274,7 +1292,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa from='hag66@shakespeare.example' to='coven@mix.shakespeare.example' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'> - + ]]> @@ -1286,7 +1304,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa from='coven@mix.shakespeare.example' to='hag66@shakespeare.example' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'> - + ]]> @@ -1297,10 +1315,10 @@ This approach enables flexible support of multiple clients for a MIX channel pa - + ]]>

          When the user leaves the channel, the MIX service is responsible for unsubscribing the user from all nodes in the channel and for removing the user from the participants and presence list. If the user has online presence when the user leaves the channel, the change of presence status caused by removing the user's entry or entries from the presence node will ensure that subscribers to the presence node are correctly updated on presence status. @@ -1342,21 +1360,21 @@ This approach enables flexible support of multiple clients for a MIX channel pa

        3. The MIX service generates the nick. In this case it is RECOMMENDED that the assigned nick is a UUID following &rfc4122;.

        - A user will typically set a nick when joining a channel and MAY update this nick from time to time. The user does this by sending a command to the channel to set the nick. If the user wishes the channel to assign a nick (or knows that the channel will assign a nick) the nick field can be left blank, so that the user can see what is assigned in the result. + A user will typically set a nick when joining a channel and MAY update this nick from time to time. The user does this by sending a command to the channel to set the nick. This command is a <setnick/> child element of <iq/> element. The <setnick/> element is qualified by the 'urn:xmpp:mix:1' namespace. The nick is encoded as a <nick/> child element of the <setnick/> element. If the user wishes the channel to assign a nick (or knows that the channel will assign a nick) the nick field can be left blank, so that the user can see what is assigned in the result.

        - + thirdwitch ]]>

        - The channel will return the nick that is to be used, noting that this MAY be different to the requested nick. MIX services SHOULD apply the "nickname" profile of the PRECIS OpaqueString class, as defined in &rfc7700;. + On successful nick assignment, the channel will return the nick that is to be used, noting that this MAY be different to the requested nick. MIX services SHOULD apply the "nickname" profile of the PRECIS OpaqueString class, as defined in &rfc7700;. The channel MAY return a conflict error or other appropriate error.

        - + thirdwitch @@ -1390,22 +1408,22 @@ This approach enables flexible support of multiple clients for a MIX channel pa from='mix.shakespeare.example' id='7nve413p'> - + ]]>

        - The response will be a list of features of the MIX channel. If Nick Registration is supported, then the result set will include <feature var="urn:xmpp:mix:0#mix_nick_register"/>. + The response will be a list of features of the MIX channel. If Nick Registration is supported, then the result set will include <feature var="urn:xmpp:mix:1#nick-register"/>.

        To register a nick with the MIX service the user sends - a <register/> command to the service.

        + a register command to the service. This is encoded as a <register/> child element of an <iq/> element. The <register/> element is qualified by the urn:xmpp:mix:1' namespace. The nick is encoded in a <nick/> child element of the <register/> element.

        - + thirdwitch @@ -1421,12 +1439,12 @@ This approach enables flexible support of multiple clients for a MIX channel pa to='mix.shakespeare.example' from='hag66@shakespeare.example/UUID-a1j/7533' id='7nve413p'> - + thirdwitch ]]> -

        If the requested nick is already taken, the MIX service returns a <conflict/> error:

        +

        If the requested nick is already taken and the MIX service does not assign an alternate nick, the MIX service MUST return a <conflict/> error:

        ]]> -

        If the register request does not contain a <nick/> element, then the MIX service assigns one. It is RECOMMENDED that the assigned nick is a UUID following &rfc4122;. +

        If the register request does not contain a <nick/> element, then the MIX service MUST assign one. It is RECOMMENDED that the assigned nick is a UUID following &rfc4122;.

        @@ -1459,18 +1477,27 @@ This approach enables flexible support of multiple clients for a MIX channel pa Presence status and availability is set in a MIX channel by standard presence stanzas sent to the MIX channel by the user's server. Users wishing to receive presence updates will subscribe to the MIX channel presence node. Presence updates are sent out to subscribing participants using standard presence stanzas.

        - A user setting status is now used as an example. Unlike in &xep0045; where coming online is a special action, coming online in MIX is implicit when presence status is set. Going offline is a achieved by setting presence status to unavailable, which removes the client full JID entry from the presence node. When a user sets a presence status, the user's server sends updated presence to the MIX channel, and the MIX service then publishes the user's availability to the "urn:xmpp:mix:nodes:presence" node. If there is not an item named by the full JID of the client with updated presence status, this item is created.

        - - + + + dnd + Making a Brew +]]> + +

        + The server then sends the presence information to roster entries. The following example then shows the presence message from the client's server to the MIX channel. +

        + + dnd Making a Brew ]]> -

        The user's presence information is then published by the service to the "urn:xmpp:mix:nodes:presence" node, with the 'publisher' attribute set to the user's participant identifier (the proxy JID). The MIX channel then broadcasts the presence change to all users who are subscribed to the "urn:xmpp:mix:nodes:presence" node. The presence stanza is sent from the full proxy JID of the user. - Note that presence is associated with a client and so will have a full JID as it comes directly from the client and not from the user's server.

        +

        The user's presence information is then published by the service to the "urn:xmpp:mix:nodes:presence" node, with the 'publisher' attribute set to the user's participant identifier (the proxy JID). The MIX channel then broadcasts the presence change to all users who are subscribed to the "urn:xmpp:mix:nodes:presence" node. The presence stanza is sent from the full proxy JID of the client updating status. + Note that presence is associated with a client and so will have a full JID. The following example shows a presence message as distributed by the server to a presences subscriber.

        thirdwitch dnd @@ -1531,8 +1558,8 @@ This approach enables flexible support of multiple clients for a MIX channel pa - - hecate@mix.shakespeare.example + + hecate@mix.shakespeare.example @@ -1573,8 +1600,8 @@ This approach enables flexible support of multiple clients for a MIX channel pa - - hecate@mix.shakespeare.example + + hecate@mix.shakespeare.example @@ -1644,8 +1671,15 @@ This approach enables flexible support of multiple clients for a MIX channel pa Harpier cries: 'tis time, 'tis time. ]]> +

        + The MIX channel then adds information to the message using a <mix> element qualified by the 'urn:xmpp:mix:1' namespace. This element contains two child elements: +

        +
          +
        1. A <nick> element that contains the Nick of the message sender, taken from the Participants Node.
        2. +
        3. A <jid> element containing the full proxy JID of the sender.
        4. +

        The MIX channel then puts a copy of the message into the MAM archive for the channel and sends a copy of the message to each participant in - standard groupchat format. These messages sent by the channel are addressed to the bare JID of each participant and this will be handled by the participant's local server. The message from value is the JID of the channel. To enable sender identification, the Nick and bare proxy JID of the sender are included in the message as MIX parameters. The id of the message is the ID from the MAM archive and NOT the id used by the sender. The message placed in the MAM archive is the reflected message without a 'to' element.

        + standard groupchat format. These messages sent by the channel are addressed to the bare JID of each participant and this will be handled by the participant's local server. The message 'from' attribute is the JID of the channel. The id of the message is the ID from the MAM archive and NOT the id used by the sender. The message placed in the MAM archive is the reflected message without a 'to' attribute.

        Harpier cries: 'tis time, 'tis time. - thirdwitch - 123456#coven@mix.shakespeare.example + + thirdwitch + 123456#coven@mix.shakespeare.example + ]]> @@ -1664,12 +1700,14 @@ This approach enables flexible support of multiple clients for a MIX channel pa id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD' type='groupchat'> Harpier cries: 'tis time, 'tis time. - thirdwitch - 123456#coven@mix.shakespeare.example + + thirdwitch + 123456#coven@mix.shakespeare.example + ]]>

        - The messages sent to participants have a different message id to the originally submitted message. This does not impact most recipients, but it does not allow the message originator to correlate the message with the submitted message. To address this the MIX channel MUST include an additional element of the message copy going back to the originator's bare JID that includes the original id. This enables the originator to correlate the received message with the message submitted. + The messages sent to participants have a different message id to the originally submitted message. This does not impact most recipients, but it does not allow the message originator to correlate the message with the submitted message. To address this the MIX channel MUST include an additional <submission-id> element in the <mix> element of the message copy going back to the originator's bare JID. The <submission-id> element holds the original id provided by the sender. This enables the originator to correlate the received message with the message submitted.

        Harpier cries: 'tis time, 'tis time. - thirdwitch - 123456#coven@mix.shakespeare.example - 92vax143g + + thirdwitch + 123456#coven@mix.shakespeare.example + 92vax143g + ]]>

        - A MIX channel MAY support message retraction, where the sender of a messages or an authorized administrator deletes a message. If this is done the original message MAY be replaced by a tombstone. The protocol to request retraction does this by a message with a <retract> element as shown in the following example. + A MIX channel MAY support message retraction, where the sender of a messages or an authorized administrator deletes a message. If this is done the original message MAY be replaced by a tombstone. The protocol to request retraction does this by adding to the message a <retract> element qualified by the 'urn:xmpp:mix:1' namespace. The <retract> element MUST include an <id> attribute that holds the id of the original message. A message and it's retraction shown in the following example.

        + A Message I did not mean to send + + - + ]]>

        @@ -1706,7 +1753,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa

        The second approach is to leave a tombstone, which if taken MUST be done in the following manner. This is appropriate where it is desired to leave a record of the message that was redacted. - With this approach, the original message <body> is removed and replaced with a tombstone using the <retracted> element that shows the JID of user performing the retraction and the time of the retraction. + With this approach, the original message <body> is removed and replaced with a tombstone using the <retracted> element qualified by the 'urn:xmpp:mix:1' namespace that shows the JID of user performing the retraction and the time of the retraction.

        @@ -1715,7 +1762,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa - @@ -1743,14 +1790,14 @@ This approach enables flexible support of multiple clients for a MIX channel pa
      8. The invitee MAY send a response to the inviter, indicating if the invitation was accepted or declined.
      9. - The first step is for the inviter to request an invitation from the channel. The invitation contains inviter, invitee and a token. The channel will evaluate if the inviter has rights to issue the invitation. This will be because the inviter is a channel administrator or if the inviter is a channel participant and the channel allows invitation by participants. If the inviter has rights to make the invitation, the channel will return a token. The token is a string that the channel can subsequently use to validate an invitation. The format of the token is not specified in this standard. The encoded token MAY reflect a validity time. + The first step is for the inviter to request an invitation from the channel. The invitation contains inviter, invitee and a token. The channel will evaluate if the inviter has rights to issue the invitation. This will be because the inviter is a channel administrator or if the inviter is a channel participant and the channel allows invitation by participants. If the inviter has rights to make the invitation, the channel will return a token. The token is a string that the channel can subsequently use to validate an invitation. The format of the token is not specified in this standard. The encoded token MAY reflect a validity time. The invitation request is encoded as an <invite/> child element of an <iq/> element. The <invite/> element is qualified by the 'urn:xmpp:mix:1' namespace. <invite/> contains an <invitation/> child element, which contain <inviter/>, <invitee/>, <channel/> and <token/> child elements.

        - + cat@shakespeare.lit @@ -1760,7 +1807,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa id='kl2fax27' to='hag66@shakespeare.lit/UUID-h5z/0253' type='result'> - + hag66@shakespeare.lit cat@shakespeare.lit @@ -1771,14 +1818,14 @@ This approach enables flexible support of multiple clients for a MIX channel pa ]]>

        - The inviter can now send the invitee a message containing the invitation, as shown in the following example. + The inviter can now send the invitee a message containing the invitation within the <message/> element, as shown in the following example.

        Would you like to join the coven? - + hag66@shakespeare.lit cat@shakespeare.lit coven@mix.shakespeare.lit @@ -1786,13 +1833,13 @@ This approach enables flexible support of multiple clients for a MIX channel pa ]]> -

        The invitation can now be used by the invitee to join a channel. The invitation is simply added to the standard channel join, so that the channel can validate the invitation using the token. If the allowed node is present and the invitee is not matched against any item, the channel MUST add the invitee to the allowed node as part of the join.

        +

        The invitation can now be used by the invitee to join a channel. The <invitation/> child element is simply added to the standard channel <join/> element, so that the channel can validate the invitation using the token. If the allowed node is present and the invitee is not matched against any item, the channel MUST add the invitee to the allowed node as part of the join.

        - + hag66@shakespeare.lit @@ -1803,7 +1850,9 @@ This approach enables flexible support of multiple clients for a MIX channel pa ]]> -

        The invitee MAY send an acknowledgement back to the inviter, noting the status of the invitation. Values are:

        +

        The invitee MAY send an acknowledgement back to the inviter, noting the status of the invitation. + This is encoded as an <invitation-ack/> child element of <message/> element. The <invitation-ack/> element is qualified by the 'urn:xmpp:mix:1' namespace. The <invitation-ack/> has an <invitation/> child element that encodes the invitation being acknowledged and a <value/> child element to encode the acknowledgement value. + <value/> has the following values:

        • 'Joined': The invitee has joined the channel.
        • 'Declined': The invitee is not taking up the invitation.
        • @@ -1814,7 +1863,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa id='b6p9llze' to='hag66@shakespeare.lit/UUID-h5z/0253'> No Thanks - too busy chasing mice.... - + Declined hag66@shakespeare.lit @@ -1921,14 +1970,14 @@ This approach enables flexible support of multiple clients for a MIX channel pa It is important that messages are all transferred from the MIX channel to the server associated with the each channel participant. Transfer between servers will typically happen quickly and &xep0198; will deal with short connection failures between servers. Longer connection failures could lead to message loss. This would lead to online users (who remain connected to their servers) missing messages, and to messages being missed out of the user archive. This section describes how MIX addresses this.

          - When there is a long term connection failure, the MIX channel will receive an error from the XMPP server indicating that a message failed to transfer to a recipient. When this happens, the MIX channel MUST take responsibility to ensure that the message is retransmitted and delivered. When the MIX channel detects a failure it will make use of an IQ Marker message to determine when the connection to the peer server is working again. Once the channel has received a response to the marker IQ it will retransmit the pending messages. + When there is a long term connection failure, the MIX channel will receive an error from the XMPP server indicating that a message failed to transfer to a recipient. When this happens, the MIX channel MUST take responsibility to ensure that the message is retransmitted and delivered. When the MIX channel detects a failure it will make use of an IQ Marker message to determine when the connection to the peer server is working again. Once the channel has received a response to the marker IQ it will retransmit the pending messages. The marker is encoded as a <marker/> child element of an <iq/> element. The <marker/> element is qualified by the 'urn:xmpp:mix:1' namespace.

          - + @@ -1936,7 +1985,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa id='lx09df27' to='coven@mix.shakespeare.example' type='result'> - + ]]> @@ -1972,7 +2021,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa

          - MIX does not standardize an access control model for creating and deleting MIX channels. The choice is left to the MIX implementer, and could be a very simple or complex approach. A client can determine if it has permission to create a channel on a MIX service, which MAY be used to control options presented to the user. This is achieved by a disco command on the MIX service. If the 'urn:xmpp:mix:0#create-channel' feature is returned, the user is able to create a channel. + MIX does not standardize an access control model for creating and deleting MIX channels. The choice is left to the MIX implementer, and could be a very simple or complex approach. A client can determine if it has permission to create a channel on a MIX service, which MAY be used to control options presented to the user. This is achieved by a disco command on the MIX service. If the 'urn:xmpp:mix:1#create-channel' feature is returned, the user is able to create a channel.

          - - + + ]]>

          - A client creates a channel by sending a simple request to the MIX service. A channel MAY be created with default parameters, as shown in the following example. The result MUST include the name of the channel which MUST match the channel name in the request (if present). Creating and destroying a channel is done direct from a client. + A client creates a channel by sending a simple request to the MIX service. A channel MAY be created with default parameters, as shown in the following example. The result MUST include the name of the channel which MUST match the channel name in the request (if present). The create is encoded as a <create/> child element of <iq/> element. The <create/> is qualified by the 'urn:xmpp:mix:1' namespace. The <create/> element MUST have a 'channel' attribute to specify the channel name.

          - + - + ]]>

          @@ -2024,10 +2073,10 @@ This approach enables flexible support of multiple clients for a MIX channel pa id='lx09df27' to='mix.shakespeare.example' type='set'> - + - urn:xmpp:mix:0 + urn:xmpp:mix:1 hecate@shakespeare.lit @@ -2050,7 +2099,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa id='lx09df27' to='hag66@shakespeare.example/UUID-a1j/7533' type='result'> - + ]]> @@ -2066,14 +2115,14 @@ This approach enables flexible support of multiple clients for a MIX channel pa id='lx09df27' to='mix.shakespeare.example' type='set'> - + - + ]]> @@ -2109,6 +2158,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa MIX channels are always explicitly destroyed by an owner of the channel or by a server operator. There is no concept of temporary channel, equivalent to &xep0045; temporary room which is automatically destroyed by the server when the users leave. However, channels MAY be configured with an explicit lifetime, after which the channel MUST be removed by the MIX service. Where a channel is created for ad hoc use, it MAY be desirable to keep the channel for history reference or for re-use by the same set of users. Note that the owner of the channel does not need to have presence registered in the channel in order to destroy it.

          + The destroy operation is encoded as a <destroy/> child element of an <iq/> element. The <destroy/> element is qualified by the 'urn:xmpp:mix:1' namespace. The <destroy/> element MUST have a 'channel' attribute to specify the channel to be destroyed. A client destroys a channel using a simple set operation, as shown in the following example.

          - + - urn:xmpp:mix:0 + urn:xmpp:mix:1 Information Node Modification - urn:xmpp:mix:0 + urn:xmpp:mix:1 Witches Coven @@ -2204,7 +2254,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa type='result'> - + @@ -2228,10 +2278,10 @@ This approach enables flexible support of multiple clients for a MIX channel pa to='hag66@shakespeare.example/UUID-a1j/7533' type='result'> - + - urn:xmpp:mix:0 + urn:xmpp:mix:1 Configuration Node Modification - urn:xmpp:mix:0 + urn:xmpp:mix:1 hecate@shakespeare.lit @@ -2278,7 +2328,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa type='result'> - + @@ -2391,12 +2441,16 @@ This approach enables flexible support of multiple clients for a MIX channel pa id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD' type='groupchat'> Harpier cries: 'tis time, 'tis time. - thirdwitch - 123456#coven@mix.shakespeare.example + + thirdwitch + 123456#coven@mix.shakespeare.example + ]]>

          + The server receiving the message will then deliver the messages to all online clients. Messages are delivered to all available online resources irrespective of + status and resource priority. The following example shows how the participant's server modifies the inbound message to replace the bare JID in the 'to' with a full JID for each of two active MIX clients.

          @@ -2406,8 +2460,10 @@ This approach enables flexible support of multiple clients for a MIX channel pa id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD' type='groupchat'> Harpier cries: 'tis time, 'tis time. - thirdwitch - 123456#coven@mix.shakespeare.example + + thirdwitch + 123456#coven@mix.shakespeare.example + Harpier cries: 'tis time, 'tis time. - thirdwitch - 123456#coven@mix.shakespeare.example + + thirdwitch + 123456#coven@mix.shakespeare.example + ]]> @@ -2429,6 +2487,29 @@ This approach enables flexible support of multiple clients for a MIX channel pa + +

          + Servers supporting the capabilities necessary to enable MIX clients MUST advertise this. A client wishing to use MIX MUST check for this capability in the server before using MIX. The capability is represented by the 'urn:xmpp:mix:account:0' feature. +

          + + + + + + + + + +]]> + +
          +

          Most interaction between a MIX client and a MIX channel is directly between the client and the channel. The participant's server relays the message but does not modify the messages. In particular configuration management and discovery is direct. Interaction will be direct, unless explicitly stated otherwise. @@ -2448,7 +2529,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa from='hag66@shakespeare.example/UUID-a1j/7533' to='hag66@shakespeare.example' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'> - @@ -2465,7 +2546,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa from='hag66@shakespeare.example' to='coven@mix.shakespeare.example' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'> - + @@ -2491,28 +2572,32 @@ This approach enables flexible support of multiple clients for a MIX channel pa -

          It will be useful for a MIX client to know which roster members are MIX channels, as this will facilitate convenient presentation of subscribed MIX channels to the user. A standard roster item is encoded as follows.

          +

          It is useful for a MIX client to know which roster members are MIX channels, as this will facilitate convenient presentation of subscribed MIX channels to the user. A MIX client MAY request that the server return this additional information that annotates roster elements with MIX capability. The server MUST return the additional information. The request is made by extending the standard roster get request by adding a child element <annotate/> to the <query/> element. The <annotate/> element is qualified by the ‘urn:xmpp:mix:roster:0' namespace.

          + + + + + +]]> + +

          A standard roster item is encoded as follows.

          ]]>

          - MIX channels in the roster have an attribute 'channel' set to true. + MIX channels in the roster information returned in response to a request for this additional MIX information MUST have an element <channel/> qualified by the ‘urn:xmpp:mix:roster:0' namespace included in the roster item, as shown inf the following example.

          - + + ]]> -

          - When sending roster information to a client that advertises MIX capability, the server MUST return all MIX channels and MUST use this encoding. Presence of MIX roster items MUST be set to offline (unavailable). -

          - -

          - Where a client does not advertise MIX capability, the server MAY choose to not return MIX channels as roster items. If this is done care needs to be taken, in particular around support of roster versioning &xep0237;. -

          @@ -2543,11 +2628,11 @@ This approach enables flexible support of multiple clients for a MIX channel pa category='conference' name='Shakespearean Chat Service' type='text'/> - + - urn:xmpp:mix:0#serviceinfo + urn:xmpp:mix:1#serviceinfo @@ -2566,10 +2651,10 @@ This approach enables flexible support of multiple clients for a MIX channel pa category='conference' name='Shakespearean Chat Service' type='text'/> - + - urn:xmpp:mix:0#serviceinfo + urn:xmpp:mix:1#serviceinfo ]]> -

          The result is returned in an extended disco results in a form whose type value is 'urn:xmpp:mix:0#serviceinfo'. The field with var='muc-mirror' is the value of which is the mirrored MUC domain's JID.

          +

          The result is returned in an extended disco results in a form whose type value is 'urn:xmpp:mix:1#serviceinfo'. The field with var='muc-mirror' is the value of which is the mirrored MUC domain's JID.

          Where a client supporting both MIX and MUC is given a reference to a MUC room, it is desirable that the client can determine the MIX channel and join using MIX. This is achieved by an equivalent extension to MUC service discover.

          - urn:xmpp:mix:0#serviceinfo + urn:xmpp:mix:1#serviceinfo ]]> -

          The result is returned in an extended disco results in a form whose type value is 'urn:xmpp:mix:0#serviceinfo'. The field with var='mix-mirror' is the value of which is the mirrored MIX domain's JID.

          +

          The result is returned in an extended disco results in a form whose type value is 'urn:xmpp:mix:1#serviceinfo'. The field with var='mix-mirror' is the value of which is the mirrored MIX domain's JID.

          Where a client supports MUC and MIX and has determined that for a channel that the server also supports a MUC room, the client has a choice as to which type of invite to send. This SHOULD be done by determining if the client support MIX using the mechanism specified in @@ -2668,7 +2753,7 @@ This approach enables flexible support of multiple clients for a MIX channel pa -

          Thanks to the following who have made contributions: Dave Cridland, Philipp Hancke, Waqas Hussain, Timothée Jaussoin, Evgeny Khramtsov, Georg Lukas, Tobias Markmann, Ralph Meijer, Edwin Mons, Emmanuel Gil Peyrot, Florian Schmaus, Lance Stout, Sam Whited, Jonas Wielicki, Matthew Wild and one anonymous reviewer.

          +

          Thanks to the following who have made contributions: Dave Cridland, Tarun Gupta, Philipp Hancke, Waqas Hussain, Timothée Jaussoin, Evgeny Khramtsov, Georg Lukas, Tobias Markmann, Ralph Meijer, Edwin Mons, Emmanuel Gil Peyrot, Florian Schmaus, Lance Stout, Sam Whited, Jonas Wielicki, Matthew Wild and one anonymous reviewer.

          diff --git a/xep-0370.xml b/xep-0370.xml index f61054b4..e95d55d7 100644 --- a/xep-0370.xml +++ b/xep-0370.xml @@ -10,7 +10,7 @@ This specification defines two Jingle transport methods for establishing HTTP connections for either uploading or downloading data. &LEGALNOTICE; 0370 - Experimental + Deferred Standards Track Standards Council @@ -22,6 +22,12 @@ NOT_YET_ASSIGNED &lance; + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2016-01-12 diff --git a/xep-0371.xml b/xep-0371.xml index 32cd2f17..c0ed18dc 100644 --- a/xep-0371.xml +++ b/xep-0371.xml @@ -10,7 +10,7 @@ This specification defines a Jingle transport method that results in sending media data using datagram associations via the User Datagram Protocol (UDP) or using end-to-end connections via the Transport Control Protocol (TCP). This transport method is negotiated via the Interactive Connectivity Establishment (ICE) methodology (which provides robust NAT traversal for media traffic) and also supports the ability to exchange candidates throughout the life of the session, consistent with so-called "Trickle ICE" (draft-ietf-ice-trickle). &LEGALNOTICE; 0371 - Experimental + Deferred Standards Track Standards Council @@ -27,6 +27,12 @@ jingle-ice &stpeter; + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2016-01-21 diff --git a/xep-0372.xml b/xep-0372.xml index 9339e50b..28d9746a 100644 --- a/xep-0372.xml +++ b/xep-0372.xml @@ -11,7 +11,7 @@ This document defines a method for one XMPP stanza to provide references to another entity, such as mentioning users, HTTP resources, or other XMPP resources. &LEGALNOTICE; 0372 - Experimental + Deferred Standards Track Standards Council @@ -25,6 +25,12 @@ Refs &ksmithisode; + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1 2016-03-22 diff --git a/xep-0373.xml b/xep-0373.xml index 968d0741..8fd12c25 100644 --- a/xep-0373.xml +++ b/xep-0373.xml @@ -18,7 +18,7 @@ devices. &LEGALNOTICE; 0373 - Experimental + Deferred Standards Track Standards Council @@ -46,6 +46,12 @@ look@my.amazin.horse valodim@stratum0.org + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1.3 2016-07-15 diff --git a/xep-0376.xml b/xep-0376.xml index b1c05813..212ff5e3 100644 --- a/xep-0376.xml +++ b/xep-0376.xml @@ -10,7 +10,7 @@ This specification describes a new model for handling remote pubsub services and a protocol for doing so. &LEGALNOTICE; 0376 - Experimental + Deferred Standards Track Standards Council @@ -27,6 +27,12 @@ dave.cridland@surevine.com dave.cridland@surevine.com + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1.1 2016-07-20 diff --git a/xep-0377.xml b/xep-0377.xml index ed3b6387..69c18494 100644 --- a/xep-0377.xml +++ b/xep-0377.xml @@ -13,7 +13,7 @@ &LEGALNOTICE; 0377 - Experimental + Deferred Standards Track Standards Council @@ -26,6 +26,12 @@ NOT_YET_ASSIGNED &sam; + + 0.2 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.1.0 2016-05-25 diff --git a/xep-0378.xml b/xep-0378.xml index f4dfb3aa..1dd93381 100644 --- a/xep-0378.xml +++ b/xep-0378.xml @@ -15,7 +15,7 @@ &LEGALNOTICE; 0378 - Experimental + Deferred Standards Track Standards Council @@ -27,6 +27,12 @@ OTR-DISCO &sam; + + 0.1 + 2017-09-11 + XEP Editor (jwi) + Defer due to lack of activity. + 0.0.1 2016-07-15 diff --git a/xep-0384.xml b/xep-0384.xml index 29d76c94..a06ee046 100644 --- a/xep-0384.xml +++ b/xep-0384.xml @@ -27,6 +27,15 @@ andy@strb.org andy@strb.org + + 0.2 + 2017-06-02 + dg + +

          Depend on SignalProtocol instead of Olm.

          +

          Changed to eu.siacs.conversations.axolotl Namespace which is currently used in the wild

          +
          +
          0.1 2016-12-07 @@ -63,17 +72,21 @@ external complexity.

          - This XEP defines a protocol that leverages &olm; encryption to provide + This XEP defines a protocol that leverages the SignalProtocol encryption to provide multi-end to multi-end encryption, allowing messages to be synchronized - securely across multiple clients, even if some of them are offline. Olm + securely across multiple clients, even if some of them are offline. The SignalProtocol is a cryptographic double ratched protocol based on work by Trevor Perrin - and Moxie Marlinspike first published as the Axolotl protocol. + and Moxie Marlinspike first published as the Axolotl protocol. While the + protocol itself has specifications in the public domain, the + protobuf-based wire format of the signal protocol is not fully + documented. The signal protocol currently only exists in GPLv3-licensed + implementations maintained by OpenWhisperSystems.

          The general idea behind this protocol is to maintain separate, - long-standing Olm-encrypted sessions with each device of each contact + long-standing SignalProtocol-encrypted sessions with each device of each contact (as well as with each of our other devices), which are used as secure key transport channels. In this scheme, each message is encrypted with a fresh, randomly generated encryption key. An encrypted header is added to @@ -87,14 +100,14 @@

          As the encrypted payload is common to all recipients, it only has to be - included once, reducing overhead. Furthermore, Olm's transparent handling + included once, reducing overhead. Furthermore, SignalProtocols’s transparent handling of messages that were lost or received out of order, as well as those sent while the recipient was offline, is maintained by this protocol. As a result, in combination with &xep0280; and &xep0313;, the desired property of inter-client history synchronization is achieved.

          - OMEMO currently uses version 1 Olm protocol. Instead of an Axolotl key + OMEMO currently uses version 3 SignalProtocol. Instead of a Signal key server, &xep0163; (PEP) is used to publish key data.

          @@ -111,7 +124,7 @@
          Device
          A communication end point, i.e. a specific client instance
          -
          OMEMO element
          An <encrypted> element in the urn:xmpp:omemo:0 namespace. Can be either MessageElement or a KeyTransportElement
          +
          OMEMO element
          An <encrypted> element in the eu.siacs.conversations.axolotl namespace. Can be either MessageElement or a KeyTransportElement
          MessageElement
          An OMEMO element that contains a chat message. Its <payload>, when decrypted, corresponds to a <message>'s <body>.
          KeyTransportElement
          An OMEMO element that does not have a <payload>. It contains a fresh encryption key, which can be used for purposes external to this XEP.
          Bundle
          A collection of publicly accessible data that can be used to build a session with a device, namely its public IdentityKey, a signed PreKey with corresponding signature, and a list of (single use) PreKeys.
          @@ -120,12 +133,12 @@
          - +
          IdentityKey
          Per-device public/private key pair used to authenticate communications
          PreKey
          A Diffie-Hellman public key, published in bulk and ahead of time
          -
          PreKeyOlmMessage
          An encrypted message that includes the initial key exchange. This is used to transparently build sessions with the first exchanged message.
          -
          OlmMessage
          An encrypted message
          +
          PreKeySignalMessage
          An encrypted message that includes the initial key exchange. This is used to transparently build sessions with the first exchanged message.
          +
          SignalMessage
          An encrypted message
          @@ -139,16 +152,16 @@

          -

          In order to determine whether a given contact has devices that support OMEMO, the devicelist node in PEP is consulted. Devices MUST subscribe to 'urn:xmpp:omemo:0:devicelist' via PEP, so that they are informed whenever their contacts add a new device. They MUST cache the most up-to-date version of the devicelist.

          +

          In order to determine whether a given contact has devices that support OMEMO, the devicelist node in PEP is consulted. Devices MUST subscribe to 'eu.siacs.conversations.axolotl.devicelist' via PEP, so that they are informed whenever their contacts add a new device. They MUST cache the most up-to-date version of the devicelist.

          - + - + @@ -162,9 +175,9 @@ - + - + @@ -178,9 +191,9 @@ - + - + BASE64ENCODED... @@ -216,10 +229,10 @@ to='juliet@capulet.lit' id='fetch1'> - + ]]> -

          A random preKeyPublic entry is selected, and used to build an Olm session.

          +

          A random preKeyPublic entry is selected, and used to build a SignalProtocol session.

          @@ -230,15 +243,15 @@ 128 bit) are concatenated and for each intended recipient device, i.e. both own devices as well as devices associated with the contact, the result of this concatenation is encrypted using the corresponding - long-standing Olm session. Each encrypted payload key/authentication tag + long-standing SignalProtocol session. Each encrypted payload key/authentication tag tuple is tagged with the recipient device's ID. The key element MUST be - tagged with a prekey attribute set to true if a PreKeyOlmMessage is being + tagged with a prekey attribute set to true if a PreKeySignalMessage is being used. This is all serialized into a MessageElement, which is transmitted in a <message> as follows:

          - +
          BASE64ENCODED... BASE64ENCODED... @@ -258,14 +271,14 @@ SHOULD have at least 128 bit) are concatenated and for each intended recipient device, i.e. both own devices as well as devices associated with the contact, this key is encrypted using the corresponding - long-standing Olm session. Each encrypted payload key/authentication tag + long-standing SignalProtocol session. Each encrypted payload key/authentication tag tuple is tagged with the recipient device's ID. The key element MUST be - tagged with a prekey attribute set to true if a PreKeyOlmMessage is being + tagged with a prekey attribute set to true if a PreKeySignalMessage is being used This is all serialized into a KeyTransportElement, omitting the <payload> as follows:

          +
          BASE64ENCODED... BASE64ENCODED... @@ -276,25 +289,24 @@

          This KeyTransportElement can then be sent over any applicable transport mechanism.

          -

          When an OMEMO element is received, the client MUST check whether there is a <key> element with an rid attribute matching its own device ID. If this is not the case, the element MUST be silently discarded. If such an element exists, the client checks whether the element's contents are a PreKeyOlmMessage.

          +

          When an OMEMO element is received, the client MUST check whether there is a <key> element with an rid attribute matching its own device ID. If this is not the case, the element MUST be silently discarded. If such an element exists, the client checks whether the element's contents are a PreKeySignalMessage.

          If this is the case, a new session is built from this received element. The client SHOULD then republish their bundle information, replacing the used PreKey, such that it won't be used again by a different client. If the client already has a session with the sender's device, it MUST replace this session with the newly built session. The client MUST delete the private key belonging to the PreKey after use.

          -

          If the element's contents are a OlmMessage, and the client has a session with the sender's device, it tries to decrypt the OlmMessage using this session. If the decryption fails or if the element's contents are not a OlmMessage either, the OMEMO element MUST be silently discarded.

          +

          If the element's contents are a SignalMessage, and the client has a session with the sender's device, it tries to decrypt the SignalMessage using this session. If the decryption fails or if the element's contents are not a SignalMessage either, the OMEMO element MUST be silently discarded.

          If the OMEMO element contains a <payload>, it is an OMEMO message element. The client tries to decrypt the base64 encoded contents using the key and the authentication tag extracted from the <key> element. If the decryption fails, the client MUST silently discard the OMEMO message. If it succeeds, the decrypted contents are treated as the <body> of the received message.

          If the OMEMO element does not contain a <payload>, the client has received a KeyTransportElement. The key extracted from the <key> element can then be used for other purposes (e.g. encrypted file transfer).

          Before publishing a freshly generated Device ID for the first time, a device MUST check whether that Device ID already exists, and if so, generate a new one.

          -

          Clients SHOULD NOT immediately fetch the bundle and build a session as soon as a new device is announced. Before the first message is exchanged, the contact does not know which PreKey has been used (or, in fact, that any PreKey was used at all). As they have not had a chance to remove the used PreKey from their bundle announcement, this could lead to collisions where both Alice and Bob pick the same PreKey to build a session with a specific device. As each PreKey SHOULD only be used once, the party that sends their initial PreKeyOlmMessage later loses this race condition. This means that they think they have a valid session with the contact, when in reality their messages MAY be ignored by the other end. By postponing building sessions, the chance of such issues occurring can be drastically reduced. It is RECOMMENDED to construct sessions only immediately before sending a message.

          -

          As there are no explicit error messages in this protocol, if a client does receive a PreKeyOlmMessage using an invalid PreKey, they SHOULD respond with a KeyTransportElement, sent in a <message> using a PreKeyOlmMessage. By building a new session with the original sender this way, the invalid session of the original sender will get overwritten with this newly created, valid session.

          -

          If a PreKeyOlmMessage is received as part of a &xep0313; catch-up and used to establish a new session with the sender, the client SHOULD postpone deletion of the private key corresponding to the used PreKey until after MAM catch-up is completed. If this is done, the client MUST then also send a KeyTransportMessage using a PreKeyOlmMessage before sending any payloads using this session, to trigger re-keying. (as above) This practice can mitigate the previously mentioned race condition by preventing message loss.

          +

          Clients SHOULD NOT immediately fetch the bundle and build a session as soon as a new device is announced. Before the first message is exchanged, the contact does not know which PreKey has been used (or, in fact, that any PreKey was used at all). As they have not had a chance to remove the used PreKey from their bundle announcement, this could lead to collisions where both Alice and Bob pick the same PreKey to build a session with a specific device. As each PreKey SHOULD only be used once, the party that sends their initial PreKeySignalMessage later loses this race condition. This means that they think they have a valid session with the contact, when in reality their messages MAY be ignored by the other end. By postponing building sessions, the chance of such issues occurring can be drastically reduced. It is RECOMMENDED to construct sessions only immediately before sending a message.

          +

          As there are no explicit error messages in this protocol, if a client does receive a PreKeySignalMessage using an invalid PreKey, they SHOULD respond with a KeyTransportElement, sent in a <message> using a PreKeySignalMessage. By building a new session with the original sender this way, the invalid session of the original sender will get overwritten with this newly created, valid session.

          +

          If a PreKeySignalMessage is received as part of a &xep0313; catch-up and used to establish a new session with the sender, the client SHOULD postpone deletion of the private key corresponding to the used PreKey until after MAM catch-up is completed. If this is done, the client MUST then also send a KeyTransportMessage using a PreKeySignalMessage before sending any payloads using this session, to trigger re-keying. (as above) This practice can mitigate the previously mentioned race condition by preventing message loss.

          As the asynchronous nature of OMEMO allows decryption at a later time to currently offline devices client SHOULD include a &xep0334; <store /> hint in their OMEMO messages. Otherwise, server implementations of &xep0313; will generally not retain OMEMO messages, since they do not contain a <body />

          - The Olm library's reference implementation (and presumably its ports to - various other platforms) uses a trust model that doesn't work very well with + The SignalProtocol-library uses a trust model that doesn't work very well with OMEMO. For this reason it may be desirable to have the library consider all keys trusted, effectively disabling its trust management. This makes it necessary to implement trust handling oneself. @@ -305,7 +317,7 @@

          When prompting the user for a trust decision regarding a key, the client SHOULD present the user with a fingerprint in the form of a hex string, QR code, or other unique representation, such that it can be compared by the user.

          While it is RECOMMENDED that clients postpone private key deletion until after MAM catch-up and this standards mandates that clients MUST NOT use duplicate-PreKey sessions for sending, clients MAY delete such keys immediately for security reasons. For additional information on potential security impacts of this decision, refer to Menezes, Alfred, and Berkant Ustaoglu. "On reusing ephemeral keys in Diffie-Hellman key agreement protocols." International Journal of Applied Cryptography 2, no. 2 (2010): 154-158..

          - In order to be able to handle out-of-order messages, the Olm stack has to + In order to be able to handle out-of-order messages, the SignalProtocol stack has to cache the keys belonging to "skipped" messages that have not been seen yet. It is up to the implementor to decide how long and how many of such keys to keep around. @@ -318,9 +330,8 @@

          This specification defines the following XMPP namespaces:

            -
          • urn:xmpp:omemo:0
          • +
          • eu.siacs.conversations.axolotl
          -

          The ®ISTRAR; shall include the foregoing namespace in its registry at &NAMESPACES;, as goverened by &xep0053;.

          &NSVER; @@ -330,8 +341,8 @@ + targetNamespace="eu.siacs.conversations.axolotl" + xmlns="eu.siacs.conversations.axolotl"> diff --git a/xep-0385.xml b/xep-0385.xml index a8c357c0..03d3e561 100644 --- a/xep-0385.xml +++ b/xep-0385.xml @@ -31,6 +31,12 @@ TODO: sims &tobias; + + 0.2.0 + 2017-09-21 + fs +

          Use 'urn:xmpp:hashes:2' and 'urn:xmpp:jingle:apps:file-transfer:5'.

          +
          0.1.0 2017-01-04 @@ -125,12 +131,12 @@ TODO: Look at the nice view from the summit. - + image/jpeg summit.jpg 3032449 - a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a - a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a + 2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU= + 2AfMGH8O7UNPTvUVAM9aK13mpCY= Photo from the summit. @@ -239,12 +245,12 @@ TODO: - + image/jpeg summit.jpg 3032449 - a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a - a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a + 2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU= + 2AfMGH8O7UNPTvUVAM9aK13mpCY= Photo from the summit. @@ -255,7 +261,6 @@ TODO: ]]> -

          Note: that ni URIs use a Base64URL encoding for the hash value and &xep0300; uses a hexencoding.

          This way the client can aquire the content addressable resource mentioned in the img-tag in the XHTML-IM message, and when finished show in in the rendered XHTML-IM message.

          @@ -279,7 +284,7 @@ TODO: -

          Thanks to Kim Alvefur, Emmanuel Gil Peyrot, Kevin Smith, and Nicolas Vérité for their helpful comments.

          +

          Thanks to Kim Alvefur, Emmanuel Gil Peyrot, Kevin Smith, Nicolas Vérité, and Florian Schmaus for their helpful comments.

          REQUIRED.

          diff --git a/xep-0388.xml b/xep-0388.xml index 82fd2e84..e81944ae 100644 --- a/xep-0388.xml +++ b/xep-0388.xml @@ -20,6 +20,35 @@ sasl2 &dcridland; + + 0.2.1 + 2017-08-24 + dwd + +
            +
          • That's a lot of XML errors. Sorry.
          • +
          • Clarified whose additional-data this is.
          • +
          • <next> uses <initial-response>.
          • +
          • Added a bunch of example flows.
          • +
          +
          +
          + + 0.2.0 + 2017-08-14 + dwd + +

          Updated according to implementation experience:

          +
            +
          • Updated namespace
          • +
          • Continue "mechanisms" are not; changed these to "tasks".
          • +
          • Added stream features after Success.
          • +
          • Don't need complexity of "=" encoding; removed.
          • +
          • Fixed internal links.
          • +
          • Updated examples.
          • +
          +
          +
          0.1.0 2017-03-16 @@ -60,28 +89,28 @@ -

          Servers capable of SASL2 offer a stream feature of <mechanisms/>, qualified by the "urn:xmpp:sasl:0" namespace. This in turn contains one or more <mechanism/> elements in the same namespace, and potentially other elements (for example, the <hostname/> element defined within XEP-0233).

          +

          Servers capable of SASL2 offer a stream feature of <mechanisms/>, qualified by the "urn:xmpp:sasl:1" namespace. This in turn contains one or more <mechanism/> elements in the same namespace, and potentially other elements (for example, the <hostname/> element defined within XEP-0233).

          Note that SASL2 is impossible for clients to initiate without at least one mechanism being available, and therefore MUST NOT be offered.

          The feature so advertised, and its child content, SHOULD be stable for the given stream to and from attributes and encryption state, and therefore MAY be cached by clients for later connections.

          The Service Name used by XMPP is unchanged from RFC 6120.

          -

          In all cases, both Clients and Servers encode SASL exchanges using Base 64 encoding. This SHOULD NOT include any line wrapping or other whitespace. As the form <element/> is equivalent to <element></element>, these both indicate an empty string, which is used to indicate no data (ie, the absence of the data). In order to explicitly transmit a zero-length SASL challenge or response, the sending party sends a single equals sign character ("=").

          +

          In all cases, both Clients and Servers encode SASL exchanges using Base 64 encoding. This SHOULD NOT include any line wrapping or other whitespace. As the form <element/> is equivalent to <element></element>, these both indicate an empty string. Challenges and responses with no data do not occur in SASL, and so require no special handling. To indicate the absence of an initial response, or the absence of success data, the element is simply not included.

          Clients, upon observing this stream feature, initiate the authentication by the use of the <authenticate/> top-level element, within the same namespace. The nature of this element is to inform the server about properties of the final stream state, as well as initiate authentication itself. To achieve the latter, it has a single mandatory attribute of "mechanism", with a string value of a mechanism name offered by the Server in the stream feature, and an optional child element of <initial-response/>, containing a base64-encoded SASL Initial Response.

          On subsequent connections, if a Client has previously cache the stream feature, the Client MAY choose to send it before seeing the stream features - sending it "pipelined" with the Stream Open tag for example.

          - SW1wcm92ZWQgZW5jYXNwdWxhdGlvbiBvZiBvcHRpb25hbCBTQVNMLUlSIGRhdGE= + + Tm9ib2R5IGV2ZXIgZGVjb2RlcyB0aGUgZXhhbXBsZXMu ]]>

          In order to provide support for other desired stream states beyond authentication, additional child elements are used. For example, a hypothetical XEP-0198 session resumption element might be included, and/or Resource Binding requests.

          + - U0FTTC1JUiBlbmNvZGVkIGFsb25nc2lkZSBiaW5kIHJlcXVlc3Q= + SSBzaG91bGQgbWFrZSB0aGlzIGEgY29tcGV0aXRpb24= @@ -92,13 +121,13 @@

          Server Challenges MAY then be sent. Each Challenge MUST be responded to by a Client in a Client Response. These are not extensible, and contain the corresponding base64 encoded SASL data:

          - - QmFzZSA2NCBlbmNvZGVkIFNBU0wgY2hhbGxlbmdlIGRhdGE= + + U28sIG5leHQgRk9TREVNIC0gMjAxOCwgdGhhdCBpcy4uLg== - - QmFzZSA2NCBlbmNvZGVkIFNBU0wgcmVzcG9uc2UgZGF0YQ== + + Li4uSSdsbCBidXkgYSBiZWVyIGZvciB0aGUgZmlyc3QgcGVyc29uIHdoby4uLg== ]]> @@ -110,31 +139,33 @@

          Authentication may complete in one of three ways. It may complete successfully, in which case the client is authenticated. It may also fail, in which case the client is not authenticated and the stream and session state remain entirely unchanged.

          Finally, it may have completed successfully, but further interaction is required - for example, a password change or second-factor authentication.

          -

          If the Client is now authenticated, the Server sends a <success/> element, which contains an OPTIONAL <additional-data/> element containing SASL additional data. It also contains a <authorization-identity/> element containing the negotiated identity - this is a bare JID, unless resource binding has occurred, in which case it is a full JID.

          +

          If the Client is now authenticated, the Server sends a <success/> element, which contains contains an <authorization-identity/> element containing the negotiated identity - this is a bare JID, unless resource binding has occurred, in which case it is a full JID.

          +

          It MAY contain an <additional-data> element, containing additional data from the exchange (task or SASL mechanism) that has just completed.

          - - T3B0aW9uYWwgQmFzZSA2NCBlbmNvZGVkIFNBU0wgc3VjY2VzcyBkYXRh - + + + ip/AeIOfZXKBV+fW2smE0GUB3I//nnrrLCYkt0Vj + juliet@montague.example/Balcony/a987dsh9a87sdh ]]>

          Other extension elements MAY also be contained by the <success/> element.

          + - T3B0aW9uYWwgQmFzZSA2NCBlbmNvZGVkIFNBU0wgc3VjY2VzcyBkYXRh + SGFkIHlvdSBnb2luZywgdGhlcmUsIGRpZG4ndCBJPw== juliet@montague.example/Balcony/a987dsh9a87sdh ]]> -

          Any security layer negotiated SHALL take effect after the ">" octet of the closing tag (ie, immediately after "</success>").

          +

          Any security layer negotiated SHALL take effect after the ">" octet of the closing tag (ie, immediately after "</success>"), if it has not already taken effect at a <continue> - see Continue below.

          +

          The <success> element is immediately followed by a <features> element containing the applicable stream features of the newly authenticated stream. Note that no stream restart occurs.

          A <failure/> element is used by the server to terminate the authentication attempt. It MAY contain application-specific error codes, and MAY contain a textual error. It MUST contain one of the SASL error codes from RFC 6120 Section 6.5.

          + This is a terrible example. @@ -143,25 +174,30 @@

          A <continue/> element is used to indicate that while the SASL exchange was successful, it is insufficient to allow authentication at this time.

          -

          This can be used to indicate that the Client needs to perform a Second Factor Authentication ("2FA"), or is required to change password. These are conducted as additional SASL mechanisms. Such SASL mechanisms MUST NOT change the authorization identifier, or introduce any security layer. The authorization identifer transmitted during the subsequent <success/>, and any security layer which comes into effect after the eventual <success/>, therefore MUST be that of the first mechanism.

          -

          The element contains a <mechanisms/> element, as defined above as a stream feature, containing suitable mechanisms. It MAY contain an <additional-data/> element, as the <success/> element does.

          +

          This can be used to indicate that the Client needs to perform a Second Factor Authentication ("2FA"), or is required to change password.

          +

          Such tasks are presented within a <tasks> element, which contains a sequence of <task> elements, each containing a name. These tasks are analogous to a SASL mechanism, but have a number of differences - they may never attempt to negotiate a new authorization identifier, nor a new security layer.

          +

          A client MAY choose any one of the offered tasks; if multiple are required a sequence of <continue> exchanges will occur until all mandatory tasks are complete.

          +

          The <continue element therefore always contains a <tasks/> element, as defined above. It MAY contain an <additional-data/> element, as the <success/> element does.

          Finally, it MAY contain a <text/> element, which can contain human-readable data explaining the nature of the step required.

          + - T3B0aW9uYWwgQmFzZSA2NCBlbmNvZGVkIFNBU0wgc3VjY2VzcyBkYXRh + SSdtIGJvcmVkIG5vdy4= - - HOTP-EXAMPLE - TOTP-EXAMPLE - + + HOTP-EXAMPLE + TOTP-EXAMPLE + This account requires 2FA ]]> -

          Clients respond with a <next-authenticate/> element, which has a single mandatory attribute of "mechanism", containing the selected mechanism name, and contains an OPTIONAL base64 encoded initial response.

          +

          After the final octet of the first <continue> element, any SASL security layer negotiated in the preceding exchange SHALL be immediately in effect.

          +

          Clients respond with a <next/> element, which has a single mandatory attribute of "task", containing the selected task name, and contains an OPTIONAL base64 encoded initial response contained in an <initial-response> element.

          - MkZBIG9yIHBhc3N3b3JkIGNoYW5nZSBvciBzb21ldGhpbmc= + + + SSd2ZSBydW4gb3V0IG9mIGlkZWFzIGhlcmUu + ]]>
          @@ -169,46 +205,260 @@
          -

          This provides pointers and/or clarifications to the in the order and manner defined in RFC 4422, section 4.

          +

          This provides pointers and/or clarifications to the Overview in the order and manner defined in RFC 4422, section 4.

          The service name SHALL be "xmpp", as defined by RFC 6120.

          -

          Servers list mechanisms during stream features (See ) and within the <continue/> element (See ).

          -

          TODO: Neither this specification nor RFC 6120 allow clients access to the mechanism list after SASL negotiation...?

          +

          Servers list mechanisms during stream features (See Discovering Support).

          -

          Clients initiate using the <authenticate/> top level element (See , and after any <continue/> with the <next-authenticate/> message (See ).

          +

          Clients initiate using the <authenticate/> top level element (See Initiation.

          -

          See .

          +

          See Challenges and Responses.

          -

          See .

          +

          See Completing Authentication.

          If a Client specifies an authorization string which is non-empty, the identifier is normalized by treating it as a JID, and performing normalization as described in RFC 7622.

          +

          In general, implementors are advised that a non-empty authorization string MAY be considered an error if the stream's from attribute (if present) does not match.

          -

          Clients MAY abort unilaterally by sending <abort/> as specified in .

          -

          Servers MAY abort unliterally by sending <failure/> with the <aborted/> error code as defined in .

          +

          Clients MAY abort unilaterally by sending <abort/> as specified in Client Aborts.

          +

          Servers MAY abort unliterally by sending <failure/> with the <aborted/> error code as defined in Failure.

          -

          See .

          +

          Security Layers take effect after the SASL mechanism itself (ie, the first negotiation) has completed successfully, after the final octet of the server's <success> or <continue>. See Success and Continue.

          Option (a) is used - any SASL Security Layer is applied first to data being sent, and TLS applied last.

          -

          Although the <continue/> concept does use multiple SASL sequences, only the first SASL mechanism used is considered an authentication, and only the first can negotiate a security layer.

          +

          Although the <continue/> concept does use tasks analogous to multiple SASL sequences, only the first SASL mechanism used is considered an authentication, and only the first can negotiate a security layer.

          In particular, once <success/> has been sent by the server, any further <authenticate/> element MUST result in a stream error.

          + +

          This section provides a fictional example. It is important to note that many of the extensions used wihtin this section do not, in fact, exist and therefore are to be avoided.

          + +

          Where no additional features that SASL2 makes available are used, the flow of information is identical to the original SASL profile. This example shows the new syntax and draws the reader's attention to the differences.

          + + + + PLAIN + SCRAM-SHA-1 + + + + + + AGFsaWNlQGV4YW1wbGUub3JnCjM0NQ== + + + + + alice@example.org + + + + + + + + + +]]> +

          Use of SASL2 in this simple scenario saves one round-trip (due to the lack of stream restart).

          +
          + +

          Again, this is an equivalent flow to a common SASL1 flow, although using the CRAM-MD5 mechanism which is (thankfully) rarely used in practise.

          + + + + PLAIN + CRAM-MD5 + + + + + + + + + PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+ + + + + + tim@example.org + + + + + + + + + +]]> +

          Use of SASL2 in this simple scenario again simply saves one round-trip.

          +
          + +

          This moves into the deeply hypothetical. A binding extension is posited, alongside an unrealistic 2FA mechanism which somehow mutually authenticates because why not.

          + + + + BLURDYBLOOP + + + + + + + + SW5pdGlhbCBSZXNwb25zZQ== + + + this-one-please + + + + + + PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+ + + + + + + QWRkaXRpb25hbCBEYXRh + + + UNREALISTIC-2FA + + + + + + + VW5yZWFsaXN0aWMgMkZBIElS + + + + + + + PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+ + + + + + + + VW5yZWFsaXN0aWMgMkZBIG11dHVhbCBhdXRoIGRhdGE= + + + alice@example.org/this-one-please + + + + +]]> +

          Although the unrealistic 2FA here uses 2 round-trips (real ones will probably use one), the embedding of resource binding as shown here means that a second RTT is saved by SASL2, and there's no net change. A more realistic example would see RTTs saved, and additional negotiations could be added to further reduce RTTs.

          +
          +
          +

          Relative to the SASL profile documented in RFC 6120, this introduces more data unprotected by any security layer negotiated by SASL itself.

          +

          While no actual exchanges are introduced that are unprotected, the nature of this exchange might allow for (for example) a resource binding extension to be introduced.

          +

          SASL security layers are sparingly used in the field, however, so this is thought to be a theoretical, rather than practical, concern.

          @@ -219,8 +469,95 @@

          None.

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + -

          The author wishes to share any credit with many members of the community, including Lance Stout, Ralph Meijer, and Florian Schmaus.

          +

          The author wishes to share any credit with many members of the community, including Lance Stout, Ralph Meijer, Phil Roberts and Florian Schmaus.

          diff --git a/xep-0390.xml b/xep-0390.xml index 0ed820e4..c93d1f2c 100644 --- a/xep-0390.xml +++ b/xep-0390.xml @@ -20,6 +20,8 @@ Processing Entities"> Generating Entity"> Generating Entities"> + Query Interception"> + Gratuitous Capabilities"> org.jabber.security Mailing List Archive: '[Security] Trivial preimage attack against the entity capabilities protocol)' from 2009-07-22, <https://mail.jabber.org/pipermail/security/2009-July/000812.html>."> capsdb https://github.com/xnyhps/capsdb/"> ]> @@ -51,6 +53,18 @@ jonas@wielicki.name jonas@wielicki.name + + 0.2 + 2017-06-14 + jwi + +
            +
          • Clearly specify handling of xml:lang attributes.
          • +
          • Add Query Interception.
          • +
          • Add Gratuitous Caps.
          • +
          +
          +
          0.1 2017-03-23 @@ -85,11 +99,12 @@
        • The bandwidth consumption should be as minimal as possible, while reusing existing specifications.
        • It must be possible to write &xep0045; and &xep0369; implementations which can forward this protocol with negligible extra work.
        • Entities must be able to update their published information arbitrarily often in a single presence session.
        • -
        • Server infrastructure beyond XMPP Core and XMPP IM must not be required for this to work.
        • +
        • Server infrastructure beyond XMPP Core and XMPP IM must not be required for this to work (but may be beneficial).
        • Entities must be able to be confident that the information obtained from the broadcast is equivalent to the information which would be obtained from querying the generating entity directly at the time the broadcast was generated.
        • The protocol must be able to coexist (but not necessarily exchange information) with &xep0115;.
        • No special XML features beyond what is needed to implement XMPP Core itself should be required.
        • Obsoletion of hash functions should not need a new version of the specification.
        • +
        • Support for pushing Entity Capabilities to the clients server without sending presence.
        • @@ -101,6 +116,8 @@
          Capability Hash Set
          A set of &hashes; which cover the same XEP-0030 response, possibly in the form of a <c/> element with &xep0300; <hash/> children.
          Generating Entity
          An entity which emits a &hashset; to other entities.
          Processing Entity
          An entity which receives and processes a &hashset; from a &genent;.
          +
          Query Interception
          Server-side processing of disco#info queries directed to a resource based on the &hashsets; published by that resource.
          +
          Gratuitous Capabilities
          The sending of a &hashset; to a server before initial presence has been sent and without being asked by the server.
          @@ -109,7 +126,11 @@

          The input to this algorithm is a &xep0030; disco#info <query/> response. The output is an octet string which can be used as input to a hash function or an error.

          -

          General remarks: The algorithm strongly distinguishes between character data (sequences of Unicode code points) and octet strings (sequences of 8-bit bytes). Whenever character data is encoded to octet strings in the following algorithm, the UTF-8 encoding as specified in &rfc3629; is used. Whenever octet strings are sorted in the following algorithm, the i;octet collation as specified in &rfc4790; is used.

          +

          General remarks:

          +
            +
          • The algorithm strongly distinguishes between character data (sequences of Unicode code points) and octet strings (sequences of 8-bit bytes). Whenever character data is encoded to octet strings in the following algorithm, the UTF-8 as specified in &rfc3629; encoding is used. Whenever octet strings are sorted in the following algorithm, the i;octet collation as specified in &rfc4790; is used.

          • +
          • The algorithm uses the xml:lang attribute. Implementations must take implicit values for the xml:lang attribute into account, for example those inherited from the disco#info or the IQ element.

          • +
          1. If the <query/> element contains any elements except <identity/>, <feature/> (both from the &xep0030; disco#info namespace) or &xep0128; data forms, abort with an error.
          2. If any &xep0128; <x/> element contains a data form which contains a <reported/> or <item/> element, abort with an error.
          3. @@ -714,6 +735,44 @@ cDp0aW1lHxw=
            ]]> + +

            A server MAY support pushing of &hashes; from clients before sending initial presence. This allows servers to discover capabilities of clients before those have sent initial presence, which may be useful or important for some protocols (such as &xep0369;). This feature is called &gratcaps;.

            +

            To advertise support, the server publishes the urn:xmpp:caps:gratuitous feature:

            + + + ... + + + ... + + +]]> +

            After determining server support, a client can send &hashes; via &gratcaps; before sending initial presence:

            + + + u79ZroNJbdSWhdSp311mddz44oHHPsEBntQ5b1jqBSY= + XpUJzLAc93258sMECZ3FJpebkzuyNXDzRNwQog8eycg= + + + + + +]]> +

            The server replies with an empty result on success.

            +

            The server MUST NOT broadcast the &hashes; submitted via &gratcaps; using presence.

            +

            Clients SHOULD NOT send &gratcaps; after they have sent initial presence; instead, they SHOULD re-send presence to update the &hashes;. Otherwise, entities subscribed to the presence will not receive the updated &hashes;.

            +
            @@ -721,7 +780,8 @@ cDp0aW1lHxw=
            • Entities MUST respond to disco#info queries for all &hashnodes; of at least the most recent 3 &hashsets; emitted.
            • Entities MUST broadcast the &hashset; of the current disco#info it publishes in every non-directed "available" <presence/> they send and SHOULD do so for directed "available" <presence/>.
            • -
            • Entities MUST re-broadcast the &hashset; after their disco#info response changes, but MAY limit the rate at which presences are emitted solely for the purpose of sending new &hashsets;.
            • +
            • After initial presence has been sent, entities MUST re-broadcast the &hashset; after their disco#info response changes, but MAY limit the rate at which presences are emitted solely for the purpose of sending new &hashsets;.
            • +
            • Before initial presence has been sent and if the server supports &gratcaps;, entities SHOULD send &gratcaps; after their disco#info response changes, but MAY limit the rate at which &gratcaps; are sent. (For example, a client may load and enable additional functionality (thus changing its features) based on server support and only send &gratcaps; once all functionality has been set up, not after each individual feature.)
            • Entities MAY assume that another entity supports ∩︀ after receiving a &hashset; from that entity.
            • Entities MAY also send &xep0115; capabilities to support legacy entities.
            @@ -739,6 +799,7 @@ cDp0aW1lHxw=

            Instead of issuing a &xep0030; disco#info <query/> with absent 'node' attribute to a target entity, an entity MAY use a &hashcache; to obtain the response. To look up the disco#info response in the &hashcache;, an entity MUST use a hash from the &hashset; which was most recently received from the entity to which the <query/> would have been sent otherwise. If none of the most recently received &hashes; are found in the &hashcache;, the entity MUST fall back to sending the request.

            An entity MUST NOT use &hashes; which were not included in the most recent &hashset; received from the target entity.

            An entity MAY use external data sources to fill the &hashcache;.

            +

            An entity MUST ensure that implicit values for xml:lang attributes is preserved when disco#info data is cached. This can for example happen by making the implicit values explicit in the storage.

            @@ -751,6 +812,17 @@ cDp0aW1lHxw=
          4. Servers MAY answer disco#info requests for &hashnodes; on behalf of their and others clients if the disco#info response belonging to that &hash; is known to them.
        + + +

        Servers MAY implement &queryintercept; to further optimise bandwidth consumption. The idea is that servers intercept &xep0030; disco#info queries sent to clients if they already know the answer from &hashes; published by the client. The rules for &queryintercept; are the following (to be applied in this order):

        +
          +
        • Servers MUST NOT intercept disco#info queries except those with empty node or a node which refers to a &hashnode; known to the server.
        • +
        • Servers MUST NOT intercept disco#info queries on behalf of the resource unless the query would be forwarded to the resource otherwise.
        • +
        • Servers MUST NOT intercept disco#info queries to resources which do not support ∩︀ (clients not implementing ∩︀ may legitimately use disco#info nodes matching the format of &hashnodes; for different purposes).
        • +
        • Servers SHOULD intercept disco#info queries with empty node and answer them with the disco#info of the most recent &hashset; published by the client.
        • +
        • Servers SHOULD intercept disco#info queries a valid &hashnode; node, if the server knows the disco#info for the &hashnode;. Otherwise, the query MUST be forwarded to the addressed resource. Note that it is valid for a sevrer to reply for &hashnodes; which have not been published by the resource.
        • +
        +
        @@ -773,11 +845,26 @@ cDp0aW1lHxw=

        This was an issue with &xep0115; and has been addressed with a new algorithm for generating the hash function input which keeps the structural information of the disco#info input.

        An entity MUST NOT ever use disco#info which has not been verified to belong to a &hash; obtained from a cache using that &hash;. Using cache contents from a trusted source (at the discretion of the entity) counts as verifying.

        A malicious entity could send a large amount of &hashsets; in short intervals, while making sure that it provides matching disco#info responses. If a &procent; uses caching, this can overflow or thrash the caches. &procents; should be aware of this risk and apply proper rate-limiting for processing &hashsets;. To reduce the attack surface, an entity MAY choose to not cache &hashes; obtained from entities not in its roster.

        +

        As mentioned earlier, when storing disco#info data in a cache for later retrieval, implementations MUST ensure that implicit values for xml:lang attributes are reconstructed correctly when the disco#info is restored.

        Entities MAY choose to not send &hashsets; with directed presence (for example to increase privacy). In that case, entities SHOULD also refuse direct &xep0030; queries.

        + + +

        The server replies to certain disco#info queries on behalf of the client. This means that the client has no choice on to whom they reply. Otherwise, a client could choose to reply with <service-unavailable/> to mask its existence. We consider two effects of this:

        +
          +
        • +

          A remote entity could attempt to detect that an entity exists behind a resource. For this, they send a disco#info query to the resource since nearly everyone implements disco#info. As the client responds with <service-unavailable/>, it looks as if no client was present at this resource.

          +

          With &queryintercept;, the server would reply on behalf of the client. However, the consensus in the community is that by measuring the difference between the reply from the server of the resource and the reply from the actual resource, it would generally be possible to detect the existence of a resource.

          +
        • +
        • +

          A remote entity can obtain the disco#info information of any resource which supports ∩︀ and of which the entity knows the resource.

          +

          This cannot be mitigated with &queryintercept;. The risk is deemed acceptable considering that resources should generally be chosen randomly.

          +
        • +
        +
        @@ -871,7 +958,7 @@ cDp0aW1lHxw=

        Thanks to the authors of &xep0115; for coming up with the original idea of using presence broadcast to convey service discovery information, as well as the optimization strategies.

        The note below the example in Advertisement of Support and Capabilities by Servers has been copied verbatimly from XEP-0115.

        Thanks to Waqas Hussain for originally (to my knowledge) pointing out the security flaws in XEP-0115 (see &mlwaqas1;).

        -

        Thanks to Georg Lukas, Link Mauve, Sebastian Riese, Florian Schmaus and Sam Whithed for their input, editorial and otherwise.

        +

        Thanks to Dave Cridland, Georg Lukas, Link Mauve, Sebastian Riese, Florian Schmaus and Sam Whited for their input, editorial and otherwise.

        diff --git a/xep-0391.xml b/xep-0391.xml new file mode 100644 index 00000000..a9bdb71a --- /dev/null +++ b/xep-0391.xml @@ -0,0 +1,308 @@ + + + +%ents; +]> + + +
        + Jingle Encrypted Transports + This specification defines a method that allows to use established encryption schemes for end-to-end encryption of Jingle transports. + &LEGALNOTICE; + 0391 + Experimental + Standards Track + Standards + Council + + XEP-0234 + + + + jet + + jingle + http://xmpp.org/schemas/jingle.xsd + + + jingle:errors + http://xmpp.org/schemas/jingle-errors.xsd + + + jingle + + Paul + Schaub + vanitasvitae@riseup.net + vanitasvitae@jabberhead.tk + + + 0.1 + 2017-09-27 + XEP Editor: jwi +

        Accepted as Experimental by Council.

        +
        + + 0.0.1 + 2017-06-12 + vv +

        First draft

        +
        +
        + +

        Jingle Encrypted Transports (JET) strives to provide a modular and easily extensible way to wrap Jingle Transports in an additional end-to-end encryption layer. The focus of this specification lays on being modular. It should be possible to extend existing Jingle use scenarios with end-to-end encryption by simply adding a JET element to the negotiation.

        +
        + +

        JET uses multiple encryption layers, so it is necessary to declare a distinct denomination for the different keys involved.

        +
        Messages'urn:xmpp:mix:nodes:messages'For distributing messages to the channel. Each item of this node will contain a message sent to the channel.MessageMessage
        Participants'urn:xmpp:mix:nodes:participants'For storing the list of participants and the associated nick. Channel participants are added when they join the channel and removed when they leave Join/Leave/Set NickPubSub
        JID Map'urn:xmpp:mix:nodes:jidmap'For storing a list of bare proxy JIDs from the participants node with a 1:1 mapping to the corresponding real JIDs.AutomaticPubSub
        JID Maybe Visible Map'urn:xmpp:mix:nodes:jidmap2'For storing a list of bare proxy JIDs from the participants node with a 1:1 mapping to the corresponding real JIDs for participants that choose to share real JIDs in a channel with JID Maybe Visible mode.AutomaticPubSub
        JID Maybe Visible Map'urn:xmpp:mix:nodes:jidmap-visible'For storing a list of bare proxy JIDs from the participants node with a 1:1 mapping to the corresponding real JIDs for participants that choose to share real JIDs in a channel with JID Maybe Visible mode.AutomaticPubSub
        Presence'urn:xmpp:mix:nodes:presence'For storing information about the availability status of online participants, which MAY include multiple clients for a single participant.PresencePresence
        Information'urn:xmpp:mix:nodes:info'For storing general channel information, such as description. PubSubPubSub
        Allowed'urn:xmpp:mix:nodes:allowed'For storing JIDs that are allowed to be channel participants.PubSubPubSub
        'Owner'Bare JIDs with Owner rights as defined in ACL node. When a channel is created, the JID creating the channel is configured as an owner, unless this attribute is explicitly configured to another value.jid-multi--
        'Administrator'Bare JIDs with Administrator rights.jid-multi--
        'End of Life'The date and time at which the channel will be automatically removed by the server. If this is not set, the channel is permanent.text-single--
        'Nodes Present'Specifies which nodes are present. Presence of config nodes is implicit. Jidmap node MUST be present if participants node is present. 'avatar' means that both Avatar Data and Avatar Metadata nodes are present.list-multi'participants'; 'presence'; 'information'; 'allowed'; 'banned'; 'jidmap2'; 'avatar'-
        'Nodes Present'Specifies which nodes are present. Presence of config nodes is implicit. Jidmap node MUST be present if participants node is present. 'avatar' means that both Avatar Data and Avatar Metadata nodes are present.list-multi'participants'; 'presence'; 'information'; 'allowed'; 'banned'; 'jidmap-visible'; 'avatar'-
        'Messages Node Subscription'Controls who can subscribe to messages node.list-single'participants'; 'allowed'; 'anyone''participants'
        'Presence Node Subscription'Controls who can subscribe to presence node.list-single'participants'; 'allowed'; 'anyone''participants'
        'Participants Node Subscription'Controls who can subscribe to participants node.list-single'participants'; 'allowed'; 'anyone'; 'nobody'; 'admins'; 'owners''participants'
        + + + + + + + + + + + + + + + + + + + + + + + + + +
        DesignationAbbrevationUsage
        Transport KeyTK(Symmetric) key that is used to encrypt/decrypt the bytestreams sent/received through Jingle transports. This key encrypts the data two entities want to exchange. Examples for TK can be found under "Ciphers".
        Initialization VectorIVInitialization vector that is used together with TK.
        Transport SecretTSSerialization of TK and TI.
        Envelope ElementEEOutput element of an established end-to-end encryption method when encrypting TS.
        +
        + +

        Lets assume Romeo wants to initiate an encrypted Jingle session with Juliet. Prior to the Jingle session initiation, an already existing, established and (ideally) authenticated end-to-end encryption session between Romeo and Juliet MUST exist. This session is needed to transfer the Transport Secret from Romeo to Juliet.

        +

        When this precondition is met, Romeo initially generates a transport key (TK) and associated initialization vector (IV). These will later be used by the sender to encrypt, and respectively by the recipient to decrypt data that is exchanged. This protocol defines a set of usable ciphers from which Romeo might choose. TK and IV are serialized to create the transport secret (TS).

        +

        Next Romeo uses her established encryption session with Juliet to encrypt TS. The resulting envelope element (EE) will be part of the Jingle session initiation as child of the JET &secret; element.

        +

        When Juliet receives Romeos session request, she decrypts EE to retrieve TS, from which she can deserialize TK and IV. Now she and Romeo can go on with the session negotiation. Once the session is established, data can be encrypted and exchanged. Both parties MUST keep a copy of TS in cache until the Jingle session is ended.

        +
        + +

        &xep0234; has the disadvantage, that transmitted files are not encrypted (aside from regular TLS transport encryption), which means that intermediate nodes like XMPP/proxy server(s) have access to the transferred data. Considering that end-to-end encryption becomes more and more important to protect free speech and personal expression, this is a major flaw that needs to be addressed.

        +

        In order to initiate an encrypted file transfer, the initiator includes a JET &secret; in the Jingle file transfer request.

        + + +

        In this scenario Romeo wants to send an encrypted text file over to Juliet. First, he generates a fresh AES-256 transport key and IV. TK and IV are serialized into TS which is then encrypted using Romeos end-to-end-encryption session with Juliet.

        +

        The resulting envelope element (EE) is sent as part of the security element along with the rest of the jingle stanza over to Juliet.

        + + + + + + 1969-07-21T02:56:15Z + This is a test. If this were a real file... + text/plain + test.txt + + 6144 + w0mcJylzCn+AfvuGdqkty2+KP48= + + + + + + + + BASE64-ENCODED-ENCRYPTED-SECRET + + + + +]]> + +

        Juliet decrypts the envelope element (EE) using her session with Romeo to retrieve TS from which she deserializes TK and IV. Both Juliet and Romeo then carry on with the session negotiation as described in &xep0234;. Before Romeo starts transmitting the file, he encrypts it using TK and IV. He then transmitts the encrypted file over to Juliet.

        +

        When Juliet received the file, she uses the TK and IV to decrypt the received file.

        +
        + + +

        Juliet might want to request a file transfer from Romeo. This can be the case, when Romeo hosts the file. In order to do so, she sends generates TK and IV, creates TS from those and encrypts TS with an encryption method of her choice to get EE. TK and IV will be used by Romeo to encrypt the requested file before sending it to Juliet.

        + + + + + + w0mcJylzCn+AfvuGdqkty2+KP48= + + + + + + + + BASE64-ENCODED-ENCRYPTED-SECRET + + + + +]]> +
        + + +

        &xep0234; defines a way for parties to request ranged transfers. This can be used to resume interrupted transfers etc. In case of an interrupted transfer, the receiving party might be able to decrypt parts of the received file. When requesting a resumption of the transfer, the recipient therefore can use the index of the last successfully decrypted byte of the file as offset in the ranged transfer. Since a resumed transfer takes place in a new session, the old transport secret might no longer be available to either party. For that reason the receiver creates a new TS for the session-initiation. The sending party then encrypts and sends only the requested parts of the file.

        + + + + + + + w0mcJylzCn+AfvuGdqkty2+KP48= + + + + + + + + + BASE64-ENCODED-ENCRYPTED-SECRET + + + + +]]> +
        + +
        + + +

        In order to encrypt the transported bytestream, the initiator must transmit a cipher key to the responder. There are multiple options available:

        + + + + + + + + + + + + + + + + + + + + + + +
        NamespaceTypeLength (bits)ParametersSerialization
        urn:xmpp:ciphers:aes-128-gcm-nopadding:0AES128GCM/NoPadding128BitKey::96BitIV
        urn:xmpp:ciphers:aes-256-gcm-nopadding:0AES256GCM/NoPadding256BitKey::96BitIV
        +

        The column 'serialization' describes, how the key and iv are serialized. "::" means plain concatenation of byte arrays.

        +
        + + +

        To advertise its support for the Jingle Encrypted Transports, when replying to service discovery information ("disco#info") requests an entity MUST return URNs for any version, or extension of this protocol that the entity supports -- e.g., "urn:xmpp:jingle:jet:0" for this version, or "urn:xmpp:jingle:jet-stub:0" for a stub encryption method &VNOTE;.

        + + +]]> + + + + + +]]> +

        In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined in &xep0115;. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.

        +
        + + +

        The initiator SHOULD NOT use the generated key TK as IV, but instead generate a seperate random IV.

        +

        Instead of falling back to unencrypted transfer in case something goes wrong, implementations MUST instead abort the Jingle session, informing the user.

        +

        IMPORTANT: This approach does not deal with metadata. In case of &xep0234;, an attacker with access to the sent stanzas can for example still see the name of the file and other information included in the <file/> element.

        +

        The responder MUST check, whether the envelope element belongs to the initiator to prevent MitM attacks

        +
        + + +

        This is only a rough draft and there is still a ton of questions left to be answered. Here is a small non-exhaustive list of things I can think of:

        +
          +
        • How exactly are interrupted transfers resumed? How (long) are keys/IVs cached?
        • +
        • May it be desirable to split data into chunks?
        • +
        • Please add to this list :)
        • +
        +
        + +
          +
        • Split up the protocol into encryption method specific sub protocols (jet-omemo, jet-ox...)
        • +
        +
        + diff --git a/xep-0392.xml b/xep-0392.xml new file mode 100644 index 00000000..6774dc3a --- /dev/null +++ b/xep-0392.xml @@ -0,0 +1,316 @@ + + +%ents; + Red/Green-Blindness"> + Blue-Blindness"> + + +]> + + +
        + Consistent Color Generation + This specification provides a set of algorithms to consistently generate colors given a string. The string can be a nickname, a JID or any other piece of information. All entities adhering to this specification generate the same color for the same string, which provides a consistent user experience across platforms. + &LEGALNOTICE; + 0392 + Experimental + Standards Track + Standards + Council + + + + colors + + Jonas + Wielicki + jonas@wielicki.name + jonas@wielicki.name + + + 0.2 + 2017-10-04 + jwi +

        + Move to SHA-1 as mixing function; + Properly reference BT.601 and include constants in text; + Prefer bare JID over roster name when selecting the hash function input; + Editing. +

        +
        + + 0.1 + 2017-09-27 + XEP Editor: jwi +

        Accepted as Experimental by Council.

        +
        + + 0.0.1 + 2017-09-14 + jwi +

        First draft.

        +
        +
        + +

        Colors provide a valuable visual cue to recognize text. Recognition of colors works much faster than recognition of text. Together with the length and overall shape of a piece of text (such as a nickname), a color provides a decent amount of entropy to distinguish a reasonable amount of entities.

        +

        Clients have been using randomly or deterministically chosen colors for users in multi-user situations for a long time already. However, since there has been no standard for how this is implemented, the experience differs across platforms. The goal of this XEP is to provide a uniform, platform-independent, stateless and easy-to-implement way to map arbitrary bytestrings to colors, as well as give recommendations how this is applied to color names of participants in conversations, roster entries and other pieces of text.

        +

        To allow cross-client use, it is important that the color scheme can be adapted to different environments. This specification provides means to adapt colors to different background colors as well as &cvds;.

        +

        In no way is the system presented in this specification a replacement for names. It only serves as an additional visual aid.

        +
        + +

        The color generation mechanism should provide the following features:

        +
          +
        • Consistent generation of color across all platforms depending solely on the identifier used as input for the algorithm.
        • +
        • The system should be reasonably fast; it must be possible to, for example, apply it to all roster entries even of very large rosters in reasonable amount of time.
        • +
        • It must be able to provide decent contrast on any background.
        • +
        • The implementation should be stateless and not be complex.
        • +
        • A fallback path for users with common types of &cvds; must be provided.
        • +
        • A fallback path for systems which can only use colors from a restricted palette must be provided.
        • +
        +
        + + +

        To generate a color from a string of text, the follownig algorithms are applied in order:

        +
          +
        1. Generate an angle in the CbCr plane from the text.
        2. +
        3. If enabled, apply configured corrections for &cvds;.
        4. +
        5. Convert the angle to a CbCr pair.
        6. +
        7. If the output device only supports a small palette of colors, map the CbCr value to the closest palette color.
        8. +
        9. If the output device supports RGB output, convert the CbCr pair to an RGB triple.
        10. +
        +
        + +

        Implementations may colorize the participants of a conversation with an individual color to make them easier to distinguish.

        +

        In such cases, the color SHOULD be generated as described in the Generating a color section. The input used SHOULD be, in descending order of preference, (a) the nickname from the conversation, (b) the bare JID.

        +
        + +

        Implementations may want to show a picture in connection with a contact even if the contact does not have an avatar defined (e.g. via &xep0084;).

        +

        In such cases, auto-generating an avatar SHOULD happen as follows:

        +
          +
        1. Obtain a name for the contact, in descending order of preference, (a) by using the actual bare JID of the contact (not the bare JID of the conference in case of a XEP-0045 MUC), (b) by using the nickname from the conversation.
        2. +
        3. Generate a color as described in the Generating a color section.
        4. +
        5. Fill an implementation-defined background shape with that color.
        6. +
        7. Render the first character of the name in white or black centered on the shape.
        8. +
        +
        +
        + +
          +
        • Implementations SHOULD allow the user to turn off any colorization completely.
        • +
        • Implementations SHOULD implement the &cvd; profiles and SHOULD allow the user to choose any of these profiles or to disable the correction.
        • +
        • Implementations MUST NOT share the &cvd; correction settings with other entities.
        • +
        +
        + + +

        Input: An identifier, encoded as octets of UTF-8 (&rfc3269;).

        +

        Output: Angle in the CbCr plane.

        +

        Note: The goal of this algorithm is to convert arbitrary text into a scalar value which can then be used to calculate a color. As it happens, the CbCr plane of the YCbCr space determines the color (while Y merely defines the lightness); thus, an angle in the CbCr plane serves as a good scalar value to select a color.

        +
          +
        1. Run the input through CRC32 as defined by zlib (TODO: add citation).
        2. +
        3. Take the lower 16 bits and XOR them with the upper 16 bits.
        4. +
        5. Divide the value by 65535 (use float division) and multiply it by 2π (two Pi).
        6. +
        +
        + +

        Input: Angle in the CbCr plane.

        +

        Output: Angle in the CbCr plane.

        +

        Note: This algorithm will re-map the angle to map it away from ranges which can not be distinguished by people with the respective &cvds;.

        + +

        Divide the angle by two.

        +
        + +

        Divide the angle by two and add π/2 (half Pi).

        +
        +
        + +

        Input: Angle in the CbCr plane, from the previous algorithm.

        +

        Output: Values for Cb and Cr in the YCbCr &BT.601; color space in the range from -0.5 to 0.5.

        +

        Form a vector from the angle and project it to edges of a quad in 2D space with edge length 1 around (0, 0). The resulting coordinates are Cb and Cr:

        + abs(cb)) { + factor = 0.5 / abs(cr); +} else { + factor = 0.5 / abs(cb); +} +cb = cb * factor; +cr = cr * factor; +]]> +
        + +

        Input: Values for Cb and Cr in the YCbCr &BT.601; color space in the range from -0.5 to 0.5; Value for Y.

        +

        Output: Values for Red (R), Green (G) and Blue (B) in the RGB color space in the range from 0 to 1.

        +

        Note: The recommended value for Y is 0.732. See Gamma Correction for a discussion on the choice of Y.

        +
          +
        1. Calculate r, g and b according to BT.601:
        2. +
        3. Clip the values of r, g and b to the range from 0 to 1.
        4. +
        +

        See Constants for YCbCr (BT.601) for the values of KR, KG and KB.

        +
        + +

        Input: RGB values for the color to adapt (Ri, Gi, Bi) and for the background color to adapt to (Rb, Gb, Bb), in the range from 0 to 1 each.

        +

        Output: Values for Red (Rc), Green (Gc) and Blue (Bc) in the RGB color space in the range from 0 to 1.

        +
          +
        1. Invert the background color by subtracting the individual channels from 1 each: +
        2. +
        3. Mix the inverted background with the color to adapt, using a mixing factor of 0.2: +
        4. +
        +
        + +

        Input: Values for Red (R), Green (G) and Blue (B) in the RGB color space in the range from 0 to 1.

        +

        Output: Values for Cb and Cr in the YCbCr &BT.601; color space in the range from -0.5 to 0.5; Value for Y.

        +

        Calculate Y, Cb and Cr according to BT.601:

        + +

        See Constants for YCbCr (BT.601) for the values of KR, KG and KB.

        +
        + +

        Input: A set of RGB colors (each component from 0 to 1).

        +

        Output: A mapping from CbCr pairs (each component from -0.5 to 0.5) to RGB colors.

        +

        Note: when the algorithm finishes, the mapping maps CbCr values (rounded to two decimal places) to the R, G, B triples which come closest to the desired color and lightness.

        +
          +
        1. Create an empty mapping M which maps from pairs of CbCr values to quadruples of Y, R, G and B.
        2. +
        3. For each color R, G, B from the input palette: +
            +
          1. Calculate Y, Cb and Cr from R, G, B as described in RGB to YCbCr.
          2. +
          3. Round Cb and Cr to two decimal places as Cb' and Cr'.
          4. +
          5. If the (Cb', Cr') pair is not in the mapping M yet, or if the Y value of the existing entry is farther away from 0.732 than the new Y value, put the Y, R, G, and B values as value for the (Cb', Cr') pair into the mapping.
          6. +
          +
        4. +
        5. Strip the Y values from the values of mapping M.
        6. +
        7. Return M as the result of the algorithm.
        8. +
        +
        + +

        Input: A set of colors (the palette) as tuples of Cbp and Crp and a color to map to the closest palette color as Cb and Cr value.

        +

        Output: A palette color as Cbr and Crr values.

        +
          +
        1. For each color as pair Cbp, Crp in the palette, calculate the distance metric: D = sqrt((Cbp-Cb)*(Cbp-Cb) + (Crp-Cr)*(Crp-Cr)).
        2. +
        3. Pick the palette color Cbp, Crp with the smallest distance metric D as result color Cbr, Crr.
        4. +
        +

        Note: the distance metric is simply the euclidian distance in the CbCr plane.

        +
        +
        + + +

        An implementation may choose a different value for Y depending on whether the sink for the R, G and B values expects Gamma Encoded or Gamma Decoded values. The recommended default of 0.732 is 0.5 to the power of 0.45, that is, a Gamma Encoded 0.5.

        +

        Modifications to Y SHOULD NOT be used to correct for bright/dark backgrounds. Implementations SHOULD instead use the algorithm described in Adapting the Color for specific Background Colors for that.

        +
        +
        + +

        As outlined above, implementations SHOULD offer the &rgblind; and &bblind; corrections as defined in the Corrections for &cvds; section. Users SHOULD be allowed to choose between:

        +
          +
        • disabling all corrections (skip the Corrections for &cvds; step entirely),
        • +
        • applying one of the &cvd; correction profiles and
        • +
        • disabling colorization altogether.
        • +
        +

        The last option is important for users with monochromatic view.

        +

        Some sources on the internet indicate that people with &cvds; may profit from having larger areas of color to be able to recognize them. This should be taken into consideration when selecting font weights and line widths for colored parts.

        +
        + +

        This specification extracts a bit more information from an entity and shows it alongside the existing information to the user. As the algorithm is likely to produce different colors for look-alikes (see &xep0165; for examples) in JIDs, it may add additional protection against attacks based on those.

        +

        Due to the limited set of distinguishable colors and only extracting 16 bits of the hash function output, possible &cvds; and/or use of palettes, entities MUST NOT rely on colors being unique in any context.

        +
        + +

        This section provides an overview of design considerations made while writing this specification. It shows alternatives which have been considered, and eventually rejected.

        + +

        The other common YCbCr variants, BT.709 and BT.2020, do not achieve a brightness across the color space as uniform as &BT.601; does. Adapting the Y value for uniform luminosity across the range for CbCr would have complicated the algorithm with little or no gain.

        +
        + +

        The HSV and HSL color spaces fail to provide uniform luminosity with fixed value/lightness and saturation parameters. Adapting those parameters for uniform luminosity across the hue range would have complicated the algorithm with litte to no gain.

        +
        + +

        Given a fixed-size and finite palette of colors, it would be possible to ensure that, until the number of entities to color exceeds the number of colors, no color collisions happen.

        +

        There are issues with this approach when the set of entities is dynamic. In such cases, it is possible that an entity changes its associated color (for example by re-joining a colored group chat), which defeats the original purpose.

        +

        In addition, more state needs to be taken into account, increasing the complexity of choosing a color.

        +
        + +

        This specification needs to collapse an arbitrarily long string into just a few bits (the angle in the CbCr plane). To do so, SHA-1 (&rfc3174;) is used.

        +

        CRC32 and Adler32 have been considered as faster alternatives. Downsides of these functions:

        +
          +
        • Bad mixing without additional entropy.
        • +
        • Adler32 is rarely available in standard libraries.
        • +
        • CRC32 is ambiguous: there are multiple polynomials in widespread use (e.g. the Ethernet and the zlib polynomials). Often it is not clear which polynomial is used by a library.
        • +
        +

        SHA-1 is widely available. From a security point of view, the exact choice of hash function does not matter here, since it is truncated to 16 bits. At this length, any cryptographic hash function is weak.

        +
        +
        + +

        This document requires no interaction with &IANA;.

        +
        + +

        This document requires no interaction with the ®ISTRAR;.

        +
        + +

        Thanks to Daniel Gultsch, Georg Lukas, and Tobias Markmann.

        +
        + + +

        Throughout the document, the constants KR, KG and KB are used. They are defined in &BT.601; as:

        + +
        + +

        This section holds test vectors for the different configurations. The test vectors are provided as Comma Separated Values. Strings are enclosed by single quotes ('). The first line contains a header. Each row contains, in that order, the original text, the text encoded as UTF-8 as hexadecimal octets, the angle in radians, and the Cb, Cr, Red, Green, and Blue values.

        + + + + + + + + + +
        + +

        The used palette can be generated by sampling the RGB cube evenly with six samples on each axis (resulting in 216 colors). The resulting palette is commonly known as the palette of so-called "Web Safe" colors.

        +

        The format of the test vectors is the same as in the full range case above.

        + + + + + + + + + +
        +
        +
        diff --git a/xep.ent b/xep.ent index 2f87609e..f4cc587f 100644 --- a/xep.ent +++ b/xep.ent @@ -372,6 +372,7 @@ THE SOFTWARE. ITU E.164 ITU Recommendation E.164/I.331: The International Public Telecommunication Numbering Plan (1997). This specification is not freely available; a short summary is located at <http://en.wikipedia.org/wiki/E.164>." > X.500 X.500: The Directory: Overview of concepts, models and service <http://www.itu.int/rec/T-REC-X.500-200102-I/en>." > X.841 X.841: Security techniques - Security information objects for access control <http://www.itu.int/rec/T-REC-X.841-200010-I/en>." > +BT.601 BT.601: Studio encoding parameters of digital television for standard 4:3 and wide screen 16:9 aspect ratios <https://www.itu.int/rec/R-REC-BT.601-7-201103-I/en>"> @@ -1446,3 +1447,5 @@ IANA Service Location Protocol, Version 2 (SLPv2) Templates Extensible SASL Profile (XEP-0388) XEP-0388: Extensible SASL Profile <https://xmpp.org/extensions/xep-0388.html>." > Extensible In-Band Registration (XEP-0389) XEP-0389: Extensible In-Band Registration <https://xmpp.org/extensions/xep-0389.html>." > Entity Capabilities 2.0 (XEP-0390) XEP-0390: Entity Capabilities 2.0 <https://xmpp.org/extensions/xep-0390.html>." > +Jingle Encrypted Transports (XEP-0391) XEP-0391: Jingle Encrypted Transports <https://xmpp.org/extensions/xep-0391.html>." > +Consistent Color Generation (XEP-0392) XEP-0392: Consistent Color Generation <https://xmpp.org/extensions/xep-0392.html>." > diff --git a/xep2texml.xsl b/xep2texml.xsl index 8e2af75e..348ce3ae 100644 --- a/xep2texml.xsl +++ b/xep2texml.xsl @@ -29,7 +29,7 @@ --> - + diff --git a/xmpp.css b/xmpp.css index 048b7ec2..2ef1bd8e 100644 --- a/xmpp.css +++ b/xmpp.css @@ -2,10 +2,10 @@ BODY { background-color: #ffffff; color: #000000; font-family: Verdana, Arial, Helvetica, Geneva, sans-serif; - font-size: small; line-height: 130%; - margin-left: 7%; - margin-right: 7%; + width: 90%; + max-width: 60em; + margin: 0 auto; } #left { border: 0px; @@ -58,6 +58,7 @@ pre { background-color: #e0e9f2; padding: 0.4em; border: 1px solid #369; + overflow: scroll; } ul { list-style: disc outside; @@ -154,5 +155,5 @@ A:visited.pagehead { white-space: nowrap; } .event { - color: #336699; -} + color: #336699; + }