<?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; Web</title>
	<atom:link href="http://www.certpal.com/blogs/tag/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.certpal.com/blogs</link>
	<description>Technology and certifications</description>
	<lastBuildDate>Mon, 18 Jul 2011 06:48:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Using greasemonkey to prototype your web UI</title>
		<link>http://www.certpal.com/blogs/2011/03/using-greasemonkey-to-prototype-your-web-ui/</link>
		<comments>http://www.certpal.com/blogs/2011/03/using-greasemonkey-to-prototype-your-web-ui/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 16:04:01 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[mock]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=1018</guid>
		<description><![CDATA[GreaseMoney differentiates itself in its ability to mock a live web UI. Never underestimate the impact of a mock feature on a live website. How an idea is presented to a person that might green-light it is pretty critical. ]]></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%2F2011%2F03%2Fusing-greasemonkey-to-prototype-your-web-ui%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2011%2F03%2Fusing-greasemonkey-to-prototype-your-web-ui%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p style="text-align: center;"><a href="http://www.certpal.com/blogs/wp-content/uploads/grease_monkey.png"><img class="size-full wp-image-1019 aligncenter" title="grease_monkey" src="http://www.certpal.com/blogs/wp-content/uploads/grease_monkey.png" alt="" width="32" height="32" /></a></p>
<p>When mock-ups and screenshots fail to deliver the idea that you are trying to convey, a prototype can deliver a strong impact. But why should you prototype with <a href="http://en.wikipedia.org/wiki/Greasemonkey" target="_blank">GreaseMonkey</a> when you can check out code from source control and mock a web page with a few shabbily scribbled lines of javascript ?</p>
<p>I often find myself comparing GreaseMoney with the Netbeans swing builder for thick clients. Its great because you can deliver a quick UI without worrying about the underlying functionality. But where GreaseMoney differentiates itself is in its ability to mock a <strong>live</strong> web page. By live I mean one that is already deployed on production. Never underestimate the impact of mocking a feature on a live website. Changing the innerHTML of a few HTML elements and hacking out some JS can get you quick results.</p>
<p>How an idea is presented to a person that might green-light it is pretty critical.From my experience, here is how it usually plays out</p>
<table style="height: 82px;" width="547">
<tbody>
<tr>
<th style="text-align: center;">How you present your idea</th>
<th style="text-align: center;">Possible reaction</th>
</tr>
<tr>
<td style="text-align: left;">Prepare a slide deck / design document and email it</td>
<td style="text-align: left;">Sounds interesting. Lets try it sometime.</td>
</tr>
<tr>
<td style="text-align: left;">Mock the UI and send a link / jar</td>
<td style="text-align: left;">Pretty cool. Lets get this live by Mar this year</td>
</tr>
<tr>
<td style="text-align: left;">Screen scrap a live page and pretend to have implemented the feature</td>
<td style="text-align: left;"><strong><span style="color: #800080;">Holy cow !</span> </strong>We need that right now</td>
</tr>
</tbody>
</table>
<p>Of course, I am not trying to suggest that all ideas that you mock on a screen-scrapped live web site will kick off. An idea is great only when your potential users realize its significance and importance. The way you can get them excited about it, is to actually show them what it could look like. Once they are wowed, they will be eating out of your hand.</p>
<p>Be wary of the risk of getting folks too excited. Explain carefully that you are screen scrapping a page before you present it. The last thing you want is a customer thinking that you already implemented an idea <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you have never used GreaseMonkey before, the <a href="http://diveintogreasemonkey.org/helloworld/divein.html" target="_blank">hello world</a> tutorial is a great place to start. As you get your way around the simple stuff, you will eventually perform relatively complex operations like changing HTML content, setting timers, making ajax calls. Some of those steps will not work due to limitations in the way GreaseMonkey works. Which is when this <a href="http://wiki.greasespot.net/Avoid_Common_Pitfalls_in_Greasemonkey" target="_blank">common pitfalls</a> page will be of great help.</p>
<p>Good luck mocking your web page.</p>
<p><script type="text/javascript">var dzone_url = 'http://www.certpal.com/blogs/2011/03/using-greasemonkey-to-prototype-your-web-ui/';</script><br />
<script type="text/javascript">var dzone_title = 'Using greasemonkey to prototype your web UI';</script><br />
<script type="text/javascript">var dzone_blurb = 'GreaseMoney differentiates itself in its ability to mock a live web UI. Never underestimate the impact of a mock feature on a live website. How an idea is presented to a person that might green-light it is pretty critical. ';</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>
<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%2F2011%2F03%2Fusing-greasemonkey-to-prototype-your-web-ui%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2011%2F03%2Fusing-greasemonkey-to-prototype-your-web-ui%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2011/03/using-greasemonkey-to-prototype-your-web-ui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging HTTPS traffic</title>
		<link>http://www.certpal.com/blogs/2009/12/debugging-https-traffic/</link>
		<comments>http://www.certpal.com/blogs/2009/12/debugging-https-traffic/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 05:49:11 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=495</guid>
		<description><![CDATA[If you have to deal with HTTPS traffic and sniff it, it is possible. Learn a trick that debugging proxies use to analyze secure data and how they work around it. There are some drawbacks however, but developers can work around them.]]></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%2Fdebugging-https-traffic%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F12%2Fdebugging-https-traffic%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><img class="alignright size-full wp-image-503" title="security_lock" src="http://www.certpal.com/blogs/wp-content/uploads/security_lock.png" alt="security_lock" width="79" height="104" />There are times when you work with SSL traffic. Your website might be protected with a certificate so that traffic between you and the client is secure. At times like this, being a developer is troublesome. Browser cache settings need to be analyzed by looking at the HTTP headers. Encoding / Content type may need to be analyzed to ensure that a particular page is displayed correctly. These things cannot be looked into if the traffic is secure. There are situations under which the environment is secure but you must still sniff the data. So how do you manage this ?</p>
