<?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>Stuff Yaron Finds Interesting</title>
	<atom:link href="http://www.goland.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.goland.org</link>
	<description>Technology, Politics, Food, Finance, etc.</description>
	<lastBuildDate>Sat, 21 Aug 2010 23:18:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Investing in the global stock market</title>
		<link>http://www.goland.org/buyingaworldindexfund/</link>
		<comments>http://www.goland.org/buyingaworldindexfund/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 20:04:51 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[financial]]></category>

		<guid isPermaLink="false">http://www.goland.org/?p=719</guid>
		<description><![CDATA[I want to invest in a global capitalization weighted free float stock market index. Below I explain what I mean, who provides such indexes and how I would like to build such an index. [Ed. Note: Reduced the proposed portfolios to two and updated numbers] Table of Contents Section 1: Disclaimer Section 2: Defining the [...]]]></description>
			<content:encoded><![CDATA[<div class="abstract">
I want to invest in a global capitalization weighted free float stock market index. Below I explain what I mean, who provides such indexes and how I would like to build such an index. [Ed. Note: Reduced the proposed portfolios to two and updated numbers]
</div>
<span id="more-719"></span>
<div class="fulltoc">
<div class="tocheader">
Table of Contents
</div>
<div class="tocindent">
<div class="toc">
<a class="Link" href="#toc-Section-1">Section 1: Disclaimer</a>
</div>

<div class="toc">
<a class="Link" href="#toc-Section-2">Section 2: Defining the index I’m looking for</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-3">Section 3: Slicing the pie</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-4">Section 4: The contenders</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-5">Section 5: The three fund solution - 0.19% expense ratio</a>
</div>
<div class="toc">

<a class="Link" href="#toc-Section-6">Section 6: A four fund solution - 0.17% expense ratio</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-A">Section A: MSCI Barra’s view of the world</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-B">Section B: FTSE’s view of the world</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-C">Section C: Cooking the books</a>
</div>
<div class="tocindent">
<div class="toc">

<a class="Link" href="#toc-Subsection-C.1">Subsection C.1: Percentage of world market accounted for by the US - 41%</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-C.2">Subsection C.2: Percentage of all-world accounted for by ex US Large and Mid Cap - 53%</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-C.3">Subsection C.3: Percentage of all-world accounted for by ex US Small Cap - 6.0%</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-C.4">Subsection C.4: Percentage of all-world accounted for by EAFE large and mid cap - 41.9%</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-C.5">Subsection C.5: Percentage of all-world accounted for by Emerging Stocks - 11.1%</a>

</div>
<div class="tocindent">
<div class="toc">
<a class="Link" href="#toc-Subsubsection-C.5.1">Subsubsection C.5.1: Is FTSE emerging a good stand in for MSCI emerging? I think so. Here’s why</a>
</div>
</div>
</div>
</div>

</div>
<h1 class="Section">
<a class="toc" name="toc-Section-1">1</a> Disclaimer
</h1>
<div class="Unindented">
I am not in anyway qualified to give anyone financial advice. Furthermore the numbers in this article are based largely on guesses (the basis of which are detailed in the appendix) and I’m notoriously bad at algebra. So proceed at your own risk.

</div>
<h1 class="Section">
<a class="toc" name="toc-Section-2">2</a> Defining the index I’m looking for
</h1>
<div class="Unindented">
I’m looking for an index that covers all the equity assets on the planet and then weights them based on their market capitalization. Capitalization just means taking the stock price and multiplying it by the number of shares in the company. The idea being that the index reflects the evaluation of the world’s investors in the world’s companies.
</div>
<div class="Indented">
A complication however is that the number of shares a company has issued is not the same thing as the number of shares available for purchase by the world’s investors. Some companies have a chunk of their shares kept off the market by governments, by regulations or by families. So the ’real’ value of the company isn’t a blind multiplier of the value of the shares versus the number of the shares. Rather it’s the value of the shares multiplied by the number of shares that are available for purchase. This difference is known as the free float and indexes that adjust for it are called ’free float’ or ’free’ indexes. I want to work based on such indexes.
</div>
<h1 class="Section">
<a class="toc" name="toc-Section-3">3</a> <a class="Label" name="sec:Slicing-up-the"> </a>Slicing the pie
</h1>

<div class="Unindented">
Traditionally capitalization weighted free float equity indexes divide the world based on country. Each country is classified into three categories, developed, emerging and frontier. Within each country companies that are identified as being hosted in that country are classified into large capitalization, medium capitalization and small capitalization. There are also micro capitalization indexes but as I show below it takes enough effort to get the other 98.5% of the market so I’m not going to worry too much about them.
</div>
<div class="Indented">
Note that I have also more or less given up for now in investing in Frontier countries. There are a few funds that go there but they tend to be very expensive and use odd indexes. My suspicion is that over the next few years we’ll see some reasonably low cost main stream ETFs that cover this area, so I’ll wait.
</div>
<h1 class="Section">
<a class="toc" name="toc-Section-4">4</a> The contenders
</h1>
<div class="Unindented">
There are a bunch of companies that produce capitalization weighted free float equity indexes including MSCI Barra, FTSE, S&amp;P, Bloomberg, Morningstar, Dow Jones, etc. But of those the two most popular and comprehensive are the MSCI Barra and FTSE indexes. For more information on those indexes check out the appendix. It is worth noting however that the Dow Jones indexes in particular freely publish a ton of really useful data. It turns out that for the specific numbers I needed FTSE was sufficient but I’ve used Dow Jones in the past when I wanted to ask more interesting questions.
</div>
<div class="Indented">
In terms of companies that produce funds that follow these indices there is, in my opinion, really only one player that truly matters - Vanguard. Their record of low costs and low tracking error (e.g. their funds return what the index returns) are without peer in the industry. So below I will just be looking at Vanguard funds. [Note: I have heard that Dimension Fund Adviser funds are also quite good but I don’t have enough money to get direct access to them and I’m unwilling to pay an advisor.]
</div>

<h1 class="Section">
<a class="toc" name="toc-Section-5">5</a> The three fund solution - 0.19% expense ratio
</h1>
<div class="Unindented">
When it comes to covering every single stock from micro to large cap in the U.S. market the best in the business, near as I can tell anyway, is the Vanguard Total Stock Market ETF with an expense ratio of 0.07%. This ETF follows the MSCI US Broad Market Index which is essentially identical to the Wilshire 5000 index or just about any U.S. whole market index. With this fund I can cover at absurdely low expense the entire U.S. market.
</div>
<div class="Indented">
So now I just need to account for the rest of the world. Here there is good news and some small bad news. The good news is that it only takes two more funds to cover the rest of the world. The Vanguard FTSE All-World ex-US covers all developed and emerging markets in the world except the US (hence ex US in the name). It specifically covers all large and mid cap stocks. But this leaves small cap. For that I need one more fund, the Vanguard FTSE All-World ex-US Small Cap ETF which fills that hole.
</div>
<div class="Indented">
The small bad news is that I’m mixing indices, MSCI for the U.S. and FTSE for the rest of the world. But given how well defined and consistently covered the U.S. market is I don’t think in practice this will prove to be a problem.
</div>
<div class="Indented">
<table>
<tr>
<td align="center" valign="top">

Fund Name
</td>
<td align="center" valign="top">
Expense Ratio
</td>
<td align="center" valign="top">
Index Tracked
</td>

</tr>
<tr>
<td align="center" valign="top">
Vanguard Total Stock Market ETF
</td>
<td align="center" valign="top">
0.07%
</td>

<td align="center" valign="top">
MSCI US Broad Market Index
</td>

</tr>
<tr>
<td align="center" valign="top">
Vanguard FTSE All-World ex-US ETF
</td>
<td align="center" valign="top">
0.25%
</td>
<td align="center" valign="top">
No fair guessing
</td>

</tr>

<tr>
<td align="center" valign="top">
Vanguard FTSE All-World ex-US Small-Cap ETF
</td>
<td align="center" valign="top">
0.40%
</td>
<td align="center" valign="top">
Oh come on
</td>

</tr>

</table>

</div>
<div class="Indented">

My assumptions are:
</div>
<div class="Indented">
<table>
<tr>
<td align="center" valign="top">
Market Split
</td>
<td align="center" valign="top">
Percentage
</td>

</tr>
<tr>
<td align="center" valign="top">
% of all-world market accounted for by the US
</td>

<td align="center" valign="top">
41%
</td>

</tr>
<tr>
<td align="center" valign="top">
% of all-world accounted for by ex US large and mid cap
</td>
<td align="center" valign="top">
53%
</td>

</tr>
<tr>
<td align="center" valign="top">
% of all-world accounted for by ex US small cap

</td>
<td align="center" valign="top">
6.0%
</td>

</tr>

</table>

</div>
<div class="Indented">
So the math is:
</div>
<div class="Indented">
<div class="formula">
41%*0.07%  +  53%*0.25%  +  6.0%*0.4%  ?  0.19%
</div>

</div>
<h1 class="Section">
<a class="toc" name="toc-Section-6">6</a> A four fund solution - 0.17% expense ratio
</h1>
<div class="Unindented">
When I started to invest internationally in a serious way about five years ago I needed to find a way to hold international stocks in a taxable account. At the time there really weren’t that many outstanding international stock index funds that had good behavior (in terms of distributions and capital gains). So I ended up in the Vanguard Tax Managed International fund which is an EAFE fund. EAFE is an index used by MSCI, in this case, and it stands for Europe, Australasia and the Far East. All things considered I wish I wasn’t in the fund but I’m stuck with it. First, if I sell it I’ll realize a ton of capital gains. Second, any funds withdrawn from the fund in less than 5 years realize a 1% redemeption fee. So the cost of exiting the fund is just too high.
</div>
<div class="Indented">
So my plan is to keep the money and try to compensate. The thing about the EAFE fund is that it doesn’t include emerging stocks the way the all world ex US fund does. So I had to also buy the Vanguard Emerging Markets ETF to fill out my portfolio. Most of my emerging ETF money is in tax exempt accounts so I can sell without capital gains. But some is taxable and it has appreciated a lot so the taxes would be pretty serious. So I need to hold those shares as well. Over time as stocks dip and as shares get beyond the 5 year limit I’ll try to sell off shares. But until then I have to figure out how to integrate my existing shares into my ideal portfolio.
</div>
<div class="Indented">
To do this I’ll calculate the normal contribution that should go to all-world ex US and then I’ll break that amount into money already in the EAFE and emerging that I can’t sell. If the total money going to all-world ex US is less than what is in EAFE+emerging then I’m stuck and I’ll just have to keep the shares and be out of balance. If however the amount is more than is already in EAFE and emerging then I’ll use that money to buy ex US stock. If the balance between EAFE and emerging is off then I’ll mostly live with it unless it gets too crazy in which case I’ll have to decide if I want to either take a capital gains/fee hit or buy more stock and store up more problems.
</div>
<div class="Indented">
Mixing indexes is bad. For example, EAFE doesn’t include Canada while the all-world ex US does. Or the way that MSCI calculates small cap is different than FTSE so the EAFE and emerging funds don’t include all the companies that the FTSE all-world does and the FTSE small-cap doesn’t cover them either so they are just missing from my portfolio.

</div>
<div class="Indented">
<table>
<tr>
<td align="center" valign="top">
Fund Name
</td>
<td align="center" valign="top">
Expense Ratio
</td>
<td align="center" valign="top">
Index Tracked
</td>

</tr>
<tr>
<td align="center" valign="top">

Vanguard Total Stock Market ETF
</td>
<td align="center" valign="top">
0.07%
</td>
<td align="center" valign="top">
MSCI US Broad Market Index
</td>

</tr>
<tr>
<td align="center" valign="top">
Vanguard Tax-Managed International Fund
</td>
<td align="center" valign="top">
0.20%
</td>

<td align="center" valign="top">
MSCI EAFE Index
</td>

</tr>
<tr>
<td align="center" valign="top">
Vanguard Emerging Markets ETF
</td>
<td align="center" valign="top">
0.27%
</td>
<td align="center" valign="top">
MSCI Emerging Markets Index
</td>

</tr>

<tr>
<td align="center" valign="top">
Vanguard FTSE All-World ex-US Small-Cap ETF
</td>
<td align="center" valign="top">
0.40%
</td>
<td align="center" valign="top">
You get one guess
</td>

</tr>

</table>

</div>
<div class="Indented">

My assumptions are:
</div>
<div class="Indented">
<table>
<tr>
<td align="center" valign="top">
Market Split
</td>
<td align="center" valign="top">
Percentage
</td>

</tr>
<tr>
<td align="center" valign="top">
% of all-world market accounted for by the US
</td>

<td align="center" valign="top">
41%
</td>

</tr>
<tr>
<td align="center" valign="top">
% of all-world accounted for by EAFE large &amp; mid cap
</td>
<td align="center" valign="top">
41.9%
</td>

</tr>
<tr>

<td align="center" valign="top">
% of all-world accounted for by ex US small cap
</td>
<td align="center" valign="top">
6%
</td>

</tr>
<tr>
<td align="center" valign="top">
% of all-world accounted for by emerging stocks
</td>
<td align="center" valign="top">
11.1%
</td>

</tr>

</table>

</div>
<div class="Indented">
So the math is <div class="formula">
41%*0.07%  +  41.9%*0.20%  +  6%*0.40%  +  11.1%*0.27%  =  0.17%
</div>

</div>
<div class="Indented">
The 10.5% savings of this approach versus the other one is clearly, in my mind at least, not worth the dog’s breakfast of index mixing and coverage holes. But I’m more or less stuck with it since I’m not willing to take the 1% haircut (not to mention capital gains taxes) on getting rid of my Vanguard Tax Managed fund. But if I was starting from scratch I certainly wouldn’t have taken this approach.
</div>
<h1 class="Section">
<a class="toc" name="toc-Section-A">A</a> MSCI Barra’s view of the world

</h1>
<div class="Unindented">
MSCI Barra divides the world into exactly the terms I used in <a class="Reference" href="#sec:Slicing-up-the">?</a> - developed, emerging and frontier.
</div>
<div class="Indented">
<table>
<tr>
<td align="center" valign="top">
Index Name
</td>
<td align="center" valign="top">
What it covers
</td>
<td align="center" valign="top">

Notes
</td>

</tr>
<tr>
<td align="center" valign="top">
MSCI All Country World Index Investable Market Index (ACWI IMI)
</td>
<td align="center" valign="top">
All developed and emerging countries. All large, mid and small cap stocks in those countries.
</td>
<td align="center" valign="top">
I can’t find any ETFs or mutual funds that I can invest in that actually follow this index.
</td>

</tr>
<tr>

<td align="center" valign="top">
MSCI All Country World Index (ACWI)
</td>
<td align="center" valign="top">
All developed and emerging countries. All large and mid cap stocks in those countries.
</td>
<td align="center" valign="top">
iShares MSCI ACWI tracks this fund.
</td>

</tr>
<tr>
<td align="center" valign="top">
MSCI Global Small Cap Index
</td>
<td align="center" valign="top">
All small cap stocks in developed and emerging countries.

</td>
<td align="center" valign="top">
I can’t find anyone with this exact index, just the countries in EAFE and Japan.
</td>

</tr>
<tr>
<td align="center" valign="top">
MSCI Frontier Index
</td>
<td align="center" valign="top">
My guess is that this only covers large and mid cap stocks in those countries but I can’t be sure.
</td>
<td align="center" valign="top">
I can’t find anyone who tracks this index.
</td>

</tr>

</table>

</div>
<h1 class="Section">
<a class="toc" name="toc-Section-B">B</a> FTSE’s view of the world
</h1>
<div class="Unindented">
Like MSCI Barra, FTSE follows the same break down as I used in <a class="Reference" href="#sec:Slicing-up-the">?</a>. 
</div>
<div class="Indented">
<table>
<tr>

<td align="center" valign="top">
Index Name
</td>
<td align="center" valign="top">
What it covers
</td>
<td align="center" valign="top">
Notes
</td>

</tr>
<tr>
<td align="center" valign="top">
FTSE All-World Index
</td>
<td align="center" valign="top">
All developed and emerging countries. All large and mid cap stocks in those countries.

</td>
<td align="center" valign="top">
Vanguard Total World Stock Market tracks this fund
</td>

</tr>
<tr>
<td align="center" valign="top">
FTSE Global Small Cap Index
</td>
<td align="center" valign="top">
All small cap stocks in developed and emerging countries.
</td>
<td align="center" valign="top">
Vanguard has a fund that tracks this fund minus U.S. small cap
</td>

</tr>
<tr>
<td align="center" valign="top">
FTSE Frontier 50 Index
</td>
<td align="center" valign="top">
Frontier countries, not clear which capitalizations.
</td>
<td align="center" valign="top">
I can’t find anyone who tracks this
</td>

</tr>

</table>

</div>

<h1 class="Section">
<a class="toc" name="toc-Section-C">C</a> Cooking the books
</h1>
<div class="Unindented">
Previously I pulled a bunch of numbers out of the air and listed them as ’assumptions’. Below I explain where those numbers came from. Please fasten your seat belt, it’s going to be a bumpy ride.
</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-C.1">C.1</a> Percentage of world market accounted for by the US - 41%
</h2>
<div class="Unindented">
MSCI no longer publishes much useful information publicly. I actually looked into buying access to their data but the most rock bottom subscription they said they offered was more than $3000. Too rich for my blood. So my primary source for market capitalization information is the FTSE All-World Index review published with Nomura [<a class="bibliocite" name="cite-1" href="#biblio-1">1</a>]. I used the July 2010 edition for these numbers. I took the USA market capitalization ($10,606,743,000,000) and divided it by the All-World Index capitalization ($25,640,028,000,000) to get a US total market percentage of roughly 41%. But remember, the FTSE All-World Index doesn’t include small cap stocks. So that 41% represents 41% of the Large/Mid Cap universe. However FTSE defines Small Cap as being 10% of the capitalization of the regional market so this means that the US is also 41% of the total world market across small, medium and large capitalizations.
</div>
<h2 class="Subsection">

<a class="toc" name="toc-Subsection-C.2">C.2</a> Percentage of all-world accounted for by ex US Large and Mid Cap - 53%
</h2>
<div class="Unindented">
If the U.S. is 41% of the world’s market then by definition the rest of the world is 59%. But we can’t forget to break things up into small cap and the rest. Also by definition Small Cap is 10% of the total regional value (according to FTSE). So this means that 90% of the 59% belongs to non-US large and mid-cap companies. Thus giving us roughly 53%.
</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-C.3">C.3</a> Percentage of all-world accounted for by ex US Small Cap - 6.0%
</h2>
<div class="Unindented">
By the same logic used previously this value is 10% of the 59% or 5.9%. Due to rounding errors however I am going to bump the percentage 0.1% to make everything add up to 100%.
</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-C.4">C.4</a> Percentage of all-world accounted for by EAFE large and mid cap - 41.9%
</h2>

<div class="Unindented">
The closest thing in FTSE land to MSCI’s EAFE is developed markets ex US. But the comparison isn’t exact. For one thing EAFE explicitly doesn’t include Canada where as developed ex US does. I’ll deal with this by rolling the Canada contribution into the EAFE dollars. Also the country memberships of developing versus emerging in FTSE land aren’t exactly the same as developing versus emerging in MSCI land. So the whole thing is a mess. But I’m going to go with the FTSE numbers. So in this case I’ll take a short cut. I already know from above that the developed world ex US accounts for 59% of the large and mid-cap market. I then look up the emerging market capitalization at $3,216,452,000,000 and divide it by the global capitalization at $25,640,028,000,000 and get 12.5%. So 59% - 12.5% = 46.5%. But remember the large/mid cap versus small cap 10% split so I need to adjust for that getting a final value of roughly 41.9%.
</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-C.5">C.5</a> Percentage of all-world accounted for by Emerging Stocks - 11.1%
</h2>
<div class="Unindented">
In the previous section I already calculated that emerging is 12.5% of the large/mid cap world so now I need to adjust by 10% to get its percentage of the whole world for 11.25%. I’m going to shave 0.15% off to make the numbers all add up nicely. The discrepency is due to previous rounding.
</div>
<h3 class="Subsubsection">
<a class="toc" name="toc-Subsubsection-C.5.1">C.5.1</a> Is FTSE emerging a good stand in for MSCI emerging? I think so. Here’s why
</h3>
<div class="Unindented">
The way I tried to figure this out is a bit complex so hold on. I couldn’t get good numbers for MSCI’s numbers representing things like the US market cap so I had to go instead go to the iShares MSCI ACWI ETF which publishes a fact sheet [<a class="bibliocite" name="cite-2" href="#biblio-2">2</a>] that lists the value of their stocks in each country. Then using software I can’t even find anymore (I did this back in January of 2010) I calculated for each country what the total value of the stock the ETF held for that country was worth. Then I went to MSCI Barra’s site for <a class="URL" href="http://www.mscibarra.com/products/indices/tools/index_country_membership/">index membership</a> and pulled down the membership list for EAFE. The combination of U.S., Canada and EAFE is all developed countries so remaining capitalization is by definition emerging. Of course this whole approach is suspect since the stocks held by the iShares ETF represent their replication of the index, not the index itself. But without a better source of information this was the best I could do. I did all of this back in January of 2010 so I pulled the December 2010 results for the Nomura/FTSE All-World review and calculated the table below.

</div>
<div class="Indented">
<table>
<tr>
<td align="center" valign="top">
Region
</td>
<td align="center" valign="top">
% of large cap/mid cap capitalization using iShares MSCI ACWI ETF holdings
</td>
<td align="center" valign="top">
% of large cap/mid cap capitalization using FTSE Index
</td>

</tr>
<tr>
<td align="center" valign="top">

U.S.
</td>
<td align="center" valign="top">
41.30%
</td>
<td align="center" valign="top">
41.02%
</td>

</tr>
<tr>
<td align="center" valign="top">
Canada
</td>
<td align="center" valign="top">
4.12%
</td>

<td align="center" valign="top">
3.56%
</td>

</tr>
<tr>
<td align="center" valign="top">
EAFE
</td>
<td align="center" valign="top">
40.59%
</td>
<td align="center" valign="top">
41.60%
</td>

</tr>

<tr>
<td align="center" valign="top">
Emerging
</td>
<td align="center" valign="top">
13.99%
</td>
<td align="center" valign="top">
13.82%
</td>

</tr>

</table>

</div>
<div class="Indented">

So given all the caveats it seems reasonable to use the FTSE emerging markets definition as a stand in for MSCI.
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.goland.org/buyingaworldindexfund/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Building full delegation in OAuth &#8211; This time in English</title>
		<link>http://www.goland.org/oauthgenericdelegation/</link>
		<comments>http://www.goland.org/oauthgenericdelegation/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 05:29:28 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[SOA/Web/Etc.]]></category>

		<guid isPermaLink="false">http://www.goland.org/?p=787</guid>
		<description><![CDATA[OAuth enables a very simple type of delegation, a user can delegate permissions between two services that they have accounts on. In other words, OAuth lets a user delegate permission to themself. But full delegation allows arbitrary users of arbitrary services to give permissions to each other. In this article I summarize the two key [...]]]></description>
			<content:encoded><![CDATA[     <p class="indent" >    <span class="aer-9">OAuth enables a very simple type of delegation, a user can delegate</span>
     <span class="aer-9">permissions between two services that they have accounts on. In other</span>
     <span class="aer-9">words,  OAuth  lets  a  user  delegate  permission  to  themself.  But  full</span>
     <span class="aer-9">delegation allows arbitrary users of arbitrary services to give permissions</span>
     <span class="aer-9">to each other. In this article I summarize the two key extensions to OAuth</span>
     <span class="aer-9">needed to enable it to do full delegation. The first is &#8217;on behalf of&#8217; (e.g.</span>
     <span class="aer-9">a service saying &#8221;I am making this request on behalf of user X&#8221;) and the</span>
     <span class="aer-9">second is a very simple directory service. The rest of the article tries to</span>
     <span class="aer-9">use something like plain English to explain how these features could work</span>
     <span class="aer-9">in OAuth.</span>
<span id="more-787"></span>
       <h3 class="likesectionHead"><a id="x1-1000"></a><span class="aer-9">Contents</span></h3>
       <div class="tableofcontents">
       <span class="sectionToc" ><span class="aer-9">1 </span><a href="#x1-20001" id="QQ2-1-2"><span class="aer-9">Kicking OAuth delegation up to 11</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">2 </span><a href="#x1-30002" id="QQ2-1-3"><span class="aer-9">The first step on the road to general delegation - target user</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">3 </span><a href="#x1-40003" id="QQ2-1-4"><span class="aer-9">The next step on the road to general delegation - on behalf of</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">4 </span><a href="#x1-50004" id="QQ2-1-5"><span class="aer-9">Making on behalf of actually work - discovery</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">5 </span><a href="#x1-60005" id="QQ2-1-6"><span class="aer-9">Another nice feature of discovery</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">6 </span><a href="#x1-70006" id="QQ2-1-7"><span class="aer-9">Conclusion</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">A </span><a href="#x1-8000A" id="QQ2-1-8"><span class="aer-9">Some odds and ends</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">B </span><a href="#x1-9000B" id="QQ2-1-9"><span class="aer-9">How exactly did Live calendar provision with Yahoo calendar?</span></a></span>
                                                                  

                                                                  
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">B.1 </span><a href="#x1-10000B.1" id="QQ2-1-10"><span class="aer-9">Establishing a secure communication channel</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">B.2 </span><a href="#x1-11000B.2" id="QQ2-1-11"><span class="aer-9">A shared application protocol</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">C </span><a href="#x1-12000C" id="QQ2-1-12"><span class="aer-9">How did Yochi&#8217;s discovery server come to list Yahoo calendar as Yochi&#8217;s</span>
     <span class="aer-9">calendar service?</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">D </span><a href="#x1-13000D" id="QQ2-1-13"><span class="aer-9">And why was Live calendar allowed to discover who Yochi&#8217;s calendar service is anyway?</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">E </span><a href="#x1-14000E" id="QQ2-1-14"><span class="aer-9">What if Leon wanted to ask Yochi for permission to see his free/busy time?</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">F </span><a href="#x1-15000F" id="QQ2-1-15"><span class="aer-9">Where can I go to learn more? (Read: I&#8217;m having trouble sleeping)</span></a></span>
       </div>

<!--l. 45--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">1   </span> <a id="x1-20001"></a>Kicking OAuth delegation up to 11</h3>
<!--l. 47--></p><p class="noindent" >Delegation is all about transferring permissions. At its most general a delegation
expresses something like &#8221;User X of service Y gives permission Z to user A of service
B&#8221;. Today OAuth cannot express this statement because OAuth always assumes that
X = A. In other words what OAuth can say is &#8221;The user of service Y gives
permission Z to their own account on service B.&#8221;
<!--l. 54--></p><p class="indent" >   With general delegation a user of Sharepoint Online can give permission to a user
of Google Docs to see the Sharepoint Online user&#8217;s documents from inside of Google
Docs. Or, as explored below, a user of Yahoo calendar can give permission to a user
of Live calendar to see the Yahoo calendar user&#8217;s free/busy time from inside of
Live calendar. With full delegation we can finally start having truly <a href="http://www.goland.org/openpermission/" >open
permissions</a>.
<!--l. 62--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">2   </span> <a id="x1-30002"></a>The first step on the road to general delegation - target user</h3>
<!--l. 64--></p><p class="noindent" >Imagine that we added one feature to OAuth, the ability in a permission request to
specify who the target user is. This would enable us to make the following
statement in OAuth &#8221;The user of service Y gives permission Z to user A
of service B&#8221;. But how do we identify user A? We already have a pretty
good solution to how to identify users, e-mail addresses. So let&#8217;s go with
that.
<!--l. 71--></p><p class="indent" >   But now imagine the user experience. Yochi, who uses Yahoo Calendar, wants to
give Leon, who uses Live Calendar, permission to see his free/busy time. Using the
new &#8217;target user&#8217; functionality Yochi can say to Yahoo Calendar &#8221;Hey, Yahoo
Calendar, give leon@bogus.gmail.com who uses Live Calendar the right to see my
free/busy time.&#8221; Yahoo calendar can now make a three legged OAuth request to Live
Calendar and specify that the permission to be granted, free/busy time read
capability, is to be given to the user leon@gmail.com.
                                                                  

                                                                  
<!--l. 80--></p><p class="indent" >   But how does Live Calendar know who is giving the permission? In other words,
how does Live Calendar know that Yochi is the one granting the permission to
Leon? If all we add is Target User then what will have to happen is that
Yochi will have to be sent to a browser pointed at Live Calendar who will
then require Yochi to prove his identity. Personally I think that <a href="http://www.goland.org/adhocauthentication/" >oauth</a> can
handle that part just fine but let&#8217;s just say we use OpenID. So now Yochi has
to login to Live Calendar via OpenID to prove to Live Calendar who he
is.
<!--l. 90--></p><p class="indent" >   The good news is that all the mechanics needed to make the previous work exists.
This is important because it will take a while for the machinery I describe below to
be ubiquitous so this is a reasonable fall back experience. But we can do better, much
better.
<!--l. 96--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">3   </span> <a id="x1-40003"></a>The next step on the road to general delegation - on behalf of</h3>
<!--l. 98--></p><p class="noindent" >In the previous section we added to OAuth the ability to specify the user who is the
target of a request using e-mail. What if we could also specify the identity of the user
the request is on behalf of? In other words, imagine we add an &#8217;OnBehalfOf&#8217; field to
OAuth? Now we have reached the fully generic semantics we talked about
above. We can make a statement of the form &#8221;Yahoo Calendar, on behalf of
Yochi@bogus.example.org, gives permission to see his free/busy time to
leon@bogus.gmail.com using the service Live Calendar.&#8221; The beauty of the previous
statement is that Yochi no longer needs to login to Live calendar to prove his
identity. So long as Live calendar believes that Yahoo calendar is authorized to act on
behalf of Yochi the entire permissioning step can be handled with no additional
UX.
<!--l. 111--></p><p class="indent" >   But this begs the question, why should Live calendar believe that Yahoo calendar
has the right to speak on Yochi&#8217;s behalf?
<!--l. 115--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">4   </span> <a id="x1-50004"></a>Making on behalf of actually work - discovery</h3>
<!--l. 117--></p><p class="noindent" >There are a number of ways that Live calendar can figure out if Yahoo calendar is
allowed to speak on behalf of Yochi. But a fairly straight forward way that
turns out to have some really nice capabilities (which I&#8217;ll get to in the next
section) is a discovery server. Imagine if Live calendar could take Yochi&#8217;s e-mail
address, Yochi@bogus.example.org and make a GET request of the form

https://bogus.example.org/.well-known/finger-service?user=Yochi@bogus.example.org&amp;service=URN:Services:calendar

and get back the URL for Yochi&#8217;s calendar service? Notice that as directories go this
is a fairly tame one. Queries consist of two fields (a user e-mail and a service ID) and
the response is one or more URIs. In this case if the URI returned to the query points
at Yahoo calendar than Live Calendar knows that Yahoo Calendar really
is authorized to make statements on Yochi&#8217;s behalf, at least in regards to
                                                                  

                                                                  
calendaring.
<!--l. 131--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">5   </span> <a id="x1-60005"></a>Another nice feature of discovery</h3>
<!--l. 133--></p><p class="noindent" >The calendar scenario is predicated on Yochi being able to specify that Leon&#8217;s
calendar is at Live Calendar. But how did Yochi know that? Did he ask Leon
where he keeps his calendar and then type in some URL pointing at Live
Calendar into Yahoo Calendar? Did he pick from a drop down? Ideally Yochi
could just say to Yahoo calendar &#8221;Hey, my friend Leon&#8217;s e-mail address is
leon@bogus.gmail.com, give him permission to see my free/busy time&#8221; and then
Yahoo calendar would handle the rest. Thanks to the discovery service that&#8217;s
possible.
<!--l. 142--></p><p class="indent" >   Yahoo  calendar  can  go  to

https://bogus.gmail.com/.well-known-finger-service?user=leon@bogus.gmail.com&amp;service=URN:Services:calendar

and get back the URL for Leon&#8217;s calendar service, in this case, Live calendar. And
then Yahoo can make an on-behalf of request and set up the permission. So Yochi
didn&#8217;t need to know where Leon&#8217;s calendar service was at. He just needed to know
Leon&#8217;s e-mail address.
<!--l. 149--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">6   </span> <a id="x1-70006"></a>Conclusion</h3>
<!--l. 151--></p><p class="noindent" >The goal was to enable generic delegation so that any user of any service can give
permissions to any user of any other service. To make this happen we needed to
introduce two key features. First was on behalf of (and the related target user).
Doing this required little more than adding two fields to OAuth requests
along with the idea that users are identified by e-mail addresses. Second was
discovery. By enabling a simple discovery server (two strings in, a list of
URIs out) we both enable users to find other user&#8217;s services as well as allow
services to figure out which services are allowed to act on behalf of which other
services.
<!--l. 162--></p><p class="indent" >   These two features give us the foundation for open permissions on the
Internet.
<!--l. 167--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">A   </span> <a id="x1-8000A"></a>Some odds and ends</h3>
<!--l. 169--></p><p class="noindent" >My goal with the previous article was to provide a very high level overview of how
full delegation could work in OAuth. In this appendix I provide a similar
high level overview of a number of ancillary features needed to fill out the
experience.
                                                                  

                                                                  
<!--l. 175--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">B   </span> <a id="x1-9000B"></a>How exactly did Live calendar provision with Yahoo calendar?</h3>
<!--l. 177--></p><p class="noindent" >In most OAuth contexts there is an assumption that two services have provisioned
with each other out of band and that&#8217;s why they can securely talk to each other. But
requiring everyone to provision out of band with everyone else is not a recipe for a
scalable web. What I think we want is the ability for any two arbitrary services
to be able to provision a relationship dynamically. There are two parts to
provisioning from a technical perspective. One part is establishing a secure
communication channel. The other part is establishing a shared application
protocol.
<!--l. 187--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">B.1   </span> <a id="x1-10000B.1"></a>Establishing a secure communication channel</h4>
<!--l. 189--></p><p class="noindent" >Establishing a secure communication channel generally means creating a mutually
authenticated connection, that is, a connection where both ends have authenticated
each other. Public key cryptography would be a great technology to use here were it
not that most of the languages/platforms used on the Internet do not have good
public key support. So instead I propose that we use SSL (ironically built on public
key cryptography but in a sufficiently low level way that there exist high quality wide
spread support) to establish a shared symmetric key between two services.
This key can then be used to sign things like request/access tokens (thus
authenticating the sender) over a SSL connection (thus authenticated the
receiver).
<!--l. 201--></p><p class="indent" >   Establishing the shared symmetric key requires two round trips. For example. let&#8217;s
say that Yahoo Calendar wants to provision with Live Calendar. Note that this
provisioning would only need to happen once. The symmetric key, once established,
could be used with all on behalf of requests between the services independent of the
users involved. In other words the symmetric key is provisioned between the services
directly.
     <ol class="enumerate1" >
     <li class="enumerate" id="x1-10002x1">Yahoo  calendar  (after  using  discovery  to  find  the  Live  calendar
     provisioning endpoint) would send a HTTPS request to Live calendar&#8217;s
     provisioning  endpoint  including  a  cryptographically  secure  random
     number.
     </li>
     <li class="enumerate" id="x1-10004x2">Live  calendar  (after  using  discovery  to  confirm  the  Yahoo  calendar
     provisioning endpoint) would send a HTTPS request to Yahoo calendar&#8217;s
     provisioning endpoint including both the cryptographically secure random
     number and the symmetric key that is to be used between the services.</li></ol>
<!--l. 218--></p><p class="noindent" >That&#8217;s it. The two services have now securely established a shared key that can be used
to sign tokens and prove identity. This same mechanism can also be used to generate
new keys when it&#8217;s time to do a key rollover.
                                                                  

                                                                  
<!--l. 224--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">B.2   </span> <a id="x1-11000B.2"></a>A shared application protocol</h4>
<!--l. 226--></p><p class="noindent" >As for the second part, the shared application protocol, the Internet is full of those.
Are we talking about a file or photo sharing service? WebDAV. Are we talking about
a content management system? Delta-V. calendar? CalDAV. You have a problem?
DAV has a protocol. :)
<!--l. 233--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">C   </span> <a id="x1-12000C"></a>How did Yochi&#8217;s discovery server come to list Yahoo calendar as Yochi&#8217;s
calendar service?</h3>
<!--l. 235--></p><p class="noindent" >In the scenario Yochi&#8217;s discovery service is at bogus.example.com but Yochi&#8217;s
calendaring service is at Yahoo. How did Yahoo tell bogus.example.com
to list Yahoo Calendar as Yochi&#8217;s discovery service? Making this work is
really just an application of bog standard OAuth. After setting up his Yahoo
Calendar, the Yahoo Calendar service would redirect Yochi with a standard
OAuth delegation request to Yochi&#8217;s discovery service to set itself as Yochi&#8217;s
calendaring service location. Yochi would confirm to his discovery service that
he agrees (again, this is bog standard OAuth) and the change would be
made.
<!--l. 247--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">D   </span> <a id="x1-13000D"></a>And why was Live calendar allowed to discover who Yochi&#8217;s calendar service
is anyway?</h3>
<!--l. 249--></p><p class="noindent" >It&#8217;s not a good idea to have discovery services sharing information about user&#8217;s
services to just anyone. So in our scenario the discovery service should have
demanded authentication from Live. But it seems doubtful that Yochi would have
thought to give Live permission to see his discovery data. What is more likely is that
Yochi set up his discovery service to allow anyone in his address book to see his
service locations and Leon is in his address book. So what should happen is that Live
should make an &#8217;on behalf of&#8217; request to Yochi&#8217;s discovery server in Leon&#8217;s name. But
how does Yochi&#8217;s discovery server know that Live Calendar is allowed to act on
behalf of Leon?
<!--l. 260--></p><p class="indent" >   The answer is that Yochi&#8217;s discovery service will make a request to Leon&#8217;s
discovery service on behalf of Yochi to find out Leon&#8217;s calendar service and see if it&#8217;s
Live Calendar. Leon&#8217;s discovery service can easily validate that Yochi&#8217;s discovery
service is allowed to act on Yochi&#8217;s behalf by matching Yochi&#8217;s e-mail address to the
discovery service location (e.g. they are both bogus.example.org) so it knows
everything is o.k. Since Yochi is in Leon&#8217;s address book, Leon&#8217;s discovery service will
respond to the request confirming that Live is allowed to act on behalf of Leon. And
now the scenario is complete. Yochi&#8217;s discovery service knows that Live can act on
behalf of Leon (at least in this context) and since Leon is in Yochi&#8217;s address book the
request for calendar location information from Live is positively responded
                                                                  

                                                                  
to.
<!--l. 276--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">E   </span> <a id="x1-14000E"></a>What if Leon wanted to ask Yochi for permission to see his free/busy
time?</h3>
<!--l. 278--></p><p class="noindent" >This article has worked on the scenario where Yochi wants to inform Leon that he
has been granted a permission. But a more general case is that Leon realizes he needs
access to Yochi&#8217;s free/busy time. This just requires adding a command to OAuth
&#8221;asking for permission&#8221; whose semantics are &#8221;User X of service Y asks for permission
Z from user A of service B&#8221;. But all the details of discovery, permissioning, etc. are
the same as above. Once user A reviews the request and approves it then the process
of notifying User X that they have received the permission is exactly as given
above.
<!--l. 289--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">F   </span> <a id="x1-15000F"></a>Where can I go to learn more? (Read: I&#8217;m having trouble sleeping)</h3>
<!--l. 291--></p><p class="noindent" >I&#8217;ve tried my best to keep this article focused on the big picture and in something
reasonably approximate to English. But I&#8217;ve written a series of articles going
into the gory details of how all this can be made to work. Those articles
are:
     <dl class="description"><dt class="description">
<a href="http://www.goland.org/openpermission/" ><span class="aebx-10">Open Permissions Matter for an Open Web</span></a> </dt><dd class="description">An argument for why open
     permissions matter and an exploration of the components needed to make
     them happen.
     </dd><dt class="description">
<a href="http://www.goland.org/oauthpermissioningexamples/" ><span class="aebx-10">The Outline of a Profile for Granting Permissions Using OAuth WRAP</span></a> </dt><dd class="description">
     Provides a sequence diagram and supporting material explaining how the
     basic protocol exchanges would work.
     </dd><dt class="description">
<a href="http://www.goland.org/simplewebfinger/" ><span class="aebx-10">Thoughts on Building a Finger Service</span></a> </dt><dd class="description">What I call a discovery service in
     this  article  was  more  traditionally  called  a  finger  service.  This  article
     explores key issues in designing a dirt simple finger service.
     </dd><dt class="description">
<a href="http://www.goland.org/adhocauthentication/" ><span class="aebx-10">Using OAuth WRAP and Finger for Ad-Hoc User Authentication</span></a> </dt><dd class="description">
     This is where I first introduce how to do ad-hoc provisioning (e.g. using
     two request/response pairs to establish a shared symmetric key). But I do
     it in the context of showing how OAuth can be used as a replacement for
     OpenID v1.
                                                                  

                                                                  
     </dd><dt class="description">
<a href="http://www.goland.org/managingfingerservice/" ><span class="aebx-10">Thoughts on Updating Finger Services</span></a> </dt><dd class="description">All   the   gory   details   on   how
     services can update user&#8217;s discovery services.</dd></dl>
<a id="Q1-1-16"></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.goland.org/oauthgenericdelegation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Thoughts on updating finger services</title>
		<link>http://www.goland.org/managingfingerservice/</link>
		<comments>http://www.goland.org/managingfingerservice/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 20:27:09 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[SOA/Web/Etc.]]></category>

		<guid isPermaLink="false">http://www.goland.org/?p=781</guid>
		<description><![CDATA[Having a finger service as a directory to find information about users and services appears to be absolutely necessary if ad-hoc information sharing between people and services is to be possible. But just having a way to finger a person or service is less than 1/2 the battle. The real challenge is making it possible [...]]]></description>
			<content:encoded><![CDATA[<p class="indent" >    <span class="aer-9">Having a </span><a href="http://www.goland.org/simplewebfinger/" ><span class="aer-9">finger service</span></a> <span class="aer-9">as a directory to find information about users</span>
     <span class="aer-9">and  services  appears  to  be  absolutely  necessary  if  ad-hoc  information</span>
     <span class="aer-9">sharing between people and services is to be possible. But just having</span>
     <span class="aer-9">a way to finger a person or service is less than 1/2 the battle. The real</span>
     <span class="aer-9">challenge is making it possible for services to update their user&#8217;s finger</span>
     <span class="aer-9">information in an ad-hoc manner. I explore the issues around dynamic</span>
     <span class="aer-9">finger update in this article.</span>
<span id="more-781"></span>
       <h3 class="likesectionHead"><a id="x1-1000"></a><span class="aer-9">Contents</span></h3>
       <div class="tableofcontents">
       <span class="sectionToc" ><span class="aer-9">1 </span><a href="#x1-20001" id="QQ2-1-2"><span class="aer-9">Update a calendar services&#8217; location - a scenario</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">2 </span><a href="#x1-30002" id="QQ2-1-3"><span class="aer-9">Requirements</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">2.1 </span><a href="#x1-40002.1" id="QQ2-1-4"><span class="aer-9">Start with an absurdly simple data format</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">2.2 </span><a href="#x1-50002.2" id="QQ2-1-5"><span class="aer-9">Keep going with an absurdly simple protocol</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">2.3 </span><a href="#x1-60002.3" id="QQ2-1-6"><span class="aer-9">Updating the pointers</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">2.4 </span><a href="#x1-70002.4" id="QQ2-1-7"><span class="aer-9">Updating the access control permissions</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">2.5 </span><a href="#x1-80002.5" id="QQ2-1-8"><span class="aer-9">Submitting proposed permissions descriptions</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">3 </span><a href="#x1-90003" id="QQ2-1-9"><span class="aer-9">Updating the finger service, an example</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.1 </span><a href="#x1-100003.1" id="QQ2-1-11"><span class="aer-9">Wait a minute, what about the late bound e-mail security hole?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.2 </span><a href="#x1-110003.2" id="QQ2-1-12"><span class="aer-9">Isn&#8217;t the list of folks able to see the calendar going to likely be dynamic</span>
     <span class="aer-9">and so Google will be endlessly updating the finger permissions?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.3 </span><a href="#x1-120003.3" id="QQ2-1-13"><span class="aer-9">Does telling the requester about additional identifiers associated</span>
     <span class="aer-9">with the service open up a possible security hole?</span></a></span>
                                                                  

                                                                  
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.4 </span><a href="#x1-130003.4" id="QQ2-1-14"><span class="aer-9">Why couldn&#8217;t Google just ask for two identifiers in one request?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.5 </span><a href="#x1-140003.5" id="QQ2-1-15"><span class="aer-9">Oh come on, why isn&#8217;t this just LDAP?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.6 </span><a href="#x1-150003.6" id="QQ2-1-16"><span class="aer-9">Fine, if it&#8217;s not LDAP then why isn&#8217;t it WebDAV?</span></a></span>
<!--l. 44--><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">1   </span> <a id="x1-20001"></a>Update a calendar services&#8217; location - a scenario</h3>
<!--l. 46--></p><p class="noindent" >Dax has decided to host her personal calendar with Google. As part of the set up
process Google asks Dax if she wants to update her finger service to point her
calendar at Google. Dax agrees and is forwarded to the finger service along with a
request to add her Google calendar as a choice for her calendaring entry. Dax
authenticates to her finger service and her finger service prompts Dax for how she
would like, if at all, to include Google Calendar in her finger results. Dax specifies
that Google should be listed as her personal calendar service but not her business
calendar service.
<!--l. 57--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">2   </span> <a id="x1-30002"></a>Requirements</h3>
<!--l. 60--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">2.1   </span> <a id="x1-40002.1"></a>Start with an absurdly simple data format</h4>
<!--l. 62--></p><p class="noindent" >Directories bloat. One suspects it&#8217;s a corollary of <a href="http://en.wikipedia.org/wiki/Parkinson%27s_Law" >Parkinson&#8217;s Law</a> for data
(data expands to fill the space available for storage). But we don&#8217;t have to
start off bloated. We can start off with a directory that initially contains
exactly one table with two columns (on a per entity basis). One column is
the identifier of the service being sought and the other is the URI. Any
further information needs to be retrieved from the service being pointed
at.
<!--l. 70--></p><p class="indent" >   This approach has instant problems. For example let&#8217;s say we have an identifier
URN:SomeStandardOrgId:Calendar. But wait, the user has two calendars, one for
work and one for business. We can easily imagine returning two results. But
should we further disambiguate? Maybe have an entry for a personal versus a
business calendar? Surely there is other interesting data we could throw
in?
<!--l. 77--></p><p class="indent" >   It&#8217;s pretty bloody obvious that if finger is successful then before it&#8217;s done it will
look like LDAP (which, given its success and long history I&#8217;m going to guess probably
now looks a lot like DAP). So I&#8217;m not suffering from any illusions that this time it
will be simpler. No, it won&#8217;t. But every once in a while you have to burn the ships
                                                                  

                                                                  
and start anew.
<!--l. 84--></p><p class="indent" >   So my argument is that rather than putting in say a name/value bag that can be
searched on (and creating a language to go with it - should it be <a href="http://www.webdav.org/specs/rfc5323.html" >DASL</a> or
<a href="http://www.odata.org/" >OData</a>?) we either just have a single identifier for a calendar (and so can
return multiple results) and we also allow for more distinct identifiers such as
URN:SomeStandardOrgId:Calendar:Personal. In other words we hack the data into
the identifier.
<!--l. 92--></p><p class="indent" >   This will mean that the same service will be identified multiple times in the finger
service but that&#8217;s fine. Given that it is a non-goal to replace true directories but
rather to create an indirectory one suspects we can get pretty far with a very simple
proposal.
<!--l. 98--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">2.2   </span> <a id="x1-50002.2"></a>Keep going with an absurdly simple protocol</h4>
<!--l. 100--></p><p class="noindent" >It&#8217;s all just name/value pairs so the protocol should just focus on that. No need to
get fancy. For now we should just focus on reading/updating data in a single user&#8217;s
directory.
<!--l. 105--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">2.3   </span> <a id="x1-60002.3"></a>Updating the pointers</h4>
<!--l. 107--></p><p class="noindent" >When a service wants to update its user&#8217;s finger service it&#8217;s job, first and
foremost, is to provide a set of service identifiers and associated values that it
wants to update. So in theory an update should contain just two data points,
the service identifier (e.g. this is a calendar service) and the URI for that
service. The main downside to this approach is that it can potentially leave
the directory in an inconsistent state. In the previous calendar example we
showed how a single calendar service could show up under multiple service
identifiers. If the service is only allowed to change one pointer at a time and the
change is to replace one calendar service with another then the system can be
viewable halfway through the change. In ACID terms this means we don&#8217;t have
isolation.
<!--l. 120--></p><p class="indent" >   I suspect this is a sufficiently nettlesome problem that we need to support updates
that allow the value of multiple service identifiers for a single user to be updated in a
single request.
<!--l. 125--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">2.4   </span> <a id="x1-70002.4"></a>Updating the access control permissions</h4>
<!--l. 127--></p><p class="noindent" >Remember how I said that the finger service would just have a two column table? I
lied. Wow, Parkinson&#8217;s law hits really fast.
<!--l. 130--></p><p class="indent" >   Because one of the key issues for a successful finger service is privacy. We don&#8217;t
want stalkers finding people. We don&#8217;t want spammers harvesting identities. We don&#8217;t
want to help the black hats by making it easier to find users with potentially
                                                                  

                                                                  
compromised services. Etc. So we need to expect that the finger service will enforce
access permissions.
<!--l. 136--></p><p class="indent" >   But let&#8217;s think about a simple scenario. Dax has given permission to Martok to
see her calendar in Google. But the utility of that permission will be quite limited if
when Martok&#8217;s calendar application tries to find Dax&#8217;s calendar service the finger
service won&#8217;t accept Martok&#8217;s request to find out where the heck Dax&#8217;s calendar is
at.
<!--l. 142--></p><p class="indent" >   So this argues that when updating data in finger the updater also needs to
provide permission data - who has the user authorized to see this information?
Strictly speaking however this update is more a hint than anything else. In other
words the service is saying &#8221;Look, user X is using me as a calendar service and has
allowed the following users to access their calendar so you should let the following
users also discover where the user&#8217;s calendar is.&#8221;
<!--l. 150--></p><p class="indent" >   This isn&#8217;t nearly as complex as it sounds. The ACL list would literally consist of a
series of email addresses. How those email addresses would be validated is discussed
later.
<!--l. 154--></p><p class="indent" >   And yes sharing all this data with the finger service is more than a little scary.
Plus there are a number of practical issues discussed later in the article that lead me
to believe that the way permissioning will really work is that permissions
will be controlled first and foremost by the user of the finger service on a
&#8217;universal&#8217; basis, e.g. &#8217;anyone in my address book can see where my services are
located&#8217;.
<!--l. 162--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">2.5   </span> <a id="x1-80002.5"></a>Submitting proposed permissions descriptions</h4>
<!--l. 164--></p><p class="noindent" >A problem with sticking a finger service in the middle of everything is that it has
the real potential to slow innovation. For example, let&#8217;s say there is a new
service foo whose service identifier is URN:SomePrivateOrg:Foo. A user
signs up for a foo service and now the foo service wants to update the user&#8217;s
finger service so other users can find the user&#8217;s instance of the foo service.
However when the foo service sends an update to the user&#8217;s finger service
the finger service is likely to reject the request saying &#8221;Huh? What&#8217;s a foo
service?&#8221;
<!--l. 173--></p><p class="indent" >   This is not an unreasonable reaction on the part of the finger service. One can
imagine that a critical part of the update process is when the finger service turns
around to the user and says &#8221;Hey user, I got a request from service X asking to be
your Calendar service, this means that anyone trying to see your free/busy time or
check out your calendar is going to go to service X, are you super duper sure you
want to do this?&#8221;
<!--l. 181--></p><p class="indent" >   But the finger service can&#8217;t provide that level of protection if it&#8217;s dealing with a
service identifier that it doesn&#8217;t recognize.
<!--l. 184--></p><p class="indent" >   I can imagine some ways of trying to tackle this problem, such as having an
industry registry with localized strings where finger services can pick up &#8217;safe&#8217;
descriptions of new services but that&#8217;s a heck of an infrastructure to build and
                                                                  

                                                                  
probably isn&#8217;t going to be available any time soon.
<!--l. 190--></p><p class="indent" >   So I think in the meantime we need to go for the &#8217;user empowering&#8217; (read: we
believe in your inalienable right to commit security suicide) option which is to let the
service that is trying to update the finger directory put in a human readable
description of what the heck the service identifier they are trying to update actually
does. A finger service could then prompt the user &#8221;Dear user, service X wants to
update your service directory with some new service type I don&#8217;t recognize. I have
no idea what the heck this is or what it means and you are pretty much
opening yourself up to eternal security damnation if you agree to this. So
you probably shouldn&#8217;t. But if you care this is what the service claims the
identifier does but hey, they could (and probably are) lying through their
teeth.&#8221;
<!--l. 203--></p><p class="indent" >   Anyone want to take bets on how close to 100% of users will click yes even with
that warning? But that&#8217;s o.k. the <a href="http://www.win.tue.nl/hashclash/rogue-ca/" >little padlock</a> or the <a href="http://www.blackhat.com/presentations/bh-usa-09/SOTIROV/BHUSA09-Sotirov-AttackExtSSL-PAPER.pdf" >green glow</a> will fix everything.
(Was that bitter?)
<!--l. 209--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">3   </span> <a id="x1-90003"></a>Updating the finger service, an example</h3>
<!--l. 211--></p><p class="noindent" >In this example Dax has just signed up with Google&#8217;s calendar service. Dax&#8217;s identity
provider has no relationship with Google. As described <a href="http://www.goland.org/adhocauthentication/" >here</a> Google was able to
authenticate Dax using her identity provider (IdP) even though Google had no
previous relationship with that provider. So the next step is for Google to
send a request to the IdP asking to update Dax&#8217;s finger status. So Google
first asks Dax&#8217;s IdP where the finger update service endpoint is using, well,
finger, obviously. Generally the finger update service endpoint is always
public so no proof of identity was needed (note however that smart IdPs will
return a URL for any submitted user identifier to prevent people fishing
for validate identifiers). Google then sends a request to the finger update
service endpoint asking to update various service identifiers with Dax&#8217;s Google
calendar service URL and also specifying the e-mails of anyone Dax has
approved for access. This will essentially be an OAuth request where Dax will
end up being redirected to her IdP who will confirm that she accepts the
changes. Dax confirms and the changes are made as Dax is redirected back to
Google.
<!--l. 230--></p><p class="indent" >   Note that this entire flow just requires adding some arguments to the
OAuth Web Server flow. It doesn&#8217;t require any fundamentally new protocol
machinery.
<!--l. 235--></p><p class="indent" >   <hr class="figure"/><div class="figure" 
>
                                                                  

                                                                  
<a id="x1-90011"></a>
                                                                  

                                                                  
<!--l. 236--><p class="noindent" >
<object data="managingfingerservice.svg" type="image/svg+xml" width="648.42249pt" height="529.98pt"></object>
<!--tex4ht:graphics  
name="managingfingerservice0x.png" src="0_Users_yarongoland_Documents_Unfinished_Website_Articles_managingfingerservice.eps"  
-->
                                                                  

                                                                  
<br /> <div class="caption" 
><span class="id">Figure&#x00A0;1: </span><span class="content">An example of updating a finger service</span></div><!--tex4ht:label?: x1-90011 -->
                                                                  

                                                                  
<!--l. 242--></p><p class="indent" >   </p></div><hr class="endfigure"/>
   <h4 class="subsectionHead"><span class="titlemark">3.1   </span> <a id="x1-100003.1"></a>Wait a minute, what about the late bound e-mail security hole?</h4>
<!--l. 248--></p><p class="noindent" >The problem, which I&#8217;ve referred to <a href="http://www.goland.org/openpermission/#x1-100003.1" >before</a>, is that email addresses are late bound
identifiers. So if I say &#8221;joe@example.com&#8221; can access my service and at some point
Joe Johnson, who was the person behind joe@example.com, loses that address and
now Joe Jehoshaphat has it, my ACL will still be in place and the wrong person will
have access.
<!--l. 255--></p><p class="indent" >   What we need is a way to exchange a late bound identifier like an email address
with a persistent identifier that is guaranteed to always follow the person and not the
email address. But the infrastructure needed to enable swapping out e-mail addresses
for persistent identifiers should, if we do it right, be implementable on top of the
finger infrastructure. In fact ideally what will be sent across the wire is a list of
doublets, one part identifying an identity provider and the other part a local
identifier.
<!--l. 266--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.2   </span> <a id="x1-110003.2"></a>Isn&#8217;t the list of folks able to see the calendar going to likely be dynamic and
so Google will be endlessly updating the finger permissions?</h4>
<!--l. 268--></p><p class="noindent" >A simple case is that Dax says &#8221;let everyone in my address book see my free/busy
time&#8221; in which case every time someone gets added or removed from Dax&#8217;s copy of
her address book at Google the Google calendar service will need to go over to Dax&#8217;s
finger service and update the list of folks who can discover her calendar service in the
first place.
<!--l. 275--></p><p class="indent" >   One solution is to just ask Google. In other words somebody shows up with a
request to Dax&#8217;s finger service asking to see where Dax&#8217;s calendar is located. The
Finger service knows that Dax has her personal calendar at Google and let&#8217;s say her
work calendar at Exchange Online. Dax&#8217;s finger service could fire off two requests to
each service asking &#8221;Hey, should I let this person see Dax&#8217;s calendar service
location?&#8221;
<!--l. 282--></p><p class="indent" >   This approach however does have a few problems. First, it&#8217;s very prone to leak
data. An attacker can see where connections are going from the finger service and
make a pretty good guess about things like &#8221;Hey, there is a user called Dax&#8221; and then
&#8221;Oh and that user probably uses Google and Exchange&#8221;. So much for privacy. The
performance is also likely to be less than one might like since every incoming
request ends up resulting in one or more outgoing requests before it can be
answered.
<!--l. 291--></p><p class="indent" >   My suspicion is that in practice this problem doesn&#8217;t really need to be solved. My
suspicion is that the way users will really manage their finger service is they will say
things like &#8221;Anyone in my address book can see my services&#8221;, their finger
service will be syncing to where ever their address book is kept and call
it a day. They will have the choice of making more restricted settings but
in the general case I think just having that level of validation is probably
                                                                  

                                                                  
enough.
<!--l. 300--></p><p class="indent" >   Keep in mind that finger services that are associated with corporate identities will
almost certainly be backed by full directories who can play all the access control
tricks one could ever want. For those kind of customers I expect that services will
either synch the full directory contents (including groups, rules, etc.) or really will
outsource requests to the corporate directory.
<!--l. 307--></p><p class="indent" >   In other words if someone is using Google Apps through their company then
when someone tries to access one of the employee&#8217;s Google Apps accounts
Google will forward the request to the corporation for fulfillment or will
fulfill it with a local copy of the corporation&#8217;s directory. This approach is
acceptable because the corporations pay enough money to make it economically
feasible.
<!--l. 316--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.3   </span> <a id="x1-120003.3"></a>Does telling the requester about additional identifiers associated with the
service open up a possible security hole?</h4>
<!--l. 318--></p><p class="noindent" >Possibly. It&#8217;s a trade off. I suspect this trade off will have to be made depending on
the nature of the identifier being updated.
<!--l. 322--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.4   </span> <a id="x1-130003.4"></a>Why couldn&#8217;t Google just ask for two identifiers in one request?</h4>
<!--l. 324--></p><p class="noindent" >Because if we do that we are essentially tunneling an application protocol inside of an
application protocol. We need to create a compound wrapper to contain each of the
individual requests and quite possibly a compound response format (assuming the
semantics are not all or nothing which I think would be odd in our case). That is a
lot of complexity to save a round trip.
<!--l. 332--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.5   </span> <a id="x1-140003.5"></a>Oh come on, why isn&#8217;t this just LDAP?</h4>
<!--l. 334--></p><p class="noindent" >ASN.1 in the browser? Sounds like fun. And what a wonderful barrier to entry for
anyone wanting to run their finger service. &#8221;Step 1, LDAP&#8221;. I doubt anyone will make
it to step 2. LDAP is wonderfully successful but only in places where the price is
worth the reward (e.g. the enterprise).
<!--l. 341--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.6   </span> <a id="x1-150003.6"></a>Fine, if it&#8217;s not LDAP then why isn&#8217;t it WebDAV?</h4>
<!--l. 343--></p><p class="noindent" >Hum... resources... properties.... named retrieval.... updates.... I&#8217;ve seen this story
before. It was called WebDAV. And no whining about how to run WebDAV in the
browser since XMLHTTP was literally invented for WebDAV. My current desire is to
see finger folded into the OAuth 2.0 world and so I&#8217;d like to see a solution that is in
                                                                  

                                                                  
keeping with how OAuth 2.0 works. This would be something much simpler than
WebDAV. But once the standards machinery is done who knows where we end
up.
<a id="Q1-1-17"></a></p></div></p>]]></content:encoded>
			<wfw:commentRss>http://www.goland.org/managingfingerservice/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using OAuth WRAP and Finger for ad-hoc user authentication</title>
		<link>http://www.goland.org/adhocauthentication/</link>
		<comments>http://www.goland.org/adhocauthentication/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 00:26:17 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[SOA/Web/Etc.]]></category>

		<guid isPermaLink="false">http://www.goland.org/?p=761</guid>
		<description><![CDATA[The OpenID community has worked long and hard to make ad-hoc logins possible on the web. Part of that process has been experiments with a number of different technologies and approaches. Below I make my own proposal for how to handle ad-hoc logins on the Internet using OAuth WRAP and my own spin on Finger. [...]]]></description>
			<content:encoded><![CDATA[     <!--l. 32--><p class="indent" >    <span class="aer-9">The </span><a href="http://openid.net/" ><span class="aer-9">OpenID</span></a> <span class="aer-9">community has worked long and hard to make ad-hoc</span>
     <span class="aer-9">logins possible on the web. Part of that process has been experiments with</span>
     <span class="aer-9">a number of different technologies and approaches. Below I make my own</span>
     <span class="aer-9">proposal for how to handle ad-hoc logins on the Internet using OAuth</span>
     <span class="aer-9">WRAP and my own </span><a href="http://www.goland.org/simplewebfinger/" ><span class="aer-9">spin</span></a> <span class="aer-9">on Finger. I offer this up as food for thought.</span>
<span id="more-761"></span>
       <h3 class="likesectionHead"><a id="x1-1000"></a><span class="aer-9">Contents</span></h3>
       <div class="tableofcontents">
       <span class="sectionToc" ><span class="aer-9">1 </span><a href="#x1-20001" id="QQ2-1-2"><span class="aer-9">Disclaimer</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">2 </span><a href="#x1-30002" id="QQ2-1-3"><span class="aer-9">Logging into the Foo service - a scenario</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">3 </span><a href="#x1-40003" id="QQ2-1-4"><span class="aer-9">My thoughts on requirements</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.1 </span><a href="#x1-50003.1" id="QQ2-1-5"><span class="aer-9">No federation, no registration, it&#8217;s truly ad-hoc</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.2 </span><a href="#x1-60003.2" id="QQ2-1-6"><span class="aer-9">No public key encryption beyond SSL/TLS, at least not initially</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">4 </span><a href="#x1-70004" id="QQ2-1-7"><span class="aer-9">An example</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.1 </span><a href="#x1-80004.1" id="QQ2-1-9"><span class="aer-9">What if Joe&#8217;s identity provider isn&#8217;t the same as his domain name?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.2 </span><a href="#x1-90004.2" id="QQ2-1-10"><span class="aer-9">Why do we need proof1 in messages 4 and 6? Shouldn&#8217;t the request ID be enough?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.3 </span><a href="#x1-100004.3" id="QQ2-1-11"><span class="aer-9">How did Example.com know what security token format to send</span>
     <span class="aer-9">proof of Joe&#8217;s identity in to the Foo service or what claims to use?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.4 </span><a href="#x1-110004.4" id="QQ2-1-12"><span class="aer-9">Wouldn&#8217;t it be easier for the Foo service to just make one directory</span>
     <span class="aer-9">lookup request against example.com instead of two?</span></a></span>
                                                                  

                                                                  
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.5 </span><a href="#x1-120004.5" id="QQ2-1-13"><span class="aer-9">Why is Example.com using finger in 5/5R to find Foo&#8217;s key negotiation</span>
     <span class="aer-9">service URL when that value was already provided in message 4?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.6 </span><a href="#x1-130004.6" id="QQ2-1-14"><span class="aer-9">How do keys expire and get replaced?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.7 </span><a href="#x1-140004.7" id="QQ2-1-15"><span class="aer-9">What happens if a key gets compromised or lost?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.8 </span><a href="#x1-150004.8" id="QQ2-1-16"><span class="aer-9">Aren&#8217;t there race conditions between two services trying to establish keys?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.9 </span><a href="#x1-160004.9" id="QQ2-1-17"><span class="aer-9">Does Foo service repeat this entire process with everyone from</span>
     <span class="aer-9">example.com who wants to login?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.10 </span><a href="#x1-170004.10" id="QQ2-1-18"><span class="aer-9">Why do we need to discover the location of the key negotiation or</span>
     <span class="aer-9">login services? Why not just hard code their locations under /.well-known?</span></a></span>
       </div>

<!--l. 42--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">1   </span> <a id="x1-20001"></a>Disclaimer</h3>
<!--l. 44--></p><p class="noindent" >My employer has nothing to do with anything in this article. They didn&#8217;t review
it, authorize it or influence it. It&#8217;s my ideas and my ideas alone. So blame
me.
<!--l. 48--></p><p class="indent" >   I have a deep interest in identity issues mostly as part of my fervent desire to live
in an Open Web and that web doesn&#8217;t exist today. So I ask the reader to please take
these ideas in the spirit that they are offered, as a fellow traveler trying to find
a successful path to a web where users decide who they want to interact
with.
<!--l. 55--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">2   </span> <a id="x1-30002"></a>Logging into the Foo service - a scenario</h3>
<!--l. 57--></p><p class="noindent" >Joe wants to use the Foo service. To do this Joe needs to log into the Foo service.
Joe&#8217;s identity provider is example.com where Joe is known as joe@example.com. The
Foo service and example.com have no previous relationship. Joe tells the Foo service
that his email is joe@example.com (note: the scenario works just as well with
just Joe&#8217;s domain so there is no need to expose one&#8217;s identity). The Foo
service then uses finger (my thoughts on which I have explored <a href="http://www.goland.org/simplewebfinger/" >here</a>) to obtain
example.com&#8217;s symmetric key negotiation service and login service endpoints. The
Foo service uses the key negotiation service to negotiate a symmetric key
with example.com. Then the Foo service uses a profile of OAuth WRAP
to forward Joe to the login service asking for proof that the user really is
joe@example.com. Example.com validates Joe&#8217;s identity and then forwards Joe&#8217;s web
browser back to the Foo service with a security token attesting to Joe&#8217;s
identity.
                                                                  

                                                                  
<!--l. 73--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">3   </span> <a id="x1-40003"></a>My thoughts on requirements</h3>
<!--l. 76--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.1   </span> <a id="x1-50003.1"></a>No federation, no registration, it&#8217;s truly ad-hoc</h4>
<!--l. 78--></p><p class="noindent" >We need an approach to authenticating users across services that doesn&#8217;t require the
services to have any pre-existing relationship. The services must not need to register
with each other, federate or any other &#8217;off line&#8217; magic in order to successfully
authenticate users to each other.
<!--l. 84--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.2   </span> <a id="x1-60003.2"></a>No public key encryption beyond SSL/TLS, at least not initially</h4>
<!--l. 86--></p><p class="noindent" >The use of public key encryption has obvious applications to this scenario. But I
believe we have to start simple with solutions that do not require any form of PKI
beyond SSL/TLS which I believe should be mandatory requirements of the protocol.
Yes, in the future, we definitely should extend to PKI because it has some
very nice advantages but I believe that the base functionality shouldn&#8217;t use
anything more than SSL/TLS with some HMAC thrown in for validation of
security tokens. Note however that support for SSL/TLS is mandatory and a
critical component of the security of the key negotiation algorithm defined
below.
<!--l. 98--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">4   </span> <a id="x1-70004"></a>An example</h3>
<!--l. 100--></p><p class="noindent" >When Joe first navigates to the Foo service he is prompted to login. Ideally Joe
should just type in his identity provider&#8217;s domain name (example.com) but
realistically most users won&#8217;t &#8217;get&#8217; that (at least not initially) and will probably just
type in their e-mail addresses, in this case, joe@example.com.
<!--l. 106--></p><p class="indent" >   The Foo service has never had an interaction with example.com before so the first
thing it does is do a lookup on example.com&#8217;s <a href="http://www.goland.org/simplewebfinger/" >finger service</a> to find the location of
example.com&#8217;s key negotiation endpoint. This process consists of sending a POST
request to https://example.com/.well-known/finger-service?service=example.com with a
scope (a la OAuth WRAP) of URN:SomeStandardsOrgId:KeyNegotiationService. The
response would contain a URL such as https://example.com/keynegotiationservice.
<!--l. 113--></p><p class="indent" >   The Foo service would then send a request to establish a symmetric key to
https://example.com/keynegotiationservice. The request would contain Foo&#8217;s key
negotiation service URL (https://foo.com/mykeygenerator), a request ID
and a cryptographically secure randomly generated number that I&#8217;ll call
proof1.
<!--l. 119--></p><p class="indent" >   Example.com would then double check the key negotiation service location by
using a finger request on foo.com to find foo.com&#8217;s key negotiation endpoint. Once
                                                                  

                                                                  
it had validated that the URL it received in the key negotiation request
matched the value retrieved from finger then example.com would issue a
POST to that URL with the request ID, proof1 and a symmetric key value
that is to be used to sign security tokens between example.com and the Foo
service.
<!--l. 127--></p><p class="indent" >   At this point there is now a symmetric key that both Example.com and the Foo
service (represented by the domain foo.com) have agreed to use with each
other.
<!--l. 131--></p><p class="indent" >   Now the Foo service will perform a second finger lookup but this time look for
URN:SomeStandardsOrgId:LoginService. This time the Foo service wants to know
where to send Joe in order to log him in.
<!--l. 135--></p><p class="indent" >   Foo service will then forward Joe&#8217;s browser to the URI returned in the previous
finger request along with an OAuth WRAP style permission request of &#8221;Please log
this person in and tell me who the heck they are.&#8221;
<!--l. 140--></p><p class="indent" >   Example.com will then log Joe in and ask Joe if he wants to tell Foo service
who he is. Joe will say yes and Example.com will redirect Joe back to Foo
service with a security token, HMAC&#8217;d with the shared key, asserting Joe&#8217;s
identity.
<!--l. 145--></p><p class="indent" >   And now we&#8217;re done. Joe logged into Foo service using his identity provider
example.com even though Foo service and example.com had never had any previous
interactions with each other.
<!--l. 150--></p><p class="indent" >   <hr class="figure"/><div class="figure" 
>
                                                                  

                                                                  
<a id="x1-70011"></a>
                                                                  

                                                                  
                                                                  

                                                                  
<!--l. 151--><p class="noindent" >
<object data="adhocauthentication.svg" type="image/svg+xml" width="1350pt" height="630pt"></object>
<!--tex4ht:graphics  
name="adhocauthentication0x.png" src="4_Users_yarongoland_Documents_BlogXMLRPC_src_technology_soawebetc_adhocauthentication.eps"  
-->
<br /> <div class="caption" 
><span class="id">Figure&#x00A0;1: </span><span class="content">An example of ad hoc authentication</span></div><!--tex4ht:label?: x1-70011 -->
                                                                  

                                                                  
<!--l. 157--></p><p class="indent" >   </p></div><hr class="endfigure"/>
<!--l. 160--></p><p class="indent" >   Only the colored links involve standardization. The blue links (3/3R, 5/5R and
7/7R) use finger whose design I have discussed <a href="http://www.goland.org/simplewebfinger/" >elsewhere</a>. The green links (4/4R and
6/6R) are the symmetric key negotiation algorithm I introduce in this article. The
red links (2R, 8, 9R and 10) are a minor profile of OAuth WRAP that I discuss in
this article.
   <h4 class="subsectionHead"><span class="titlemark">4.1   </span> <a id="x1-80004.1"></a>What if Joe&#8217;s identity provider isn&#8217;t the same as his domain name?</h4>
<!--l. 169--></p><p class="noindent" >This is actually not an uncommon situation. For example, users establish Facebook
accounts with e-mail addresses that Facebook doesn&#8217;t own yet Facebook acts very
much as an identity provider. Some services, like Google and Live are identity
providers where users can either choose to use a domain for their e-mail
controlled by Google or Live (e.g. gmail.com or live.com) or they can use an
existing e-mail address. This can sometimes create confusion. If Joe has a Live
account he created with the e-mail address joe@example.com and Joe wants to
login to the Foo service then if he says his e-mail is joe@example.com the
Foo service will go to example.com instead of live.com who is Joe&#8217;s identity
provider.
<!--l. 181--></p><p class="indent" >   This is a really sticky problem and I&#8217;m pretty convinced that it&#8217;s not interesting
to solve. The reason identity providers like Live or Google let users use existing
e-mail addresses from domains not owned by identity provider was as a
convenience. That convenience is proving more and more troublesome to
the point where the message needs to go out - login using your identity
provider. So if Joe wants to be known as joe@example.com then example.com
better be his identity provider. Otherwise he needs to get another e-mail
address.
<!--l. 190--></p><p class="indent" >   I know many people don&#8217;t find this to be a satisfying answer but I believe that
bending ourselves over backwards to solve a weird pointer problem just isn&#8217;t worth
the effort.
<!--l. 196--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.2   </span> <a id="x1-90004.2"></a>Why do we need proof1 in messages 4 and 6? Shouldn&#8217;t the request ID be
enough?</h4>
<!--l. 198--></p><p class="noindent" >As long as the request ID contains a cryptographically secure random number of
sufficient length then yes it is enough. But I felt like calling out the requirement for
the secure value as its own value in the exchange in order to hammer home
how important it is from a security perspective. The security of the key
establishment hinges on the use of TLS/SSL and the exchange of an unguessable
secret. If either is compromised then the key establishment protocol is not
secure.
                                                                  

                                                                  
<!--l. 208--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.3   </span> <a id="x1-100004.3"></a>How did Example.com know what security token format to send proof of
Joe&#8217;s identity in to the Foo service or what claims to use?</h4>
<!--l. 210--></p><p class="noindent" >My assumption is that we will define profiles for common situations like this. So there
will be a profile called &#8217;login&#8217; and that profile will specify things like what
security token format to use and what claims can be placed in that security
token.
<!--l. 217--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.4   </span> <a id="x1-110004.4"></a>Wouldn&#8217;t it be easier for the Foo service to just make one directory lookup
request against example.com instead of two?</h4>
<!--l. 219--></p><p class="noindent" >This is really more of an issue for the <a href="http://www.goland.org/simplewebfinger/" >finger server article</a> but my opinion is that with
HTTP/1.1 pipelining (and in this case the POST&#8217;s semantics are idempotent so
pipelining is fine) I don&#8217;t see any reason to over optimize. Besides these requests
should be reasonably rare.
<!--l. 227--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.5   </span> <a id="x1-120004.5"></a>Why is Example.com using finger in 5/5R to find Foo&#8217;s key negotiation
service URL when that value was already provided in message 4?</h4>
<!--l. 229--></p><p class="noindent" >In theory any request that can be validated against a domain over TLS/SSL should
be &#8217;trusted&#8217; as having properly come from that domain. But in practice
paranoia is a healthy thing. Let&#8217;s say an attacker has managed to take over
some small part of example.com and is using that to launch key attacks. By
checking the key negotiation service location in message 4 against the value
returned by the finger service in 5R, example.com gives itself an extra level of
protection.
<!--l. 238--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.6   </span> <a id="x1-130004.6"></a>How do keys expire and get replaced?</h4>
<!--l. 240--></p><p class="noindent" >As part of the key exchange one expects that an expiration date will be associated
with the key. To keep things running smoothly it will be necessary to be able to roll
keys over without a &#8217;gap&#8217; where no key is in place. This means that at a minimum
the two parties to a key negotiation need to handle having at least two keys active at
the same time.
<!--l. 247--></p><p class="indent" >   For example, let&#8217;s say a key has been negotiated and will expire in a few days.
One of the parties may decide it is time to create a new key so that it can be
established before the old key expires. For this scheme to work at least two keys have
to be active at the same time, the old key that is about to expire and the newly
established key.
<!--l. 254--></p><p class="indent" >   In general a new key is established any time the key negotiation exchange is
made. So in theory an unbounded number of keys could be put into play. In practice
however each side is likely to have some upper limit to how many keys they want in
                                                                  

                                                                  
play at any one time. This limit can be enforced either by refusing to add new keys
if there already exist a maximum number of unexpired keys or dropping
off an existing key (e.g. no longer honoring it) if the maximum number of
supported keys has been reached. Which approach isn&#8217;t as important as making
sure both ends of the conversation understand what has happened. My own
preference is for each side to just support a maximum number of keys and to
refuse to create new ones if that maximum is filled with unexpired keys.
I think the failure scenarios for that situation are easier for each side to
understand.
<!--l. 269--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.7   </span> <a id="x1-140004.7"></a>What happens if a key gets compromised or lost?</h4>
<!--l. 271--></p><p class="noindent" >My own thinking is that the key negotiation protocol should have a message
exchange type of &#8221;Delete all keys we have negotiated&#8221; along with a human description
of what the heck happened and some contact information since a follow up is
probably necessary. This exchange would occur using the same two step pattern as
establishing a key so as to prevent attacks.
<!--l. 280--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.8   </span> <a id="x1-150004.8"></a>Aren&#8217;t there race conditions between two services trying to establish
keys?</h4>
<!--l. 282--></p><p class="noindent" >You betcha. Imagine a case where a user is logging into one of example.com&#8217;s services
using a Foo service identity and vice versa. This could easily result in two different
keys getting established between the same services. But as long as we mandate that
each side be able to handle a reasonable number of keys (say 10 just to pick some
integer) then it really shouldn&#8217;t matter.
<!--l. 291--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.9   </span> <a id="x1-160004.9"></a>Does Foo service repeat this entire process with everyone from example.com
who wants to login?</h4>
<!--l. 293--></p><p class="noindent" >Heck no. The negotiated key is good for all communications between foo.com and
example.com
<!--l. 298--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.10   </span> <a id="x1-170004.10"></a>Why do we need to discover the location of the key negotiation or login
services? Why not just hard code their locations under /.well-known?</h4>
<!--l. 300--></p><p class="noindent" >Somewhere I can hear Mark Nottingham groaning. Strictly speaking hard coding the
locations under /.well-known is at least logically consistent. But in general hard
coding makes for fragile systems. It limits implementers flexibility around where
services should be hosted. So it seems like a good idea to hard code as few things as
                                                                  

                                                                  
possible and let everything else be dynamic. Hence the desire to redirect through a
finger server.
<a id="Q1-1-19"></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.goland.org/adhocauthentication/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Thoughts on building a finger service</title>
		<link>http://www.goland.org/simplewebfinger/</link>
		<comments>http://www.goland.org/simplewebfinger/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 00:47:09 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[SOA/Web/Etc.]]></category>

		<guid isPermaLink="false">http://www.goland.org/?p=754</guid>
		<description><![CDATA[Those folks of a certain age will remember the finger command/protocol which allowed one to look up information about a person based just on their login identifier. This command was extremely useful even if it had some troubling security and privacy implications. Efforts are underway to create a Web Finger but for reasons I&#8217;ve previously [...]]]></description>
			<content:encoded><![CDATA[     <!--l. 32--><p class="indent" >    <span class="aer-9">Those            folks            of            a            certain            age</span>
     <span class="aer-9">will remember the </span><a href="http://en.wikipedia.org/wiki/Finger_protocol" ><span class="aer-9">finger</span></a> <span class="aer-9">command/protocol which allowed one to look</span>
     <span class="aer-9">up information about a person based just on their login identifier. This</span>
     <span class="aer-9">command was extremely useful even if it had some troubling security and</span>
     <span class="aer-9">privacy implications. Efforts are underway to create a </span><a href="http://code.google.com/p/webfinger/" ><span class="aer-9">Web Finger</span></a> <span class="aer-9">but for</span>
     <span class="aer-9">reasons I&#8217;ve </span><a href="http://www.goland.org/openpermission/#x1-110003.2" ><span class="aer-9">previously discussed</span></a> <span class="aer-9">I think the underlying technologies for</span>
     <span class="aer-9">those efforts are sub-optimal. So in this article I propose what I think is a</span>
     <span class="aer-9">much simpler approach. My motivation for caring is that I think having a</span>
     <span class="aer-9">finger service will make permissioning systems much more useful (see </span><a href="http://www.goland.org/openpermission/" ><span class="aer-9">here</span></a>
     <span class="aer-9">and </span><a href="http://www.goland.org/oauthpermissioningexamples/" ><span class="aer-9">here</span></a><span class="aer-9">).</span>
<span id="more-754"></span>
       <h3 class="likesectionHead"><a id="x1-1000"></a><span class="aer-9">Contents</span></h3>
       <div class="tableofcontents">
       <span class="sectionToc" ><span class="aer-9">1 </span><a href="#x1-20001" id="QQ2-1-2"><span class="aer-9">Disclaimer</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">2 </span><a href="#x1-30002" id="QQ2-1-3"><span class="aer-9">Scenario - discovering a friend&#8217;s calendar service using a local application</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">3 </span><a href="#x1-40003" id="QQ2-1-4"><span class="aer-9">My personal opinions on requirements</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.1 </span><a href="#x1-50003.1" id="QQ2-1-5"><span class="aer-9">The finger service should just point at other services</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.2 </span><a href="#x1-60003.2" id="QQ2-1-6"><span class="aer-9">The finger service needs to support authentication and authorization</span>
     <span class="aer-9">to control who gets to see what</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.3 </span><a href="#x1-70003.3" id="QQ2-1-7"><span class="aer-9">The finger service should just be a service, not a document</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.4 </span><a href="#x1-80003.4" id="QQ2-1-8"><span class="aer-9">The finger service should start with trivial queries and get complex later</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.5 </span><a href="#x1-90003.5" id="QQ2-1-9"><span class="aer-9">The finger service should at least support using e-mail addresses as user identifiers</span></a></span>
                                                                  

                                                                  
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.6 </span><a href="#x1-100003.6" id="QQ2-1-10"><span class="aer-9">The finger service should use HTTP, in preference to DNS, to go</span>
     <span class="aer-9">from e-mail to finger service</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.7 </span><a href="#x1-110003.7" id="QQ2-1-11"><span class="aer-9">The finger service should use SSL/TLS when dealing with non-anonymous</span>
     <span class="aer-9">queries/responses</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">4 </span><a href="#x1-120004" id="QQ2-1-12"><span class="aer-9">Martok gets Dax&#8217;s free/busy time - An example</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.1 </span><a href="#x1-130004.1" id="QQ2-1-14"><span class="aer-9">Where did the refresh token in message 1 come from?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.2 </span><a href="#x1-140004.2" id="QQ2-1-15"><span class="aer-9">How can the access token from 1R be used both in message 2 and message 5?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.3 </span><a href="#x1-150004.3" id="QQ2-1-16"><span class="aer-9">Well then, why couldn&#8217;t the access token from 3R be used with request 6?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.4 </span><a href="#x1-160004.4" id="QQ2-1-17"><span class="aer-9">Wait, remind me again, how did Martok&#8217;s calendar client know where</span>
     <span class="aer-9">Dax&#8217;s finger service was?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.5 </span><a href="#x1-170004.5" id="QQ2-1-18"><span class="aer-9">Why do we bother with the previously mentioned STS/Kerberos two step anyway?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.6 </span><a href="#x1-180004.6" id="QQ2-1-19"><span class="aer-9">How did Martok get permission to access Dax&#8217;s finger service or free/busy time?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.7 </span><a href="#x1-190004.7" id="QQ2-1-20"><span class="aer-9">How did Martok&#8217;s identity provider know how to issue security tokens</span>
     <span class="aer-9">with formats and claims supported by Dax&#8217;s finger service and calendar service?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.8 </span><a href="#x1-200004.8" id="QQ2-1-21"><span class="aer-9">Couldn&#8217;t Dax&#8217;s finger server tell Dax&#8217;s calendar server that Martok</span>
     <span class="aer-9">is allowed to have access to free/busy time?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">4.9 </span><a href="#x1-210004.9" id="QQ2-1-22"><span class="aer-9">Couldn&#8217;t Dax have multiple calendar services?</span></a></span>
       </div>

<!--l. 47--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">1   </span> <a id="x1-20001"></a>Disclaimer</h3>
<!--l. 49--></p><p class="noindent" >I don&#8217;t always remember to put on a disclaimer because this is my blog
and my opinions and by default the assumption should be that anything
I say here represents my views and only my views. But just in case, this
article (like all the articles on my blog) represents my views and only my
views.
<!--l. 57--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">2   </span> <a id="x1-30002"></a>Scenario - discovering a friend&#8217;s calendar service using a local application</h3>
<!--l. 59--></p><p class="noindent" >Martok wants to invite Dax to a meeting but to do so Martok needs to see Dax&#8217;s
free/busy time which is available at Dax&#8217;s calendar service. But Martok
doesn&#8217;t know which calendar service Dax uses. So Martok uses the finger
functionality from inside of his local calendaring client to take Dax&#8217;s e-mail address
and use it to discover Dax&#8217;s finger service. Martok then authenticates to
Dax&#8217;s finger service and queries for Dax&#8217;s calendar. Dax&#8217;s finger service has
been instructed to share details such as Dax&#8217;s calendar service location with
anyone who is part of Dax&#8217;s personal address book. Since Martok is in Dax&#8217;s
personal address book he is allowed to see where Dax&#8217;s calendar service is
kept.
                                                                  

                                                                  
<!--l. 71--></p><p class="indent" >   Note: This scenario is strictly about programmatic interaction with the finger
service. I&#8217;ll leave UX issues for another day.
<!--l. 75--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">3   </span> <a id="x1-40003"></a>My personal opinions on requirements</h3>
<!--l. 78--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.1   </span> <a id="x1-50003.1"></a>The finger service should just point at other services</h4>
<!--l. 80--></p><p class="noindent" >Once upon a time finger directly returned key information about the user
such as their office location or status message. But in the new world order
with social networks all over the place it seems more reasonable to think
about finger as a catalog of pointers to more specialized services. In other
words one shouldn&#8217;t go to Finger to find out someone&#8217;s status. One should
rather go to Finger to find out what service or services a user uses to publish
their status (Messenger? Facebook? Twitter?). The same thing with other
services such as blogs (personal or work?), calendars, preferred social network,
etc.
<!--l. 92--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.2   </span> <a id="x1-60003.2"></a>The finger service needs to support authentication and authorization to
control who gets to see what</h4>
<!--l. 94--></p><p class="noindent" >Because of the privacy and security implications of finger it&#8217;s necessary to
authenticate who is requesting information (even if the authentication is just
&#8217;anonymous&#8217;) and to require the requester to specify exactly what information they
want. This allows the finger service to reason about who is making the request and
what they want and so decide what is appropriate to share.
<!--l. 101--></p><p class="indent" >   It&#8217;s tempting to argue that it isn&#8217;t necessary to know what the requester wants
since who they are should specify what they can see. But I believe that as a rule it&#8217;s
not a good idea to over share.
<!--l. 106--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.3   </span> <a id="x1-70003.3"></a>The finger service should just be a service, not a document</h4>
<!--l. 108--></p><p class="noindent" >I have <a href="http://www.goland.org/openpermission/#x1-110003.2" >previously</a> explained my concerns about the XRD/LRDD approach to finger.
So I won&#8217;t repeat myself here other than to say - I believe finger is a service not a
document. So I expect that people will issue queries to the finger service and get back
responses, not just do global GETs.
                                                                  

                                                                  
<!--l. 116--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.4   </span> <a id="x1-80003.4"></a>The finger service should start with trivial queries and get complex
later</h4>
<!--l. 118--></p><p class="noindent" >At its heart the finger service is a database with ACLs on top. So one could imagine
specifying that the interface for the finger service should be something like <a href="http://www.odata.org/" >OData</a>. I
actually expect that eventually finger services will sport interfaces like OData
because they will make potentially interesting query and data navigation capabilities
possible.
<!--l. 125--></p><p class="indent" >   But in the short run I think we need to focus on easy things first. If all we do
initially is just create an interface where someone can submit an identifier of a service
and get back what, if anything, the finger service is willing to say about that the
user&#8217;s usage of that service then we will have done a good thing for the
world.
<!--l. 133--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.5   </span> <a id="x1-90003.5"></a>The finger service should at least support using e-mail addresses as user
identifiers</h4>
<!--l. 135--></p><p class="noindent" >A perennial argument about how to identify users is what kind of identifier should be
used? Whatever that identifier is it has to be something that enables a finger client to
go from that identifier to the finger service that handles that identifier. Similarly the
identifier needs to be something that is easy for users to remember and exchange.
Something that is easily transcribable and typeable so users can just type a friend&#8217;s
identifier into an application or service and away they go. To date there is exactly one
user identifier that has proven robust across all of these requirements - e-mail
addresses. So email addresses are a minimum required user identifier. This
means that the finger service has to define how to find the finger service for a
particular individual by starting off with nothing more than their e-mail
address.
<!--l. 150--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.6   </span> <a id="x1-100003.6"></a>The finger service should use HTTP, in preference to DNS, to go from
e-mail to finger service</h4>
<!--l. 152--></p><p class="noindent" >Going from an e-mail address to the finger service that owns that address essentially
requires figuring out how to use the DNS name in the e-mail address to find the
finger service. One obvious way to do this would be DNS <a href="http://tools.ietf.org/html/rfc2782" >SRV</a> records. We could add
a new SRV type for finger services and allow discovery that way. The downside
to this approach is that it requires the ability to manipulate DNS records
on the server side and the ability to make DNS queries on the client side.
Neither is a common operation for most programmers or users. So basing
discovering on DNS is likely to slow adoption. Nothing stops us from adding an
extension based on DNS but I personally don&#8217;t think that it is the right place to
start.
<!--l. 165--></p><p class="indent" >   Instead I think we should build on top of <a href="http://tools.ietf.org/html/rfc5785" >RFC 5785</a> that defines a location
                                                                  

                                                                  
for hosting &#8217;well known&#8217; services via HTTP. So if someone has the e-mail
address joe@example.com they could try to find the finger service for Joe at

http://example.com/.well-known/finger-service.

<!--l. 170--></p><p class="indent" >   There are some pretty obvious problems with this approach. For example, what
happens if the owner of one&#8217;s e-mail domain doesn&#8217;t support the finger service? Is one
supposed to change one&#8217;s e-mail address just to get to a service provider who does
support the finger service? The answer, I believe, is, unfortunately, yes. It&#8217;s the
nature of hierarchical trust systems that there are choke points, in this case, the
domain owner. We could look for a web of trust system but previous experience
with systems like <a href="http://www.gnupg.org/" >GPG</a> teach that while these systems can be powerful they
are hard for users to understand so I don&#8217;t feel they are a good starting
point.
<!--l. 181--></p><p class="indent" >   Nevertheless the RFC 5785 approach does offer flexibility. For example, let&#8217;s
say I don&#8217;t want to host my own finger service but I do own goland.org. I
can easily set up a redirect rule in my domain to redirect requests for
http://goland.org/.well-known/finger-service to where ever my finger service actually
rests. I would posit that more people know how to set up redirect rules then know
how to configure SRV records.
<!--l. 190--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.7   </span> <a id="x1-110003.7"></a>The finger service should use SSL/TLS when dealing with non-anonymous
queries/responses</h4>
<!--l. 192--></p><p class="noindent" >Any finger service that needs to support authorization/authentication (and one hopes
that is the majority) must support SSL/TLS. The OAuth 1.0 signature/encryption
experience has taught that adding message integrity/confidentiality as a layer on top
of protocols like HTTP is so difficult as to be impractical for even sophisticated
developers. So rather than re-invent the wheel we&#8217;ll require using the one that&#8217;s
already there, SSL/TLS.
<!--l. 200--></p><p class="indent" >   Note: The reader is well advised to review articles <a href="http://www.crypto.com/blog/spycerts/" >such as this one</a> that explain
some fundamental flaws in how SSL is used operationally. The way certs are used
today enables abuse and I think this is much more threatening in the long run then
functional flaws like the <a href="http://www.educatedguesswork.org/2009/11/understanding_the_tls_renegoti.html" >renegotiation attack</a> for which <a href="http://tools.ietf.org/html/draft-mrex-tls-secure-renegotiation" >a fix</a> is likely to be available
sooner rather than later.
<!--l. 208--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">4   </span> <a id="x1-120004"></a>Martok gets Dax&#8217;s free/busy time - An example</h3>
<!--l. 210--></p><p class="noindent" >In this example Martok&#8217;s calendar client is going to start with Dax&#8217;s e-mail address
and use it to go to the reserved URL for the finger service and ask for Dax&#8217;s calendar
location. Embedded in the request is a security token authenticating Martok to Dax&#8217;s
finger service. For right now I&#8217;ll just wave my hands and say that Dax&#8217;s finger
service is federated with Martok&#8217;s Identity Provider and so recognizes the
HMAC/signature/etc. on the security token. In a later article I&#8217;ll explain how we can
                                                                  

                                                                  
build on top of the finger service to enable ad-hoc authentication of users without
federation.
<!--l. 220--></p><p class="indent" >   Dax&#8217;s finger service will validate Martok&#8217;s security token and return the location
of Dax&#8217;s calendar service. Martok&#8217;s calendar client will then get a security token for
Dax&#8217;s calendar service and use that to access Dax&#8217;s free/busy time. Again, I&#8217;m going
to assume that Martok&#8217;s Identity Provider is also federated with Dax&#8217;s calendar
service.
<!--l. 226--></p><p class="indent" >   Note: To keep the picture from getting too big I have collapsed the services and
their associated authentication servers into a single box.
<!--l. 231--></p><p class="indent" >   <hr class="figure"/><div class="figure" 
>
                                                                  

                                                                  
<a id="x1-120011"></a>
                                                                  

                                                                  
                                                                  

                                                                  
<!--l. 232--><p class="noindent" ><object data="MartokDaxFreeBusy.svg" type="image/svg+xml" width="799.98874pt" height="746.79pt" ></object><!--tex4ht:graphics  
name="simplewebfinger0x.png" src="1_Users_yarongoland_Documents_BlogXMLRPC_src_technology_soawebetc_MartokDaxFreeBusy.eps"  
-->
<br /> <div class="caption" 
><span class="id">Figure&#x00A0;1: </span><span class="content">Martok gets Dax&#8217;s free/busy time</span></div><!--tex4ht:label?: x1-120011 -->
                                                                  

                                                                  
<!--l. 238--></p><p class="indent" >   </p></div><hr class="endfigure"/>
<!--l. 241--></p><p class="indent" >   This picture is essentially the STS/Kerberos two step repeated over and over
again. Martok&#8217;s client gets an access token from the identity provider which is
provided to the service&#8217;s authentication server who exchanges it for another security
token that is then presented to the service. All the exchanges in red are bog standard
OAuth WRAP calls. The only thing needed to be added to support finger is 4/4R in
blue. My guess is that even 4/4R will be an OAuth WRAP profile extension where
the wrap_scope will probably be a URI indicating the user and service that is being
sought. Or maybe we can add another field. In any case it&#8217;s a pretty obvious
variation.
   <h4 class="subsectionHead"><span class="titlemark">4.1   </span> <a id="x1-130004.1"></a>Where did the refresh token in message 1 come from?</h4>
<!--l. 255--></p><p class="noindent" >I&#8217;m assuming that Martok&#8217;s calendar client is using OAuth WRAP section 6.3 to get
a refresh token to allow it to talk to Martok&#8217;s identity provider. I intend to go more
into this scenario in a future article.
<!--l. 261--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.2   </span> <a id="x1-140004.2"></a>How can the access token from 1R be used both in message 2 and message
5?</h4>
<!--l. 263--></p><p class="noindent" >Both requests require the client to authenticate itself to the same service, Martok&#8217;s
identity provider, so the same access token can be used. The only problem is if
enough time passed between message 2 and 5 that the access token (which is
typically short lived) expired. In that case the client would need to repeat
request 1 to get a new access token. This is all standard OAuth WRAP
behavior.
<!--l. 272--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.3   </span> <a id="x1-150004.3"></a>Well then, why couldn&#8217;t the access token from 3R be used with request
6?</h4>
<!--l. 274--></p><p class="noindent" >Because access tokens are service specific. The access token returned in 3R was only
good with the finger service so it couldn&#8217;t be used with the calendar service.
Therefore the client had to execute request 5 to get an access token for the calendar
service.
<!--l. 281--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.4   </span> <a id="x1-160004.4"></a>Wait, remind me again, how did Martok&#8217;s calendar client know where Dax&#8217;s
finger service was?</h4>
<!--l. 283--></p><p class="noindent" >The scenario assumes that Martok, either directly or via an address book, gave
the client Dax&#8217;s e-mail address. Let&#8217;s assume that Dax&#8217;s e-mail address is
dax@example.com The calendar client pulled the domain name out of the e-mail
                                                                  

                                                                  
address, in this case example.com, and then created a request of the form
http://example.com/.well-known/finger-service. Note that I just made up
&#8217;finger-service&#8217;, the actual value will be whatever goes into the standard. The
interesting question is how did the request identify Dax?
<!--l. 292--></p><p class="indent" >   One way is in the URI itself. We could specify
https://example.com/.well-known/finger-service?localname=dax. We could even handle
cases where a finger service is handling an address from a domain other than its own
via https://example.com/.well-known/finger-service?email=dax@federation.com.
Alternatively Dax&#8217;s identifier could go into the request body, possibly into the
wrap_scope element.
<!--l. 300--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.5   </span> <a id="x1-170004.5"></a>Why do we bother with the previously mentioned STS/Kerberos two step
anyway?</h4>
<!--l. 302--></p><p class="noindent" >The answer is scalability. It turns out that requiring services to handle authentication
directly is expensive. Life works better if there is a centralized authentication service
who handles the expensive authentication actions and then hands out a short lived
token (typically good for a few hours) that can then be used with services
without further ado. This is why OAuth WRAP uses the refresh and access
tokens.
<!--l. 311--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.6   </span> <a id="x1-180004.6"></a>How did Martok get permission to access Dax&#8217;s finger service or free/busy
time?</h4>
<!--l. 313--></p><p class="noindent" >For the example we just assume that Dax said something like &#8221;anyone in my address
book can see my calendar location and my free/busy time&#8221; and Martok was in Dax&#8217;s
address book. Martok&#8217;s identity was validated to the finger and calendar
services by the security token issued by Martok&#8217;s identity provider. But in the
more general case I&#8217;m proposing that we extend OAuth WRAP to enable
individuals to ask each other for permissions. See <a href="http://www.goland.org/openpermission/" >here</a> and <a href="http://www.goland.org/oauthpermissioningexamples/" >here</a> for more
details.
<!--l. 326--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.7   </span> <a id="x1-190004.7"></a>How did Martok&#8217;s identity provider know how to issue security tokens
with formats and claims supported by Dax&#8217;s finger service and calendar
service?</h4>
<!--l. 328--></p><p class="noindent" >My guess is that if the finger service as proposed here takes off then there will be a
defined standard for a default security token format along with a default identity
claim that can be used in any situation where one entity needs to prove its &#8217;identity&#8217;
(in this case, an e-mail address) to another. See the previous question for why the
finger service and calendar service honored the identity assertion from Martok&#8217;s
identity provider.
                                                                  

                                                                  
<!--l. 338--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.8   </span> <a id="x1-200004.8"></a>Couldn&#8217;t Dax&#8217;s finger server tell Dax&#8217;s calendar server that Martok is
allowed to have access to free/busy time?</h4>
<!--l. 340--></p><p class="noindent" >This is a feature I&#8217;m interested in mostly because over time individuals trying to
manage their security in a coherent way are going to get a really serious headache.
How can anyone remember which permissions they gave to which services for which
people? What&#8217;s needed is a centralized place where users can manage their
permissions across many services. The finger server could either be that service or be
in communication with that service. In that case rather than Dax telling the
calendaring service directly &#8221;Give Martok access&#8221;, she could instead tell this to her
centralized permission service who would then be discovered by Martok using the
finger service. Martok would then ask that central permissioning service for a token
to give to Dax&#8217;s calendar service to prove he had a right to access her free/busy
time.
<!--l. 353--></p><p class="indent" >   But I think it&#8217;s premature to try and create this kind of infrastructure
right now. To be blunt, until it hurts nobody is going to spend time and
money fixing it. So while some enterprises are just now barely trying to get
started on issues like managing security policy across multiple internal services
(and believe me, that hurts way worse than a single user managing their
permissions) I suspect users effectively addressing this issue is some way into the
future.
<!--l. 361--></p><p class="indent" >   In fact my strong suspicion is that the way things will really work is that users are
going to synch at least the e-mails in their address books across services and then
specify permissions based on the address book&#8217;s structure or tags. &#8221;Anyone
marked as family can edit X&#8221; or &#8221;Anyone marked as business can see Y&#8221;,
etc.
<!--l. 367--></p><p class="indent" >   It&#8217;s tempting to argue that we shouldn&#8217;t design a system we know is problematic
at the start but synchronized permission management is an unsolved problem mostly
because we aren&#8217;t sure as to the most effective way to present permissions to users
(this is also known as a the policy problem).
<!--l. 374--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">4.9   </span> <a id="x1-210004.9"></a>Couldn&#8217;t Dax have multiple calendar services?</h4>
<!--l. 376--></p><p class="noindent" >Absolutely. My guess is that services like calendars will have standard finger schemas
that can say things like &#8221;I&#8217;m the work calendar&#8221; or &#8221;I&#8217;m the second personal
calendar&#8221; or whatever. It will be up to Martok and his calendar client to
decide how many of those services he should try to synch free/busy time for. <a id="Q1-1-23"></a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.goland.org/simplewebfinger/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The outline of a profile for granting permissions using OAuth WRAP</title>
		<link>http://www.goland.org/oauthpermissioningexamples/</link>
		<comments>http://www.goland.org/oauthpermissioningexamples/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 22:20:01 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[SOA/Web/Etc.]]></category>

		<guid isPermaLink="false">http://www.goland.org/?p=745</guid>
		<description><![CDATA[In a previous article I talked about adding a profile to OAuth WRAP that would enable users to ask for or grant permissions to each other. In this article I show that an OAuth WRAP profile to handle granting permissions only needs two request/response pairs. I then show that an OAuth WRAP profile to handle [...]]]></description>
			<content:encoded><![CDATA[     <!--l. 32--><p class="indent" >    <span class="aer-9">In a </span><a href="http://www.goland.org/openpermission" ><span class="aer-9">previous</span></a> <span class="aer-9">article I talked about adding a profile to OAuth WRAP</span>
     <span class="aer-9">that would enable users to ask for or grant permissions to each other.</span>
     <span class="aer-9">In this article I show that an OAuth WRAP profile to handle granting</span>
     <span class="aer-9">permissions only needs two request/response pairs. I then show that an</span>
     <span class="aer-9">OAuth WRAP profile to handle asking for permissions only needs one</span>
     <span class="aer-9">additional exchange.</span>
<span id="more-745"></span>
       <h3 class="likesectionHead"><a id="x1-1000"></a><span class="aer-9">Contents</span></h3>
       <div class="tableofcontents">
       <span class="sectionToc" ><span class="aer-9">1 </span><a href="#x1-20001" id="QQ2-1-2"><span class="aer-9">Granting Permission - The free/busy time example</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">1.1 </span><a href="#x1-30001.1" id="QQ2-1-4"><span class="aer-9">How did Joe know to tell Yahoo that Mike keeps his calendar at Live?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">1.2 </span><a href="#x1-40001.2" id="QQ2-1-5"><span class="aer-9">What if Mike has multiple calendar services?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">1.3 </span><a href="#x1-50001.3" id="QQ2-1-6"><span class="aer-9">How did Live know the requests came from Yahoo?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">1.4 </span><a href="#x1-60001.4" id="QQ2-1-7"><span class="aer-9">How did Live know what permission Yahoo was asking for?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">1.5 </span><a href="#x1-70001.5" id="QQ2-1-8"><span class="aer-9">How did Live know that joe@google.com was the one who asked</span>
     <span class="aer-9">Yahoo to make the request?</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">1.6 </span><a href="#x1-80001.6" id="QQ2-1-9"><span class="aer-9">How does Joe remove permission for Mike to see his free/busy time?</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">2 </span><a href="#x1-90002" id="QQ2-1-10"><span class="aer-9">Asking for permission - extending the free/busy time example</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">2.1 </span><a href="#x1-100002.1" id="QQ2-1-12"><span class="aer-9">How does Live know that the notification in 7 is a response to the request in 4?</span></a></span>
       </div>

                                                                  

                                                                  
<!--l. 42--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">1   </span> <a id="x1-20001"></a>Granting Permission - The free/busy time example</h3>
<!--l. 44--></p><p class="noindent" >In this example the user joe@google.com, who uses the Yahoo Calendar service,
wants to give permission to mike@example.com, who uses the Live calendar service,
to see Joe&#8217;s free/busy time. Mike will then login to Live calendar service, accept Joe&#8217;s
permission grant and then schedule a meeting with Joe where Joe&#8217;s free/busy time
will be displayed to Mike.
<!--l. 52--></p><p class="indent" >   <hr class="figure"/><div class="figure" 
>
                                                                  

                                                                  
<a id="x1-20011"></a>
                                                                  

                                                                  
                                                                  

                                                                  
<!--l. 53--><p class="noindent" >
<object data="SimplePermissionGranting.svg" type="image/svg+xml" width="950pt" height="590"></object>
<!--tex4ht:graphics  
name="Oauthpermissioningexamples0x.png" src="2_Users_yarongoland_Documents_Unfinished_Website_Articles_SimplePermissionRequest.eps"  
-->
<br /> <div class="caption" 
><span class="id">Figure&#x00A0;1: </span><span class="content">Granting Permission - Free/Busy time example</span></div><!--tex4ht:label?: x1-20011 -->
                                                                  

                                                                  
<!--l. 59--></p><p class="indent" >   </p></div><hr class="endfigure"/>
<!--l. 62--></p><p class="indent" >   In looking at the sequence diagram it&#8217;s worth noting that the entire proposal
comes down to creating a profile for OAuth WRAP that introduces request/response
pairs 2/2R and 3/3R. That&#8217;s it.
<!--l. 66--></p><p class="indent" >   7/7R are already defined by OAuth WRAP, 8/8R are defined by other protocols
like CalDAV and everything else occurs outside of any standard context. So while a
lot is going on the amount we have to add to enable interoperability is quite small.
The sequence diagram does, however, bring up some interesting issues that I explore
below.
   <h4 class="subsectionHead"><span class="titlemark">1.1   </span> <a id="x1-30001.1"></a>How did Joe know to tell Yahoo that Mike keeps his calendar at
Live?</h4>
<!--l. 75--></p><p class="noindent" >One can imagine that Joe went into his Yahoo address book and clicked on a button
saying "Give Mike permission to see my free/busy time". Yahoo knows that Mike&#8217;s
e-mail address is mike@example.com but how does Yahoo figure out where Mike
keeps his calendar? I don&#8217;t think it will ever make sense to ask a customer where
their friend&#8217;s calendar is because the customer might either not know or have
the wrong answer. For privacy reasons Yahoo in many cases can&#8217;t tell the
customer if their choice is right or wrong. So my suspicion is that Yahoo will
need to find out for itself where the calendar is for the associated e-mail
address.
<!--l. 86--></p><p class="indent" >   In the long term there will exist discovery services that given an identifier like an
e-mail address can return information such as where the owner&#8217;s calendar(s) is(are). I
hope to discuss my ideas around that problem in another article. But in the short
term my guess is that services will just have to ask their partners. In some cases,
where there is very deep trust (or very long legal agreements and enough money to
sue if things go bad) services will just bulk upload lists of who they host calendars for
to their partners and update those lists on a regular basis. In other cases a
service will have to send a protocol request to their partners asking "Do
you host X&#8217;s calendar?" This request/response pair is shown in 2/2R in the
diagram.
<!--l. 99--></p><p class="indent" >   This means that a service like Yahoo who is probably partnered with a large
number of other services will either have to check its local database of bulk uploads
and/or make queries to partner services in order to figure out where a user&#8217;s calendar
is. This won&#8217;t scale but it&#8217;s probably o.k. in the short term until the discovery service
infrastructure is up and running.
<!--l. 107--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">1.2   </span> <a id="x1-40001.2"></a>What if Mike has multiple calendar services?</h4>
<!--l. 109--></p><p class="noindent" >We can easily imagine that Mike has a personal calendar that he keeps at Live and a
work calendar that is run from his business. One can also imagine that both Live and
Mike&#8217;s business are federated with Yahoo. So when Yahoo goes out looking for where
Mike&#8217;s calendar is they are likely to find not one, but two calendars. In fact it
                                                                  

                                                                  
could be even more complicated. Let&#8217;s say that before deciding that Live
was his primary personal calendar service Mike created accounts with a
few other calendar services. He has since abandoned those calendars but he
used the same e-mail address, mike@example.com, to create all the calendar
accounts. If Yahoo is federated/registered with those calendaring services then
Yahoo could find itself having numerous potential calendaring services who all
say they represent mike@example.com and at least two of them are even
right!
<!--l. 123--></p><p class="indent" >   One suspects that the only sane way to handle this for now is for Yahoo to just
find all the calendar services who have an entry for Mike and send the permission
request to all of them. Most likely Mike will probably accept Joe&#8217;s request for his
Live calendar and reject Joe&#8217;s request for his work calendar. But just as likely
Joe might accept both requests and that&#8217;s probably a good thing. In the
end Joe needs to know when Mike is busy, if Mike hasn&#8217;t federated his two
calendars together then the only way to have an accurate picture of Mike&#8217;s
activities is to get free/busy time from both calendars. Yahoo would then
pull the data from both and show Joe a unified free/busy time view for
Mike.
<!--l. 136--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">1.3   </span> <a id="x1-50001.3"></a>How did Live know the requests came from Yahoo?</h4>
<!--l. 138--></p><p class="noindent" >In the sequence diagram Yahoo sends two requests to Live, one to find out if Live has
Mike&#8217;s calendar (2/2R) and another to notify Live that Joe has granted
Mike permission to see Joe&#8217;s free/busy time (3/3R). In the short run my
guess is that services like Live will require services that want to talk to it to
register and as part of that registration the requesting service, in this case
Yahoo, will get what OAuth WRAP calls a client id and a client secret.
Yahoo will include those values in its requests and so authenticate itself to
Live.
<!--l. 147--></p><p class="indent" >   In the long run I&#8217;d actually like to see an ad-hoc system that lets two services
exchange requests without a previous relationship. In a future blog post I hope to
explain how this could be made to work.
<!--l. 152--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">1.4   </span> <a id="x1-60001.4"></a>How did Live know what permission Yahoo was asking for?</h4>
<!--l. 154--></p><p class="noindent" >My guess is that requests 2/2R and 3/3R will use the OAuth WRAP
request/response format which is just HTML Forms. So we would expect that
request 3 will include some indicator of what permission or permissions are
being asked for. This is nothing new in and of itself, OAuth handles this
all the time today. What&#8217;s unfortunate is that the way OAuth typically
handles this is that every service posts its own unique list of permissions it
handles and anyone wanting to work with that service has to work with that
service&#8217;s permissions. This makes economies of scale hard to come by. Also the
                                                                  

                                                                  
permissioning part of the game is the easy part, all things considered. The
hard work comes in request/response pair 8/8R where the free/busy time is
retrieved.
<!--l. 166--></p><p class="indent" >   My hope is that folks in communities like calendaring, document sharing, etc. will
get together and create packages of both claims for use with OAuth WRAP as well as
details on what protocols to use along with those permissions. But one step at a
time.
<!--l. 173--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">1.5   </span> <a id="x1-70001.5"></a>How did Live know that joe@google.com was the one who asked Yahoo to
make the request?</h4>
<!--l. 175--></p><p class="noindent" >The real question is probably more subtle - how did Yahoo know its user was the
legitimate owner of joe@google.com? It turns out that there are a non-trivial number
of ways that Yahoo could have validated Joe&#8217;s identify. But the two typical
approaches are:
     <dl class="description"><dt class="description">
<span class="aebx-10">E-mail</span><span class="aebx-10">&#x00A0;Validation</span> </dt><dd class="description">Joe  could  have  created  an  account  with  Yahoo  using
     the e-mail address &#8217;joe@google.com&#8217; and Yahoo e-mailed a confirmation
     message to that address that Joe then had to click on and then log in
     again. This provides reasonable proof that the user owns the e-mail address
     &#8217;joe@google.com&#8217;.
     </dd><dt class="description">
<span class="aebx-10">WS-Federation,</span><span class="aebx-10">&#x00A0;SAML-P</span><span class="aebx-10">&#x00A0;or</span><span class="aebx-10">&#x00A0;OpenID</span> </dt><dd class="description">Yahoo   could   have   a   trusted
     federation  with  Google  and  so  accept  Google&#8217;s  attestations  of  Joe&#8217;s
     identity.</dd></dl>
<!--l. 189--></p><p class="noindent" >My guess is that initially Live will require that Yahoo disclose the mechanism used to
authenticate the user&#8217;s identity. Live will then decide how to proceed based on
context and the authentication mechanism. Yahoo&#8217;s disclosure could be as simple as a
field in the permission notification request that says "auth_type = EmailValidation"
or what have you. Live would then trust that Yahoo was being honest about the
value it put in the auth_type claim.
<!--l. 197--></p><p class="indent" >   There are some edge case scenarios where a service that is giving permission
might not know the public identity of the person granting the permission. I have
some ideas on how to solve that problem but they are fairly complex so I&#8217;ll save them
for another day.
<!--l. 203--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">1.6   </span> <a id="x1-80001.6"></a>How does Joe remove permission for Mike to see his free/busy
time?</h4>
<!--l. 205--></p><p class="noindent" >In message 1R Yahoo let Joe know that it was able to deliver the notification request,
although Yahoo won&#8217;t tell Joe where the request was sent. But Joe won&#8217;t ever know
                                                                  

                                                                  
if Mike actually accepted the request since, to be blunt, it&#8217;s none of Joe&#8217;s business.
Joe can offer the permission but that&#8217;s it. But what is Joe&#8217;s business is if Joe
changes his mind and wants to withdraw permission he needs a way to do
that.
<!--l. 212--></p><p class="indent" >   Thankfully removing permissions can be handled completely outside of the
protocol. Joe needs to let Yahoo know that he no longer wants Mike to be
able to see his free/busy time and at that point Yahoo will remove Mike&#8217;s
permission from its permission store. It&#8217;s worth remembering that the way OAuth
WRAP works every time a particular user gives a particular permission to
another particular user a refresh token is issued. That token is unique to the
combination of Source User/Source Service/Destination User/Destination
Service/Permission. In our case that is joe@google.com/Yahoo Calendaring
Service/mike@example.com/Live Calendaring Service/See Free Busy time. So the
next time that Live comes with the refresh token (request 7) to get a new
access token (7R) the request will be denied since Joe had Yahoo remove the
permission.
<!--l. 226--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">2   </span> <a id="x1-90002"></a>Asking for permission - extending the free/busy time example</h3>
<!--l. 228--></p><p class="noindent" >In this version of the example Mike asks for permission to see Joe&#8217;s free busy time.
By way of reference, in the previous example Joe pre-emptively granted Mike
permission, Mike hadn&#8217;t asked. The scenario is that Mike creates a meeting in the
Live calendar service and invites Joe. Live sees that Mike doesn&#8217;t have Joe&#8217;s
free/busy time and prompts Mike if he would like to ask Joe to see his free/busy
time. Mike responds in the affirmative. Yahoo queries the services it knows to see if
anyone owns Joe&#8217;s calendar and gets a positive response from Yahoo. So Live asks
Yahoo to forward a free/busy time view request to Joe from Mike. Mike logs in, sees
the request and approves it. At that point the rest of the flow is essentially
identical to the previous example. Yahoo notifies Live that Joe has granted the
permission and Live uses that permission to show Joe&#8217;s free/busy time to
Mike.
<!--l. 243--></p><p class="indent" >   <hr class="figure"/><div class="figure" 
>
                                                                  

                                                                  
<a id="x1-90012"></a>
                                                                  

                                                                  
                                                                  

                                                                  
<!--l. 244--><p class="noindent" >
<object data="SimplePermissionRequest.svg" type="image/svg+xml" width="976.64874pt" height="734.745pt"></object>
<!--tex4ht:graphics  
name="Oauthpermissioningexamples1x.png" src="2_Users_yarongoland_Documents_Unfinished_Website_Articles_SimplePermissionRequest.eps"  
-->
<br /> <div class="caption" 
><span class="id">Figure&#x00A0;2: </span><span class="content">Asking for permission - extending the free/busy time example</span></div><!--tex4ht:label?: x1-90012 -->
                                                                  

                                                                  
<!--l. 250--></p><p class="indent" >   </p></div><hr class="endfigure"/>
<!--l. 253--></p><p class="indent" >   In comparing this example to the previous example only one new request/response
pair is added, 4/4R. All the other request/response pairs that deal with anything
that needs to be standardized are already defined in the previous example. And even
4/4R is a variant on 7/7R.
<!--l. 258--></p><p class="indent" >   A variant on this scenario would be to have Mike both request Joe&#8217;s free/busy
time while simultaneously granting Joe the right to see Mike&#8217;s free/busy time. But I
suspect these should be modeled as two separate interactions.
   <h4 class="subsectionHead"><span class="titlemark">2.1   </span> <a id="x1-100002.1"></a>How does Live know that the notification in 7 is a response to the request in
4?</h4>
<!--l. 267--></p><p class="noindent" >Strictly speaking correlation isn&#8217;t necessary since Live should be able to recognize
that it asked for specific permission from Yahoo for a specific user and if it later gets
that permission then matching the request with the response shouldn&#8217;t be a big deal.
One can imagine Live keeping a table where the index is on a set of columns that
specify what service the request went to, what user at the server it was
targeted at, what permission was asked for and what local user made the
request. Correlating 7 with 4 then becomes a simple task of looking up the
appropriate entry in the table. If there is an entry then this is a response to a
previous permission request and if there isn&#8217;t an entry then this is the previous
example.
<!--l. 279--></p><p class="indent" >   But if we really want we can just include a correlation ID from Live in request 4
that Yahoo is expected to include in 7 because 7 was generated in response to 4. If 7
was generated on its own (e.g. the previous example) then no correlation ID would be
present.
<a id="Q1-1-13"></a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.goland.org/oauthpermissioningexamples/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Open permissions matter for an open web</title>
		<link>http://www.goland.org/openpermission/</link>
		<comments>http://www.goland.org/openpermission/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 05:11:15 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[SOA/Web/Etc.]]></category>

		<guid isPermaLink="false">http://www.goland.org/?p=741</guid>
		<description><![CDATA[The key to an open social web is permissions. There is data we don&#8217;t want to share and data we do want to share, permissions let us create the appropriate barriers. Closed networks like Facebook have reasonably rich permission infrastructures but what about open networks? How should Google and Microsoft enable document sharing across Google [...]]]></description>
			<content:encoded><![CDATA[<p class="indent" >    <span class="aer-9">The key to an open social web is permissions. There is data we don&#8217;t</span>
     <span class="aer-9">want to share and data we do want to share, permissions let us create the</span>
     <span class="aer-9">appropriate barriers. Closed networks like Facebook have reasonably rich</span>
     <span class="aer-9">permission infrastructures but what about open networks? How should</span>
     <span class="aer-9">Google and Microsoft enable document sharing across Google Docs and</span>
     <span class="aer-9">Sharepoint Online? Sure WebDAV can handle the actual mechanics of</span>
     <span class="aer-9">listing out documents, editing, etc. But how do the permissions get put</span>
     <span class="aer-9">into place in an open manner directly between users of the two services?</span>
     <span class="aer-9">This is a hole in the standards infrastructure and it&#8217;s time to fill it.</span>
<span id="more-741"></span>
       <h3 class="likesectionHead"><a id="x1-1000"></a><span class="aer-9">Contents</span></h3>
       <div class="tableofcontents">
       <span class="sectionToc" ><span class="aer-9">1 </span><a href="#x1-30001" id="QQ2-1-3"><span class="aer-9">Bring in the scenarios!</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">1.1 </span><a href="#x1-40001.1" id="QQ2-1-4"><span class="aer-9">Notification that permission has been granted</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">1.2 </span><a href="#x1-50001.2" id="QQ2-1-5"><span class="aer-9">Asking for permission</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">2 </span><a href="#x1-60002" id="QQ2-1-6"><span class="aer-9">Breaking down the scenarios</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">2.1 </span><a href="#x1-70002.1" id="QQ2-1-7"><span class="aer-9">Notification that permission has been granted</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">2.2 </span><a href="#x1-80002.2" id="QQ2-1-8"><span class="aer-9">Asking for permission</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">3 </span><a href="#x1-90003" id="QQ2-1-9"><span class="aer-9">Addressing the scenario components</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.1 </span><a href="#x1-100003.1" id="QQ2-1-10"><span class="aer-9">Identify the principal</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.2 </span><a href="#x1-110003.2" id="QQ2-1-11"><span class="aer-9">Discovery where to deliver the permission notification/request</span></a></span>
                                                                  

                                                                  
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.3 </span><a href="#x1-120003.3" id="QQ2-1-12"><span class="aer-9">Deliver the permission notification/request</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.4 </span><a href="#x1-130003.4" id="QQ2-1-13"><span class="aer-9">Utilize the permission</span></a></span>
     <br />     <span class="aer-9">&#x00A0;</span><span class="subsectionToc" ><span class="aer-9">3.5 </span><a href="#x1-140003.5" id="QQ2-1-14"><span class="aer-9">Describe the permission</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">4 </span><a href="#x1-150004" id="QQ2-1-15"><span class="aer-9">Conclusion</span></a></span>
       </div>

<!--l. 45--></p><p class="indent" >
   <h1 class="likepartHead"><a id="x1-2000"></a>Disclaimer</h1>
<!--l. 47--></p><p class="noindent" >This article represents my personal opinions and only my personal opinions. Nothing
in this article should be construed as representing my current employers opinions,
actions, plans, or what have you.
   <h3 class="sectionHead"><span class="titlemark">1   </span> <a id="x1-30001"></a>Bring in the scenarios!</h3>
<!--l. 55--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">1.1   </span> <a id="x1-40001.1"></a>Notification that permission has been granted</h4>
<!--l. 57--></p><p class="noindent" >Jane works at Big Corp international where she uses Exchange to maintain
her work calendar. Jane wants to give her spouse, Lucy, permission to see
her free/busy time so that Lucy can schedule events with Jane that won&#8217;t
interfere with Jane&#8217;s work schedule. Jane sets up a permission for Lucy in her
calendar granting Lucy permission to see Jane&#8217;s free/busy time. Lucy, who uses
Yahoo Calendaring for her personal calendar, is notified by Yahoo that Jane
has granted the permission and asked if she accepts the permission. Lucy
accepts the permission and Jane&#8217;s free/busy time is displayed in Lucy&#8217;s Yahoo
Calendar.
<!--l. 68--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">1.2   </span> <a id="x1-50001.2"></a>Asking for permission</h4>
<!--l. 70--></p><p class="noindent" >Morgan is a vendor hired by Istvan&#8217;s company to help with a project. Morgan uses
Google Docs to edit and manage documents while Istvan uses Sharepoint Online. To
get the project done Morgan needs access to certain documents in Istvan&#8217;s
Sharepoint. Morgan uses a permission request dialog in Google Docs to send a
request to Sharepoint Online asking Istvan for access to Istvan&#8217;s Sharepoint.
Sharepoint Online receives the request and shows it to Istvan who approves granting
Morgan read/write access to a particular sub-directory in Istvan&#8217;s Sharepoint.
Sharepoint Online then notifies Google Docs that Istvan has granted Morgan
read/write permissions to a directory in Istvan&#8217;s Sharepoint. Google Docs notifies
Morgan and displays the folder from Istvan&#8217;s Sharepoint as part of Morgan&#8217;s Google
                                                                  

                                                                  
Docs workspace.
<!--l. 84--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">2   </span> <a id="x1-60002"></a>Breaking down the scenarios</h3>
<!--l. 86--></p><p class="noindent" >Below I break the scenarios into what I think are the &#8217;key&#8217; actions. My suspicion is
that if we can define reasonable ways to achieve each of these actions then the rest of
the questions around how to implement the scenarios will more or less answer
themselves.
<!--l. 92--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">2.1   </span> <a id="x1-70002.1"></a>Notification that permission has been granted</h4>
<!--l. 93--></p><p class="noindent" >
     <dl class="description"><dt class="description">
<span class="aebx-10">Identify</span><span class="aebx-10">&#x00A0;the</span><span class="aebx-10">&#x00A0;principal</span> </dt><dd class="description">In  order  to  grant  a  permission  Jane  had  to  let
     Exchange Online know &#8217;who&#8217; Lucy is so that Exchange could transmit the
     permission to Lucy. What is the pointer used to identify Lucy to Exchange
     Online?
     </dd><dt class="description">
<span class="aebx-10">Describe</span><span class="aebx-10">&#x00A0;the</span><span class="aebx-10">&#x00A0;permission</span> </dt><dd class="description">What format did Exchange Online use to tell Lucy
     about the permission granted by Jane? What information is needed in the
     format?
     </dd><dt class="description">
<span class="aebx-10">Discover</span><span class="aebx-10">&#x00A0;where</span><span class="aebx-10">&#x00A0;to</span><span class="aebx-10">&#x00A0;deliver</span><span class="aebx-10">&#x00A0;the</span><span class="aebx-10">&#x00A0;permission</span><span class="aebx-10">&#x00A0;notification</span> </dt><dd class="description">How        did
     Exchange Online figure out where to deliver the permission notification
     to?
     </dd><dt class="description">
<span class="aebx-10">Deliver</span><span class="aebx-10">&#x00A0;the</span><span class="aebx-10">&#x00A0;permission</span><span class="aebx-10">&#x00A0;notification</span> </dt><dd class="description">What     are     the     details     of
     how Exchange Online delivered the permission notification, isn&#8217;t this just
     a spammers dream?
     </dd><dt class="description">
<span class="aebx-10">Utilize</span><span class="aebx-10">&#x00A0;the</span><span class="aebx-10">&#x00A0;permission</span> </dt><dd class="description">Assuming  that  Lucy  accepts  the  permission  how
     does she go about taking advantage of it?</dd></dl>
<!--l. 111--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">2.2   </span> <a id="x1-80002.2"></a>Asking for permission</h4>
<!--l. 112--></p><p class="noindent" >
                                                                  

                                                                  
     <dl class="description"><dt class="description">
<span class="aebx-10">Identify</span><span class="aebx-10">&#x00A0;the</span><span class="aebx-10">&#x00A0;principal</span> </dt><dd class="description">How did Aahan tell Facebook that he wanted to ask
     for permission from Aanjay at Flicker? What is the pointer that Aahan
     used to identify Aanjay to Facebook?
     </dd><dt class="description">
<span class="aebx-10">Describe</span><span class="aebx-10">&#x00A0;the</span><span class="aebx-10">&#x00A0;permission</span> </dt><dd class="description">How does Facebook tell Aanjay about her father&#8217;s
     permission  request?  What  is  the  format?  What  information  is  in  the
     format?
     </dd><dt class="description">
<span class="aebx-10">Discover</span><span class="aebx-10">&#x00A0;where</span><span class="aebx-10">&#x00A0;to</span><span class="aebx-10">&#x00A0;deliver</span><span class="aebx-10">&#x00A0;the</span><span class="aebx-10">&#x00A0;permission</span><span class="aebx-10">&#x00A0;request</span> </dt><dd class="description">How            does
     Facebook know where to deliver the permission request?
     </dd><dt class="description">
<span class="aebx-10">Deliver</span><span class="aebx-10">&#x00A0;the</span><span class="aebx-10">&#x00A0;permission</span><span class="aebx-10">&#x00A0;request</span> </dt><dd class="description">What  are  the  details  of  how  Facebook
     delivered the permission request, isn&#8217;t this just a spammers dream?</dd></dl>
<!--l. 125--></p><p class="noindent" >My assumption is that if the permission request is granted then notification of this fact
will be delivered in the manner specified in the previous section.
<!--l. 130--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">3   </span> <a id="x1-90003"></a>Addressing the scenario components</h3>
<!--l. 133--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.1   </span> <a id="x1-100003.1"></a>Identify the principal</h4>
<!--l. 135--></p><p class="noindent" >The obvious answer would seem to be e-mail addresses. Jane types in lucy@yahoo.com
(or more likely selects Lucy&#8217;s entry in Jane&#8217;s personal address book which then
resolves to lucy@yahoo.com). Unfortunately e-mail addresses are lousy identifiers for
a couple of reasons.
     <dl class="description"><dt class="description">
<span class="aebx-10">Late</span><span class="aebx-10">&#x00A0;bound</span><span class="aebx-10">&#x00A0;identifiers</span> </dt><dd class="description">Are identifiers that are resolved to a principal at
     time of use and are not guaranteed to always bind to the same principal. In
     other words, Jane&#8217;s spouse Lucy may have control over lucy@yahoo.com
     today, but who knows who might own lucy@yahoo.com tomorrow?
     </dd><dt class="description">
<span class="aebx-10">Non</span><span class="aebx-10">&#x00A0;transferable</span> </dt><dd class="description">If Lucy decides that she no longer wants to use Yahoo and
     would like to move to another identity provider or even be her own identity
     provider there is no well defined way to achieve this goal with an e-mail
     address. Once the address is abandoned, that&#8217;s it. There&#8217;s no forwarding
     mechanism.
                                                                  

                                                                  
     </dd><dt class="description">
<span class="aebx-10">Not</span><span class="aebx-10">&#x00A0;uniquely</span><span class="aebx-10">&#x00A0;bound</span><span class="aebx-10">&#x00A0;to</span><span class="aebx-10">&#x00A0;an</span><span class="aebx-10">&#x00A0;identity</span><span class="aebx-10">&#x00A0;provider</span> </dt><dd class="description">It&#8217;s  tempting  to  argue
     that when trying to interact with the identifier lucy@yahoo.com it makes
     the most sense to contact yahoo.com. But what to then make of folks
     like Live or Google who will let users create account with other identity
     provider&#8217;s e-mail names? For example, Lucy can create a Google account
     using her Yahoo address. So when typing in lucy@yahoo.com to give a
     calendaring permission does Jane mean Lucy&#8217;s calendar with Yahoo or
     Lucy&#8217;s calendar with Google?</dd></dl>
<!--l. 159--></p><p class="noindent" >These are all very serious problems but solving them will require introducing a new
identity infrastructure. There are ways to make this new infrastructure work over the
old one but the issues are complex and I think we should solve the easy problems
before the hard ones.
<!--l. 164--></p><p class="indent" >   So I&#8217;m going to assume that principals are identified by e-mail. Once we have
that more or less working we can move on to the more difficult identity
issues.
<!--l. 169--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.2   </span> <a id="x1-110003.2"></a>Discovery where to deliver the permission notification/request</h4>
<!--l. 171--></p><p class="noindent" >So who gets notified that a permission has been granted? I suspect a key requirement
is that we don&#8217;t mandate a single notification point for all services. In other words if I
want to notify someone about a calendaring permission I should be able to do that at
a different location than say an IM permission. That way services can be well
factored and spread out. But this also means that there needs to be some mechanism
to go from the principal identifier (an e-mail address) to the right address to notify
for a particular service.
<!--l. 180--></p><p class="indent" >   There is already a proposed solution for exactly this problem that we could, in
theory, build on top of - <a href="http://tools.ietf.org/html/draft-hammer-discovery" >Link-based Resource Descriptor Discovery (LRDD)</a>. But
besides supporting no less than three different discovery mechanisms and throwing in
<a href="http://docs.oasis-open.org/xri/xrd/v1.0/xrd-1.0.html" >XRD</a> I think LRDD has is backwards. It assumes that one publishes all the data to
be known about oneself. Besides wasting space this makes versioning and
extensibility a nightmare. What if one supports four different types of calendaring
protocol with various versions for each one? LRDD requires publishing the whole
lot.
<!--l. 190--></p><p class="indent" >   It&#8217;s tempting to argue that LRDD is easier to implement than a service since with
LRDD one can, in theory, just publish a static file. But given the type and
amount of data likely to be in a LRDD retrieved discovery file, the &#8217;static
file&#8217; argument is, in my mind, a fiction. The data in a LRDD file will be
dynamic and it will be maintained so it&#8217;s a service. Might as well treat it as
one.
<!--l. 197--></p><p class="indent" >   LRDD, besides describing what&#8217;s in the discovery file (e.g. the file containing the
pointers to various services) also describes how to find the discovery file for a
particular user when starting with an e-mail address. Specifically LRDD uses <a href="http://tools.ietf.org/html/draft-hammer-hostmeta" >Web
Host Metadata</a>. But this is just another static file (using the XRD format that is
                                                                  

                                                                  
also used in LRDD) that hangs off a well known address. Instead of using a
request/response service (&#8221;here is the e-mail I&#8217;m looking for&#8221;, &#8221;here is the address to
go to&#8221;) It uses a static file that includes a templating language which one downloads
and then locally feeds the e-mail address into the template which then spits out a
URL.
<!--l. 209--></p><p class="indent" >   So the LRDD process of going from an e-mail address to a service URL
involves two steps. First one retrieves the Web Host Metadata that contains
the pseudo-regular expression that one then downloads and &#8217;runs&#8217; locally
to translate the e-mail address to a LRDD discovery file location. Then
one retrieves the LRDD discovery file and from there finds out the service
address.
<!--l. 216--></p><p class="indent" >   Personally I think having a service at a well known location that one can send a
request of the form &#8221;I want to talk to the calendaring permission server for user X&#8221;
and get back a response would be oodles easier to implement and reason about and
involve one less hop.
<!--l. 221--></p><p class="indent" >   But in any case, at least there is some existing work to start from.
<!--l. 224--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.3   </span> <a id="x1-120003.3"></a>Deliver the permission notification/request</h4>
<!--l. 226--></p><p class="noindent" >In theory delivering the request or permission notification is easy enough, just
POST some bit of XML or JSON and call it a day. But this is going to be a
spammer/security nightmare. We need some authentication. But in this case we need
to authenticate the sender, which is the service sending the notification and not the
user who granted the permission. This simplifies things a bit and more accurately
represents who the responsible parties are. (Note: For you WS-* heads, this is
explicitly not an &#8217;act as&#8217; scenario)
<!--l. 235--></p><p class="indent" >   For services with long standing relationship HMAC&#8217;s can be used to
validate the POSTs by pre-arranging a shared secret. For ad-hoc scenarios I
suspect we&#8217;ll want to use digital signatures and leverage the previous discovery
mechanism to find the public key for a service. That way when a service receives a
message it can validate the signature by checking the source service&#8217;s public
key.
<!--l. 242--></p><p class="indent" >   Another check against spamming/security attacks is to make sure to only process
requests or permission notifications who are identified as coming from people the user
&#8217;trusts&#8217;, typically people in their address book. Yes, this leaves open the question
of how to handle requests that aren&#8217;t from folks in the address book but
most social networking systems already deal with this by asking users if
they wish to receive requests or permissions from people they don&#8217;t have
listed.
<!--l. 252--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.4   </span> <a id="x1-130003.4"></a>Utilize the permission</h4>
                                                                  

                                                                  
<!--l. 254--></p><p class="noindent" >In the case of a permission notice the service receiving the notice will need the right
information to use the permission on the user&#8217;s behalf. This is a classic OAuth use
case so my guess is that we should just use OAuth access tokens in the permission
notice and use the OAuth access pattern to exchange the access token for a request
token (or whatever they are called this week) which is then passed into the actual
service.
<!--l. 263--></p><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.5   </span> <a id="x1-140003.5"></a>Describe the permission</h4>
<!--l. 265--></p><p class="noindent" >This leaves the question (which I moved out of order because I actually think it&#8217;s the
least interesting question) of what the actual permission notification/request looks
like. My guess is that we should, again, rely on OAuth. It has a very simple format
that can be easily adapted for the purposes of describing anything and it
provides mechanisms for sending requests either over SSL or without. Again,
no need to get fancy. The whole thing then becomes just another OAuth
profile.
<!--l. 274--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">4   </span> <a id="x1-150004"></a>Conclusion</h3>
<!--l. 276--></p><p class="noindent" >I think we have all the pieces to create a really powerful ad-hoc sharing infrastructure
that can allow a user of any random kind of service to ask for or grant permissions to
any user of any other service. This is what a real, open, social web is all about. So
let&#8217;s get cracking!  </p>]]></content:encoded>
			<wfw:commentRss>http://www.goland.org/openpermission/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FirstTechPrivacyFailure</title>
		<link>http://www.goland.org/firsttechprivacyfailure/</link>
		<comments>http://www.goland.org/firsttechprivacyfailure/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 04:55:55 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://www.goland.org/?p=738</guid>
		<description><![CDATA[For more years than I care to count I have been a happy customer of First Tech credit union. Their website has always been top notch and the service I received from them was the best. But now I find myself looking for a new bank and would welcome any suggestions. My unhappiness started when [...]]]></description>
			<content:encoded><![CDATA[<p>For more years than I care to count I have been a happy customer
of First Tech credit union. Their website has always been top notch
and the service I received from them was the best. But now I find
myself looking for a new bank and would welcome any suggestions. 
</p>
<p>My unhappiness started when First Tech's website was down for 5
days, worse yet, a scheduled 5 days, so they could upgrade their
online banking. In this day and age to have a 5 day downtime for an
upgrade is unacceptable. This is not the 1990s. This isn't even the
2000s. 
</p>
<p>Things only got worse when, according to their own notice the
upgrade failed because after 5 days of being down they got three
times their normal traffic and couldn't handle the load. Huh? You
were down for 5 days, what the heck did you think was going to
happen? Of course you're going to get a load spike! Their solution
was to roll all of their website back to the old website so they
could get back up and running while they figured out what to do about
the extra load. The planning screw ups this situation called for are,
well, concerning.</p>
<p>All of this was irritating but then there was the final straw.
Their new on-line bill pay system wouldn't work for me. It kept
saying my login failed. I sent mail to their help desk and they
quickly responded (still good customer service). Their instructions
were for me to reset my browser's security settings to accept third
party cookies. What? I have to commit one of the most basic privacy
mistakes and let everybody on the Internet trivially track me just so
I can use your bill pay service? 
</p>
<p>This is a bank we're talking about. An institution which is
supposed to be all about privacy. And they are so clueless that they
think it's o.k. to require third party cookies? Their previous
behavior already gave me good reason to question their technical
competence but this is just over the top.</p>
<p>So does anyone have a recommendation for a bank with a solid web
banking system that has a clue about privacy?</p>]]></content:encoded>
			<wfw:commentRss>http://www.goland.org/firsttechprivacyfailure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How much will it cost to send our     daughter to college?</title>
		<link>http://www.goland.org/collegecost/</link>
		<comments>http://www.goland.org/collegecost/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 08:00:00 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[financial]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[The short answer is that we don&#8217;t know. And before someone says &#8221;what about the 529 prepaid plans?!?!&#8221; (which I will discuss in a future article) please keep in mind that those plans only track instate tuition fees and so don&#8217;t cover expenses like room and board, books, etc. So bottom line is - we [...]]]></description>
			<content:encoded><![CDATA[<p class="indent" >    <span class="aer-9">The short answer is that we don&#8217;t know. And before someone says</span>
     <span class="aer-9">&#8221;what about the 529 prepaid plans?!?!&#8221; (which I will discuss in a future</span>
     <span class="aer-9">article) please keep in mind that those plans only track instate tuition fees</span>
     <span class="aer-9">and so don&#8217;t cover expenses like room and board, books, etc. So bottom</span>
     <span class="aer-9">line is - we don&#8217;t know, in fact, I would argue, we can&#8217;t know. The guiding</span>
     <span class="aer-9">light of finance being &#8221;the future&#8217;s not our&#8217;s to see.&#8221; So I&#8217;m going to guess.</span>
     <span class="aer-9">My guess, assuming our daughter goes out of state for college in 15 years</span>
     <span class="aer-9">and attends college for 4 years is that our total bill (tuition, fees, room,</span>
     <span class="aer-9">board, etc.) at the end of her undergraduate education will be $320,000</span>
     <span class="aer-9">in 2010 dollars. </span>Oy.
<span id="more-609"></span>
       <h3 class="likesectionHead"><a id="x1-1000"></a><span class="aer-9">Contents</span></h3>
       <div class="tableofcontents">
       <span class="sectionToc" ><span class="aer-9">1 </span><a href="#x1-20001" id="QQ2-1-2"><span class="aer-9">How much does a single year of college cost today?</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">2 </span><a href="#x1-30002" id="QQ2-1-3"><span class="aer-9">How quickly are college costs going up?</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">3 </span><a href="#x1-40003" id="QQ2-1-4"><span class="aer-9">How much will the bill be?</span></a></span>
     <br />     <span class="sectionToc" ><span class="aer-9">A </span><a href="#x1-5000A" id="QQ2-1-5"><span class="aer-9">Calculating the cost of college</span></a></span>
     <br />     <span class="sectionToc" ><a href="#Q1-1-6"><span class="aer-9">References</span></a></span>
       </div>
                                                                  

                                                                  

<!--l. 52--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">1   </span> <a id="x1-20001"></a>How much does a single year of college cost today?</h3>
<!--l. 54--></p><p class="noindent" >Living in Washington State the obvious college to think about is the University of
Washington. UW&#8217;s <a href="http://www.washington.edu/students/osfa/prospectiveug/costs.html" >total costs</a> for the 2010-2011 academic year for an instate student
living away from home are $21,033. In my opinion UW is currently the only world
class university in Washington State and I wouldn&#8217;t want to pin all of our
daughter&#8217;s hopes on one university. So we&#8217;ll have to face the reality that our
daughter may go out of state. Since I went to UCLA let&#8217;s see what UCLA
would cost for the 2008-2009 academic year for an out of state student -
<a href="http://www.admissions.ucla.edu/prospect/budget.htm" >$50,214</a> for an out of state student living in an off campus apartment. And
remember, the UCLA figure is what it costs for an out of state student to go
to UCLA today, right now, this very moment. Not, say, oh 15 years from
now.
<!--l. 69--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">2   </span> <a id="x1-30002"></a>How quickly are college costs going up?</h3>
<!--l. 71--></p><p class="noindent" >The most comprehensive source of information I could find on college pricing is
<span class="cite">[<a href="#XCollege09">Board(a)</a>]</span>. But the raw data is available as spreadsheet in <span class="cite">[<a href="#XCollege09XLS">Board(b)</a>]</span>, I used Table 5.
Please note that when staring at the table below the numbers in table 5 are adjusted
for inflation.
   <div class="tabular"> <table id="TBL-2" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-2-1g"><col id="TBL-2-1"></col></colgroup><colgroup id="TBL-2-2g"><col id="TBL-2-2"></col></colgroup><colgroup id="TBL-2-3g"><col id="TBL-2-3"></col></colgroup><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-2-1-"><td style="white-space:wrap; text-align:left;" id="TBL-2-1-1"  
class="td11"> <!--l. 78--><p class="noindent" >Geometric mean increase in
  tuition, fees, room &amp; board in
  inflation adjusted dollars for the
  last X years                              </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-1-2"  
class="td11"> Public 4 Year Colleges across the US  </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-1-3"  
class="td11"> Private 4 Year Colleges across the US  </td>
</tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-2-2-"><td style="white-space:wrap; text-align:left;" id="TBL-2-2-1"  
class="td11"> <!--l. 82--><p class="noindent" >10                                           </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-2-2"  
class="td11">              3.76%                      </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-2-3"  
class="td11">              2.55%                       </td>
</tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-2-3-"><td style="white-space:wrap; text-align:left;" id="TBL-2-3-1"  
class="td11"> <!--l. 84--><p class="noindent" >15                                           </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-3-2"  
class="td11">              3.17%                      </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-3-3"  
class="td11">              2.52%                       </td>
</tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-2-4-"><td style="white-space:wrap; text-align:left;" id="TBL-2-4-1"  
class="td11"> <!--l. 86--><p class="noindent" >30                                           </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-4-2"  
class="td11">              2.80%                      </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-4-3"  
class="td11">              3.03%                       </td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-2-5-"><td style="white-space:wrap; text-align:left;" id="TBL-2-5-1"  
class="td11"> </td> </tr></table>
</div>
<!--l. 90--></p><p class="indent" >   Unfortunately there is a problem with the data. The 2009-2010 school year saw
the single largest year-on-year increase in public four-year college tuition in the entire
data set (which admittedly only goes back to 1979). The increase for private colleges
was one of the largest ever. This does odd things to the numbers. For example, if I
calculate the 10 year geometric mean increase from 1999 through 2008 I get 3.03%
for public colleges and 1.89% for private colleges. Quite a change from the
numbers above. So do college tuition increases during the greatest recession
in recent memory where colleges, public and private, were essentially set
loose on their own with their endowments pummeled really serve as a good
basis for calculating what&#8217;s going to happen over the next 15 years? Beats
me.
<!--l. 103--></p><p class="indent" >   My guess is that 2010-2011 is going to be even worse, I know the UC system on
its own increased tuition by 32%. Yes, 32%. So maybe these sky high rises are just
                                                                  

                                                                  
the future and we need to get used to it? Or more likely at some point the whole
system collapses because as the old saying goes, anything that can&#8217;t go on forever,
won&#8217;t.
<!--l. 109--></p><p class="indent" >   But in the meantime I need to estimate the future college cost increases. So I&#8217;m
going to take the 15 year number, for no particularly good reason and I&#8217;m going to
average it. In other words I&#8217;ll assume that for the next 15 years college costs will go
up at a rate of (0.0317 + 0.0252)/2 = 2.85%.
<!--l. 116--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">3   </span> <a id="x1-40003"></a>How much will the bill be?</h3>
<!--l. 118--></p><p class="noindent" >The first question is - how long will our daughter take to get her undergraduate
degree? I haven&#8217;t had much success in finding solid data on how long it takes to
graduate from college but I did find one data point from 2000. The table on page 46
of <span class="cite">[<a href="#XNCES03">for Education&#x00A0;Statistics(2003)</a>]</span>. It claims that students on average took 55 months
to graduate although students who went to only one college took 51 months on
average but even that number can be split into 53 months for a public school and 47
months for a private college. I don&#8217;t have any trend data on these figures and no clue
what anyone is projecting for the future. Still the message here is that in 2000 public
school students took about 4.5 years to graduate and private school students took
4 years. Given the outrageous costs of college the only way I can see the
number of years substantially increasing is if students are attending school part
time to try and make ends meet. So I&#8217;m going to guess that my daughter is
probably going to go to college for 4 years. Or, put another way, given what we
expect to be paying 15 years from now she better not need more than 4
years.
<!--l. 136--></p><p class="indent" >   In terms of the cost basis I&#8217;m going to pick the UCLA out-of-state figure, $50,214
and the 2.85% growth rate. As my daughter is now 4 years old she has 15
years left until she goes to college. The only problem is that the school year
(which determines when I have to cough up the money) doesn&#8217;t follow the
calendar year. Schools start around September and run through June or so.
This means my first check to college should be due around September of
2024.
<!--l. 144--></p><p class="indent" >   The 2024 figure comes out because my daughter will turn 5 in 2011 and start
kindergarten during the 2011-2012 school year. She will have 12 years of school after
Kindergarten. So 2011+12 = 2023. In other words, she will graduate high school
during the 2023-2024 school year. Which means she will start college during the
2024-2025 school year.
<!--l. 151--></p><p class="indent" >   So the goal is to have enough money to pay for her first year of college
by September of 2024. In reality I could stretch it out since most of her
college expenses will be paid by the quarter/semester (tuition, fees, books
and on-campus housing) or month (general living expenses and off-campus
housing). But trying to be that exact over a 15 year period seems like useless
specificity.
<!--l. 158--></p><p class="indent" >   So, to keep myself mildly insane (as opposed to completely wacko) I&#8217;ll assume
                                                                  

                                                                  
we&#8217;ll save money on a September-September basis. Or, in accountant speak, our
college &#8217;fiscal&#8217; year starts in September.
<!--l. 162--></p><p class="indent" >   And yes, this always drives me nuts at work. &#8221;The project will be delivered by
2008&#8221;, &#8221;Wait, is that calendar or fiscal year?&#8221;, &#8221;AAAAHHHH!!!!!&#8221;
<!--l. 166--></p><p class="indent" >   So, let&#8217;s see, $50,214 base figure, 2.85% real rate of growth (e.g. after inflation),
for 15 years to save until her first year of college, with 4 years of college total, the
total bill will be $319,499.38. (See the appendix for details)
<!--l. 171--></p><p class="indent" >   Oy.
<!--l. 173--></p><p class="indent" >   Keep in mind, that the previous figure is &#8217;real&#8217; not &#8217;nominal&#8217; money. Or
in other words, this is &#8217;inflation adjusted&#8217;. So $320,300 is how much I&#8217;m
estimating it will cost to send our daughter to college in 2010 dollars. By way of
comparison, sending our daughter to UCLA today for 4 years would cost
$209,606.90.
<!--l. 179--></p><p class="indent" >   So, I guess we can look on the bright side. Sending our daughter to college 15
years from now will &#8217;only&#8217; cost $109,892.48 more (in 2010 dollars) then it would to
send her to college today. Oy
<!--l. 185--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">A   </span> <a id="x1-5000A"></a>Calculating the cost of college</h3>
<!--l. 187--></p><p class="noindent" >The math for calculating a compounding entry is thankfully very straight
forward:
<!--l. 190--></p><p class="indent" >   <div class="eqnarray">
   <center class="math-display" >
<img src="collegecost0x.png" alt="                                                 Y earsToGrow
YearX  Of College =  CurrentCost *(1+ GrowthRate )
" class="math-display" /></center>
</div>
<!--l. 194--></p><p class="indent" >   In the example I gave above the CurrentCost is $50,214 for 2010-2011 and
GrowthRate is 2.85%. Let&#8217;s say my daughter was going to college in one year. In
that case the cost would increase over one year and be $50,214*(1+0.0285)
= $51,645.10. In other words the YearsToGrow value would be 1 because
there was only one year in which the growth would compound. So if my
daughter is going to college in 15 years from now then the YearsToGrow value is
15.
<!--l. 202--></p><p class="indent" >   So the math for calculating my daughter&#8217;s expected cost of going to college
is:
                                                                  

                                                                  
<!--l. 205--></p><p class="indent" >   <div class="eqnarray">
   <center class="math-display" >
<img src="collegecost1x.png" alt="  FirstYear  50214* (1 + 0.0285)15  = $76,540.14
Second Year  50214* (1 + 0.0285)16  = $78,721.54
                              17
 T hird Year  50214* (1 + 0.0285)   = $80,965.10
F ourth Year  50214* (1 + 0.0285)18  = $83,272.60
                    Total        = $319,499.38
" class="math-display" /></center>
</div>
<!--l. 213--></p><p class="indent" >   The cost for sending my daughter to college in 2010-2011 would be:
<!--l. 215--></p><p class="indent" >   <div class="eqnarray">
   <center class="math-display" >
<img src="collegecost2x.png" alt="50214* (1+ 0.0285)0  =  $50,214
50214* (1+ 0.0285)1  =  $51,645.10
50214* (1+ 0.0285)2  =  $53,116.98
                 3
50214* (1+ 0.0285)   =  $54,630.82
             T otal  =  $209,606.90
" class="math-display" /></center>
</div>
<a id="Q1-1-6"></a>
<!--l. 1--></p><p class="noindent" >
   <h3 class="likesectionHead"><a id="x1-6000A"></a>References</h3>
<!--l. 1--></p><p class="noindent" >
                                                                  

                                                                  
   <div class="thebibliography">
   <p class="bibitem" ><span class="biblabel">
 [Board(a)]<span class="bibsp">&#x00A0;&#x00A0;&#x00A0;</span></span><a id="XCollege09"></a>College Board. Trends in college pricing 2009. Internet, a. URL
   <a href="http://www.trends-collegeboard.com/college_pricing/pdf/2009_Trends_Coll%
ege_Pricing.pdf" class="url" ><span class="aett-10">http://www.trends-collegeboard.com/college_pricing/pdf/2009_Trends_College_Pricing.pdf</span></a>.
   </p>
   <p class="bibitem" ><span class="biblabel">
 [Board(b)]<span class="bibsp">&#x00A0;&#x00A0;&#x00A0;</span></span><a id="XCollege09XLS"></a>College        Board.                      Trends        in        college
   pricing       figures       and       tables       2009,       b.                   URL
   <a href="http://www.trends-collegeboard.com/college_pricing/excel/2009_Trends_Co%
llege_Pricing_All_Figures_Tables.xls" class="url" ><span class="aett-10">http://www.trends-collegeboard.com/college_pricing/excel/2009_Trends_College_Pricing_All_Figures_Tables.xls</span></a>.
   </p>
   <p class="bibitem" ><span class="biblabel">
 [for Education&#x00A0;Statistics(2003)]<span class="bibsp">&#x00A0;&#x00A0;&#x00A0;</span></span><a id="XNCES03"></a>National&#x00A0;Center for Education&#x00A0;Statistics.
   the  condition  of  education  2003.   Technical  report,  U.S.  Department  of
   Education, 2003.
</p>
   </div>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.goland.org/collegecost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asset Location for College Savings</title>
		<link>http://www.goland.org/collegeassetlocation/</link>
		<comments>http://www.goland.org/collegeassetlocation/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 08:00:00 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[financial]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Asset location is not so much about what investment to buy as where to locate it. A typical asset location problem is - do I put money in a taxable account or a tax exempt account? In the case of saving for college there are at least four different ways to save money for college [...]]]></description>
			<content:encoded><![CDATA[<p class="indent" >    <span class="aer-9">Asset location is not so much about what investment to buy as where</span>
     <span class="aer-9">to locate it. A typical asset location problem is - do I put money in a</span>
     <span class="aer-9">taxable account or a tax exempt account? In the case of saving for college</span>
     <span class="aer-9">there are at least four different ways to save money for college that have</span>
     <span class="aer-9">some kind of tax exemption. Below I explore the five options (taxable and</span>
     <span class="aer-9">various tax exempt ones) that I could find and explain why we settled on</span>
     <span class="aer-9">using a 529 savings plan.</span>
<span id="more-620"></span>
       <h3 class="likesectionHead"><a id="x1-1000"></a><span class="aer-9">Contents</span></h3>
       <div class="tableofcontents">
       <span class="sectionToc" ><span class="aer-9">1 </span><a href="#x1-20001" id="QQ2-1-2"><span class="aer-9">Where should the money go?</span></a></span>
     <br />     <span class="sectionToc" ><a href="#Q1-1-3"><span class="aer-9">References</span></a></span>
       </div>

<!--l. 45--></p><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">1   </span> <a id="x1-20001"></a>Where should the money go?</h3>
<!--l. 47--></p><p class="noindent" >The IRS has kindly summarized all the various options available to get tax benefits
for spending money on education in <span class="cite">[<a href="#XIRS97006">IRS(2009)</a>]</span>.
                                                                  

                                                                  
   <div class="tabular"> <table id="TBL-2" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-2-1g"><col id="TBL-2-1"></col></colgroup><colgroup id="TBL-2-2g"><col id="TBL-2-2"></col></colgroup><colgroup id="TBL-2-3g"><col id="TBL-2-3"></col></colgroup><colgroup id="TBL-2-4g"><col id="TBL-2-4"></col></colgroup><colgroup id="TBL-2-5g"><col id="TBL-2-5"></col></colgroup><colgroup id="TBL-2-6g"><col id="TBL-2-6"></col></colgroup><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-2-1-"><td style="white-space:wrap; text-align:left;" id="TBL-2-1-1"  
class="td11"> <!--l. 52--><p class="noindent" >Vehicle              </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-1-2"  
class="td11"> <!--l. 52--><p class="noindent" >Money goes in     </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-1-3"  
class="td11"> <!--l. 52--><p class="noindent" >Money grows and comes out        </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-1-4"  
class="td11"> <!--l. 52--><p class="noindent" >Maximum Yearly Purchase          </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-1-5"  
class="td11"> <!--l. 52--><p class="noindent" >Available Investments                </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-1-6"  
class="td11"> <!--l. 52--><p class="noindent" >Price to use for non-educational
  purposes                                  </p></td>
</tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-2-2-"><td style="white-space:wrap; text-align:left;" id="TBL-2-2-1"  
class="td11"> <!--l. 55--><p class="noindent" >Taxable Money    </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-2-2"  
class="td11"> <!--l. 55--><p class="noindent" >Taxable             </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-2-3"  
class="td11"> <!--l. 55--><p class="noindent" >Taxable unless we use one of the
  three education related tax
  credits (the American
  opportunity credit, Hope credit
  and lifetime learning credit) or
  take tax deductions for tuitions
  and fees. All the credits have
  income limits and the total
  credits/deductions, while nice,
  are a drop in the bucket. For
  example, the tuition and fees
  deduction is worth a maximum
  of $4,000.                                 </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-2-4"  
class="td11"> <!--l. 60--><p class="noindent" >Unlimited                                </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-2-5"  
class="td11"> <!--l. 60--><p class="noindent" >Everything                               </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-2-6"  
class="td11"> <!--l. 60--><p class="noindent" >None (except the various tax
  credits wouldn&#8217;t apply)               </p></td>
</tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-2-3-"><td style="white-space:wrap; text-align:left;" id="TBL-2-3-1"  
class="td11"> <!--l. 62--><p class="noindent" >U.S. Savings
  Bonds (see
  section 11 of
  <span class="cite">[<a href="#XIRS97006">IRS(2009)</a>]</span>)        </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-3-2"  
class="td11"> <!--l. 62--><p class="noindent" >Taxable             </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-3-3"  
class="td11"> <!--l. 62--><p class="noindent" >All interest is tax exempt until
  the bond is redeemed.
  Withdrawals are tax exempt
  only if spent on tuition and fees.
  Money spent on Room and
  Board are not tax exempt. Also
  if the bond owner&#8217;s taxable
  income is too high (in 2009 tax
  benefits start phasing out for
  couples filing jointly at $104,900
  and disappear completely at
  $134,900) then the tax deduction
  can&#8217;t be claimed.                       </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-3-4"  
class="td11"> <!--l. 67--><p class="noindent" >$10,000 per social security
  number for Series I and another
  $10,000 for Series EE. See <a href="http://www.treasurydirect.gov/indiv/research/articles/res_invest_articles_purchaselimits_0406.htm" >here</a>
  for more information.                 </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-3-5"  
class="td11"> <!--l. 69--><p class="noindent" >Series EE or I savings bonds.       </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-3-6"  
class="td11"> <!--l. 69--><p class="noindent" >Withdrawals become taxable. I
  Bonds must be held for at least
  1 year and there is a 3 month
  interest penalty if they are
  withdrawn before 5 years. (see
  <a href="http://treasurydirect.gov/indiv/products/prod_ibonds_glance.htm" >here</a> for details)                        </p></td>
</tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-2-4-"><td style="white-space:wrap; text-align:left;" id="TBL-2-4-1"  
class="td11"> <!--l. 74--><p class="noindent" >529 (see section
  9 of
  <span class="cite">[<a href="#XIRS97006">IRS(2009)</a>]</span>)        </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-4-2"  
class="td11"> <!--l. 74--><p class="noindent" >Taxable             </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-4-3"  
class="td11"> <!--l. 74--><p class="noindent" >All growth in the value of 529
  assets are tax exempt.
  Withdrawals are tax exempt for
  all approved educational
  expenses which includes room,
  board, tuition, fees, etc.              </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-4-4"  
class="td11"> <!--l. 76--><p class="noindent" >There are no contribution limits
  but if the fund is in someone
  else&#8217;s name (e.g. our daughter&#8217;s)
  then gift taxes apply. However
  typically there are no gift taxes
  for contributions of $13,000 per
  year or less (twice that for
  married couples).                       </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-4-5"  
class="td11"> <!--l. 79--><p class="noindent" >I&#8217;ll discuss this in more detail
  below but the investment
  options are fairly limited and
  typically involve high fees.           </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-4-6"  
class="td11"> <!--l. 80--><p class="noindent" >If money is withdrawn for
  non-approved educational
  purposes then income taxes
  apply plus a 10% penalty.           </p></td>
</tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-2-5-"><td style="white-space:wrap; text-align:left;" id="TBL-2-5-1"  
class="td11"> <!--l. 83--><p class="noindent" >Coverdale IRA
  (see section 8 of
  <span class="cite">[<a href="#XIRS97006">IRS(2009)</a>]</span>)        </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-5-2"  
class="td11"> <!--l. 83--><p class="noindent" >Taxable             </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-5-3"  
class="td11"> <!--l. 83--><p class="noindent" >Money grows tax exempt.
  Money comes out tax exempt if
  used for the same type of
  expenses that apply to a 529.       </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-5-4"  
class="td11"> <!--l. 84--><p class="noindent" >No more than $2,000 per
  beneficiary across all accounts.
  Couples with incomes over
  $220,000 cannot use Coverdale
  IRAs.                                      </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-5-5"  
class="td11"> <!--l. 85--><p class="noindent" >Everything.                              </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-5-6"  
class="td11"> <!--l. 85--><p class="noindent" >Same as 529                             </p></td>
</tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-2-6-"><td style="white-space:wrap; text-align:left;" id="TBL-2-6-1"  
class="td11"> <!--l. 87--><p class="noindent" >IRA (see section
  10 of
  <span class="cite">[<a href="#XIRS97006">IRS(2009)</a>]</span>) -
  Note: This
  covers taking an
  early
  withdrawal from
  an existing IRA
  to pay for
  educational
  expenses.            </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-6-2"  
class="td11"> <!--l. 88--><p class="noindent" >Taxable for
  Roth IRAs and
  Tax Exempt for
  traditional IRAs  </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-6-3"  
class="td11"> <!--l. 88--><p class="noindent" >Money grows tax exempt. An
  early distribution can be taken
  from an IRA to pay for
  educational expenses (following
  the same rules as 529s) without
  having to pay an early
  withdrawal penalty.                   </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-6-4"  
class="td11"> <!--l. 90--><p class="noindent" >Standard IRA contribution
  limits apply.                             </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-6-5"  
class="td11"> <!--l. 90--><p class="noindent" >Everything.                              </p></td><td style="white-space:wrap; text-align:left;" id="TBL-2-6-6"  
class="td11"> <!--l. 90--><p class="noindent" >None as long as there is no early
  withdrawal involved.                  </p></td>
</tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-2-7-"><td style="white-space:wrap; text-align:left;" id="TBL-2-7-1"  
class="td11">                 </td> </tr></table>                                            

                                                                  
</div>
<!--l. 94--></p><p class="indent" >   That various tax credits and deductions one can take when spending taxable
money on education all come with strict limitations on the income one can earn and
still qualify for the tax credits. Marina and I certainly plan to exceed those limits by
the time our daughter gets to college so we can&#8217;t rely on their use for our
planning. U.S. Savings Bonds are also not a viable option for similar income cap
reasons. The Coverdale IRA doesn&#8217;t work because its contribution limits are
low given the costs of college and eventually we would hope the income
limits would also be an issue. The IRA option isn&#8217;t a terribly good one for us
because we need our IRA money to pay for our own retirements. If we have to
choose between saving for our own retirement and paying for our daughter&#8217;s
education then we will choose our retirement. It would be unfortunate if our
daughter has to take on debt to go to college, it would be catastrophic for all
involved if our daughter has to spend the rest of her life supporting her
parents.
<!--l. 110--></p><p class="indent" >   Although we probably can&#8217;t use the various tax deductions for taxable money we
can still choose to invest for our daughter&#8217;s college education using taxable money,
alternatively we can use a 529 plan. I&#8217;m not a huge fan of 529 plans. I don&#8217;t like the
fact that if we don&#8217;t use all the money we have to pay a penalty above and beyond
the deferred taxes to get it back. I also don&#8217;t like the fact that the investment options
for 529s tend to be both limited and expensive. But the fact is that money
we put into the 529 plan grows and exits completely tax free. This means
that all the income on the principal we deposit in a 529 plan will never
be subject to taxation. To put this benefit into perspective imagine our
marginal tax bracket is T% and our college investments makes an I% return.
In that case if we put the money in a taxable account our return after N
years would be <span class="cmr-10">(1 + </span><span class="cmmi-10">I </span><span class="cmsy-10">* </span><span class="cmr-10">(1 </span><span class="cmsy-10">- </span><span class="cmmi-10">T</span><span class="cmr-10">))</span><sup><span class="cmmi-7">N</span></sup> where as in a 529 our return would be
<span class="cmr-10">(1 + </span><span class="cmmi-10">I</span><span class="cmr-10">)</span><sup><span class="cmmi-7">N</span></sup>. For example, if our marginal tax bracket was 25% and we got a
5% return on our investment over a 17 year period then we would get a
<img src="collegeassetlocation0x.png" alt="----(1+0.05)17---
(1+0.05*(1-0.25))17"  class="frac" align="middle"/> <span class="cmsy-10">- </span><span class="cmr-10">1 </span><span class="msbm-10">&#xE306; </span><span class="cmr-10">23% </span>or so higher return on investment from a 529
than a taxable plan. That&#8217;s the kind of benefit that is too expensive to give
up.
<!--l. 129--></p><p class="indent" >   So we&#8217;ll be using a 529 plan.
<a id="Q1-1-3"></a>
<!--l. 1--></p><p class="noindent" >
   <h3 class="likesectionHead"><a id="x1-30001"></a>References</h3>
<!--l. 1--></p><p class="noindent" >
   <div class="thebibliography">
   <p class="bibitem" ><span class="biblabel">
 [IRS(2009)]<span class="bibsp">&#x00A0;&#x00A0;&#x00A0;</span></span><a id="XIRS97006"></a><span class="aeti-10">Publication 970 (2009), Tax Benefits for Education</span>, 2009. URL
   <a href="http://www.irs.gov/publications/p970/index.html" class="url" ><span class="aett-10">http://www.irs.gov/publications/p970/index.html</span></a>.
                                                                  

                                                                  
</p>
   </div>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.goland.org/collegeassetlocation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
