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.

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.

Install UK SIF 1.0 Specification in your ZIS

Do not use these steps to install

Introduction
This post will talk you through the installation of UK SIF Spec 1.0 in to a properly installed ZIS. I will be login in as the user ZIT for this example.
Ubuntu versions tested
Ubuntu 9 64 bit Server Version

Step 0: download SIF 1.0

wget http://www.openzis.org/download/uk_1_0_lib_install.zip
unzip uk_1_0_lib_install.zip
cd uk_1_0_lib_install

Step 1: Load MySQL Data

mysql -u root -p
mysql> use zit
mysql> source uk_1_0_lib_install/install.sql
mysql> commit;
mysql> exit

Step 2: Move the ’sif_schema’ directory

mv uk_1_0_lib_install/sif_schema ZIT_CommunityEdition/ZIT_APPLICIATION

Step 3: Move the ‘uk_1_0_lib’ directory

mv uk_1_0_lib_install/lib/uk_1_0_lib ZIT_CommunityEdition/ZIT_APPLICIATION


Install your Zone Integration Server

Introduction
This guide will walk you through the installation of our open source zone integration server (ZIS) known as ZIT. At the end of this tutorial you will have a Zone Integration Server that is functionally ready to serve SIF Messages and ready for SIF specs to be applied. So lets login to your ubuntu server – i will be login in as the user ZIT for this example.

Ubuntu versions tested

Ubuntu 9 64 bit Server Version

Step 0: get apt-get ready

sudo updatedb
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential

sudo reboot

Step 1: Install Apache 2

sudo apt-get install apache2

Step 2: Install MySQL
You will want to assign the MySQL root user a password – please do not leave it blank as you will need it for your ZIS.

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

Step 3: create MySQL database

mysql -u root -p

> create database zit default character set utf8 collate utf8_unicode_ci;
> quit

Step 4: Install PHP 5

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:

extension=pdo.so
extension=pdo_mysql.so

 

 

sudo pecl install pdo_mysql

Step 5: Install Zend Framework

wget http://framework.zend.com/releases/ZendFramework-1.8.0/ZendFramework-1.8.0-minimal.tar.gz
tar -xzvf ZendFramework-1.8.0-minimal.tar.gz
mv ZendFramework-1.8.0-minimal ZendFramework

Lets restart apache – it should restart successfully.
sudo /etc/init.d/apache2 restart

Step 6: Download your ZIT Core & unzip
This will contain the basic server package, installation script, and the admin site.

sudo apt-get install unzip
wget http://www.openzis.org/download/zit_core.zip
unzip zit_core.zip

After unzipping the zit_core file you should have a directory named ZIT_CommunityEdition. Now lets move into that directory and see what
our working directory is.

cd ZIT_CommunityEdition
pwd

Take note of the working directory structure that is printed.

Step 7: Configure Apache2

sudo vi httpd.conf

Add in three virtual hosts for your ZIT installation. The Installation will be removed later.

NameVirtualHost 192.168.1.103 <-- use your IP Address for your machine.
<VirtualHost 192.168.1.103 >
ServerAdmin someone@openzis.org
DocumentRoot /The working directory from step 6/ZIT_SERVER
Servername zis.domainname.
<Directory "/The working directory from step 6/ZIT_SERVER">
Options Indexes FollowSymLinks
AllowOverride All
Order deny,allow
</Directory>
</VirtualHost>

<VirtualHost 192.168.1.103 >
ServerAdmin someone@openzis.org
DocumentRoot /The working directory from step 6/ADMIN_SERVER
Servername admin.domainname.
<Directory "/The working directory from step 6/ADMIN_SERVER">
Options Indexes FollowSymLinks
AllowOverride All
Order deny,allow
</Directory>
</VirtualHost>

<VirtualHost 192.168.1.103 >
ServerAdmin someone@openzis.org
DocumentRoot /The working directory from step 6/INSTALL
Servername install.domainname.
<Directory "/The working directory from step 6/INSTALL">
Options Indexes FollowSymLinks
AllowOverride All
Order deny,allow
</Directory>
</VirtualHost>

Add the rewrite module
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

Step 8: ZIS Configuration
Now locate your config.ini located in your ZIT_CommunityEdition directory so that you may update it with your database connection string.

vi config.ini

Now restart your Apache 2 server so that it can pick up the newly added directories.

sudo /etc/init.d/apache2 restart

After a successful restart point your browsers to the Installation directory. There you will want to create your web admin account as well as your ZIT Server Setup variables.

Suggested ZIT Variables:
ServerName: Same as SourceID
SourceID: The unique name for your ZIS ex:zis_abcusd_k12_ca_us
Server URL: ( Virtualhost to your ZIS domain) ex: zis.abcusd.k12.ca.us
Admin URL: ( Virtualhost to your Admin domain ) ex: admin.abcusd.k12.ca.us
Min Buffer: 1024
Max Buffer: 1024000000

After you have walked through the setup you will want to remove the VirtualHost for the installation directory. So simple edit the http.conf file like you did above – just this time you will want to remove the INSTALL virtualhost.

You now have successfully installed the core of your Zone Integration Server. You will need to install the SIF Specs you are interested.
SIF Specifications Available

  • US 1.5r1
  • US 2.0r1 – not yet available for download
  • US 2.1 – not yet available for download
  • UK 1.0 – not yet available for download

So what’s in a name?

One of the first questions we hear about our project is “what is a Zone Integration Terminal (ZIT)?” And I usually respond back “It’s a Zone Integration Server with less complexity.”  So what does that really mean.

According to the SIF Specification, a Zone Integration Server (ZIS) allow an agent to contact a ZIS (Pull mode) for its messages as well as allow a ZIS to contact an agent (Push mode).   Our Zone Integration Terminal (ZIT) handles pull mode requests from agents and never reaches out to agents, thus reducing complexity and in turn your project has a higher chance of success. 

Next Page →