<p>Tools like <a href="http://www.charlesproxy.com/" target="_blank">Charles </a>(A debugging proxy) help you do this. Charles allows you to proxy to a secure connection over a protocol like HTTPS and still read the traffic. So how does it do this ? Lets have a look.</p>
<p>Your environment probably has a self signed certificate like the one issued below, using keytool.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">keytool <span style="color: #339933;">-</span>genkey <span style="color: #339933;">-</span>keyalg RSA <span style="color: #339933;">-</span>keysize <span style="color: #cc66cc;">1024</span> <span style="color: #339933;">-</span>alias example.<span style="color: #006633;">com</span> <span style="color: #339933;">-</span>keystore mystore.<span style="color: #006633;">ks</span> <span style="color: #339933;">-</span>validity <span style="color: #cc66cc;">9999</span>
&nbsp;
keytool <span style="color: #339933;">-</span>list <span style="color: #339933;">-</span>keystore .<span style="color: #339933;">/</span>mystore.<span style="color: #006633;">ks</span> <span style="color: #339933;">-</span>v
&nbsp;
Enter keystore password<span style="color: #339933;">:</span>  changeit
&nbsp;
Keystore type<span style="color: #339933;">:</span> jks
Keystore provider<span style="color: #339933;">:</span> SUN
&nbsp;
Your keystore contains <span style="color: #cc66cc;">1</span> entry
&nbsp;
Alias name<span style="color: #339933;">:</span> example.<span style="color: #006633;">com</span>
Creation date<span style="color: #339933;">:</span> Dec <span style="color: #cc66cc;">21</span>, <span style="color: #cc66cc;">2009</span>
Entry type<span style="color: #339933;">:</span> keyEntry
<span style="color: #003399;">Certificate</span> chain length<span style="color: #339933;">:</span> <span style="color: #cc66cc;">1</span>
<span style="color: #003399;">Certificate</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">:</span>
<span style="color: #003399;">Owner</span><span style="color: #339933;">:</span> CN<span style="color: #339933;">=</span>www.<span style="color: #006633;">org</span>.<span style="color: #006633;">com</span>, OU<span style="color: #339933;">=</span>Org, O<span style="color: #339933;">=</span>SomeCompany, L<span style="color: #339933;">=</span>Somewhere, ST<span style="color: #339933;">=</span>Someplace, C<span style="color: #339933;">=</span>US
Issuer<span style="color: #339933;">:</span> CN<span style="color: #339933;">=</span>www.<span style="color: #006633;">org</span>.<span style="color: #006633;">com</span>, OU<span style="color: #339933;">=</span>Org, O<span style="color: #339933;">=</span>SomeCompany, L<span style="color: #339933;">=</span>Somewhere, ST<span style="color: #339933;">=</span>Someplace, C<span style="color: #339933;">=</span>US
Serial number<span style="color: #339933;">:</span> 4b2ef9e0
Valid from<span style="color: #339933;">:</span> Mon Dec <span style="color: #cc66cc;">21</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">:</span>00<span style="color: #339933;">:</span><span style="color: #cc66cc;">24</span> GMT<span style="color: #339933;">+</span>05<span style="color: #339933;">:</span><span style="color: #cc66cc;">30</span> <span style="color: #cc66cc;">2009</span> until<span style="color: #339933;">:</span> Thu May 07 <span style="color: #cc66cc;">10</span><span style="color: #339933;">:</span>00<span style="color: #339933;">:</span><span style="color: #cc66cc;">24</span> GMT<span style="color: #339933;">+</span>05<span style="color: #339933;">:</span><span style="color: #cc66cc;">30</span> <span style="color: #cc66cc;">2037</span>
<span style="color: #003399;">Certificate</span> fingerprints<span style="color: #339933;">:</span>
MD5<span style="color: #339933;">:</span>  XX<span style="color: #339933;">:</span>XX<span style="color: #339933;">:</span>XX...
<span style="color: #006633;">SHA1</span><span style="color: #339933;">:</span> XX<span style="color: #339933;">:</span>XX<span style="color: #339933;">:</span>XX...
&nbsp;
<span style="color: #339933;">*******************************************</span>
<span style="color: #339933;">*******************************************</span></pre></div></div>

