<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CertPal &#187; General</title>
	<atom:link href="http://www.certpal.com/blogs/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.certpal.com/blogs</link>
	<description>Technology and certifications</description>
	<lastBuildDate>Mon, 26 Jul 2010 17:34:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Crypt DES and 8 character truncated passwords</title>
		<link>http://www.certpal.com/blogs/2010/05/crypt-des-and-8-character-truncated-passwords/</link>
		<comments>http://www.certpal.com/blogs/2010/05/crypt-des-and-8-character-truncated-passwords/#comments</comments>
		<pubDate>Tue, 18 May 2010 14:38:00 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[crypt]]></category>
		<category><![CDATA[des]]></category>
		<category><![CDATA[encryption]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=734</guid>
		<description><![CDATA[Be wary of the crypt + DES encryption method as it truncates passwords to 8 characters in length. The users are usually not informed of the truncation which leads the account vulnerable to password guesses]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F05%2Fcrypt-des-and-8-character-truncated-passwords%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F05%2Fcrypt-des-and-8-character-truncated-passwords%2F" height="61" width="51" /></a></div><p><a href="http://www.certpal.com/blogs/wp-content/uploads/security_lock.png"><img class="alignright size-full wp-image-503" title="security_lock" src="http://www.certpal.com/blogs/wp-content/uploads/security_lock.png" alt="" width="79" height="104" /></a>Many passwords in linux are encrypted using the <a href="http://en.wikipedia.org/wiki/Crypt_%28Unix%29" target="_blank">crypt() utility</a>. The user is usually not aware of the difference between a crypt and a MD5 encryption. Well it can turn out to be important, especially if crypt uses the default DES-based scheme to perform the encryption.</p>
<p>The problem with crypt() + Traditional DES is that it truncates the password length to 8 characters. Users are not usually aware of this and assume that the entire length of the password has been saved and encrypted. Take the apache tool htpasswd for example. It uses <a href="http://httpd.apache.org/docs/2.0/programs/htpasswd.html" target="_blank">crypt() to encrypt passwords</a> (It may also use its own MD5 routine) into a password file. The following command creates a new user in a password file</p>
<p>htpasswd password_file new_user</p>
<p>After this command is executed, you are prompted for a password. If the password is greater than 8 characters, for example &#8211; 123456789, it will still be accepted and no warning will be provided that it was truncated. So providing the password 12345678 will also allow you to be authenticated into the system. Why is this bad ?</p>
<ul>
<li>The time taken to crack 8 character passwords is shorter (in relative comparison).</li>
</ul>
<ul>
<li>It is also likely that the password was truncated in these scenarios, so an attacker may well target passwords that are exactly 8 characters in length.</li>
</ul>
<ul>
<li>Some people have the knack of prefixing the password with the username first. Bad idea if your username happens to be 8 characters long <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<ul>
<li>The user may not even be aware of the problem, since he/she assumes that the password is strong and greater than 8 characters.</li>
</ul>
<p>So the next time you provide a password to a system, you might want to know how they get saved into a persistence store and what encryption is used.</p>
<p><script type="text/javascript">var dzone_url = 'http://www.certpal.com/blogs/2010/05/crypt-des-and-8-character-truncated-passwords/';</script><br />
<script type="text/javascript">var dzone_title = 'Crypt DES and 8 character truncated passwords';</script><br />
<script type="text/javascript">var dzone_blurb = 'Be wary of the crypt + DES encryption method as it truncates passwords to 8 characters in length. The users are usually not informed of the truncation which leads the account vulnerable to password guesses';</script><br />
<script type="text/javascript">var dzone_style = '2';</script><br />
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script></p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F05%2Fcrypt-des-and-8-character-truncated-passwords%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F05%2Fcrypt-des-and-8-character-truncated-passwords%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2010/05/crypt-des-and-8-character-truncated-passwords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learn to secure your application with Google Jarlsberg</title>
		<link>http://www.certpal.com/blogs/2010/05/learn-to-secure-your-application-with-google-jarlsberg/</link>
		<comments>http://www.certpal.com/blogs/2010/05/learn-to-secure-your-application-with-google-jarlsberg/#comments</comments>
		<pubDate>Mon, 10 May 2010 06:00:38 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=721</guid>
		<description><![CDATA[Learn to secure your application with Google Jarlsberg, a small cheesy application written by google with intentional security holes.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F05%2Flearn-to-secure-your-application-with-google-jarlsberg%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F05%2Flearn-to-secure-your-application-with-google-jarlsberg%2F" height="61" width="51" /></a></div><p><a href="http://www.certpal.com/blogs/wp-content/uploads/google_jarlsberg.png"><img class="alignright size-full wp-image-724" title="google_jarlsberg" src="http://www.certpal.com/blogs/wp-content/uploads/google_jarlsberg.png" alt="" width="84" height="85" /></a>I came across an interesting application today. Google has released an application named Jarlsberg that is full of security holes. The intent is to make developers learn how these holes work and put them in a position to combat the security vulnerabilities.</p>
<p>You can <a href="http://jarlsberg.appspot.com/" target="_blank">visit the app</a> to learn more. Security flaws to be detected are classified under the following categories</p>
<ul>
<li>Black box. You dont know the code</li>
<li>White box. Requires you to see the code to understand how to break it.</li>
<li>Gray box. Some code will be made visible.</li>
</ul>
<p>I also came across an <a href="http://code.google.com/edu/submissions/jarlsberg/Jarlsberg_Instructor_Guide.pdf" target="_blank">instructor&#8217;s guide</a> that has problems to be solved in the application, graded by their difficulty level.</p>
<p>What better way to learn an exploit than to perform it on a test system ? Some of the exploits involve</p>
<ul>
<li><a href="http://jarlsberg.appspot.com/part2#2__cross_site_scripting" target="_blank">XSS and related challenges</a></li>
<li><a href="http://jarlsberg.appspot.com/part4#4__path_traversal" target="_blank">Path traversal exploits</a></li>
<li><a href="http://jarlsberg.appspot.com/part4#4__denial_of_service" target="_blank">DOS</a></li>
<li><a href="http://jarlsberg.appspot.com/part5#5__buffer_and_integer_overflow" target="_blank">Buffer overflow</a></li>
<li><a href="http://jarlsberg.appspot.com/part5#5__sql_injection" target="_blank">SQL Injection</a></li>
</ul>
<p>and so much more. <a href="http://jarlsberg.appspot.com/" target="_blank">Give it a try now</a></p>
<p><script type="text/javascript">var dzone_url = 'http://www.certpal.com/blogs/2010/05/learn-to-secure-your-application-with-google-jarlsberg/';</script><br />
<script type="text/javascript">var dzone_title = 'Learn to secure your application with Google Jarlsberg';</script><br />
<script type="text/javascript">var dzone_blurb = 'Learn to secure your application with Google Jarlsberg, a small cheesy application written by google with intentional security holes.';</script><br />
<script type="text/javascript">var dzone_style = '2';</script><br />
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script> </p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F05%2Flearn-to-secure-your-application-with-google-jarlsberg%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F05%2Flearn-to-secure-your-application-with-google-jarlsberg%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2010/05/learn-to-secure-your-application-with-google-jarlsberg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to open multiple SSH tunnels</title>
		<link>http://www.certpal.com/blogs/2010/03/howto-ssh-tunnel-multiple/</link>
		<comments>http://www.certpal.com/blogs/2010/03/howto-ssh-tunnel-multiple/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 08:07:52 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tunnel]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=602</guid>
		<description><![CDATA[OpenSSH can be used to open multiple tunnels to remote services via SSH. Local ports can be opened up and the information communicated with these ports can be relayed to a remote machine. This tutorial explains how to open many ssh tunnels]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F03%2Fhowto-ssh-tunnel-multiple%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F03%2Fhowto-ssh-tunnel-multiple%2F" height="61" width="51" /></a></div><p style="text-align: center;"><a href="http://www.certpal.com/blogs/wp-content/uploads/tunnel.png"><img class="aligncenter size-full wp-image-603" style="border: 1px dashed black;" title="tunnel" src="http://www.certpal.com/blogs/wp-content/uploads/tunnel.png" alt="" width="282" height="170" /></a></p>
<p style="text-align: left;">
<p style="text-align: left;">I use remote linux services often and exposing them as local services can be performed securely using SSH. For example you can access a tomcat server or email server hosted at IP 1.2.3.4 by opening a secure SSH tunnel between your local machine and the target address &#8211; 1.2.3.4.</p>
<p>The <a href="http://www.openssh.com/" target="_blank">OpenSSH tool</a> can be used to perform SSH related activities on your machine. Simply install it with yum, apt-get or Yast, if it is not already available. Once you have it use the following command to open multiple SSH tunnels to your services</p>
<p><strong>Open tunnel and execute commands:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> 1.2.3.4 <span style="color: #660033;">-lmyUser</span> <span style="color: #660033;">-L</span> <span style="color: #000000;">3098</span>:1.2.3.4:<span style="color: #000000;">21</span> <span style="color: #660033;">-L</span> <span style="color: #000000;">3099</span>:1.2.3.4:<span style="color: #000000;">80</span> <span style="color: #660033;">-L</span> <span style="color: #000000;">3100</span>:1.2.3.4:<span style="color: #000000;">443</span></pre></td></tr></table></div>

<p>The command is explained below</p>
<p><strong>1.2.3.4</strong> &#8211; Your target IP</p>
<p><strong>l</strong> &#8211; The user to login as</p>
<p><strong>L</strong> &#8211; A local tunnel to a remote port</p>
<p><strong>3098</strong> &#8211; The local port to use when establishing this tunnel</p>
<p><strong>21</strong> &#8211; The remote port at 1.2.3.4 to which the tunnel will be established</p>
<p>Multiple tunnels can be opened by specifying multiple -L flags. For example http://localhost:3099 will now redirect to http://1.2.3.4:80/ That is a fancy way of saying all HTTP requests ( 80 is the default port ) for 1.2.3.4 can now be reached locally at port 3099.</p>
<p>Note that the above command will also log you into the remote system. If you want to open the tunnels alone, use the -N switch and the -f switch as shown below</p>
<p><strong>Open tunnels only:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-f</span> myUser<span style="color: #000000; font-weight: bold;">@</span>1.2.3.4 <span style="color: #660033;">-L</span> <span style="color: #000000;">3099</span>:1.2.3.4:<span style="color: #000000;">25</span> <span style="color: #660033;">-N</span></pre></td></tr></table></div>

<p>The -f switch asks SSH to work in the background and -N asks SSH not to execute any commands.</p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F03%2Fhowto-ssh-tunnel-multiple%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F03%2Fhowto-ssh-tunnel-multiple%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2010/03/howto-ssh-tunnel-multiple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to turn off google buzz</title>
		<link>http://www.certpal.com/blogs/2010/02/how-to-turn-off-google-buzz/</link>
		<comments>http://www.certpal.com/blogs/2010/02/how-to-turn-off-google-buzz/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 06:06:00 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[buzz]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=564</guid>
		<description><![CDATA[How to turn off google buzz. Buzz integrates with your Gmail inbox and you can get rid of it if you want to.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F02%2Fhow-to-turn-off-google-buzz%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F02%2Fhow-to-turn-off-google-buzz%2F" height="61" width="51" /></a></div><p><a href="http://www.certpal.com/blogs/wp-content/uploads/no.png"><img class="alignright size-full wp-image-565" title="no" src="http://www.certpal.com/blogs/wp-content/uploads/no.png" alt="" width="65" height="65" /></a>I logged into a gmail inbox today, surprised to find &#8216;Google Buzz&#8217; asking me if I wanted in. I clearly said &#8216;No&#8217;. Not yet another social network. pfft. So after I said &#8216;No&#8217; there it was sitting comfortably on the navigation bar and telling me people were following me and I could follow them.</p>
<p>There is a small link on the bottom of your Gmail page that says &#8216;<strong>turn off buzz</strong>&#8216;. Click on that and you get disconnected from the social network. I wonder what google plans for Orkut.</p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F02%2Fhow-to-turn-off-google-buzz%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F02%2Fhow-to-turn-off-google-buzz%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2010/02/how-to-turn-off-google-buzz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle apologizes about kenai.com</title>
		<link>http://www.certpal.com/blogs/2010/02/oracle-kenai-com/</link>
		<comments>http://www.certpal.com/blogs/2010/02/oracle-kenai-com/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 05:44:16 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[kenai]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sun]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=557</guid>
		<description><![CDATA[Oracle apologizes for its communication about kenai.com's future by saying that the future of kenai projects are secure at java.net]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F02%2Foracle-kenai-com%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F02%2Foracle-kenai-com%2F" height="61" width="51" /></a></div><p>After project owners were asked to move out of kenai.com, Oracle now admits that it did a poor job at communicating its plans for the project. An <a href="http://blogs.sun.com/projectkenai/entry/the_future_of_kenai_com" target="_blank">updated post</a> from Oracle says that the future of kenai.com projects is secure. Those projects will be migrated to java.net and continued as is. Here is an extract from the post</p>
<blockquote><p>We don&#8217;t believe it makes sense to continue investing in multiple hosted development sites that are basically doing the same thing. Our plan is to shut down kenai.com and focus our efforts on java.net as the hosted development community. We are in the process of migrating java.net to the kenai technology. This means that any project currently hosted on kenai.com will be able to continue as you are on java.net. We are still working out the technical details, but the goal is to make this migration as seamless as possible for the current kenai.com projects</p></blockquote>
<p>Most developers seem to be <a href="http://eriwen.com/tools/moving-to-github/">moving out of kenai.com</a> after being asked to leave. For those of you that do not want to move, there may still be hope <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><script type="text/javascript">// <![CDATA[
var dzone_url = 'http://www.certpal.com/blogs/2010/02/oracle-kenai-com/';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_title = 'Oracle apologizes about kenai.com';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_blurb = '[description]';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_style = '2';
// ]]&gt;</script><br />
<script src="http://widgets.dzone.com/links/widgets/zoneit.js"></script></p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F02%2Foracle-kenai-com%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F02%2Foracle-kenai-com%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2010/02/oracle-kenai-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error: ORA-01418: specified index does not exist</title>
		<link>http://www.certpal.com/blogs/2010/02/ora-01418-specified-index-does-not-exist/</link>
		<comments>http://www.certpal.com/blogs/2010/02/ora-01418-specified-index-does-not-exist/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 05:09:31 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=550</guid>
		<description><![CDATA[A look at the "Error: ORA-01418: specified index does not exist" problem and how it can be solved. The error is misleading at times and does not always mean that the specified index does not exist. You might simply not have the privilege to execute index related queries.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F02%2Fora-01418-specified-index-does-not-exist%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F02%2Fora-01418-specified-index-does-not-exist%2F" height="61" width="51" /></a></div><p>I ran into a weird little error while trying to tune the performance of a query in the oracle database. A table had an index on a VARCHAR2 column. After a fair number of inserts were made the population of this table grew to 1.5 million records. A query that did an join on the VARCHAR2 column was talking ages to get the results. Well, it was taking 900ms actually but the SLA for the API call is way below that.</p>
<p>An &#8220;explain plan for QUERY&#8221; statement was run followed by a select from plan_details. It turns out the index is never used and a full table scan was used to get the data. Hence the problem.</p>
<p>So all I have to do is find out why the index is not being picked up. It probably has to do with statistics, and a rebuild on the index might help I thought. Or may be I need to analyze the index. So I went about trying to do some of these things. There were no DBAs around so I had to experiment a little.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;">analyze <span style="color: #993333; font-weight: bold;">INDEX</span> YOUR_INDEX_NAME validate structure;
&nbsp;
Error: ORA<span style="color: #66cc66;">-</span>01418: specified <span style="color: #993333; font-weight: bold;">INDEX</span> does <span style="color: #993333; font-weight: bold;">NOT</span> exist
&nbsp;
SQLState:  <span style="color: #cc66cc;">72000</span>
ErrorCode: <span style="color: #cc66cc;">1418</span></pre></td></tr></table></div>

<p>This was totally weird. I knew that the index did exist and the name was correct. To double check I ran this query</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> all_indexes <span style="color: #993333; font-weight: bold;">WHERE</span> INDEX_NAME<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'YOUR_INDEX_NAME'</span></pre></td></tr></table></div>

<p>And it did return my index correctly. After trying several other commands related to indexes they all returned the same thing. I tried to prefix the SCHEMA name and that did not help.</p>
<p>So it turns out, I do not have permissions to create indexes or do any operations related to them and that is what throws this error. The error is pretty misleading since there already exists an error code for insufficient prvileges for performing a given operation &#8211; Error: ORA-00990: missing or invalid privilege.</p>
<p>I passed the index related queries on to a DBA and the performance of my application queries were back on track. I hope this saves a developer the time I lost trying to find out why the index did not exist.</p>
<p>PS: Oracle 11 also has an index visibility option which can be verified with</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> INDEX_NAME<span style="color: #66cc66;">,</span>VISIBILITY <span style="color: #993333; font-weight: bold;">FROM</span> USER_INDEXES <span style="color: #993333; font-weight: bold;">WHERE</span> INDEX_NAME<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'YOUR_INDEX_NAME'</span>;</pre></td></tr></table></div>

<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F02%2Fora-01418-specified-index-does-not-exist%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F02%2Fora-01418-specified-index-does-not-exist%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2010/02/ora-01418-specified-index-does-not-exist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Will you continue to use Sun projects ?</title>
		<link>http://www.certpal.com/blogs/2010/01/sun-projects-poll/</link>
		<comments>http://www.certpal.com/blogs/2010/01/sun-projects-poll/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 11:50:44 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[poll]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[sun]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=524</guid>
		<description><![CDATA[A poll to scratch the surface of the question 'Will Sun projects continue to be used in development and production environments around the world'. ]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F01%2Fsun-projects-poll%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F01%2Fsun-projects-poll%2F" height="61" width="51" /></a></div><p>A few days ago the EU had approved the takeover of Sun microsystems by Oracle. This brings to an end the long awaited acquisition. There have been several blog entries about the fate of the open source projects that Sun currently supports. I have read some of the arguments put forward about why developers should move away from / use certain projects.</p>
<p>However I also find myself in a dilemma. I installed GlassFish and deployed a few apps on it recently. I found it interesting and was impressed with it within a few minutes of using it. MySql is also a great open source project. There are many tools built around the database and it competes well with PostGresql. Netbeans is also a great IDE and supports glassfish.</p>
<p>I am very tempted to continue using these projects for the development of new pet projects and to learn new specs. Right now I expect the support for these projects to continue for a few years, and I do not really expect to see great innovation of any sort. The best case scenario is that Oracle leverages the usefulness of these projects and decides to keep them alive while giving them healthy financial support. One is allowed to dream <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p>
<p>So it boils down to the following question. &#8220;<strong>Will you as a developer / architect / &lt;Insert technical position here&gt; continue to use projects like GlassFish, Netbeans, MySql etc ?</strong>&#8221; Or are you looking to move away to other open source projects immediately ? Voice your thoughts through this poll</p>
<p>Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.<br />
<script type="text/javascript">// <![CDATA[
var dzone_url = 'http://www.certpal.com/blogs/2010/01/sun-projects-poll/';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_title = 'Will you continue to use Sun projects ?';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_blurb = 'A poll to scratch the surface of the question 'Will Sun projects continue to be used in development and production environments around the world'. ';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_style = '2';
// ]]&gt;</script><br />
<script src="http://widgets.dzone.com/links/widgets/zoneit.js"></script></p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F01%2Fsun-projects-poll%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F01%2Fsun-projects-poll%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2010/01/sun-projects-poll/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Problems in production</title>
		<link>http://www.certpal.com/blogs/2010/01/problems-in-production/</link>
		<comments>http://www.certpal.com/blogs/2010/01/problems-in-production/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 11:21:47 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[prod]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=514</guid>
		<description><![CDATA[Three anecdotes about problems that I encountered in various live environments recently. The variety of problems just goes to show that you can still encounter unexpected things after several hours of testing.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F01%2Fproblems-in-production%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F01%2Fproblems-in-production%2F" height="61" width="51" /></a></div><p><img class="alignright size-full wp-image-515" title="prod-burn" src="http://www.certpal.com/blogs/wp-content/uploads/prod-burn.PNG" alt="prod-burn" width="100" height="127" />I have been a tad busy fixing some weird little bugs lately. They helped me appreciate the multitude of things that can go wrong in a live environment and served as a gentle reminder that you should always be on your heels.</p>
<p>Here they are</p>
<p><strong>1. </strong><strong>LDAP and the user</strong></p>
<p>A web application product was configured to use an LDAP directory structure. The directory was segregated into roles / groups / OUs, the usual. One of the users had trouble logging into the product. This was weird because this person was a valid user and Outlook seemed to recognize him. Outlook uses the same LDAP tree. So I dug into it. The easiest way to check what is going on is to use a LDAP directory browser. I use the one provided by <a href="http://www.novell.com/coolsolutions/tools/13765.html" target="_blank">Novell for free</a>. The LDAP<strong>s</strong> support is not great but it will do for basic lookups.</p>
<p>So as I dug into the tree, it turns out this user was mapped as a group. Yes a group. The product was configured so that only the &#8220;user accounts&#8221; LDAP directory was looked into for valid users. So since this user was, ummm a group, the application was unable to find him. My only thought was &#8216;wow ! how did this go under the radar for so long ?&#8217;. The mistake was understandable though since groups and users are under a similar looking structure. The LDAP admin must have had too many doughnuts at lunch and probably dozed through when configuring the user into the system <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>2. Authentication failure</strong></p>
<p>This one involves the LDAP too. We built a web app recently that was supposed to check for users under a specific tree node. The logic was to bind to the LDAP and if that is successfull then it must mean that the user exists. Unfortunately the negative scenario to this logic was not tested all that well. The API did not throw an exception when the Bind failed. So this meant that I could login to the application without a password. This also meant I could use any user name I wanted to and login. Even one that does not exist. I was tempted to do some operations as MrBunnyRabbit76 but fixed the bug instead.</p>
<p><strong>3. FTP and the CPU</strong></p>
<p>Now comes this little gem. A FTP process had been scheduled in CRON to run every 10 minutes or so. Its job is to ensure that a local folder and a remote FTP folder are in sync with each other. The program used to do this is lftp with the R switch (for reverse). It so happens that the FTP account gets locked because it ran out of space. The account is unlocked the next day. However the lftp processes did not terminate for some reason when the account was locked.</p>
<p>I come back to check on a web application on the server and it gives a 503 error. hmm&#8230; weird I thought. Everything is fine, tomcat is up, apache is up and yet a 503. The problem was that the lftp processes that did not terminate caused the CPU to be overloaded. All other processes were begging for some CPU time. The lftp processes were sitting quietly and drinking up precious CPU power for almost 2 days. Once the processes were killed things went back to normal.</p>
<p>Weird things happen in PROD whether it is your fault or not. No matter how much you test, it always pays to be on your watch <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F01%2Fproblems-in-production%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F01%2Fproblems-in-production%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2010/01/problems-in-production/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do you really need that design pattern ?</title>
		<link>http://www.certpal.com/blogs/2009/12/do-you-really-need-that-design-pattern/</link>
		<comments>http://www.certpal.com/blogs/2009/12/do-you-really-need-that-design-pattern/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 15:25:16 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=481</guid>
		<description><![CDATA[Using design patterns where they do not belong can lead to over engineered code. Use patterns only when you really need to. Trivial code that is easy to maintain will always triumph over a complicated design pattern. In short, HelloWorld does not need a design pattern]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F12%2Fdo-you-really-need-that-design-pattern%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F12%2Fdo-you-really-need-that-design-pattern%2F" height="61" width="51" /></a></div><p>I chanced upon <a href="http://blogs.microsoft.co.il/blogs/gilf/archive/2009/11/22/applying-strategy-pattern-instead-of-using-switch-statements.aspx " target="_blank">a post </a>a while back about how a switch statement should be replaced with the strategy pattern. If you have not had a chance to go through it, please do. The post is not very long.  I found myself disagreeing very strongly with the author of the post and I was surprised to find that people thought this was a good idea.</p>
<p>The gist of the post was that using the Strategy pattern was better than using switch statements to determine which logic to execute. Here is why I think the idea used there was bad</p>
<ol>
<li>The introduction of the Strategy pattern, in the example, introduces three new classes. So for every case in a switch statement, we should go about replacing the corresponding code with a new class ? This could easily lead to an explosion in the number of classes.</li>
<li> Distributing logic across classes makes it harder for a developer to follow. When I traverse 2 / 3 links down a code path I might lose track of where I started.</li>
<li> Introducing a new case means I have to introduce one more class, remember to add that as a strategy and switch to that strategy correctly when the case is presented.</li>
<li>Introducing a new class to handle a &#8216;case&#8217; might not make sense. Classes are supposed to cohesively carry out a function. Introducing a new class for every function that a class is supposed to perform, dilutes the purpose of the class.</li>
<li>The code that was supposed to perform the switch case is simply done else where and called a strategy.</li>
</ol>
<p>Applying patterns where they do not belong, can be an anti pattern by itself. I can relate with what the author is trying to do. When I finished the &#8216;Head first design patterns&#8217; book I was racing to implement a pattern for everything that was around me. The book stopped me right there and warned &#8216;HelloWorld does not need a design pattern&#8217;. And they are absolutely right. For a design pattern to succeed, you need</p>
<ol>
<li>The right problem to apply the pattern.</li>
<li>Correct implementation of the pattern to solve the problem.</li>
<li>Knowledge and relevant documentation if necessary, to let the maintenance developer down the line know that this is how you used the pattern.</li>
</ol>
<p>Patterns are meant to solve common design problems but trying to use them everywhere can lead to overly engineered code that is hard to read and maintain. Use patterns only when they are necessary and help you solve the problem.</p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F12%2Fdo-you-really-need-that-design-pattern%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F12%2Fdo-you-really-need-that-design-pattern%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2009/12/do-you-really-need-that-design-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google wave</title>
		<link>http://www.certpal.com/blogs/2009/10/google-wave/</link>
		<comments>http://www.certpal.com/blogs/2009/10/google-wave/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 12:44:02 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[wave]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=378</guid>
		<description><![CDATA[A few observations that I made regarding the google wave dev preview. The wave is interesting but google has some way to go before perfecting errors / flaws in its product.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Fgoogle-wave%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Fgoogle-wave%2F" height="61" width="51" /></a></div><p><img class="alignright size-full wp-image-384" title="wavelogo" src="http://www.certpal.com/blogs/wp-content/uploads/wavelogo.png" alt="wavelogo" width="154" height="154" />After a long wait I got a google wave account. yay ! Took the wave for a spin over the last few days and there were some interesting things that I observed. I wrote my first java wave robot and it was pretty cool. But an explanation of how the robot works should be left to another post all together. I will share my general observations in this post.</p>
<p><strong>Deleted welcome messages: </strong></p>
<p>The first thing that was weird was that welcome messages are often deleted by wave users or by bots. This is nuts. The wave welcome messages also have a lot of noise amidst them with quotes like &#8216;<span style="color: #ff0000;"><strong>Please do not delete this </strong></span>!&#8217; in bold red with a big font size. Wave still does not have a feature to disable edits. It is coming soon but it is not yet active.</p>
<p><strong>Lonely waves:</strong></p>
<p>Almost every one is complaining about this. They have a wave account but the 8 invites that were promised have not yet arrived (for some). The reason being that google wave is expanding its user base very slowly to avoid a massive crash of the system. It is also difficult to find waves centered around a topic. I tried to find java discussion but my searches ended up with nothing <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   If you are a java geek and have a google wave account simply add your wave account name in the comments section. At least those reading this post will know how to contact you.</p>
<p><strong>Miscellaneous / Tit bits:</strong></p>
<ul>
<li>Google wave was pretty slow. But I expected that since this is a DEV preview.</li>
</ul>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-379" title="wave-sidebar" src="http://www.certpal.com/blogs/wp-content/uploads/wave-sidebar.PNG" alt="wave-sidebar" width="25" height="109" /></p>
<ul>
<li>A funky sidebar was present on each window. I did not like this. I am used to clicking somewhere within the side bar&#8217;s empty space to move up or down. Fortunately the mouse wheel works with the side bar.</li>
</ul>
<ul>
<li>Some robots are creating havoc. Editing comments left by others and deleting wave replies. This leaves some people vexed.</li>
</ul>
<ul>
<li>There are some cool robots out there. I tried out the <a href="http://answers.oreilly.com/topic/374-reacting-to-wave-conversations-and-inserting-wave-gadgets-with-a-wave-robot/" target="_blank">ISBN wave robot </a>that replaces the ISBN number with a picture of a book and a link to O&#8217;Reilly. I can think of many applications where such robots can come in handy.</li>
</ul>
<p><img class="aligncenter size-full wp-image-382" title="wave-usab" src="http://www.certpal.com/blogs/wp-content/uploads/wave-usab.PNG" alt="wave-usab" width="458" height="216" /></p>
<ul>
<li>Editing / deleting wave replies (blips) involves 2 clicks. You click a drop down and then select an option from it. Usability of the blip can be enhanced by placing small icons near each blip, which you can click to perform that action. Just a thought.</li>
</ul>
<ul>
<li>Removing yourself from a wave discussion is not yet supported. You can add contacts without asking the contact&#8217;s permission first.</li>
</ul>
<ul>
<li>There are wave &#8216;groups&#8217; out there that discuss specific topics. You can subscribe to these wave groups. But sometimes, like in a forum thread, the discussion takes a U turn and towards the end of the discussion the participants are talking about something entirely unrelated to the root topic.</li>
</ul>
<ul>
<li>Searching for waves is done in a variety of ways. You can search by tags / contributors / authors / wave ID / gadgets etc etc. Each wave can be tagged to particular keywords like a blog post.</li>
</ul>
<p>This is just a tip of the ice berg. The java robot was very exciting to create and it was more exciting to watch it in action. There are some good tutorials out there that tell you how to write a bot but I see a gap where the flow of events and the overall picture of the robot is not brought out. I will try to cover that in my next post. You can subscribe to the <a href="http://feeds.feedburner.com/Certpal" target="_blank">RSS feed</a> if you would like to keep an eye on it.<br />
<script type="text/javascript">var dzone_url = 'http://www.certpal.com/blogs/2009/10/google-wave/';</script><br />
<script type="text/javascript">var dzone_title = 'Google wave';</script><br />
<script type="text/javascript">var dzone_blurb = 'A few observations that I made regarding the google wave dev preview. The wave is interesting but google has some way to go before perfecting errors / flaws in its product.';</script><br />
<script type="text/javascript">var dzone_style = '2';</script><br />
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script></p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Fgoogle-wave%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Fgoogle-wave%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2009/10/google-wave/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Google hacks</title>
		<link>http://www.certpal.com/blogs/2009/10/google-hacks/</link>
		<comments>http://www.certpal.com/blogs/2009/10/google-hacks/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 17:11:55 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=364</guid>
		<description><![CDATA[Google can be used to reveal web site vulnerabilities. Tweaking google searches can help reveal them. Learn how to secure your site to prevent google from accidentally caching important content on your website. These tips will help prevent google hacks on your site.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Fgoogle-hacks%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Fgoogle-hacks%2F" height="61" width="51" /></a></div><p>Let me begin this post by saying that I am not writing this so that you can read this and become a haCkEr. I am writing this post so you can learn to identify a vulnerability and try to avoid an embarrassment.</p>
<p>Google is an amazing search engine. The problem is that it is too good at what it does sometimes <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Here are some ways that google can reveal vulnerabilities on your website by mistake.<br />
<br/></p>
<h2><strong>You allowed google to index a critical file:</strong></h2>
<p>This happens more often than you think. WordPress for example houses important files under the wp-* folders and it is no one&#8217;s business except yours to look at these files. Other files like .htaccess htpasswd are critical to your site&#8217;s security (if you are using apache and &#8216;allow overrides&#8217;). Do not allow google to index them. You can prevent that by placing a robots.txt file on the root path of your website. <a href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=156449" target="_blank">More on that here</a>.</p>
<p>The better option is to put in place a configuration that will not allow the sensitive file to be displayed in the first place. Not all robots will obey what you instruct using robots.txt. The FilesMatch directive on apache can help you protect your site.</p>
<p>You can double check that google can read your robots.txt using google <a href="http://www.google.com/analytics/" target="_blank">analytics</a>. You can check the files that google has indexed using the query<strong>&#8216;site:yoursitename.com</strong></p>
<p><br/></p>
<h2><strong>Google indexed a service page that is being served on a non regular port:</strong></h2>
<p>Examples of this are login pages or services that do not require a password. Searching for such pages can be done using the &#8220;inurl&#8221; keyword in searches. Here is an example <strong>inurl:8080</strong>. There are ways to tweak that search string to reveal more information about services on other ports. When you complement inurl:something_unique_in_the_url with a search using quotes, like <strong>inurl:1234 intitle:&#8221;Administration blah&#8221;</strong>, it can yield some very interesting results. Pick your favorite admin tool and replace the port and title with the admin home page equivalent. The search works on many major application / web servers.</p>
<p>Remember that google indexes your page. Even if you correct the problem, the damage is done and is still being done. With cached pages, a service that does not ask for user name and passwords (yes there are important services that do not require a username/password) will be completely indexed. Yikes ! The data that your service exposes is cached and indexed for everyone to see. Not what we want.</p>
<p>To avoid this simply shutdown services you do not need. If you need a service but you want that service to be private, block the port with a firewall.</p>
<p>You can optionally tell google bot and other bots not to index the page in question. But that is not really a solution. Be proactive and secure the service. A cached page can end up earning you some DOS attacks.<br />
<br/></p>
<h2><strong>Google cracks MD5:</strong></h2>
<p>I realized that google could be used to crack weak passwords <a href="http://www.lightbluetouchpaper.org/2007/11/16/google-as-a-password-cracker/" target="_blank">from this post</a>. If the encryption is done without salting, the password will result in the same hash every time. A weak password can be guessed easily using this technique.</p>
<p>The lesson here is to use a strong password that no one will guess. The other lesson is to ensure that the links on your site do not pass along sensitive information. Here is the <a href="http://www.google.com/search?q=20f1aeb7819d7858684c898d1e98c1bb" target="_blank">google search </a>in case it interests you</p>
<p><br/></p>
<h2><strong>Cached directory pages:</strong></h2>
<p>Your web server is quite capable of displaying a directory listing. What this means is that besides displaying HTML, if I were to request for a directory name instead, your web server will reveal the contents of the directory to me. Why is this bad ? It helps find more vulnerable files that are housed inside those directories. You can ask apache not to serve directory content by configuring the same in httpd.conf. The line of configuration will look something like this<br />
<br/><br/><br />
Options Indexes FollowSymLinks<br />
# More stuff here</p>
<p>Remove the word <a href="http://httpd.apache.org/docs/2.0/mod/core.html" target="_blank">Indexes</a>.</p>
<p>The related search query in google is <strong>intitle:&#8221;index of /&#8221;</strong>. Tweaking it will provide better results.</p>
<p>Before you make any configuration changes, always make a backup. Read about the changes you are making and understand what you are doing before you do it. Try these tricks on your site and check if it is secure. Be creative. Think about other sensitive terms like jsessionid, username, passwd, password, id etc.<br />
<script type="text/javascript">var dzone_url = 'http://www.certpal.com/blogs/2009/10/google-hacks/';</script><br />
<script type="text/javascript">var dzone_title = 'Google hacks';</script><br />
<script type="text/javascript">var dzone_blurb = 'Google can be used to reveal web site vulnerabilities. Tweaking google searches can help reveal them. Learn how to secure your site to prevent google from accidentally caching important content on your website. These tips will help prevent google hacks on your site.';</script><br />
<script type="text/javascript">var dzone_style = '2';</script><br />
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script> </p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Fgoogle-hacks%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Fgoogle-hacks%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2009/10/google-hacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software estimation nightmare</title>
		<link>http://www.certpal.com/blogs/2009/10/software-estimation-nightmare/</link>
		<comments>http://www.certpal.com/blogs/2009/10/software-estimation-nightmare/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 15:42:51 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[estimate]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=354</guid>
		<description><![CDATA[Software estimation is not easy. When you get it wrong, it can come back and bite you real hard. A few stories about estimates and how you can end up getting it wrong.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Fsoftware-estimation-nightmare%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Fsoftware-estimation-nightmare%2F" height="61" width="51" /></a></div><p><img class="size-medium wp-image-356 alignright" title="software_estimate" src="http://www.certpal.com/blogs/wp-content/uploads/software_estimate-189x300.png" alt="software_estimate" width="113" height="180" /></p>
<p>I have seen a few estimation nightmares in my time and have been unfortunate enough to be in some of them. Let me narrate a few anecdotes first</p>
<p><strong>Anecdote 1:</strong></p>
<p>I used to work with a re-insurer. This company had a legacy application that was written in fortran. Yes <a href="http://en.wikipedia.org/wiki/Fortran" target="_blank">fortran</a>. It did some very important things. It was capable of making estimations for a given market and it crunched a lot of numbers into meaningful data. Because this application was written in fortran, finding the right engineers to maintaining it was difficult. So they decided to shift the application to a better supported platform / language.</p>
<p>The work came to IT and a manager said &#8216;Lets convert it to VB&#8217;. This person, did not know fortran and was not a master of VB either. No developers or architects were asked for advice. It was simply decided that the application should be converted to VB from fortran.</p>
<p>But wait, the fun is just about to begin. After making the decision to convert it to VB, a developer was asked to judge how long it would take to make this migration. This developer worked in Oracle technology and knew nothing about fortran and very little VB. This developer was chosen to do this estimate because the others were busy. A &#8216;ball park&#8217; estimate of 4 months was given to the manager. The estimate was not based on any fact / data. It was arbitrary at best. The manager then went to the user and said &#8216;We will convert your application from fortran to VB in 4 months&#8217;.</p>
<p>The user could not believe what he was hearing. So much so that the business department said &#8216;If you cannot convert the application in 4 months IT will pay X dollars per day for each day that the project is defaulted&#8217;. The IT managers agreed and all hell broke loose. Two developers were assigned to the project and they worked like crazy over weekends and put in 16-20 hour days to finish the project. The project was delivered 3 months late and IT lost money implementing the project.</p>
<p><strong>Anecdote 2:</strong></p>
<p>An application cluster which housed 3 nodes had a problem. The cluster would simply shutdown without warning every now and then and had some applications that were used by external users. Here external users = internet users that are customers to the application. Since the problem involved external users it was of higher priority since a crash is an embarrassment.</p>
<p>I was assigned the task of finding out what the problem was. A manager called me up and said &#8216;Give us an estimate on how much time you need to fix this&#8217;. I had no clue, so I did some preliminary investigation and tried to find various root causes. I narrowed down some possibilities and was about to give her a number. She said &#8216;Your estimate has to be within X working days since I told the users we will give them an analysis by Thursday&#8217;. I was like &#8216;<strong>What !?</strong>&#8216;. I still had to do tons of research and it would have taken me a few weeks to go through all the problems in all the applications in the cluster and try to figure out what was going on.</p>
<p>There were no logs indicating a problem and very little signs of what was going wrong. In the end I was forced to deliver a half boiled &#8220;analysis&#8221;. The problem was then forgotten. It came back to bite us several times until we finally solved it a year and a half later.</p>
<p>There are several other cases where an estimation nightmare caused losses in time and money. I have learned some lessons the hard way over the years.</p>
<ul>
<li>When your manager will not listen to your reason about why an estimate is high, run the other way quickly.</li>
</ul>
<ul>
<li>Assert yourself. Projects will take time to get done. You do not have to lower estimates just because some one thinks it is high.</li>
</ul>
<ul>
<li>Include contingency effort in estimates. This is usually 15-20% of the total effort.</li>
</ul>
<ul>
<li>If you hit a road block, communicate it immediately. If you wait for the end date and then tell everyone that you cant deliver on time, they are less likely to listen to you.</li>
</ul>
<ul>
<li>Do not be shy to say &#8216;It cannot be done within X days.&#8217; There is nothing wrong with saying this. No one will think you are a bad developer if you take 5 extra days to get something done. If you overshoot by 5 days however, people will think &#8216;you missed the deadline&#8217; by 5 days. This is a big difference.</li>
</ul>
<ul>
<li>Always over estimate. If you think you can get something done in 5 days, you are probably thinking about the ideal scenario. Users will come up with feedback sometimes and will still expect you to deliver in 5 days.</li>
</ul>
<p>I am not trying to blame managers or developers for under estimations. There are managers that know nothing about the technology in question and make estimates in place of developers. Then there are developers that make estimations based on an ideal scenario. Both are taking risks. Think carefully before committing estimates. Getting them wrong can cost you dearly.</p>
<p><script type="text/javascript">// <![CDATA[
var dzone_url = 'http://www.certpal.com/blogs/2009/10/software-estimation-nightmare/';
// ]]&gt;</script></p>
<p><script type="text/javascript">// <![CDATA[
var dzone_title = 'Software estimation nightmare';
// ]]&gt;</script></p>
<p><script type="text/javascript">// <![CDATA[
var dzone_blurb = 'Software estimation is not easy. When you get it wrong, it can come back and bite you real hard. A few stories about estimates and how you can end up getting it wrong.';
// ]]&gt;</script></p>
<p><script type="text/javascript">// <![CDATA[
var dzone_style = '2';
// ]]&gt;</script></p>
<p><script src="http://widgets.dzone.com/links/widgets/zoneit.js"></script></p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Fsoftware-estimation-nightmare%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Fsoftware-estimation-nightmare%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2009/10/software-estimation-nightmare/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Lazy programmers</title>
		<link>http://www.certpal.com/blogs/2009/10/lazy-programmers/</link>
		<comments>http://www.certpal.com/blogs/2009/10/lazy-programmers/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 05:50:15 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[lazy]]></category>
		<category><![CDATA[programmer]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=344</guid>
		<description><![CDATA[Programmers that research topics and code on their own always reign over those that copy and paste code. We look at several breeds of programmers in this post.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Flazy-programmers%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Flazy-programmers%2F" height="61" width="51" /></a></div><p><img class="alignright size-full wp-image-345" title="google_programmer" src="http://www.certpal.com/blogs/wp-content/uploads/google_programmer.png" alt="google_programmer" width="216" height="186" />I joke with a friend about this all the time. &#8216;<strong>We are surrounded by Google programmers</strong>&#8216; he said, and I couldn&#8217;t agree more.</p>
<p>There is a difference between a &#8216;Google programmer&#8217; and a &#8216;programmer that works at Google&#8217;. Google programmers simply search Google for a piece of boiler plate code and stick it into their app. It wreaks havoc later and causes trouble for a lot of people.</p>
<p>I chanced upon <a href="http://ctasada.blogspot.com/2009/09/stackoverflow-and-lazy-developers.html" target="_blank">this blog post </a>a while back that was complaining about lazy developers at stackoverflow. The complaint being that some developers ask silly questions, the answer to which a Google search will easily reveal. It seems some people are so lazy to use google that <a href="http://lmgtfy.com/?q=let+me+google+that+for+you" target="_blank">whole websites </a>are dedicated to Google something for you <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So there are sections of the programming population that do not want to use Google, they will ask a question in a forum, expect a silver bullet for a reply and nag till they get it. The other section Googles for some code, copies it into the application and god knows what will happen when it goes kaboom. There is a third section of developers that do use Google and do see code that comes out of a Google search, but do not inject the same code into their application. Instead, they understand the code and research a little more to arrive at a good solution.</p>
<p>Now although I agree with the sentiments in the blog post mentioned above, why single out stackoverflow alone ? A comment left in the post agrees that the problem is prevalent across other sites</p>
<blockquote><p>We have this problem at dream.in.code as well. I think it&#8217;s a problem that creeps in to most Q&amp;A type sites.</p></blockquote>
<p>The rest of the comment makes a suggestion that programmers that are not employed in the US are lazy, but lets ignore that. Laziness transcends all barriers. The comment is quite true that most Q and A sites have people come in and ask very basic questions. The problem might not be with the people who ask the questions but with the people who answer it. When a slacker asks a question with an obvious answer, the right thing to do would be to point to a javadoc or a user guide pdf instead of giving the answer straight away. This will encourage the person that asked the question to lookup the answer next time.</p>
<p>When some one asks you a question with an obvious answer, do not be rude; give them a direct answer; or ask them to RTFM without giving them a link. For all you know this person may really be a newbie that has absolutely no clue about the subject. Instead post a helpful link and nudge them. If they repeated ask silly questions, simply ignore it after a while. Quoting a text from the post</p>
<blockquote><p>This behaviors will produce tons and tons of copy&amp;pasted code in our programs and will create a generation of developers unable to think by themselves</p></blockquote>
<p>These programmers are already here. But I don&#8217;t think that we are creating a generation of them. Those that are lazy and simply want to copy and paste code will always do so. They can be ignored after a little nudging. Those that are &#8216;cats on the wall&#8217; can be nudged to the right side. Then there are programmers that will research code and use Google in ways that it should be used. These are the programmers that will triumph in situations that involve solving classloaders problems / SSL handshake exceptions /performance issues etc etc.<br />
<script type="text/javascript">// <![CDATA[
var dzone_url = 'http://www.certpal.com/blogs/2009/10/lazy-programmers/';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_title = 'Lazy programmers';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_blurb = 'Programmers that research topics and code on their own always reign over those that copy and paste code. We look at several breeds of programmers in this post.';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_style = '2';
// ]]&gt;</script><br />
<script src="http://widgets.dzone.com/links/widgets/zoneit.js"></script></p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Flazy-programmers%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F10%2Flazy-programmers%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2009/10/lazy-programmers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitoring / Debugging web traffic</title>
		<link>http://www.certpal.com/blogs/2009/09/monitoring-web-traffic/</link>
		<comments>http://www.certpal.com/blogs/2009/09/monitoring-web-traffic/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 15:53:10 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=289</guid>
		<description><![CDATA[This article explains why tools like tcpmon / charles are important for a web developer. If you have never used a web monitor before, start using one now.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F09%2Fmonitoring-web-traffic%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F09%2Fmonitoring-web-traffic%2F" height="61" width="51" /></a></div><p>If you are a web developer, you would have encountered one of the following challenges.</p>
<ol>
<li>Ensure that your web page contents are not cached by the browser.</li>
<li>Check if your clear text componenets are gzipped by the web server.</li>
<li>Add additional request parameters / headers for testing.</li>
<li>Determine if a stolen cookie can be used to login to the site.</li>
<li>Analyze request / response times.</li>
<li>Verify web server response status / headers.</li>
</ol>
<p>Well, I could go on and on and the list is certainly large. Do you see anything common in the list mentioned above ? They all require a tcp monitor / web debugging proxy to solve. There are several that are available out there. If you have never used one before, its never too late. I was able to save several minutes of time when programming java web apps after marrying them with a debugging proxy / monitor.</p>
<p>I use a tool named <a href="http://www.charlesproxy.com/" target="_blank">charles</a>. Charles is a commercial product and a trial version will let you debug for 30 minutes. It is pretty cheap to purchase and gives you a central dashboard where you can focus your efforts. The trial version also shows a pop up now and then that will wait for 5-10 seconds before it lets you use the tool again. I have found these limitations to be bearable, if you are using the tool for free.</p>
<p>Here are a few use cases where a debugging proxy can prove to be useful.</p>
<h2><span style="color: #0000ff;"><strong>Cache control:</strong></span></h2>
<p>It is important that you mention an expires header or cache control policies for your web pages. This allows your browser to display cached content if the content has not yet expired. You can use Charles to track these headers and check if they are actually being returned in the response</p>
<p>Start the charles debugging proxy. If you are using firefox, there is a <a href="http://www.charlesproxy.com/download/" target="_blank">firefox plugin</a> that integrates with this tool. Now simply visit the site whose expires headers you want to check. Here is an example.</p>
<p><strong>Expires header:</strong></p>
<p><img class="aligncenter size-full wp-image-290" title="charles_expires" src="http://www.certpal.com/blogs/wp-content/uploads/charles_expires.png" alt="charles_expires" width="275" height="99" /><br />
The report from charles shows that the expires header for a resource was set to Sep 22 2009. If you want to tweak that value, you can always change the params in the web server, reload the configuration and check back here.</p>
<h2><span style="color: #0000ff;"><strong>Response times:</strong></span></h2>
<p>Now, if you want to check the request response statistics of your web site and how well it is performing, simply visit a couple of links on your site. The left side bar should look like this</p>
<p><strong>Charles:</strong></p>
<p><img class="aligncenter size-medium wp-image-291" title="charles_left_sidebar" src="http://www.certpal.com/blogs/wp-content/uploads/charles_left_sidebar-300x97.png" alt="charles_left_sidebar" width="300" height="97" /></p>
<p>Click on the Chart tab on the right side bar and this will give you detailed information about the site performance. The chart can display data by time line,size, duration, or resource type.</p>
<p><strong>Chart:</strong></p>
<p><img class="aligncenter size-medium wp-image-296" title="charles_chart" src="http://www.certpal.com/blogs/wp-content/uploads/charles_chart-300x123.png" alt="charles_chart" width="300" height="123" /></p>
<p>Arguably, a tool like apache <a href="http://jakarta.apache.org/jmeter/" target="_blank">JMeter </a>is more suited to perform load tests and visualize test results. But a TCP monitor / debugger can also help here.</p>
<p>The tool has many more advanced capabilities which I will be writing about in future posts. If you would like to keep up to date, subscribe to the <a href="http://feeds.feedburner.com/Certpal" target="_blank">RSS feed</a>.</p>
<p>I hope that the tool saves you time. Have fun programming <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><strong>PS:</strong> I do not have any affiliation with Charles. I just think it is a cool tool. Other web proxies that you might be interested in are given below</p>
<p><a href="http://www.fiddler2.com/fiddler2/" target="_blank">Fiddler</a> &#8211; From MS</p>
<p><a href="https://tcpmon.dev.java.net/" target="_blank">Tcp Mon</a> &#8211; A cool tool from java.net</p>
<p><a href="http://www.wireshark.org/" target="_blank">Wireshark</a> &#8211; A very advanced network monitoring tool that captures packets for analysis.<br />
<script type="text/javascript">// <![CDATA[
var dzone_url = 'http://www.certpal.com/blogs/2009/09/monitoring-web-traffic/';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_title = 'Monitoring / Debugging web traffic';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_blurb = 'This article explains why tools like tcpmon / charles are important for a web developer. If you have never used a web monitor before, start using one now.';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_style = '2';
// ]]&gt;</script><br />
<script src="http://widgets.dzone.com/links/widgets/zoneit.js"></script></p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F09%2Fmonitoring-web-traffic%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F09%2Fmonitoring-web-traffic%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2009/09/monitoring-web-traffic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rss cloud Vs PubSubHubBub &#8211; Should it matter ?</title>
		<link>http://www.certpal.com/blogs/2009/09/rss-cloud-vs-pubsubhubbub/</link>
		<comments>http://www.certpal.com/blogs/2009/09/rss-cloud-vs-pubsubhubbub/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 13:29:26 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[push]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=277</guid>
		<description><![CDATA[The RSS cloud and the PubSubHubBub (PuSH) format are competing to be protocols that allow feeds to be notified of updates automatically. But both formats have some challenges to surmount and an end user might not be bothered about which one wins over the other.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F09%2Frss-cloud-vs-pubsubhubbub%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F09%2Frss-cloud-vs-pubsubhubbub%2F" height="61" width="51" /></a></div><p>The <a href="http://www.rsscloud.org/" target="_blank">RSS cloud</a> and the <a href="http://code.google.com/p/pubsubhubbub/ " target="_blank">pubsubhubbub</a> (PuSH) way of notifying RSS feeds has gained some interest of late, thanks to wordpress<a href="http://wordpress.org/extend/plugins/rsscloud/" target="_blank"> supporting the former format</a>. If you have never heard of these protocols, heres the low down. The RSS feed works by having a client &#8216;pull&#8217; data from a feed. That is, clients keep nagging at the server every X minutes saying &#8216;Hey do you have something new for me ?&#8217;. The server responds with a no about 99% of the time. This leads to a lot of inefficiencies. Instead if the clients were to use a push model, the data is actually &#8216;pushed&#8217; to a client automatically without the client asking for it. This is great since the client no longer makes unnecessary calls to the server. The diagrams below illustrate this.</p>
<p><strong>Classic update:</strong></p>
<p><img class="aligncenter size-full wp-image-278" title="feed_classic" src="http://www.certpal.com/blogs/wp-content/uploads/feed_classic.png" alt="feed_classic" width="291" height="287" /></p>
<p><strong>Rss Cloud update:</strong></p>
<p><img class="aligncenter size-medium wp-image-279" title="rss_cloud_1" src="http://www.certpal.com/blogs/wp-content/uploads/rss_cloud_1-300x225.png" alt="rss_cloud_1" width="300" height="225" /></p>
<p>The cloud is supposed to be an EC2 cloud. Thus the name Rss cloud <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You can get an overview of <a href="http://code.google.com/p/pubsubhubbub/" target="_blank">PuSH here</a> .</p>
<p>So what are the differences between the two ?</p>
<table style="height: 215px;" border="1" cellspacing="1" cellpadding="1" width="500" align="center">
<tbody>
<tr style="text-align: center;">
<td><strong>Rss cloud</strong></td>
<td><strong>PuSH</strong></td>
</tr>
<tr>
<td style="text-align: center;">Uses the cloud tag in an RSS / ATOM feed</td>
<td style="text-align: center;">Triggered using <tt>&lt;link rel="hub"&gt;</tt></td>
</tr>
<tr>
<td style="text-align: center;">Simply sends a notification to the client to ping again</td>
<td style="text-align: center;">Sends the contents of the feed change to the client</td>
</tr>
<tr>
<td style="text-align: center;">Clients are automatically unsubscribed after a period of time</td>
<td style="text-align: center;">Clients can unsubscribe using an API call</td>
</tr>
<tr>
<td style="text-align: center;">A clients remote IP address is used for notification</td>
<td style="text-align: center;">A separate URL can be mentioned for notification</td>
</tr>
</tbody>
</table>
<p>What does this all mean for a regular RSS user ? It might mean zilch since the actual feed content does not change. The new model is similar to the Observer pattern, where clients behave like Observers and the server feed is the Observable. This model leads to a more efficient feed.  Clients may well receive faster updates but would a client care ? There are a few questions open to both models, which might raise concerns about reliability.</p>
<ul>
<li>How will these models address the problem of clients behind a firewall ? A geek can open up a HTTP tunnel or whatever, but the average user would be clueless. This is a major problem for both protocols. <a href="http://en.wikipedia.org/wiki/Dave_Winer" target="_blank">Dave Winer</a> acknowledges this. Here is an excerpt of what <a href="http://www.scripting.com/stories/2009/07/10/googlesPubsubhubbub.html" target="_blank">he has to say</a> about being behind a firewall.<br />
<blockquote><p>The subscriber must have a known address, therefore must not be behind a firewall or NAT. For client apps, they need some kind of proxy that has a known address. This limit is signficant, but certainly not insurmountable.</p>
</blockquote>
</li>
</ul>
<p style="padding-left: 30px;">Technically, the problem is indeed surmountable, but when it comes to usability, this problem is a major headache.</p>
<ul>
<li>Will the new model actually mean faster updates to a feed ? Yes &#8211; if the cloud / server can find the client successfully.</li>
</ul>
<ul>
<li>When using the RSS cloud, what happens to clients that use a dynamic IP address ? If they disconnect, the notification no longer works since the remote IP address is used for notifications.</li>
</ul>
<ul>
<li>How do you handle authentication for a feed ? The PuSH model <a href="http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.2.html" target="_blank">tech spec</a> clearly states that only unauthenticated ATOM feeds can be served.</li>
</ul>
<ul>
<li>Will both Atom and RSS be supported equally well. PuSH currently favors ATOM but RSS support is also mentioned in the tech spec. Rss cloud supposedly supports both Rss and Atom.</li>
</ul>
<p>It would be interesting to see how robust this protocol / format is. It might lead to a better feeding mechanism if nothing changes for the client.  Ideally, a client should be able to get better update rates for a feed and not have to know anything new about Rss cloud or PuSH. It shouldn&#8217;t matter to the client which format is used. Whether that is possible is to be seen.<br />
<script type="text/javascript">// <![CDATA[
var dzone_url = 'http://www.certpal.com/blogs/2009/09/rss-cloud-vs-pubsubhubbub/';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_title = 'Rss cloud Vs PubSubHubBub - Should it matter ?';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_blurb = 'The RSS cloud and the PubSubHubBub (PuSH) format are competing to be protocols that allow feeds to be notified of updates automatically. But both formats have some challenges to surmount and an end user might not be bothered about which one wins over the other.';
// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
var dzone_style = '2';
// ]]&gt;</script><br />
<script src="http://widgets.dzone.com/links/widgets/zoneit.js"></script></p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F09%2Frss-cloud-vs-pubsubhubbub%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F09%2Frss-cloud-vs-pubsubhubbub%2F" height="61" width="51" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2009/09/rss-cloud-vs-pubsubhubbub/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
