Privacy Lists

This is now a feature of Spark 2.6.0

Introduction - BETA draft, don’t use it right now

You need to replace the JIDs to match your needs. The examples assume that you are using the JID "lg@jivesoftware.com/spark".

A reference with all possible privacy list options may be found here: http://www.xmpp.org/rfcs/rfc3921.html#privacy

To set or get a privacy list you need to open the XMPP debug window, press F12 to open it and select the tab "lg@jivesoftware.com/spark" and then the sub-tab “Ad-hoc message”. To view the result you need to switch to the sub-tab “All Packets” or “Raw Received Packets”. Verify there that no error did occur - the examples will usually contain only the messages you need to send.

If you store some pacekts in a local xml file for much quicker usage make sure to not include comments. You can write comments like “<-- Packet to retrieve privacy list -->” before the packet but you must not send them to Wildfire.

Retrieve Your Privacy Lists

Send:

<iq from='lg@jivesoftware.com/spark' type='get' id='id1'>
   <query xmlns='jabber:iq:privacy'></query>
</iq>

You’ll get this result if you did define no lists:

<iq id="id1" to="lg@jivesoftware.com/spark" type="result">
   <query xmlns="jabber:iq:privacy">
      <query></query>
   </query>
</iq>

If lists exist you’ll get something like:

<iq id="id1" to="lg@jivesoftware.com/spark" type="result">
   <query xmlns="jabber:iq:privacy">
      <default name="buddies"></default>
      <list name="public"></list>
      <list name="invisible"></list>
      <list name="buddies"></list>
      <query></query>
   </query>
</iq>

Delete Privacy List “public”

If the list does not exist you will get a 404 error which you can ignore.

<iq from='lg@jivesoftware.com/spark' type='set' id='id1public'>
   <query xmlns='jabber:iq:privacy'>
      <list name='public'></list>
    </query>
</iq>

Create Privacy List “public”

This list does accept everything, you may be happy to have it if you want to deactivate all privacy lists. The default action is to accept all packets, but if you do not add the “accept item” you will delete the list if it exists.

<iq from='lg@jivesoftware.com/spark' type='set' id='id1public'>
   <query xmlns='jabber:iq:privacy'>
      <list name='public'>
         <item action='allow' order='1'></item>
      </list>
   </query>
</iq>

You’ll receive:

<iq id="id1public" to="lg@jivesoftware.com/spark" type="result">
  <query xmlns="jabber:iq:privacy">
    <list name="public">
      <item action="allow" order="1"></item>
    </list>
    <query></query>
  </query>
</iq>

Create “invisible” Privacy List

This list should allow you to become nearly invisible for other xmpp users. As you are not offline you’ll receive messages which are sent to you and that’s the most easy way to detect that you are online.

If you allow also IQ packets one can query your time and client version - that’s a more easy way to tell that you are online. Blocking IQ packets will cause a lot of trouble for Spark and you will no longer be able to use a lot of its features.

Item 2001 will block all incoming IQ packets, sending IQ packets can not be blocked. As Spark uses IQ packets like to detect component names a lot of the components are reachable but they can not be used any more. If you want to use them you should remove the line.

Item 2001 will also block presence out packets, so you will no longer inform your buddies if you change your state form online to away.

If you do not want to receive presence information of other buddies add also to item 2001.

The default action is to allow traffic, so everything else like messaging will work.

<iq from='lg@jivesoftware.com/spark' type='set' id='id1invisible'>
    <query xmlns='jabber:iq:privacy'>
        <list name='invisible'>
            <item action='allow' order='1' type='jid' value='search.jivesoftware.com'><iq></iq></item>
            <item action='allow' order='2' type='jid' value='conference.jivesoftware.com'><iq></iq></item>
            <item action='allow' order='3' type='jid' value='proxy.jivesoftware.com'><iq></iq></item>
            <item action='allow' order='4' type='jid' value='stun.jivesoftware.com'><iq></iq></item>
            <item action='allow' order='5' type='jid' value='broadcast.jivesoftware.com'><iq></iq></item>
            <item action='allow' order='6' type='jid' value='workgroup.jivesoftware.com'><iq></iq></item>
            <item action='allow' order='7' type='jid' value='manager.jivesoftware.com'><iq></iq></item>
            <item action='allow' order='8' type='jid' value='updater.jivesoftware.com'><iq></iq></item>
            <item action='allow' order='9' type='jid' value='sipark.jivesoftware.com'><iq></iq></item>
            <item action='allow' order='10' type='jid' value='logger.jivesoftware.com'><iq></iq></item>
            <item action='allow' order='11' type='jid' value='phone.jivesoftware.com'><iq></iq></item>
            <item action='allow' order='31' type='jid' value='aim.jivesoftware.com'><iq></iq></item>
            <item action='allow' order='32' type='jid' value='icq.jivesoftware.com'><iq></iq></item>
            <item action='allow' order='33' type='jid' value='yahoo.jivesoftware.com'><iq></iq></item>
            <item action='allow' order='34' type='jid' value='msn.jivesoftware.com'><iq></iq></item>
            <item action='deny' order='2001'>
                <iq></iq>
                <presence-out></presence-out>
            </item>
        </list>
    </query>
</iq>

Create “buddies” Privacy List

… TODO …

Set Default Privacy List

The default list will be active when you login, you can after login select another list and activate it or set it as a new default.

<iq from='lg@jivesoftware.com/spark' type='set' id='id1default'>
  <query xmlns='jabber:iq:privacy'>
    <default name='buddies'></default>
  </query>
</iq>

Set Active Privacy List

You can change the privacy list you are using at any time when you are logged in. If you logout and re-login the default list will be active anyhow.

<iq from='lg@jivesoftware.com/spark' type='set' id='id1active'>
  <query xmlns='jabber:iq:privacy'>
    <active name='invisible'></active>
  </query>
</iq>

So if you want to be “invisible” for the next week you should change the default list and the active list.

Problems

The RFC 3921 is clear about the meaning of type=‘jid’ value=‘jivesoftware.com’ but it makes no sense to block IQ packets from the server as <query xmlns='http://jabber.org/protocol/disco#info’/> will no longer work. This may be a bug in the RFC.

http://community.igniterealtime.org/docs/DOC-1036/JM-1013 fix blocking of iq packets which break disco#info requests

Possible enhancements and extentions within Wildfre would be possible:

  • type=‘jid’ value=’^jivesoftware.com’ “leading caret” to match only the domain (from=‘jivesoftware.com), no users, no resources, no components

  • type=‘jid’ value=’.jivesoftware.com’ “leading dot” to match all components (from=‘search.jivesoftware.com, from=‘icq.jivesoftware.com’, …)

  • type=‘jid’ value=’@jivesoftware.com’ “leading at” to match all users (from=‘foo@jivesoftware.com’, from=‘bar@jivesoftware.com’, …)

  • type=‘jid’ value=‘jivesoftware.com’ RFC 3921 behaviour (the domain itself matches, as does any user@domain, domain/resource, or address containing a subdomain)

I’ve got some privacy lists on the server, I can veriy that they are there by sending a query for that particular list and get a response with the content of if. But if I send this to server:

Is this a bug?

Even using Spark2.6.3 and Openfire 3.7.1, the privacy list will not work properly.

In Spark, I’ve created the privacy list and activated it. But after exiting Spark and reopen it, the privacy list is gone.

Can anybody solve this defect?

It seems there’s a bug concerning Privacy lists.

Workaround : you need to create one Privacy list for one account, then restart the server once, and then they will work correctly.