<p>When a certificate like this one is presented to a web browser, it will look like so. Let&#8217;s extract the certificate and open it up.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">keytool <span style="color: #339933;">-</span>export <span style="color: #339933;">-</span>keystore .<span style="color: #339933;">/</span>mystore.<span style="color: #006633;">ks</span> <span style="color: #339933;">-</span>file .<span style="color: #339933;">/</span>testtex.<span style="color: #006633;">crt</span> <span style="color: #339933;">-</span>alias example.<span style="color: #006633;">com</span></pre></div></div>

<p><strong>Untrusted self signed certificate:</strong></p>
<p><img class="aligncenter size-full wp-image-496" title="cert_not_trusted" src="http://www.certpal.com/blogs/wp-content/uploads/cert_not_trusted.png" alt="cert_not_trusted" width="345" height="355" /></p>
<p>Our certificate is obviously not trusted since it is self signed. A certificate signed by a CA will not exhibit a security warning. Like the one presented by google for the gmail login page, which is shown below</p>
<p><strong>Trusted certificate from google.com:</strong></p>
<p><img class="aligncenter size-full wp-image-498" title="google_cert_hierarchy" src="http://www.certpal.com/blogs/wp-content/uploads/google_cert_hierarchy.png" alt="google_cert_hierarchy" width="511" height="361" /></p>
<p>When you start a proxy that has HTTPS support, say charles for instance, it does the magic by inserting its own certificate into the certificate hierarchy. The Charles CA Certificate, now becomes the root certificate in this hierarchy, allowing it to decrypt the information that is sent between the client and server.</p>
<p><strong>Modified certificate hierarchy:</strong></p>
<p><img class="aligncenter size-full wp-image-499" title="charles_google_cert" src="http://www.certpal.com/blogs/wp-content/uploads/charles_google_cert.png" alt="charles_google_cert" width="520" height="611" /></p>
<p>Charles signs the certificate that google presents, so it will now be able to decrypt the information that is sent by the server. However the side effect is that your browser will no longer trust this certificate since the root CA is not in your trusted store.</p>
<p><strong>Untrusted connection due to modified hierarchy:</strong></p>
<p><img class="aligncenter size-full wp-image-500" title="charles_connection_not_trusted" src="http://www.certpal.com/blogs/wp-content/uploads/charles_connection_not_trusted.png" alt="charles_connection_not_trusted" width="574" height="308" /></p>
<p>You can get over the problem by importing the certificate or installing it into the MS trust store. This is one technique that proxies use to debug traffic. Know of another method / proxy software ?  Leave a comment. Happy debugging <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<script type="text/javascript">var dzone_url = 'http://www.certpal.com/blogs/2009/12/debugging-https-traffic/';</script><br />
<script type="text/javascript">var dzone_title = 'Debugging HTTPS traffic';</script><br />
<script type="text/javascript">var dzone_blurb = '[description]';</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>
<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%2Fdebugging-https-traffic%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2009%2F12%2Fdebugging-https-traffic%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2009/12/debugging-https-traffic/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

