US Spec SIF_Provision unable to handle TestAccommodation Object

While working with a client we found that the TestAccommodation object does not validate within the SIF_Provision message. Check this out for yourself by pointing your browser to http://compliance.sifinfo.org/validate/ and paste this in.


<?xml version="1.0" encoding="UTF-8"?>
<SIF_Message Version="2.3" xmlns="http://www.sifinfo.org/infrastructure/2.x">
<SIF_Provision>
<SIF_Header>
<SIF_MsgId>BD5070007BDF012D83B2001FF3502BAD</SIF_MsgId>
<SIF_Timestamp>2010-07-27T15:04:43</SIF_Timestamp>
<SIF_SourceId>Zone1Provider</SIF_SourceId>
</SIF_Header>
<SIF_ProvideObjects>
<SIF_Object ObjectName="TestAccommodation"/>
</SIF_ProvideObjects>
<SIF_SubscribeObjects/>
<SIF_PublishAddObjects>
<SIF_Object ObjectName="TestAccommodation"/>
</SIF_PublishAddObjects>
<SIF_PublishChangeObjects>
<SIF_Object ObjectName="TestAccommodation"/>
</SIF_PublishChangeObjects>
<SIF_PublishDeleteObjects>
<SIF_Object ObjectName="TestAccommodation"/>
</SIF_PublishDeleteObjects>
<SIF_RequestObjects/>
<SIF_RespondObjects>
<SIF_Object ObjectName="TestAccommodation"/>
</SIF_RespondObjects>
</SIF_Provision>
</SIF_Message>

As of July 27th 2010 this won’t validate. Now try this XML SIF Message:


<?xml version="1.0" encoding="UTF-8"?>
<SIF_Message Version="2.3" xmlns="http://www.sifinfo.org/infrastructure/2.x">
<SIF_Provision>
<SIF_Header>
<SIF_MsgId>23D54AA07BE1012D83B3001FF3502BAD</SIF_MsgId>
<SIF_Timestamp>2010-07-27T15:14:45</SIF_Timestamp>
<SIF_SourceId>Zone1Provider</SIF_SourceId>
</SIF_Header>
<SIF_ProvideObjects>
<SIF_Object ObjectName="TestAccommodation"/>
</SIF_ProvideObjects>
<SIF_SubscribeObjects/>
<SIF_PublishAddObjects/>
<SIF_PublishChangeObjects/>
<SIF_PublishDeleteObjects/>
<SIF_RequestObjects/>
<SIF_RespondObjects/>
</SIF_Provision>
</SIF_Message>

It validates successfully!

This is interesting – We are reporting this to the SIF association immediately. This error is within SIF 2.1, 2.2, 2.3 and 2.4 as far as we can tell. If you are able to provide it you should be able to Publish! With so many objects its hard to imagine that we don’t find more of these… but the SIF Association does a great job.

To fix this you will need to update your XSD SIF_SubscribeObjectNamesType. We have updated the XSD for OpenZIS.

Creating the SIF_Register Message

Our implementation choice for today will be Ruby. To create this message we can use this cool Ruby SIF message API as well as we should have handy the SIF Spec document to make sure that we are creating messages correctly.

A SIF_Register message has five mandatory elements, they are: SIF_Header, SIF_Name, SIF_Version, SIF_MaxBufferSize, SIF_Mode with the rest of the elements being optional or conditional elements. Since the SIF_Header is our first element lets build a simple SIF_Header and then print it out to see it in action.


1. require 'rubygems'
2. require 'openagent'
3.
4. @timenow = Time.now
5. @timestamp = @timenow.strftime("%Y-%m-%d") + "T" + @timenow.strftime("%H:%M:%S")
6. @message_id = UUID.generate(:compact).upcase
7.
8. header = OpenAgent::Messages::SIF_Header.new
9. header.sif_msgid = @message_id
10. header.sif_sourceid = 'AcmeAgent'
11. header.sif_timestamp = @timestamp
12. puts
13. puts header.to_xml
14. puts

Our agent name comes from the SIF Spec examples – I would suggest that you come up with a unique name for this field if you are using your OpenZIS account. Now let continue on with the construct of our Register message.


16. register = OpenAgent::Messages::SIF_Register.new
17. register.sif_header = header
18. register.sif_name= 'Acme Agent for WAP 2.x'
19. register.sif_version = '2.3'
20. register.sif_maxbuffersize = 524288
21. register.sif_mode = 'Pull'
22. puts register.to_xml
23. puts

