XEP-0016

来自Jabber/XMPP中文翻译计划
(版本间的差异)
跳转到: 导航, 搜索
(2.1语法和语义)
(2.1语法和语义)
第76行: 第76行:
 
     </query>
 
     </query>
 
   </iq>
 
   </iq>
 +
 +
 +
If the type is "jid", then the 'value' attribute MUST contain a valid Jabber ID. JIDs SHOULD be matched in the following order:
 +
 +
<user@domain/resource> (only that resource matches)
 +
<user@domain> (any resource matches)
 +
<domain/resource> (only that resource matches)
 +
<domain> (the domain itself matches, as does any user@domain or domain/resource)
 +
If the type is "group", then the 'value' attribute SHOULD contain the name of a group in the user's roster. (If a client attempts to update, create, or delete a list item with a group that is not in the user's roster, the server SHOULD return to the client an <item-not-found/> stanza error.)
 +
 +
If the type is "subscription", then the 'value' attribute MUST be one of "both", "to", "from", or "none" as defined RFC 6121, where "none" includes entities that are totally unknown to the user and therefore not in the user's roster at all. These values are exact matches, so that "both" means a bidirectional subscription (not "from" or "to" only).
 +
 +
If no 'type' attribute is included, the rule provides the "fall-through" case.
 +
 +
The 'action' attribute MUST be included and its value MUST be either "allow" or "deny". [4]
 +
 +
The 'order' attribute MUST be included and its value MUST be a non-negative integer that is unique among all items in the list. (If a client attempts to create or update a list with non-unique order values, the server MUST return to the client a <bad-request/> stanza error.)
  
 
===商业规则===
 
===商业规则===

2012年2月4日 (六) 07:24的版本


本文的英文原文来自 XEP-0016

XEP-0016: 隐私列表

摘要: 本文定义了一个XMPP协议扩展, 用于启用和禁用与网络上其他实体的通讯.这个协议,最早在RFC 3921的第十单元被标准化,被用于封锁与未知或不良实体的沟通.封锁能够基于Jabber标识符,订阅状态或者花名册群组.被封锁的节点可以是messages,IQs,进入或者输出的presence节点,或者所有节点.本协议也允许实体创建,修改或者删除它的隐私列表,使得不同的列表可以应用到不同的连接资源上,定义一个默认列表,在特定会话期间拒绝隐私列表的使用.

作者: Peter Millard,Peter Saint-Andre

版权: © 1999 - 2010 XMPP标准化基金会(XSF). 参见法律通告.

状态: 草案

类型: 标准跟踪

版本: 1.6

最后更新日期: 2007-02-15


注意: 这里定义的协议是XMPP标准化基金会的一个草案标准.对本协议的执行是被鼓励的,也适于布署到生产系统,但是在它成为最终标准之前可能还会有一些变动.


目录

绪论

几乎所有的即时通讯应用都已经发现,为用户提供一些方法,用来锁定接收自其他用户的消息和数据包是必要的(对于这些封锁的根本原因是取决于一些个别用户的需求).这个文档定义了一个灵活的方法用于锁定通讯.

注释:在此定义的协议可以用来与简单通讯锁定协同,详情请参阅XEP-0191

协议

本章节是被从RFC 3921的第十章节拷贝过来的,而且没有修改,除了message节点在处理阻止实体试图与用户通讯的订阅方面.

大部分即时通讯系统发现,为用户提供一些锁定来自一些特殊用户通讯的方法,是必要的(这在RFC 2779 [3]的5.1.5, 5.1.15, 5.3.2, 和5.4.10 章节也是被要求的).在XMPP协议中,这些工作被采用'jabber:iq:privacy'命名空间的管理个人隐私列表的操作来完成.

服务器端隐私列表成功的完成了以下用例:

   获取一个人的隐私列表. 
   添加, 删除, 并且编辑一个人的隐私列表. 
   设置, 改变, 或者 declining active lists. 
   设置, 改变, 或者 declining the default list (i.e., the list that is active by default). 
   基于JID, 群组, 或者订阅类型(或者全部)允许或者锁定messages. 
   基于JID, 群组, 或者订阅类型(或者全部)允许或锁定进入的presence通知. 
   基于JID, 群组, 或者订阅类型(或者全部)允许或锁定输出的presence通知. 
   基于JID, 群组, 或者订阅类型(或者全部)允许或锁定IQ节点. 
   基于JID, 群组, 或者订阅类型(或者全部)允许或锁定所有通讯.

注释:Presence通知不包括presence订阅,只包括那些已经订阅到用户presence信息上的,并且被广播到实体的presence信息.所以,这只包括了没有'type'属性或者type属性是'unavailable'的presence节点.


2.1语法和语义

一个用户可以定义一个或多个隐私列表,并且被存储在用户服务器上.每个<list/>元素在以<item/>元素形式里包含了一个或多个规则,并且每个<item/>元素用属性来定义来定义隐私规则类型,一个特别的值来表示哪个规则应用,相关动作,和项目处理的顺序中.

语法如下所示:

 <iq>
   <query xmlns='jabber:iq:privacy'>
     <list name='foo'>
       <item
           type='[jid|group|subscription]'
           value='bar'
           action='[allow|deny]'
           order='unsignedInt'>
         [<message/>]
         [<presence-in/>]
         [<presence-out/>]
         [<iq/>]
       </item>
     </list>
   </query>
 </iq>


If the type is "jid", then the 'value' attribute MUST contain a valid Jabber ID. JIDs SHOULD be matched in the following order:

<user@domain/resource> (only that resource matches) <user@domain> (any resource matches) <domain/resource> (only that resource matches) <domain> (the domain itself matches, as does any user@domain or domain/resource) If the type is "group", then the 'value' attribute SHOULD contain the name of a group in the user's roster. (If a client attempts to update, create, or delete a list item with a group that is not in the user's roster, the server SHOULD return to the client an <item-not-found/> stanza error.)

If the type is "subscription", then the 'value' attribute MUST be one of "both", "to", "from", or "none" as defined RFC 6121, where "none" includes entities that are totally unknown to the user and therefore not in the user's roster at all. These values are exact matches, so that "both" means a bidirectional subscription (not "from" or "to" only).

If no 'type' attribute is included, the rule provides the "fall-through" case.

The 'action' attribute MUST be included and its value MUST be either "allow" or "deny". [4]

The 'order' attribute MUST be included and its value MUST be a non-negative integer that is unique among all items in the list. (If a client attempts to create or update a list with non-unique order values, the server MUST return to the client a <bad-request/> stanza error.)

商业规则

获取某人的隐私列表

管理活跃列表

管理缺省列表

编辑隐私列表

新增隐私列表

移除隐私列表

屏蔽消息

屏蔽入站出席信息通知

屏蔽出站出席信息通知

屏蔽IQ节

屏蔽所有通讯

被屏蔽实体尝试和用户通讯

更高级的启发

发现支持

实现备注

安全事项

IANA事项

XMPP注册表事项

协议命名空间

XML Schema

作者备注

个人工具