<?xml version='1.0'?>
<!DOCTYPE slides PUBLIC "-//Norman Walsh//DTD Slides XML V3.0b1//EN"
	"/usr/share/xml/docbook/custom/slides/3.3.1/schema/dtd/slides.dtd" >
<!--
<!DOCTYPE slides PUBLIC "-//Norman Walsh//DTD Slides XML V3.0b1//EN"
	"http://docbook.sourceforge.net/release/slides/3.0b1/slides.dtd">
-->
<slides>
<slidesinfo>
<title>Outsourcing Auth and Auth (with Web Services)</title>
<titleabbrev>Outsourcing auth/auth</titleabbrev>
<author><firstname>Dave</firstname><surname>Burchell</surname></author>
<pubdate>2006-08-10</pubdate>
<copyright><year>2006</year><holder>HeroicMarkup.com</holder></copyright>
</slidesinfo>
<foilgroup>
<title>What are <quote>Outsourcing,</quote> <quote>Auth,</quote> &amp; <quote>Auth?</quote></title>
<para>The talk is about <quote>Outsourcing Auth &amp; Auth (with Web Services).</quote>  What does this mean?</para>
<foil>
<title>Authentication</title>
<blockquote><para><emphasis>Proving you are who you say you are</emphasis></para></blockquote>
<para>Authentication may be based on:</para>
<itemizedlist>
<listitem><para>Something you know (e.g., a password)</para></listitem>
<listitem><para>Something you have (e.g., a house key)</para></listitem>
<listitem><para>Something you are (e.g., your fingerprint)</para></listitem>
</itemizedlist>
<para>If you have a Website and want to know who is asking for accessing it (or requesting access), then you need a way to authenticate.</para>
</foil>

<foil>
<title>Authorization</title>
<blockquote><para><emphasis>Proving you should have access to a resource you request</emphasis></para></blockquote>
<para>If you have a Website where you want to restrict access to only certain people, you need to authorize them.</para>
</foil>

<foil>
<title>Outsourcing</title>
<blockquote><para><emphasis>Transferring an ancillary function to another entity</emphasis></para></blockquote>
<itemizedlist>
<listitem><para>Not to be confused with <quote>offshoring</quote></para></listitem>
<listitem><para>Can contribute to creation of <quote>virtual</quote> companies</para></listitem>
</itemizedlist>
</foil>

<foil>
<title>Web Services</title>
<blockquote><para><emphasis>Application-to-application programmatic interfaces using Web protocols<!--http://www.w3.org/2002/ws/--></emphasis></para></blockquote>
<para>Think of them as Web browsing for computer programs.</para>
<itemizedlist>
<listitem><para>Nearly always use HTTP, XML</para></listitem>
<listitem><para>Often use SOAP and REST</para></listitem>
<listitem><para>Commercially available</para></listitem>
<listitem><para>Facilitate outsourcing</para></listitem>
</itemizedlist>
</foil>

<foil>
<title>Why Outsource?</title>
<para>Web Services facilitate outsourcing.  But why outsource?</para>
<itemizedlist>
<listitem><para>The internal group lacks expertise <emphasis>(Barcode Reader)</emphasis></para></listitem>
<listitem><para>The system or resource is burdensome to maintain <emphasis>(tax rates)</emphasis></para></listitem>
<listitem><para>Special equipment is required <emphasis>(phone verification)</emphasis></para></listitem>
<listitem><para>Need access to a controlled information resource <emphasis>(D-U-N-S<!--
<footnote><para>Dun &amp; Bradstreet Universal Numbering System)</para></footnote>
-->)</emphasis></para></listitem>
<listitem><para>The resources cannot be spared to develop the feature or subsystem at the moment <emphasis>(CAPTCHA)</emphasis></para></listitem>
</itemizedlist>
</foil>
</foilgroup>

<foilgroup>
<title>A Simple Real-World Scenario</title>
<para>A family reunion is coming up.  You are helping to plan and organize it.</para>
<foil>
<title>Scenario</title>
<itemizedlist>
<listitem><para>Relatives in Nebraska are hosting the reunion</para></listitem>
<listitem><para>Relatives in other places are planning to attend</para></listitem>
<listitem><para>You want to divide the universe into three groups:</para>
<itemizedlist>
<listitem><para>Nebraska relatives (hosts)</para></listitem>
<listitem><para>Non-Nebraska relatives (attendees)</para></listitem>
<listitem><para>Others (non-family)</para></listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</foil>

