<?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>Laughing Meme &#187; aws</title>
	<atom:link href="http://laughingmeme.org/tag/aws/feed/" rel="self" type="application/rss+xml" />
	<link>http://laughingmeme.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 29 Jan 2012 21:54:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>New Amazon AWS Signature Version 2 is  &#8220;OAuth-compatible&#8221;</title>
		<link>http://laughingmeme.org/2008/12/30/new-amazon-aws-signature-version-2-is-oauth-compatible/</link>
		<comments>http://laughingmeme.org/2008/12/30/new-amazon-aws-signature-version-2-is-oauth-compatible/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 20:10:22 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[crypo]]></category>
		<category><![CDATA[dork]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[simpledb]]></category>

		<guid isPermaLink="false">http://laughingmeme.org/?p=4138</guid>
		<description><![CDATA[Spent a couple hours last night writing the core of a stripped down, PHP4 compatible API library for Amazon SimpleDB (in the style of my (http://laughingmeme.org/2008/12/11/my-flickr-api-library-for-php/) library. Just not a fan of abstraction for its own sake). In the process I discovered that Amazon had revved the version on their &#8220;Signature Method&#8221;. Which is good [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/briannegus/1397852047/" title="Enigma rotors by Brian Negus, on Flickr"><img src="http://farm2.static.flickr.com/1200/1397852047_3128ce06df.jpg" width="500" height="375" alt="Enigma rotors" /></a></p>

<p>Spent a couple hours last night writing the core of a stripped down, PHP4 compatible API library for <a href="http://aws.amazon.com/simpledb/">Amazon SimpleDB</a> (in the style of my <a href="http://laughingmeme.org/2008/12/11/my-flickr-api-library-for-php/">flickr simple</a> library.  Just not a fan of abstraction for its own sake).  In the process I discovered that Amazon had <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1928">revved the version on their &#8220;Signature Method&#8221;</a>.  Which is good news as SignatureVersion 1 contains a classic crypto-blunder in its design, namely it encourages collisions.  (<a href="http://www.daemonology.net/blog/2008-12-18-AWS-signature-version-1-is-insecure.html">more details</a>, also <a href="http://www.phreedom.org/research/rogue-ca/">why you care about collisions</a>)  To date the solution was use SSL, and wait patiently, very patiently.  So yay for Amazon fixing this!  And in fairness, first couple of drafts of the OAuth spec contained a similar issue, though it got ironed out quickly.  Yay for many eyes and the open web.</p>

<h3>&#8220;OAuth-compatible&#8221; signing</h3>

<p>Great things are more secure, good news and all, but that isn&#8217;t what caught my eye.  This block of text did:
<blockquote><em>
Here is what&#8217;s different about forming the string to sign for signature version 2:</p>

<ul>
<li>You include additional components of the request in the string to sign</li>
<li>You include the query string control parameters (the equals signs and ampersands) in the string to sign</li>
<li>You sort the query string parameters using byte ordering</li>
<li>You URL encode the query string parameters and their values before signing the request
</em></blockquote></li>
</ul>

<p>You really have to be an <a href="http://oauth.net/core/1.0/#anchor1">OAuth-dork</a> to find anything special with that paragraph, but if you were, you&#8217;d notice that those 4 bullets are an incredibly succinct description of generating an OAuth signature. (in fact a more succinct description then appears anywhere in the <a href="http://oauth.net/core/1.0/">OAuth documentation</a></p>

<p>Which meant that my SimpleDB library can reuse most of the logic from my OAuth library to do the trickiest part of the API call, namely the signing.  (Additionally it means that security reviews of both protocols support each other)</p>

<p>So my AWS signing method is a approximately a dozen characters different then my OAuth method and as straightforward as:</p>

<pre><code>    .....

    $signature = aws_request_signature(AWS_SECRET_KEY, $http_method, AWS_SIMPLEDB_SERVICEURL, $parameters);
    $parameters['Signature'] = $signature;

    $encoded_params = array();

    foreach ($parameters as $k =&gt; $v){
        $encoded_params[] = oauth_urlencodeRFC3986($k).'='.oauth_urlencodeRFC3986($v);
    }

    $request_url = AWS_SIMPLEDB_SERVICEURL . '?' . implode('&amp;', $encoded_params);

    .....

    function aws_request_signature($key, $http_method, $service_url, $parameters) {
        $base_string = aws_base_string($http_method, $service_url, $parameters);
        return base64_encode(hash_hmac('sha1', $base_string, $key, true));
    }

    function aws_base_string($http_method, $service_url, $parameters) {
        $parsed = parse_url($service_url);

        $host = strtolower($parsed['host']);
        $path = $parsed['path'] ? $parsed['path'] : '/';
        $data = array(
            strtoupper($http_method),
            $host,
            $path,
            oauth_normalized_request_params($parameters)
        );

        $base_string = join("\n", $data);
        return $base_string;
    }
</code></pre>

<p>(this uses my personal OAuth library, but your library should have similar methods)</p>

<p>Sure made my jobs of implementing a library easier.  If you&#8217;re going to invent a new crypto protocol, please consider doing like Amazon, and re-using the basic building blocks. (which also happen to be best practices)</p>
]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2008/12/30/new-amazon-aws-signature-version-2-is-oauth-compatible/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Amazon Developer Connection: Why S3 Failed</title>
		<link>http://laughingmeme.org/2008/02/19/amazon-developer-connection-why-s3-failed/</link>
		<comments>http://laughingmeme.org/2008/02/19/amazon-developer-connection-why-s3-failed/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 17:09:43 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[Aside]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[fluffy clouds]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[transparency]]></category>

		<guid isPermaLink="false">http://laughingmeme.org/2008/02/19/amazon-developer-connection-why-s3-failed/</guid>
		<description><![CDATA[The authentication cluster was overloaded, and improperly monitored. Complex systems are like that, never know where the problems will arise. Good clear communication, but it should have been on the AWS blog.]]></description>
			<content:encoded><![CDATA[<p>The authentication cluster was overloaded, and improperly monitored.  Complex systems are like that, never know where the problems will arise.  Good clear communication, but it should have been on the <a href="http://aws.typepad.com">AWS blog</a>.</p>
<p><a href='http://developer.amazonwebservices.com/connect/message.jspa?messageID=79978#79978'>http://developer.amazonwebservices.com/connect/message.jspa?messageID=79978#79978</a></p>]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2008/02/19/amazon-developer-connection-why-s3-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon SQS Drops Price By 10,000%?</title>
		<link>http://laughingmeme.org/2008/02/06/amazon-sqs-drops-pricie-by-10000/</link>
		<comments>http://laughingmeme.org/2008/02/06/amazon-sqs-drops-pricie-by-10000/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 19:16:26 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[Aside]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[async]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[message oriented]]></category>
		<category><![CDATA[mq]]></category>
		<category><![CDATA[price]]></category>
		<category><![CDATA[sqs]]></category>

		<guid isPermaLink="false">http://laughingmeme.org/2008/02/06/amazon-sqs-drops-pricie-by-10000/</guid>
		<description><![CDATA[At the cost of reducing packet size to 8k, retention time to 4 days, and buffer size to 10 messages. Some folks will complain but it certainly looks like it sets the service up to compete better with installing your own MQ.]]></description>
			<content:encoded><![CDATA[<p>At the cost of reducing packet size to 8k, retention time to 4 days, and buffer size to 10 messages.  Some folks will complain but it certainly looks like it sets the service up to compete better with installing your own MQ.</p>
<p><a href='http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1148'>http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1148</a></p>]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2008/02/06/amazon-sqs-drops-pricie-by-10000/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Amazon.com: SimpleDB</title>
		<link>http://laughingmeme.org/2007/12/14/amazoncom-simpledb/</link>
		<comments>http://laughingmeme.org/2007/12/14/amazoncom-simpledb/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 21:31:06 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[Aside]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[fluffy clouds]]></category>
		<category><![CDATA[simpledb]]></category>

		<guid isPermaLink="false">http://laughingmeme.org/2007/12/14/amazoncom-simpledb/</guid>
		<description><![CDATA[Building the Cloud Castle(tm), one brick at a time. Very similar set of operations to CouchDb, but without Couch&#8217;s views. Nice SimpleDB vs CouchDb side by side comparison. And more info from someone whose been playing with it longer.]]></description>
			<content:encoded><![CDATA[<p>Building the Cloud Castle(tm), one brick at a time.  Very similar set of operations to CouchDb, but without Couch&#8217;s views.  Nice <a href="http://www.automatthew.com/2007/12/amazon-simpledb-and-couchdb-compared.html">SimpleDB vs CouchDb side by side comparison</a>.  And <a href="http://www.satine.org/archives/2007/12/13/amazon-simpledb/">more info</a> from someone whose been playing with it longer.</p>
<p><a href='http://www.amazon.com/gp/browse.html?node=342335011'>http://www.amazon.com/gp/browse.html?node=342335011</a></p>]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2007/12/14/amazoncom-simpledb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some EC2, Fedora, Rails, Mongrel, Memcached Links</title>
		<link>http://laughingmeme.org/2007/04/12/some-ec2-fedora-rails-mongrel-memcached-links/</link>
		<comments>http://laughingmeme.org/2007/04/12/some-ec2-fedora-rails-mongrel-memcached-links/#comments</comments>
		<pubDate>Fri, 13 Apr 2007 06:19:53 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[mongrel]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://laughingmeme.org/2007/04/12/some-ec2-fedora-rails-mongrel-memcached-links/</guid>
		<description><![CDATA[I had done some futzing around with EC2, but ExpoCal is the first web app I&#8217;ve brought up and run on it. Also my first outing with Fedora. Some links: Amazon EC2 Getting Started Guide &#8211; very approachable walk through on get EC2 up and running How I Set Up My EC2 Instance for Rails [...]]]></description>
			<content:encoded><![CDATA[<p>I had done some futzing around with <a href="http://aws.amazon.com/ec2">EC2</a>, but <a href="http://cal.web2expo.com">ExpoCal</a> is the first web app I&#8217;ve brought up and run on it.  Also my first outing with <a href="http://fedoraproject.org/">Fedora</a>.  Some links:</p>

<ul>
<li><a href="http://docs.amazonwebservices.com/AmazonEC2/gsg/2007-01-03/">Amazon EC2 Getting Started Guide</a> &#8211; very approachable walk through on get EC2 up and running</li>
<li><a href="http://niblets.wordpress.com/2007/02/16/how-i-set-up-my-ec2-instance-for-rails-litespeed/">How I Set Up My EC2 Instance for Rails &amp; Litespeed</a> &#8211; bit more specific instructions, not entirely accurate</li>
<li><a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=554&amp;categoryID=101">Fedora Core 6 Lite Base Image</a> &#8211; simple, actively used AMI.  The Debian images came with too many caveats.</li>
<li><a href="http://niblets.wordpress.com/2007/03/23/changing-your-mysql-data-directory/">Changing your mysql data directory
</a> &#8211; <code>/mnt</code> is the new <code>/var</code></li>
<li><a href="http://brainspl.at/articles/2006/04/26/dead-simple-deployment">Dead Simple Deployment (with Mongrel and Rails)</a> &#8211; basic Mongrel cluster instructions.</li>
<li><a href="http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/">Time For A Grown-Up Server: Rails, Mongrel, Apache, Capistrano and You</a> &#8211; never had much luck with Pen and co &#8212; Apache2&#8242;s proxying modules rawk!</li>
<li><a href="http://drupal.org/files/issues/memcache.txt">Fedora memcache + drupal walkthrough</a> &#8211; memcached on Fedora</li>
<li><a href="http://fedoranews.org/tchung/rpmbuild/">Howto: rpmbuild</a> &#8211; <code>sudo yum install fedora-rpmdevtools</code></li>
<li><a href="http://errtheblog.com/post/35">My Rails Toolbox</a></li>
</ul>

<p>Also some yum&#8217;ed packages:</p>

<p><code>yum install sudo gcc ruby ruby-libs ruby-mode ruby-rdoc ruby-irb ruby-ri ruby-docs ruby-devel rsync ruby-mysql.i386 mysql mysql-devel mysql-server mysql-admin httpd-devel apr apr-devel apr-util-devel subversion libevent</code></p>
]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2007/04/12/some-ec2-fedora-rails-mongrel-memcached-links/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Amazon EC2:  Still working on the &#8220;elastic&#8221; part?</title>
		<link>http://laughingmeme.org/2006/08/24/amazon-ec2-still-working-on-the-elastic-part/</link>
		<comments>http://laughingmeme.org/2006/08/24/amazon-ec2-still-working-on-the-elastic-part/#comments</comments>
		<pubDate>Thu, 24 Aug 2006 20:04:00 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[clouds]]></category>
		<category><![CDATA[computing]]></category>
		<category><![CDATA[distributed]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[webservices]]></category>

		<guid isPermaLink="false">http://lm.quxx.info/?p=3454</guid>
		<description><![CDATA[I&#8217;ve been waiting for an Amazon compute cluster ever since S3 came out, and like Les I tried, and failed, to sign up for EC2 beta as soon as I got the email. What all you freaks were doing up around 5am signing up for webservices I&#8217;ll never know. Nik over at TechCrunch however ran [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been waiting for an <a href="http://www.amazon.com/gp/browse.html?node=201590011">Amazon compute cluster</a> ever since S3 came out, and like <a href="http://decafbad.com/blog/2006/08/24/amazon-ec2-emerges">Les</a> I tried, and failed, to sign up for EC2 beta as soon as I got the email.  What all you freaks were doing up around 5am signing up for webservices I&#8217;ll never know.</p>

<p>Nik over at TechCrunch however <a href="http://www.techcrunch.com/2006/08/24/exclusive-amazon-readies-utility-computing-service/">ran the numbers</a>, and its looking more like what I get from <a href="http://www.johncompanies.com/">John Companies</a>, and less like the great <a href="http://en.wikipedia.org/wiki/MapReduce">mapreduce</a> grid in the sky I was hoping for.</p>
]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2006/08/24/amazon-ec2-still-working-on-the-elastic-part/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

