<?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>Painless Security &#187; Software Engineering</title>
	<atom:link href="http://www.painless-security.com/blog/category/software/feed" rel="self" type="application/rss+xml" />
	<link>http://www.painless-security.com/blog</link>
	<description>Sam Hartman on Security for Real-World Users</description>
	<lastBuildDate>Tue, 01 Jun 2010 08:18:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Federated Authentication discussion tonight at 9 PM Pacific</title>
		<link>http://www.painless-security.com/blog/2010/03/25/moonshot3</link>
		<comments>http://www.painless-security.com/blog/2010/03/25/moonshot3#comments</comments>
		<pubDate>Thu, 25 Mar 2010 18:03:05 +0000</pubDate>
		<dc:creator>hartmans</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Standards]]></category>

		<guid isPermaLink="false">http://www.painless-security.com/blog/?p=47</guid>
		<description><![CDATA[The federated authentication bar BOF will be held tonight at 9 PM US Pacific time in the Manhattan room at the IETF 77 meeting..  Here is information for participation.
Reading List

 Use case/briefing paper

EAP GSS-API Mechanism draft 

RADIUS SAML attributes draft

sstc-saml-binding-aaa-draft-00

sstc-saml-eapgss-sso-draft-00

Feasibility analysis of the approach

Brief overview


Remote Participation

 Join our audio stream during the session

Join our [...]]]></description>
			<content:encoded><![CDATA[<p>The federated authentication bar BOF will be held tonight at 9 PM US Pacific time in the Manhattan room at the IETF 77 meeting..  Here is information for participation.</p>
<h3>Reading List</h3>
<ul>
<li> <a href='http://www.painless-security.com/wp/wp-content/uploads/2010/03/moonshot-ietf-77-briefing-paper.pdf'>Use case/briefing paper</a>
</li>
<li><a href="http://tools.ietf.org/html/draft-howlett-eap-gss">EAP GSS-API Mechanism draft </a>
</li>
<li><a href='http://www.painless-security.com/wp/wp-content/uploads/2010/03/draft-howlett-radius-saml-attr-00.txt'>RADIUS SAML attributes draft</a>
</li>
<li><a href='http://www.painless-security.com/wp/wp-content/uploads/2010/03/sstc-saml-binding-aaa-draft-00.pdf'>sstc-saml-binding-aaa-draft-00</a>
</li>
<li><a href='http://www.painless-security.com/wp/wp-content/uploads/2010/03/sstc-saml-eapgss-sso-draft-00.pdf'>sstc-saml-eapgss-sso-draft-00</a>
</li>
<li><a href="http://www.painless-security.com/wp/wp-content/uploads/2010/02/moonshot-feasibility-analysis.pdf">Feasibility analysis of the approach</a>
</li>
<li><a href="http://www.painless-security.com/blog/2010/02/12/moonshot1">Brief overview</a>
</li>
</ul>
<h3>Remote Participation</h3>
<ul>
<li> Join our <a href="http://videolab.uoregon.edu/events/ietf/ietf776.m3u">audio stream</a> during the session
</li>
<li>Join our jabber chat room at moonshot@conference.jabber.postel.org
</li>
</ul>
<li>Join our <a href="http://jiscmail.ac.uk/cgi-bin/webadmin?LIST=MOONSHOT-COMMUNITY">mailing list</a></li>
]]></content:encoded>
			<wfw:commentRss>http://www.painless-security.com/blog/2010/03/25/moonshot3/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://videolab.uoregon.edu/events/ietf/ietf776.m3u" length="45" type="audio/x-mpegurl" />
		</item>
		<item>
		<title>The Fate of the Three Little Pigs and Little Red Riding Hood</title>
		<link>http://www.painless-security.com/blog/2009/10/23/the-fate-of-the-three-little-pigs-and-little-red-riding-hood</link>
		<comments>http://www.painless-security.com/blog/2009/10/23/the-fate-of-the-three-little-pigs-and-little-red-riding-hood#comments</comments>
		<pubDate>Fri, 23 Oct 2009 18:23:21 +0000</pubDate>
		<dc:creator>hartmans</dc:creator>
				<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://www.painless-security.com/blog/?p=40</guid>
		<description><![CDATA[One of the more annoying aspects to deploying Kerberos and GSS-API is making sure that clients have the correct name for the server they&#8217;re talking to.  CIFS, the Windows file-sharing protocol, provided the identity of the server to the client. Windows used this to make a few things easier with NTLM but does not [...]]]></description>
			<content:encoded><![CDATA[<p>One of the more annoying aspects to deploying Kerberos and GSS-API is making sure that clients have the correct name for the server they&#8217;re talking to.  CIFS, the Windows file-sharing protocol, provided the identity of the server to the client. Windows used this to make a few things easier with NTLM but does not use this information with Kerberos.</p>
<p>I keep finding myself  in conversations where someone has the bright idea of making this problem easier by generalizing this mechanism and having the  server tell the client its identity.  The client can then authenticate to that identity.  There&#8217;s definitely an implementation advantage: you remove all the complexity of name mapping.  The problem of course is that it matters what server the client is talking to; the client actually needs to make a decision about how much to trust the server.  Authentication to the bad guy is just as bad as the bad guy being able to subvirt your authentication to the good guy.
</p>
<p>I was talking recently to another implementor who has similar experience with their customers.  Frustrated, I was looking for an analogy simple enough that people could understand the mistake here.  I was running through nursery rhymes and other childrens&#8217; tales in may head until I came to the <a href="http://www.shol.com/agita/pigs.htm">Three Little Pigs</a>. It&#8217;s perfect!<br />
The pigs do not want the results of the &#8220;Let me in,&#8221; service from the big bad wolf.  There&#8217;s no way that   the situation could be made better by more authentication. Asking the wolf for his <a href="http://csrc.nist.gov/publications/fips/fips201-1/FIPS-201-1-chng1.pdf">PIV Card</a> (when have you met a big bad wolf who was not a federal contractor) will not help the pigs decide to let the wolf in. Because the pigs think to consider who they are getting a service from, they decide not to trust it.  Of course, physical security is something that first two pigs should have worked on.  However even their brother would not have been safe if he&#8217;d taken an approach  similar to the one proposed for GSS-API   of asking the bad guy what name  to trust before authenticating to see if the bad guy  in fact has that name.
</p>
<p>There may be things we can do to make name mapping easier.  However we cannot provide security without making a trust decision about who we talk to, and whenever we talk about &#8220;who&#8221; and trust together, we must consider the security of the mapping.</p>
<p>
Of course, as  <a href="http://en.wikipedia.org/w/index.php?title=Little_Red_Riding_Hood&#038;oldid=321035934">Little Red Riding Hood</a> could tell you, sometimes it is all about authentication.  Sadly, her grandmother was unable to get better than <a href="http://csrc.nist.gov/publications/PubsDrafts.html#SP-800-63-Rev.%201">level of assurance 1</a> for her identity as &#8220;Little Red Riding Hood&#8217;s grandmother,&#8221; and the wolf was able to claim that identify for himself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.painless-security.com/blog/2009/10/23/the-fate-of-the-three-little-pigs-and-little-red-riding-hood/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Bills for Nancy</title>
		<link>http://www.painless-security.com/blog/2009/05/29/no-bills-for-nancy</link>
		<comments>http://www.painless-security.com/blog/2009/05/29/no-bills-for-nancy#comments</comments>
		<pubDate>Fri, 29 May 2009 22:05:43 +0000</pubDate>
		<dc:creator>hartmans</dc:creator>
				<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://www.painless-security.com/blog/?p=34</guid>
		<description><![CDATA[A while ago I was working with a client in the financial services sector.  They had an online banking product.  After a software upgrade, they got a confusing customer service call.  A customer, we&#8217;ll call her Nancy, called up and reported that she could no longer access the online billpay portion of [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I was working with a client in the financial services sector.  They had an online banking product.  After a software upgrade, they got a confusing customer service call.  A customer, we&#8217;ll call her Nancy, called up and reported that she could no longer access the online billpay portion of the site.  However, she was sure that she had access because her bills kept paying.  After some investigation it turned out that what she meant is that when she tried to click on the bill payments section of the site, she received a page indicating that she didn&#8217;t have the online bill pay feature.  However, her periodic payments were still being deducted from her account.  According to the provisioning system, she did have bill pay access, and audit records confirmed her claim that  her payments were being made.</p>
<p>The client was concerned.  Taking money out of end-user accounts without giving the user visibility into what was going on or a way to change it was problematic.  Besides, she was paying for a service, and the client wanted to provide it.  I got involved when the other developers were unable to reproduce the problem in the development environment.  When the data set including Nancy&#8217;s information was loaded, they could see that she did in fact have access.  If someone logged in as her in the development environment, then the bill payment system was available.
</p>
<p>When the second user called with the same problem, the issue was escalated.  The problem was not universal, but a small number of users reported trying to use online payments and getting the page indicating they did not have the service even when they did.
</p>
<p>We still were not able to reproduce on the development environment.  We were focusing on whether there was some sort of release engineering error that had caused a problem to creep into the production environment.  We could easily create a fresh instance of the development code (although not the supporting database) and that didn&#8217;t cause the problem to appear.  Our system was interpreted and the access control logic was isolated from the operating system or hardware.  So, while we acknowledged the possibility of a problem in that area, we didn&#8217;t think that development running on Alpha while production was running on newer Sparc hardware would be the issue.
</p>
<p>We looked very closely at the code that decided whether to display the online payments page.  We did find a few problems, but none should have caused this bug.  For example, the system had a concept of an individual account and a business account.  an individual account could be given access to a business account for auditing and dual control reasons.  However we did not support using an individual account to access the payments section of a business account.  So, there was logic to make sure that the login ID of the user matched the login ID of the resource being accessed.  This check would always return true because it used a numeric comparison rather than a string comparison.
</p>
<p>While going over the situation someone joked that we could just ask people to change their name: the problem only seemed to happen for users named Nancy.  I heard this description  and looked at the users who had reported the problem.  Sure enough, all named Nancy.  How do you get a name dependent bug in access control?  Surely this was just sampling error.
</p>
<p>What&#8217;s special about Nancy?  Well, it starts with &#8220;nan&#8221; as in not-a-number.  Surely, though, that shouldn&#8217;t affect anything. Unless . . . I logged into a development and production server.  Sure enough, on production, &#8220;nan+0&#8243; evaluated to &#8220;nan&#8221;.  On development, &#8220;nan+0&#8243; evaluated to &#8220;0&#8243;.  Apparently whatever the interpreter was using to read numbers respected nan on Sparc but not alpha.  Still, how could this be our issue?
</p>
<p>Then I remembered that numeric comparison instead of the string comparison.  You see there are two cases where using a numeric comparison to compare strings is not true.  The first is when the string represents the number zero.  The second is when it represents nan.  Sure enough, with a two character change and a lot of paperwork, the Nancies gained access to their payments.
</p>
<p>I really love the story of this bug, so I&#8217;m sharing it here.  People have tried to find a moral in &#8220;No Bills for Nancy,&#8221; over the years.  &#8220;This shows the value of static type checking!&#8221; some have said.  &#8220;This shows the critical importance of having identical test environments,&#8221; others have said.  &#8220;If you had the right development methodology, this wouldn&#8217;t happen!&#8221; others have said.
</p>
<p>In some sense, that&#8217;s all true.  However I&#8217;ve found that no matter how good your testing, no matter how good your practices, Nancy is out there lurking, ready to demonstrate that there is some facet of the system that we do not understand.  Really, though, Mark Twain had the right answer.  It&#8217;s a good story; enjoy it for itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.painless-security.com/blog/2009/05/29/no-bills-for-nancy/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