This section of code puts the Header into the SIF_Regester object as well as sets a few of the other mandatory elements from above.
Now lets put the SIF_Register into its message container.


24. message = OpenAgent::Messages::Register.new
25. message.sif_register = register
26. puts message.to_xml
27. puts

What are your thoughts on Authentication?

We have found ourselves at a fork in the road and wanted to get some input from the community. OpenZIS currently supports three forms of authentication.

No Authentication – Used primarily for testing and development. The agents that send requests to the ZIS are not authenticated.

Username and Password – Agents are authenticated using a username and password that is passed in the HTTP(S) header

Certificates – Agents are authenticated based on a certificate supplied by the agent. Apache ensures that the certificate is valid and passes the CN of the certificate to OpenZIS which then compares it to the CN supplied when setting up the agent and if they are the same allows communication if not sends the operate SIF Error message.

We are proposing to remove the username and password authentication due to the fact that it is not supported in the SIF Specification. We are also thinking of re-designing the certificate validation process. Instead of just checking the CN of the certificate we would save the entire certificate to the database on the first call from the agent, every request afterwards OpenZIS would compare the entire certificate passed. We believe this will be easier to maintain and more secure.

Now we want to open it up the community and hear your thoughts. What do you think our course of action should be.

Thanks in advance for sharing your thoughts,

OpenZIS Team

Installation from GitHub

These steps are based on a new installation on a Ubuntu Server 9.10

user/password: openzis/openzis

pwd => /home/openzis

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
sudo apt-get install git-core

git clone git://github.com/cwhiteley/OpenZIS.git

cd OpenZIS
pwd => /home/openzis/OpenZIS

sudo apt-get install mysql-server
user/pass root/openzis

sudo apt-get install mysql-client
sudo apt-get install php5-mysql
sudo apt-get install libmysqlclient-dev

mysql -u root -p
> source ZISDB.sql
> use openzis
> show tables

You should have 32 rows returned.

> quit

sudo apt-get install apache2
sudo apt-get install php5 php5-common
sudo apt-get install libapache2-mod-php5 php5-gd php5-dev
sudo apt-get install php-pear

Add two lines to php.ini file located at: /etc/php5/apache2/

sudo vi php.ini

extension=pdo.so
extension=pdo_mysql.so

sudo pecl install pdo_mysql

sudo a2enmod rewrite

move to /etc/apache2/

sudo vi apache2.conf

Near the end of the file add:

NameVirtaulHost *

move to /etc/apache2/sties-available

sudo vi admin


ServerAdmin someone@openzis.org
DocumentRoot /home/openzis/OpenZIS/OpenZIS/ADMIN_SERVER
Servername admin.openzis.us

Options Indexes FollowSymLinks
AllowOverride All
Order deny,allow



Save your admin file

sudo vi zis


ServerAdmin someone@openzis.org
DocumentRoot /home/openzis/OpenZIS/OpenZIS/ZIT_SERVER
Servername zis.openzis.us

Options Indexes FollowSymLinks
AllowOverride All
Order deny,allow


Save your zis file

sudo a2ensite admin
sudo /etc/init.d/apache2 reload
sudo a2ensite zis
sudo /etc/init.d/apache2 reload

move to /home/openzis/OpenZIS/OpenZIS
update the config.ini at a minimum you should update your password and your
application.root.directory. In this example your application.root.directory should look like this:

application.root.directory = /home/openzis/OpenZIS/OpenZIS;

Now you should be able to connect to your admin site as admin.openzis.us with the user/pass as admin/admin.

If you setup your Apache with a different URL you will need to update the ZIS setting from within the UI interface.

Download OpenZIS from GitHub.

Getting OpenZIS from GitHub

Ubuntu 9 64 bit Server Version

Install Git
sudo apt-get install git-core

Clone OpenZIS Repositories
git clone git://github.com/cwhiteley/OpenZIS.git


OpenZIS version 2.0 released.

Today marks the end of some major design and development work that has been going on behind the senses. Starting today OpenZIS will now be at release version 2.0 and can easily be downloaded via our GitHUB account.

Release Notes:
1. PUSH capability.
2. Improvements to message log display.
3. Improved error logging.

Australian SIF 1.0 Specification is now available

Today we have released the Australian SIF 1.0 specification.

Next Page →