<foil>
<title>Stand-Alone Authentication</title>
<para>If you wish to build stand-alone authentication, you could:</para>
<orderedlist>
<listitem><para>Gather a list of each relative's email address</para></listitem>
<listitem><para>Prepare a list of usernames (email addresses?) and generate a random password for each</para></listitem>
<listitem><para>Email the passwords to each relative</para></listitem>
<listitem><para>Put the user list on your system (e.g., .htpasswd file)</para></listitem>
</orderedlist>
</foil>
<foil>
<title>Stand-Alone Authorization</title>
<para>You could:</para>
<orderedlist>
<listitem><para>Sort the relatives usernames by Nebraska/Non-Nebraska</para></listitem>
<listitem><para>Protect the entire reunion site by requiring users to be authorized (e.g., .htaccess file, Unix username established).</para></listitem>
<listitem><para>Protect the reunion host section of the site with an access control list (ACL), Unix group, etc. to allow only Nebraska relatives to access the Nebraska section</para></listitem>
</orderedlist>
</foil>

<foil>
<title>QUICK QUIZ</title>
<para>Q: When Great Uncle Hollis forgets his password, who will he ask for help?</para>
</foil>

<foil>
<title>QUICK QUIZ</title>
<para>A: You</para>
</foil>
<foil>
<title>QUICK QUIZ</title>
<para>(Bonus question: Who will he call if he's been placed in the wrong group?)</para>
</foil>

</foilgroup>

<foilgroup>
<title>Outsourcing Auth &amp; Auth</title>
<para>You can avoid your uncle's phone calls if you let him contact someone else for help.  If you outsource the functions of auth &amp; auth, you can outsource the support of your users (relatives).</para>

<foil>
<title>Authentication with PayPal</title>
<para>PayPal's Web Services are designed to allow merchants to interact behind-the-scenes with PayPal.  A PayPal feature called Express Checkout can be used to authenticate that a user has the email address he or she claims to have.</para>
<para>The process (from an <ulink url="http://paypaltech.com/Dave/api_sourcebook/html/shell/shell_ec.html">API Sourcebook page on Express Checkout</ulink>):</para>
<orderedlist>
<listitem><para>Call <emphasis>SetExpressCheckout</emphasis></para></listitem>
<listitem><para>Send the buyer to the PayPal site with the token.  Example:</para>
<blockquote><programlisting>https://www.sandbox.paypal.com/
cgi-bin/webscr?
cmd=_express-checkout&amp;token=EC-29879344RH8987624</programlisting></blockquote></listitem>
<listitem><para>Call <emphasis>GetExpressCheckoutDetails</emphasis></para></listitem>
<listitem><para>Call <emphasis>DoExpressCheckoutPayment</emphasis></para></listitem>
</orderedlist>
<para>By using the first three of the four steps only, you can verify that the user was able to log in to PayPal with the email address they claimed.  From the <emphasis>GetExpressCheckoutDetails</emphasis> call:</para>
<blockquote><programlisting><![CDATA[<Payer xsi:type="ebl:EmailAddressType">dave_buyer@fake.com</Payer>
<PayerID xsi:type="ebl:UserIDType">RRJPLTMFCREJQ</PayerID>
<PayerStatus xsi:type="ebl:PayPalUserStatusCodeType">verified</PayerStatus>
<PayerName xsi:type="ebl:PersonNameType">
  <FirstName xmlns="urn:ebay:apis:eBLBaseComponents">Dave</FirstName>
  <LastName xmlns="urn:ebay:apis:eBLBaseComponents">Burchell</LastName>
</PayerName>]]></programlisting></blockquote>
<para>For details, see <ulink url="http://paypaltech.com/Dave/api_sourcebook/html/example_SOAP/ec_examples/get_ec_ex.html"/>.</para>
</foil>

<foil>
<title>Authentication with StrikeIron</title>
<para>StrikeIron's Real Time Telephone Verification lets you verify that a person is calling from the phone number they claim.  It is implemented as a Web Service using SOAP and HTTP.</para>
<para>Once you know a user's phone number, you can uniquely identify that user by phone number.  If you have a list of authorized users's phone numbers on your Website you can compare against it.</para>
<para>(See Resources slide for a demo of another StrikeIron service.)</para>
</foil>

<foil>
<title>Auth/Auth Using Flickr and StrikeIron</title>
<para>Q: "Who is this dog?"</para>
<mediaobject><imageobject><imagedata align="center" format="JPG" fileref="mystery_dog.jpg"/></imageobject></mediaobject>
</foil>

<foil>
<title>Auth/Auth Using Flickr and StrikeIron</title>
<para>A:</para>
<programlisting>m/r[ie]{1,2}ll?[ie]{0,2}y?[ie]{0,2}/i</programlisting>
<para>(Use a regular expression to check for the name <quote>Rilley</quote> and all for its likely misspellings.)</para>
<para>Only relatives will know this dog's name (we assume).  Use this to grant authorization.</para>
<orderedlist>
<listitem><para>Authenticate the user's phone number using StrikeIron</para></listitem>
<listitem><para>Quiz the user on the dog's name (only allow a few tries per phone number)</para></listitem>
<listitem><para>Check the area code to see if it is a Nebraskan or non-Nebraskan</para></listitem>
</orderedlist>
<para>We now know who it is (what phone number) and if they are a Nebraska relative or non-Nebraska relative.  Our auth &amp; auth is complete.</para>
</foil>
</foilgroup>

<!--
Management of auth and auth (authorization and authentication) can impose a burden on the manager of a Website.  The overhead of maintaining a password file for proving the user is who he says he is (authentication) and the list of resources he is permitted to access (authorization) can be enough of a chore to prevent Web programmers from implementing innovative features.  However, by offloading auth and auth to other Web-based resources, through the use of helpful, well-known Websites and Web Services, the Webmaster can achieve the desired effect without ever updating a permission list or keeping any lists of passwords.  In this talk, we'll explore two methods of outsourcing authentication, one using PayPal's Website and another employing Web services from StrikeIron.  Next, we'll see how to let other sites do your authorization using Flkr and StrikeIron.
-->

<foilgroup>
<title>Conclusion</title>
<foil>
<title>Outsourcing Advantages</title>
<itemizedlist>
<listitem><para>Fast</para></listitem>
<listitem><para>Easy</para></listitem>
<listitem><para>Cheap*</para></listitem>
</itemizedlist>
</foil>

<foil>
<title>Outsourcing Drawbacks</title>
<itemizedlist>
<listitem><para>New skills may be required</para></listitem>
<listitem><para>Expensive</para></listitem>
<listitem><para>What if the service goes away?</para></listitem>
</itemizedlist>
</foil>

<foil>
<title>Other services to use in outsourcing?</title>
<itemizedlist>
<listitem><para>eBay?</para></listitem>
<listitem><para>Facebook?</para></listitem>
<listitem><para>Friendster?</para></listitem>
<listitem><para>Google?</para></listitem>
<listitem><para>LinkedIn?</para></listitem>
<listitem><para>Microsoft/MSN?</para></listitem>
<listitem><para>Monster?</para></listitem>
<listitem><para>MySpace?</para></listitem>
<listitem><para>Tru?</para></listitem>
<listitem><para>VeriSign?</para></listitem>
<listitem><para>Yahoo!?</para></listitem>
<listitem><para>YouTube?</para></listitem>
</itemizedlist>
<para>Who lets us store data?  Google Base? (Encrypt it, <emphasis>a la</emphasis> Unix passwords.)  PayPal? (yes!)</para>
<para>And while we are thinking about it: Why don't people have to pay you to get authorization send you email? (<quote>Monetize your inbox!</quote>)</para>
</foil>

<foil>
<title>Resources</title>
<itemizedlist>
<listitem><para><ulink url="http://www.strikeiron.com">StrikeIron</ulink></para>
<itemizedlist>
<listitem><para><ulink url="http://www.heroicmarkup.com/~burchell/O/StrikeIron/CartUploadTax/CartUploadTax.cgi">Demo</ulink> of StrikeIron's Web Services</para></listitem>
<listitem><para><emphasis>Reverse Phone Lookup:</emphasis>
Look up a residential phone number and get associated phone book information, such as name and address. <ulink url="http://www.strikeiron.com/ProductDetail.aspx?p=157"/></para></listitem>

<listitem>
<para><emphasis>Real Time Telephone Verification:</emphasis>
Verify a site's visitor is really at the phone number she claims by placing a phone call to the number.
<ulink url="http://www.strikeiron.com/ProductDetail.aspx?p=219"/></para>
</listitem>

<listitem>
<para><emphasis>Text Disguise CAPTCHA-Image Service:</emphasis> make sure you are dealing with a human, not a computer program.
<ulink url="http://www.strikeiron.com/ProductDetail.aspx?p=196"/></para>
</listitem>
</itemizedlist>
</listitem>
<listitem><para><ulink url="http://www.google.com/base">Google Base</ulink>: post information publicly</para></listitem>
<listitem><para><ulink url="http://www.paypal.com">PayPal</ulink>: send and receive money</para>
<itemizedlist>
<listitem><para>Simple PayPal Web Services example code in the <ulink url="http://paypaltech.com/Dave/api_sourcebook/html/">API Sourcebook</ulink>.</para></listitem>
<listitem><para><ulink url="http://paypal.com/integration/">PayPal Integration Center</ulink>.</para></listitem>
</itemizedlist>
</listitem>
<listitem><para><ulink url="http://www.flickr.com">Flickr</ulink>: share photos</para></listitem>
</itemizedlist>
</foil>

<foil>
<title>Q &amp; A</title>
<para>Questions?</para>
<itemizedlist>
<listitem><para><ulink url="http://www.heroicmarkup.com/O/cert"/></para></listitem>
<listitem><para>burchell@heroicmarkup.com</para></listitem>
<listitem><para>Skype me!  User ID: <quote>evaddnomaid</quote></para></listitem>
<listitem><para>Search me out on gmail, Yahoo!, MySpace, eBay, etc.</para></listitem>
</itemizedlist>
</foil>

</foilgroup>
</slides>
