Tag Archives: FOSS
January 24th, 2008
Single sign-on (SSO) is a method of access control, that enables a user to authenticate once, and gain access to the resources of multiple software systems. Well in my case, the task i have given is to authenticate a user in a PHP and a JAVA (Web) system simultaneously.
My PHP web application is the well known Joomla CMS, and my JAVA web application is based on JSF and custom built. After some thinking and research I found several resources which are worth reading (JOSSO, OneSign ), but i couldn’t take any help from them, mostly those SSO frameworks are complex ( yeah :) I couldn’t understand ) and aimed on a general pourpose and most of them are not for free.
So yeah I thought of doing some Hack to joomla and also make some changes in my Java web app’s authentication method. After talking with some of my geeky Friends (Sandaruwan and Anjana). I came up with two approaches. both are involved in handling the cookies manually up to certain extent.
The 1st approach is (Which i didn’t try and had to give up due to the reason that I am using JSF as the web application framework) to log-in to the Joomla site and after loged in to Joomla create a random named temp file in the server (possibly in /home/secrets with 777) with the user-name (if a valid log in) and set a cookie using set_cookie(“name”,$filename) and direct to a jsp page to do the java side authentication.
in this JSP, page read the secret file name from the cookie and read the file from the http server in-order to take the username of the loged-in user. By passing this to the authentication method of the java web app, the java side also can be authenticated.
yup it is pretty simple, but i had to give it up mainly because I use JSF. if I do the user authentication in the above way in the java side. I cannot add the user object to the FacesContext which will be used by my other java side components. so even though i log in. later on in other jsf pages my loged user cannot be found. (Shortly my java login process is not happening according to the JSF implementation procedures.) and secondly i had to give up this method because my Project manger didn’t like the idea of saving temp files in the server. :)
So the Second and the method which i have implemented is, automating the Joomla log-in process by making an http request to the http server from my JSF backing bean. and set the PHP cookie manually via Http Servlet response.
before i explain this method more broadly i have to mention about two nice tools which helped me to monitor the http requests and response.
Apache TCP Monitor
Live Http headers (FireFox ad-on)
Architecture

Implementation
There are two different scenarios.
1. User can visit teh home page of the joomla site 1st and the PHP Cookie is already set.
2. User visit the Java site PHP Cookie is not available.
(more…)
Posted in FOSS, Java, Joomla, LAMP, PHP, Programming, Web Designing & Development
September 12th, 2007
Last two weeks i was busy with my office work trying to figure out some tasks related to an EU project called sensoria. I had to integrate the Events plugin of Joomla (CMS) with Google calender (which i am hoping to write about in future) and I had to compose a case study documentation for service discovery using UDDI (Universal Description, Discovery and Integration). It took me few days to setup a test environment to get things actually working. As … Continue reading →
Posted in FOSS, SOA
August 23rd, 2007
“Next generation P2P Application”, Thats what they say about Azureus 3.0 Well I know this is not so news, But I happened to discover this very recently due to few reasons.. I was not a major Azureus Fan after all.. I was using utorrent for all my p2p downloads.. for many reasons I loved uTorrent.. for its light lightnes, the fancy progress charts, Statistic GUIs and the user friendliness. When I was back there home.. I ran utorrent in my … Continue reading →
Posted in FOSS
February 26th, 2007
This is one wide area that no clear online article is available as a help document. I my self had a huge problem in searching and making my modem to work with Edgy. When you google for the Conexant AccessRunner driver you get the driver file as sources from the sourceforge, http://accessrunner.sourceforge.net/index.shtml where you have to add those files to the kernel source tree and recompile the kernel creating a great deal of work. But yet luckily the new kernels … Continue reading →
Posted in FOSS, LAMP, Programming
February 20th, 2007
Today while i was surfing the net (digging new gadgets for my Gnome desktop) i saw some interesting screenshots of a universal dock something which is similar to the OSX making me hunt down this new feature to my desktop. i googled for “Gnome dock” and found a post in ubuntu forums where i followed the installation process and at last.. yes !! I got the DOCK but there were no application images seen in the DOCK. i solved this … Continue reading →
Posted in FOSS, LAMP, Programming
February 15th, 2007
Since I haven’t used or haven’t heard that “Rational rose” working on LINUX (on WINE) and of cause for modeling purposes I had to switch to Windows making a headache, I was searching a solution or more likely an alternative within Linux. I was just peeping in the add/remove menu and under the programming category, I found two modeling softwares for Linux. one which failed to install (Gaphor) and the one which i installed (Umbrello 1.5.5). What made me surprised … Continue reading →
Posted in FOSS, LAMP, PHP, Programming
February 10th, 2007
Haah !!! after few days of playing on Ubuntu I decided to write some thing on things what I did to make my Gnome desktop more eye catching… I have heard of XGL working on Gnome providing a surprising effects !!! But also I have heard and seen that XGL effects works in much slower motion in most of Intel on board graphic cards (intel i915), so due to this fact I was searching for alternatives and found AiGLX which … Continue reading →
Posted in FOSS, LAMP, Programming
February 4th, 2007
As i have said in my last post.. few days ago I shifted most of my work to Linux (Ubuntu Edgy Eft) I had many reasons to do this, 1. I was sick choosing good anti virus programs/add ware removers/spy ware detectors for my win XP OS coz there were plenty of viruses/add wares/spy wares making the whole system slowing down. 2. I needed some change in how things look and feel. 3. for the sake of adding some thing … Continue reading →
Posted in FOSS, LAMP, Programming
January 31st, 2007
This is one annoying issue I Suffered until today, My Friend Sandaruwan advised me to upgrade my Old Ubuntu OS (Ubuntu 6.06) to the New 6.10 version to get out of my sound problem !!! This was some special case in my Acer Laptop. with some linux flavors the sound drivers did not work hand to hand !!! so I never heard any sound when working in Linux. This was kind of annoying and disappointing for a new Linux User … Continue reading →
Posted in FOSS, LAMP