<?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>ronin coder &#187; rant</title>
	<atom:link href="http://rcoder.net/content/tag/rant/feed" rel="self" type="application/rss+xml" />
	<link>http://rcoder.net</link>
	<description>Code, food, pinball, beer, and bikes. It&#039;s hard living in a place this awesome.</description>
	<lastBuildDate>Mon, 26 Jul 2010 20:30:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Never do today what you can put off &#8217;til tomorrow</title>
		<link>http://rcoder.net/content/never-do-today</link>
		<comments>http://rcoder.net/content/never-do-today#comments</comments>
		<pubDate>Fri, 06 Mar 2009 00:58:18 +0000</pubDate>
		<dc:creator>lennon</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rcoder.net/?p=352</guid>
		<description><![CDATA[In many ways, this is a golden age for web developers: we have a bunch of good, high-level frameworks for writing apps in highly-productive dynamic languages and a solid corpus of best practices for testing, service API design, and data serialization. We don&#8217;t have to deal with dog-slow CGI scripts, complicated J2EE stacks, or proprietary [...]]]></description>
			<content:encoded><![CDATA[<p>In many ways, this is a golden age for web developers: we have a bunch of <a href="http://rubyonrails.org/">good</a>, <a href="http://github.com/sinatra/sinatra">high-level</a> <a href="http://www.djangoproject.com/">frameworks</a> for writing apps in <a href="http://ruby-lang.org/">highly-productive</a> <a href="http://python.org/">dynamic</a> <a href="http://php.net/">languages</a> and a solid corpus of best practices for <a href="http://rspec.info/">testing</a>, service <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">API design</a>, and <a href="http://www.json.org/">data serialization</a>. We don&#8217;t have to deal with dog-slow CGI scripts, complicated J2EE stacks, or proprietary ColdFusion code that only runs atop expensive application servers.</p>
<p>Unfortunately, all is not wine and roses (or scotch and bacon, or whatever). The major dynamic webapp frameworks push you by convention into doing the bulk of your application work syncronously in the request-processing loop, rather than asynchronously in a background thread. All of the accumulated wisdom about building responsive graphical user interfaces gets thrown out and re-discovered by each framework&#8217;s user community, resulting in a <a href="http://github.com/purzelrakete/workling/tree/master">multitude</a> <a href="http://backgroundrb.rubyforge.org/">of</a> <a href="http://codeforpeople.rubyforge.org/svn/bj/trunk/README">solutions</a> for the basic problem of pushing work into a queue and dealing with it later.</p>
<p>As the fine folks at Twitter so famously <a href="http://www.slideshare.net/Blaine/scaling-twitter">discovered</a>, synchronous processing puts a hard upper limit on how much (and how quickly) you can scale an application. Even at the much more modest loads my <a href="http://kenai.com/">current project</a> at work receives, there are quite a few performance problems that can&#8217;t be solved by simply throwing more stuff in memcached and hoping for the best.</p>
<p><a href="http://www.paperplanes.de/archives/2008/10/6/merbs_run_later_coming_to_a/">Some</a> <a href="http://blog.urbantastic.com/post/81336210/tech-tuesday-the-fiddly-bits">folks</a> are starting to catch on, and bake asynchronous processing into their frameworks by default, but the solutions tend to either be limited to very particular deployment and application models, or <a href="http://yaws.hyber.org/">esoteric</a> in the extreme. Meanwhile, desktop application authors continue to politely chuckle at all of our bumbling, and old-skool enterprise developers look at our hackish background-worker implementations and (rightly) consider them to be toys compared to the classic &#8220;big boy&#8221; <a href="http://www.sun.com/software/products/message_queue/index.xml">message</a> <a href="http://www-01.ibm.com/software/integration/wmq/">queueing</a> <a href="http://www.microsoft.com/windowsserver2003/technologies/msmq/default.mspx">solutions</a>, or even the newer <a href="http://www.rabbitmq.com/">open source</a> <a href="http://activemq.apache.org/">alternatives.</a></p>
<p>The next generation of web application frameworks should be designed around the idea that work is done asynchronously <em>by default</em>, with a fallback to syncronous jobs only in cases where a user needs to see the result immediately. Since applications also need to scale across a potentially large and heterogenous set of CPUs and servers, those delayed jobs also may not be running in the same memory space as the web application itself. That means machine and language-agnostic serialization, <a href="http://incubator.apache.org/thrift/">fast network IPC</a>, and callback and event-driven programming.</p>
<p>Developers who grok these concepts now will have a leg up on the competition when building tomorrow&#8217;s crop of web applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://rcoder.net/content/never-do-today/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Two steps forward, one step back</title>
		<link>http://rcoder.net/content/two-steps-forward-one-step-back</link>
		<comments>http://rcoder.net/content/two-steps-forward-one-step-back#comments</comments>
		<pubDate>Wed, 11 Feb 2009 22:10:23 +0000</pubDate>
		<dc:creator>lennon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[long]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[scm]]></category>

		<guid isPermaLink="false">http://rcoder.net/?p=343</guid>
		<description><![CDATA[Once upon a time, there was RCS, and then CVS. They tracked normal edits to a set of text files reasonbly well, and coupled with telnet or ssh, even made it relatively straightforward for a trusted group of collaborators to share their changes with each other. Some people used other proprietary tools (Perforce, Visual Source [...]]]></description>
			<content:encoded><![CDATA[<p>Once upon a time, there was RCS, and then CVS. They tracked normal edits to a set of text files reasonbly well, and coupled with telnet or ssh, even made it relatively straightforward for a trusted group of collaborators to share their changes with each other. Some people used other proprietary tools (Perforce, Visual Source Safe, etc.) but they tended to be either a) expensive b) really, really lousy or c) both. Among the open source crowd, at least, CVS dominated the version control space for many years.</p>
<p>Then came Subversion. It improved on many of the failings of CVS &#8212; notably, Windows support was dramatically better, repositories could be shared over HTTP, and many operations that just didn&#8217;t work in CVS (renames, binary diffs, etc.) performed reasonably well out of the box. To this day, Subversion is a reasonable choice for many projects, especially given the advanced level of support for it in IDEs, graphical repository browsers, and the like.</p>
<p>Much of the reason for that diversity of useful tooling built atop Subversion, of course, is that it was written in C, and built with an eye towards allowing high-level languages to use bindings into the same runtime libraries upon which the &#8217;svn&#8217; command itself relied. In fact, Python, Perl, Java, and Ruby are all supported by the core Subversion maintainers, and additional bindings using those same underlying libraries are available for a number of other languages.</p>
<p>Enter the distributed version control systems: Git, Mercurial, Bazaar, Darcs, and their ilk. The basic workflow they offer is in some ways more like RCS than it is Subversion: each developer works locally against their own copy of a repository, and they share their work via patch files and periodic synchronization. (This is of course a gross over-simplifaction, as all of them offer much more sophisicated change-tracking under the hood than RCS did, but the user-visible behavior is still reminiscent.) However, their ability to maintain change history across many developers and systems without forcing everyone to eventually squash their work down into a single source tree makes a number of new modes of project management possible, or at least much easier than before.</p>
<p>All of the above DVCS systems potentially offer a huge gain of productivity for many developers, since you can easily experiment with changes locally, selectively share only those modifications which you wish to, and continue working without being connected to the central repository. (This is especially significant for those whose employers maintain draconian firewall rules and disallow off-site access to their source control.)</p>
<p>Unfortunately, none of the popular DVCS systems have anything resembling the level of cross-language API support that Subversion does. Mercurial and Bazaar are both implemented in Python, making access from other Python code quite fast, and that from any other language painfully slow. Git is implemented in C, but without a supported and documented core library of functions designed to be used to facilitate access from other languages. Darcs is written in Haskell, which means only crazy mathematicians and CS majors have any ability or interest in using it. (I&#8217;m kidding here, but the point remains that Haskell isn&#8217;t exactly the most useful substrate for scripting language bindings.)</p>
<p>The fallout from all of this is that we&#8217;re left using wrapper libraries which fork out to the command-line tools for each DVCS. Such wrappers have a number of problems: the performance sucks, the internal APIs are usually only as robust as the set of regular expressions you write to parse the output of the commands, and almost no work is shared between the various wrapper implementations.</p>
<p>Don&#8217;t get me wrong: as a simple version control tool, I&#8217;ve found Git in particular (and distributed version control in general) to be a big step up from the old centralized-repository model. However, the very eighties-esque fork-and-regexp-scrape model for IPC &#8212; coupled with the lack of an obvious &#8220;best of breed&#8221; leader in the DVCS space &#8212; means that I (along with anyone else trying to support DVCS in a general-purpose way) end up doing a lot of low-level grunt work when we could be building real value for users.</p>
<p>Even something as simple as a standard dump format for a common subset of the information available from the popular DVCS types would be a start. I do know that, for the time being, I&#8217;m stuck supporting a bunch of very brittle code which relies on the various idiosyncratic console output formats of each version-control system.</p>
<p>Playing prognosticator, I would even go so far as to suggest that the first DVCS system to provide supported, documented interfaces in a number of popular programming languages could climb to the top of the dogpile that exists currently and emerge as a clear standard.</p>
]]></content:encoded>
			<wfw:commentRss>http://rcoder.net/content/two-steps-forward-one-step-back/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>There are security holes, and security holes&#8230;</title>
		<link>http://rcoder.net/content/there-are-security-holes-and-security-holes</link>
		<comments>http://rcoder.net/content/there-are-security-holes-and-security-holes#comments</comments>
		<pubDate>Mon, 13 Oct 2008 18:31:49 +0000</pubDate>
		<dc:creator>lennon</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://rcoder.net/?p=259</guid>
		<description><![CDATA[I was reviewing a Perl CGI script a co-worker sent to me for troubleshooting last week, and came across this little gem (excerpted but not changed in any meaningful way):
use CGI;
use LWP;

my $ua = new LWP;
my $req = new CGI;

my $res_id = $req-&#62;param('rid');
my $img = $req-&#62;param('img');
my $url = "http://somehost/cgi-bin/fetch.cgi?id=$res_id";

$req-&#62;get($url, :content_file =&#62; $img);

open FH, $img;
unlink $img;

print [...]]]></description>
			<content:encoded><![CDATA[<p>I was reviewing a Perl CGI script a co-worker sent to me for troubleshooting last week, and came across this little gem (excerpted but not changed in any meaningful way):</p>
<pre>use CGI;
use LWP;

my $ua = new LWP;
my $req = new CGI;

my $res_id = $req-&gt;param('rid');
my $img = $req-&gt;param('img');
my $url = "http://somehost/cgi-bin/fetch.cgi?id=$res_id";

$req-&gt;get($url, :content_file =&gt; $img);

open FH, $img;
unlink $img;

print $req->header(-type=&gt;'application/octet-stream');

while (&lt;FH&gt;) {
        print $_;
}
close FH;
</pre>
<p>How <em>horribly bad</em> is this script? Well, it allows no less than the deletion/overwriting of <em>any file</em> writable by the web server user. While that won&#8217;t allow injection of shellcode under most configurations, it would allow an attacker to delete logfiles, insert malicious replacements to files in upload directories, and generally mess with your system in all kinds of ways.</p>
<p>Even better, it completely misuses the <tt>Content-Type</tt> HTTP header to force download instead of inline view, instead of using the semantically-appropriate <tt>Content-Disposition: attachment</tt> route to force a download dialog box to appear on the client.</p>
<p>There are doubtless millions of lines of code like this out there in the world, and (at least in Perl-land) almost all of them could be caught with the simple addition of the <tt>-T</tt> (&#8221;taint check&#8221;) flag to the <tt>#!/usr/bin/perl</tt> line at the top of the script.</p>
]]></content:encoded>
			<wfw:commentRss>http://rcoder.net/content/there-are-security-holes-and-security-holes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Erlang warts</title>
		<link>http://rcoder.net/content/erlang-warts</link>
		<comments>http://rcoder.net/content/erlang-warts#comments</comments>
		<pubDate>Thu, 04 Sep 2008 00:59:56 +0000</pubDate>
		<dc:creator>lennon</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://rcoder.net/?p=234</guid>
		<description><![CDATA[After more than a year of complaining about the syntax, I&#8217;m forcing myself to finally sit down and learn some Erlang. Between CouchDB, EjabberD, and all the other interesting projects people are implementing in Erlang, I would be remiss as a systems engineer to not at least pick up the basics.
Unfortunately, I&#8217;m still chafing a [...]]]></description>
			<content:encoded><![CDATA[<p>After more than a year of complaining about the syntax, I&#8217;m forcing myself to finally sit down and learn some <a href="http://erlang.org">Erlang</a>. Between <a href="http://couchdb.org">CouchDB</a>, <a href="http://ejabberd.im">EjabberD</a>, and all the <a href="http://tsung.erlang-projects.org/">other interesting projects</a> people are implementing in Erlang, I would be remiss as a systems engineer to not at least pick up the basics.</p>
<p>Unfortunately, I&#8217;m still chafing a bit at a number of little annoyances:</p>
<ul>
<li>The REPL is basically crippled since you can&#8217;t define functions. Being forced to think in terms of compilation units (rather than simple expressions) pisses me off.</li>
<li>Why oh why do I need to explicitly list the module name in my file header if I&#8217;m also bound by the restriction that filenames and module names have to be the same? The old Java package/file path ties were always a big annoyance when I was stuck in that environment.</li>
<li>For a functional language, there&#8217;s an awful lot of syntactic vinegar for basic operations like <code>map</code> and <code>fold</code>. I appreciate having a concise syntax for lambdas, but writing <code>fun my_function/2</code> smells a bit.</li>
<li>Records (as syntactic sugar for tuples) are a poor substitute for a real type system. Both tutorial and real-world Erlang code I&#8217;ve seen is basically full of tagged tuples, which means you get the verbosity of a strongly-typed language without any of the ability of real type checking to catch errors at compilation time.</li>
</ul>
<p>I want to stick with it long enough to find the real gems underneath all this noise. I mean, if I can sit through extended sessions reading and writing Perl, I should be able to find something to love about Erlang. Furthermore, most of the complaints I make above are inapplicable to mainstream languages &#8212; i.e., C and Java dont have an REPL or lambdas, and Ruby and Perl don&#8217;t have anything resembling a traditional compiler &#8212; not miraculously better.</p>
<p>I definitely think that learning a new language should make you feel a little bit uncomfortable. Unfortunately, right now Erlang leaves me feeling uncomfortable in all the wrong ways: I <em>understand</em> everything that&#8217;s going on with the language, and <em>just don&#8217;t like it</em>.</p>
<p>I&#8217;m going to keep plugging away for at least a little bit longer, though. Next up: reading the source to EJabberD to (hopefully) get a sense for idiomatic language use in a context where its unique features (lightweight concurrency + distributed computing) are a real advantage.</p>
]]></content:encoded>
			<wfw:commentRss>http://rcoder.net/content/erlang-warts/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Thank you, Steven Frank</title>
		<link>http://rcoder.net/content/thank-you-steven-frank</link>
		<comments>http://rcoder.net/content/thank-you-steven-frank#comments</comments>
		<pubDate>Mon, 18 Aug 2008 21:58:51 +0000</pubDate>
		<dc:creator>lennon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://rcoder.net/?p=227</guid>
		<description><![CDATA[For those who don&#8217;t already know, Steven Frank (a.k.a. stevenf on many sites) is a developer at Panic, Inc., a multiple-award-winning Mac software shop here in Portland. He (and his firm) are unapologetic Mac boosters, and have based their entire business around producing applications which appeal in large part to the aesthetic and functional preferences [...]]]></description>
			<content:encoded><![CDATA[<p>For those who don&#8217;t already know, <a href="http://stevenf.com/">Steven Frank</a> (a.k.a. stevenf on many sites) is a developer at <a href="http://www.panic.com/">Panic, Inc.</a>, a multiple-award-winning Mac software shop here in Portland. He (and his firm) are unapologetic Mac boosters, and have based their entire business around producing applications which appeal in large part to the aesthetic and functional preferences of the most die-hard Apple fans.</p>
<p>I&#8217;m unlikely to work as a proprietary desktop software developer any time soon, given that I haven&#8217;t tried to write a desktop GUI application in about five years, but I do appreciate the work that Panic puts into polishing their user experience, and have a great deal of respect for them as a development team. And so, it was extremely refreshing to me to see many of the fears and frustrations I&#8217;ve expressed about the iPhone/App Store platform lock-in as an outside <a href="http://stevenf.com/archive/on-the-app-store.php">being echoed</a> by someone who is working within that ecosystem.</p>
<p>One realization I had early on in my IT career was that almost any two firms could easily become competitors. Given the rate at which a competent team can develop most any class of application on the planet, and the generality of the platforms on which our code runs, it is entirely conceivable that your platform vendor of choice today (or your client buying your tools or OS) could become a direct competitor tomorrow. For that very reason, trusting the future of your business to the continuing benevolence of a vendor is a very risky decision.</p>
<p>Every developer working on applications for the iPhone/iTouch platform is in exactly that precarious position right now. Those innovative applications that drive sales of the platform could easily be incorporated into the next release of the OS, since Apple has more than enough resources to re-implement any 3rd-party app without breaking a sweat. (There is certainly precedent for this: just ask the developers of <a href="http://www.karelia.com/watson/">Watson</a> what it&#8217;s like to one-up Apple in the system utility space.) Even worse, truly disruptive applications that offer capabilities beyond Apple&#8217;s comfort zone (or that of one or more of their mobile network providers) could find themselves <a href="http://www.engadget.com/2008/08/01/netshare-iphone-tethering-app-reappears-in-the-app-store/">summarily dropped</a> from the App Store, effectively strangling any business the developer hoped to build around the product.</p>
<p>This is, to me at least, an unacceptable bargain, and I&#8217;m surprised that so many other developers seem to have no problem with the arrangement. (Have I mentioned how much I <a href="http://blogs.zdnet.com/mobile-gadgeteer/?p=676">can&#8217;t wait</a> for <a href="http://code.google.com/android/">Android</a>?)</p>
]]></content:encoded>
			<wfw:commentRss>http://rcoder.net/content/thank-you-steven-frank/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Presumption</title>
		<link>http://rcoder.net/content/presumption</link>
		<comments>http://rcoder.net/content/presumption#comments</comments>
		<pubDate>Fri, 01 Aug 2008 17:29:34 +0000</pubDate>
		<dc:creator>lennon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[short]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://rcoder.net/?p=166</guid>
		<description><![CDATA[From the Apple Podcast Producer Administration Guide:
Podcast Producer does to the production of podcasts what the assembly line did to automobile production.
ORLY?
]]></description>
			<content:encoded><![CDATA[<p>From the Apple Podcast Producer Administration Guide:</p>
<blockquote><p>Podcast Producer does to the production of podcasts what the assembly line did to automobile production.</p></blockquote>
<p>ORLY?</p>
]]></content:encoded>
			<wfw:commentRss>http://rcoder.net/content/presumption/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working</title>
		<link>http://rcoder.net/content/working</link>
		<comments>http://rcoder.net/content/working#comments</comments>
		<pubDate>Sun, 08 Jun 2008 21:49:25 +0000</pubDate>
		<dc:creator>lennon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[long]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://rcoder.net/?p=111</guid>
		<description><![CDATA[I was listening to OPB on the radio last week, and their morning call-in show Think Out Loud was hosting a discussion on teenagers in the workforce. They had an employment economist who worked for the state of Oregon, an 18-year-old just starting in the workforce, and a variety of parents and teens contribute to [...]]]></description>
			<content:encoded><![CDATA[<p>I was listening to OPB on the radio last week, and their morning call-in show <a href="http://www.opb.org/thinkoutloud/">Think Out Loud</a> was hosting a discussion on teenagers in the workforce. They had an employment economist who worked for the state of Oregon, an 18-year-old just starting in the workforce, and a variety of parents and teens contribute to the discussion, but I was struck by a weird sort of defeatist tone beneath the entire conversation.</p>
<p>The parents, in particular, seemed to have basically given up on their kids being able to find work, due to the classic &#8220;you need experience to get experience&#8221; Catch-22. I personally found myself desperately wanting to yell back at them to stop whining, and start helping their kids out with something other than rides to the mall.</p>
<p>Going to school absolutely <em>does not</em> prepare kids for the workforce. Nothing short of <em>work</em> prepares people for work. There is an endemic assumption right now that the only reasonable course for a young person is through the K-12 system, then straight on to college, perhaps with a brief detour into a volunteering stint along the way to help pad the college application. This track produces exactly the kind of clueless, over-privileged 22-year-old that Baby Boomer managers love to complain about.</p>
<p>Admittedly, my own perspective on this is a bit skewed, compared even to a lot of my coworkers and friends. I started working in the summers when I was 14, and year-round by the time I was 16. My first job was running a summer reading program at the local county library branch, and I locked it in before the interview even started by being the only applicant to show up wearing a tie, resumé in hand. I continued working for the year I was in college, and have been supporting myself (and other people as well, occasionally) since I was 18.</p>
<p>Not every one of those jobs has been pleasant &#8212; packing boxes for shipping at a Mailboxes, Etc. during the Christmas season, for example, or making salads at a pizza shop &#8212; but I&#8217;ve learned something useful from each and every customer, project, and boss. </p>
<p>Of course, no parent would want to listen to the advice of a college dropout who has no kids of his own, right? Obviously, college and a pure white-collar background are the only real path to success.</p>
]]></content:encoded>
			<wfw:commentRss>http://rcoder.net/content/working/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Business tip</title>
		<link>http://rcoder.net/content/business-tip</link>
		<comments>http://rcoder.net/content/business-tip#comments</comments>
		<pubDate>Wed, 16 Apr 2008 18:51:35 +0000</pubDate>
		<dc:creator>lennon</dc:creator>
				<category><![CDATA[bikes]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://rcoder.net/?p=97</guid>
		<description><![CDATA[Normally, I wouldn&#8217;t try to tell anyone how to run a business. God knows, I&#8217;m not a very good businessman myself: I&#8217;m eternally optimistic, lazy, and not really motivated by money.
That being said, I am quite experienced as a customer of other firms, and so have this one simple tip to offer anyone selling high-ticket [...]]]></description>
			<content:encoded><![CDATA[<p>Normally, I wouldn&#8217;t try to tell anyone how to run a business. God knows, I&#8217;m not a very good businessman myself: I&#8217;m eternally optimistic, lazy, and not really motivated by money.</p>
<p>That being said, I am quite experienced as a customer of other firms, and so have this one simple tip to offer anyone selling high-ticket consumer goods:</p>
<p>If a customer comes to <a href="http://rivercitybicycles.com/">you</a>, ready to buy, do not send them away unsatisfied. Even more importantly, do not tell them that, while you can no longer sell them the product they evaluated 48 hours prior and are now itching to buy, you will happily accept 20% of the purchase price in order to motivate you, the seller, to acquire another such item so that they might buy it later.</p>
<p>This is an especially egregious offense if <a href="http://bianchiusa.com/08_volpe.html">the product</a> is neither particularly rare, nor difficult to acquire from one of your competitors.</p>
<p>Failure to remember this simple tip may cost you a long-term customer.</p>
]]></content:encoded>
			<wfw:commentRss>http://rcoder.net/content/business-tip/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ActiveLdap, SASL, GSSAPI, and pain</title>
		<link>http://rcoder.net/content/activeldap-sasl-gssapi-and-pain</link>
		<comments>http://rcoder.net/content/activeldap-sasl-gssapi-and-pain#comments</comments>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<dc:creator>lennon</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I just wasted a day and a half banging my head against this problem, and while I suspect there are probably only about a half-dozen other sites on the planet that are likely to encounter this problem, I wanted to write down the solution. So, just in case anyone else has been furiously Googling for some combination of "ActiveLdap SASL GSSAPI bind connection error", here's one possible solution.

We use MIT Kerberos, OpenLDAP, and Cyrus SASL to provide single-sign-on across our network services at Reed. I've been working for a while to port legacy Perl-based systems over to Ruby, and using ActiveLdap for much of that work, but have hit a snag that limits its utility to use in many cases: namely, that GSSAPI-mech SASL binds fail if there is no corresponding LDAP directory entry for the principal under which you're doing the bind.

Let me explain a bit of background: 

OpenLDAP ACLs allow you to specify something like the following:

    authz-regexp
        uid=(.*),cn=gssapi,cn=auth

This basically says, "for any principal that our authentication backend accepts, treat them as a valid LDAP entity with the DN 'uid=<principal-name>,cn=gssapi,cn=auth'". This is incredibly handy when coupled with Kerberos keytab files, as it lets us get the same basic benefit as certificate-based authentication without maintaining a certificate authority. (As an aside, we do actually maintain a small CA setup, but since the CA data lives on an external drive in a locked cabinet, rolling a new cert is a huge pain compared to creating a new keytab from kadmin.)

This is all well and good, and lets us set up background processes which have keytab-based privileges to selectively read and edit protected attributes on our directory, without putting passwords into configuration files or source code. It also means we don't have to create a full-fledged directory entry for every little background service which may need to authenticate.

Unfortunately, ActiveLdap is unable to determine that it has successfully bound to the directory if the SASL GSSAPI principal it uses to bind doesn't have a corresponding entry. It just loops over the reconnect method until the configured number of attempts is reached, then falls back to an anonymous bind.

If all of that was gibberish to you, rest easy; like I said, our particular mixture of infrastructure and directory-maintenance practices is pretty rare, especially outside academia, so you'll probably never have to worry about any of this.

]]></description>
			<content:encoded><![CDATA[<p>I just wasted a day and a half banging my head against this problem, and while I suspect there are probably only about a half-dozen other sites on the planet that are likely to encounter this problem, I wanted to write down the solution. So, just in case anyone else has been furiously Googling for some combination of &#8220;ActiveLdap SASL GSSAPI bind connection error&#8221;, here&#8217;s one possible solution.</p>
<p>We use MIT Kerberos, OpenLDAP, and Cyrus SASL to provide single-sign-on across our network services at Reed. I&#8217;ve been working for a while to port legacy Perl-based systems over to Ruby, and using ActiveLdap for much of that work, but have hit a snag that limits its utility to use in many cases: namely, that GSSAPI-mech SASL binds fail if there is no corresponding LDAP directory entry for the principal under which you&#8217;re doing the bind.</p>
<p>Let me explain a bit of background:</p>
<p>OpenLDAP ACLs allow you to specify something like the following:</p>
<p><code>authz-regexp<br />
uid=(.*),cn=gssapi,cn=auth</code></p>
<p>This basically says, &#8220;for any principal that our authentication backend accepts, treat them as a valid LDAP entity with the DN &#8216;uid=[principal-name],cn=gssapi,cn=auth&#8217;&#8221;. This is incredibly handy when coupled with Kerberos keytab files, as it lets us get the same basic benefit as certificate-based authentication without maintaining a certificate authority. (As an aside, we do actually maintain a small CA setup, but since the CA data lives on an external drive in a locked cabinet, rolling a new cert is a huge pain compared to creating a new keytab from kadmin.)</p>
<p>This is all well and good, and lets us set up background processes which have keytab-based privileges to selectively read and edit protected attributes on our directory, without putting passwords into configuration files or source code. It also means we don&#8217;t have to create a full-fledged directory entry for every little background service which may need to authenticate.</p>
<p>Unfortunately, ActiveLdap is unable to determine that it has successfully bound to the directory if the SASL GSSAPI principal it uses to bind doesn&#8217;t have a corresponding entry. It just loops over the reconnect method until the configured number of attempts is reached, then falls back to an anonymous bind.</p>
<p>If all of that was gibberish to you, rest easy; like I said, our particular mixture of infrastructure and directory-maintenance practices is pretty rare, especially outside academia, so you&#8217;ll probably never have to worry about any of this.</p>
]]></content:encoded>
			<wfw:commentRss>http://rcoder.net/content/activeldap-sasl-gssapi-and-pain/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
