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
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.
OpenZIS and the Australia SIF Specification
Recently we have had a few developers reach out to us to see if we had an interest in developing for the Australian SIF that is currently in being Piloted. Well the short answer is Yes. We are currently waiting for the SIF Association to publish the Australian SIF Specification so that we can begin our development.
OpenZIS Demo Site Updated
Just wanted to let everyone know that we have added the UK SIF Spec 1.2 as well as the US SIF Spec 2.2 to our Demo site. We should have this available for download within the next few weeks.
