<?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>=nat</title>
	<atom:link href="http://nat.sakimura.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://nat.sakimura.org</link>
	<description>Digital Identity et al.</description>
	<lastBuildDate>Sat, 12 May 2012 19:48:03 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Why &#8220;privacy&#8221; confuses people</title>
		<link>http://nat.sakimura.org/2012/05/02/why-privacy-confuses/</link>
		<comments>http://nat.sakimura.org/2012/05/02/why-privacy-confuses/#comments</comments>
		<pubDate>Wed, 02 May 2012 08:02:47 +0000</pubDate>
		<dc:creator>Nat</dc:creator>
				<category><![CDATA[privacy]]></category>

		<guid isPermaLink="false">http://nat.sakimura.org/?p=468</guid>
		<description><![CDATA[Privacy, whether in the east or west, is a word talked in a vague sense leading to much confusion. In this article, I will try to clarify it from two approaches: etymology and legal literature. 1. Etymology of &#8220;privacy&#8221; According to Online Etymology Dictionary,  privacy is a word first appeared in the...]]></description>
			<content:encoded><![CDATA[<p>Privacy, whether in the east or west, is a word talked in a vague sense leading to much confusion.</p>
<p>In this article, I will try to clarify it from two approaches: etymology and legal literature.</p>
<h2>1. Etymology of &#8220;privacy&#8221;</h2>
<p>According to <a href="http://www.etymonline.com/">Online Etymology Dictionary</a>,  <a href="http://www.etymonline.com/index.php?allowed_in_frame=0&amp;search=privacy&amp;searchmode=none">privacy </a>is a word first appeared in the 15th century and is composed of <a href="http://www.etymonline.com/index.php?term=private&amp;allowed_in_frame=0">private </a>+ <a href="http://www.etymonline.com/index.php?term=-cy&amp;allowed_in_frame=0">-cy</a>, which is an abstract noun suffix of quality or rank.</p>
<p>&#8220;<a href="http://www.etymonline.com/index.php?term=private&amp;allowed_in_frame=0">Private</a>&#8221; is a word that appeared in the late 14th century that came from Latin &#8220;privatus&#8221;,  &#8221;set apart, belonging to oneself&#8221; (not to the state), used in contrast to publicus, communis; originally pp. stem of privare &#8221;to separate, deprive,&#8221; from privus&#8221;one&#8217;s own, individual. In short, it points to something that you have sovereign over. Thus, the notion of the &#8220;right of privacy&#8221; as &#8220;self-control right&#8221; is not too far away from its original meaning.</p>
<h2>2. Right to Privacy in legal literature<sup>[1]</sup></h2>
<p>On the other hand, in the legal literature, right to privacy is often referred to as &#8220;right to be let alone.&#8221; This comes from the Warren and Brandeis&#8217;s famous paper &#8220;Right to Privacy&#8221;[2] that quotes Justice Cooley&#8217;s &#8220;Law of Torts&#8221;[3]. The phrase however is often mistaken to be pointing to the right to the solitude, which I think is not the case. Let me quote from Justis Cooley&#8217;s paper.</p>
<blockquote><p> <strong>Personal immunity.</strong> The right to one&#8217;s person may be said to be a right of complete immunity: to be let alone. The corresponding duty is, not to inflict an injury, and not, within such proximity as might render it successful, to attempt the infliction of an injury. In this particular the duty goes beyond what is required in most cases; for usually an unexecuted purpose or an unsuccessful attempt is not noticed. But the attempt to commit a battery involves many elements of injury not always present in breaches of duty; it involves usually an insult, a putting in fear, a sudden call upon the energies for prompt and effectual resistance. There is very likely a shock to the nerves, and the peace and quiet of the individual is disturbed for a period of greater or less duration. There is consequently abundant reason in support of the rule of law which makes the assault a legal wrong, even though no battery takes place. Indeed, in this case the law goes still further and makes the attempted blow a criminal offense also. [4]</p></blockquote>
<p>So, &#8220;right to be let alone&#8221; is synonymous to the &#8220;personal immunity&#8221;. If you read what follows, you will see that &#8220;person&#8221; includes not only the physical body but also the soul. In other words, &#8220;Right to be let alone&#8221; is &#8220;the immunity of one&#8217;s body and  soul&#8221; and is very far from the impression that non-legal folks gets from the phrase &#8220;right to be let alone.&#8221;</p>
<p>Warren and Brandeis follows this and they define the right to privacy as a very basic human right of sovereignty over one&#8217;s private property, both tangible and intangible, under the common law, that such rights to free speech, copyright, etc. are derivative right on the privacy[5]. The consumer privacy bill of right that the Obama legislation put forward in 2012 [6]  follows this as well. Indeed, we can almost interpret right to privacy as the right to personal freedom also known as  liberty.</p>
<p>Warren and Brandeis then goes on to discuss the difference between the right to privacy and the right to property, copyright,  slander and of libel, and discusses why being intentional is not necessary in its infringement, and under what condition such right is limited [7]. It is a short paper that I highly recommend you to read. The online version can be found at the <a href="http://groups.csail.mit.edu/mac/classes/6.805/articles/privacy/Privacy_brand_warr2.html">MIT site</a>.</p>
<h2>3. Right to privacy in a narrower sense and confusion arising from it</h2>
<p>Thus, both direction derived the same result. Right to privacy is the sovereign right to over one&#8217;s private tangible and intangible property including one&#8217;s body and soul. In another word, it is a basic human right of personal freedom (liberty).</p>
<p>Note however, much of it actually can be protected by more specific laws, and where there is a defined law, it should be dealt with it. The remainder after all those area covered by specific laws seems to be often referred to as the right to privacy in narrow sense. This is a  negative way of defining it. Trying to do it in a positive statement is utterly impossible. This is one of the reason why it is so hard to define the right to privacy in narrower sense. I think &#8220;right to control personal image through the control of the use and release of personal information&#8221; covers good part of it, but not all. Note that personal data protection is just a tool to protect this right, and not something we should be aiming at. It is the privacy that needs to be protected, not the data per se.</p>
<p>Further, the fact those specific rights deducted differs from a jurisdiction to another. This, I feel, is one of the reason that making it difficult to bring different jurisdiction to the same page.Whereas the free world probably has very similar notion on the personal freedom (liberty), which is depicted as the rectangle in the following figure, the remainder after removing the area covered by specific laws are all different.</p>
<div id="attachment_469" class="wp-caption aligncenter" style="width: 583px"><a href="http://nat.sakimura.org/wp-content/uploads/2012/05/confusion-around-privacy.png"><img class=" wp-image-469  " title="Confusion around privacy" src="http://nat.sakimura.org/wp-content/uploads/2012/05/confusion-around-privacy-1024x542.png" alt="" width="573" height="304" /></a><p class="wp-caption-text">Figure 1. Confusion around privacy</p></div>
<p>In addition, in some jurisdiction like EU, Right to respect for private and family life is defined. This is yet another subset of the right to privacy in the broader sense, but due to the similarity in the wording, it often is referred to as the right to privacy as well adding further confusion.</p>
<h2>4. Conclusion</h2>
<p>Often, it is said that &#8220;privacy cannot be defined.&#8221; This is not true. Defining it in the narrow sense using &#8220;positive expression&#8221; is almost impossible, but it can be defined in the &#8220;negative expression.&#8221; However, when we get to it in the concrete term, the right to privacy in the narrower sense in concrete differs from jurisdiction to jurisdiction resulting in tension and confusion. It is better to define it in the abstract term, and to make the concrete guidance, extract the subset such as &#8220;self-image control right&#8221; and put it into a statute though it may overlap with existing laws. In addition, it would probably help to create a logical model of what constitutes a violation / infringement etc. as a clearer guidance. I have started it <a href="http://nat.sakimura.org/about-me/notes-on-privacy/">here</a>, which is a very early work in progress, but I would much appreciate your comments on it as well.</p>
<p>&nbsp;</p>
<p>[1] I am not a lawyer, so I feel a little inappropriate and intimidated to refer to these document, but they are too important not to mention and analyse.</p>
<p>[2] Warren and Brandeis, &#8220;The Right to Privacy&#8221;, Harvard Law Review, Vol. IV December 15, 1890 No. 5</p>
<p>[3] Thomas McIntyre Cooley, &#8220;Law of Torts&#8221;, Callaghan, 1888</p>
<p>[4] <a href="http://www.law.louisville.edu/library/collections/brandeis/node/227">http://www.law.louisville.edu/library/collections/brandeis/node/227</a> . The underline is by the author.</p>
<p>[5] 「These considerations lead to the conclusion that the protection afforded to thoughts, sentiments, and emotions, expressed through the medium of writing or of the arts, so far as it consists in preventing publication, is merely an instance of the enforcement of the more general right of the individual to be let alone. 」</p>
<p>[6] Consumer Privacy Bill of Rights  (<a href="http://1.usa.gov/privrights">http://1.usa.gov/privrights</a> )</p>
<p>[7] This notion of equality being the identity of the concession of certain quantity of sovereignty over oneself can also be found in the speech of Enjolras in Les Misrables by Victor Hugo as follows:</p>
<p style="padding-left: 30px;"><em>From a political point of view, there is but a single principle; the sovereignty of man over himself. This sovereignty of myself over myself is called Liberty. Where two or three of these sovereignties are combined, the state begins. But in that association there is no abdication. Each sovereignty concedes a certain quantity of itself, for the purpose of forming the common right. This quantity is the same for all of us. This identity of concession which each makes to all, is called Equality. (from <a href="http://www.gutenberg.org/files/135/135-h/135-h.htm#2HCH0303">Victor Hugo, &#8220;Les Miserables&#8221; vol. V, Book First, Chapter V</a>. ) </em></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://nat.sakimura.org/2012/05/02/why-privacy-confuses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comments on Wang-Chen-Wang paper on OpenID Implementation Vulnerability</title>
		<link>http://nat.sakimura.org/2012/04/27/comments-on-wang-chen-wang-paper/</link>
		<comments>http://nat.sakimura.org/2012/04/27/comments-on-wang-chen-wang-paper/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 20:04:05 +0000</pubDate>
		<dc:creator>Nat</dc:creator>
				<category><![CDATA[identity]]></category>
		<category><![CDATA[OpenID 2.0]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://nat.sakimura.org/?p=462</guid>
		<description><![CDATA[In the paper titled &#8220;Signing Me onto Your Accounts through Facebook and Google: a Traffic-Guided Security Study of Commercially Deployed Single-Sign-On Web Services&#8220;, Rui Wang, Shuo Chen, XiaoFeng Wang reported the &#8220;vulnerability&#8221; in some OpenID 2.0 implementations. The vulnerability they listed can probably be named as &#8220;OpenID Signature Check Failure&#8221;...]]></description>
			<content:encoded><![CDATA[<p>In the paper titled &#8220;<a href="http://research.microsoft.com/pubs/160659/websso-final.pdf">Signing Me onto Your Accounts through Facebook and Google: a Traffic-Guided Security Study of Commercially Deployed Single-Sign-On Web Services</a>&#8220;, Rui Wang, Shuo Chen, XiaoFeng Wang reported the &#8220;vulnerability&#8221; in some OpenID 2.0 implementations. The vulnerability they listed can probably be named as &#8220;OpenID Signature Check Failure&#8221; and &#8220;OpenID Data Type Confusion&#8221;. I would really like to thank these researchers for finding them, but at the same time, I would like to point out some confusions in the research paper. [1]</p>
<h2>1. OpenID Signature Check Failure</h2>
<p>In section 4.1, the authors points out that although the RP requests the parameters to be signed with openid.ext1.required, since the request is not signed, the openid.ext1.required can be manipulated and thus the response in the openid.signed would not include all of what was in the openid.ext1.required[2].</p>
<p>This interpretation of openid.ext1.required is wrong.</p>
<p>This parameter is defined in OpenID Attribute Exchange 1.0 as follows:</p>
<p style="padding-left: 30px;"><strong>openid.ax.required</strong></p>
<p style="padding-left: 60px;">Value: an attribute alias, or a list of aliases corresponding to the URIs defined by &#8220;openid.ax.type.&lt;alias&gt;&#8221; parameters. Multiple attribute aliases are separated with a comma, &#8220;,&#8221;.</p>
<p style="padding-left: 60px;">By requesting attributes using this field, a hint is sent to the OP about the RP&#8217;s requirements for offering certain functionality and should be used by the OP to help the user decide what attributes to release. RP&#8217;s requirements should not be enforced by the OP.</p>
<p style="padding-left: 60px;">The RP should offer, out of band of attribute exchange, an alternate method of collecting the attributes it needs, if they weren&#8217;t obtained via attribute exchange.</p>
<p>As you can see, it has nothing to do with signing. Thus, the claims that was made by the authors are actually false and Figure 8 marking &#8220;protected by openid.sig&#8221; is wrong. [3]</p>
<p>This does not mean that there was not a vulnerability at Smartsheet. Indeed there was, but the cause is not this one. The root cause is that the Smartsheet used a mail address as the user identifier to log in the user. This is wrong. OpenID Authentication 2.0 mandates the RP to identify the end-user with <code>openid.claimed_id</code>. This is always signed by the IdP, and this is a un-recyclable identifier unlike an email address. If the Smartsheet was implementing the specification properly, this vulnerability did not arise. Indeed, this is an implementation vulnerability and not a protocol vulnerability.</p>
<p>The authors goes on to say:</p>
<blockquote><p><strong>       Broader impacts</strong>. We further discovered that the problem went far beyond Smartsheet. Google confirmed that the flaw also existed in open source projects OpenID4Java (an SDK that Google authentication had been tested against) and Kay Framework. In OpenID4Java, the function for an RP to verify BRM3 is verify(). The source code showed that it only checked whether the signature covered all the elements in the openid.signed list, so a “verified” BRM3 does not ensure authenticity of the elements that the RP required the IdP to sign.</p></blockquote>
<p>As I wrote above, the &#8220;required&#8221; parameter is not indicating parameters to be signed. There is no parameter to request the response parameters to be signed in the OpenID Authentication 2.0. It is up-to the IdP to decide what is to be signed besides mandatory parameters such as claimed_id, identity, etc. Therefore, OpenID4Java implementation is actually correct. Therefore, the authors&#8217; claim &#8220;we examined other popular websites Yahoo! Mail, zoho.com, manymoon.com and diigo.com. They were all vulnerable to this attack. &#8221; cannot be verified without other evidences.</p>
<h2>2. Data Type Confusion</h2>
<p>In section &#8220;4.5. OpenID’s Data Type Confusion &#8220;, the authors identify a problem of RPs interpreting openid.ext1.value.email as email without respect to the value of openid.ext1.type.email. Of course, this is a non-compliant behavior by the RP. Type of openid.ext1.value.email is determined by the value of openid.ext1.type.email. If openid.ext1.type.email= http://schema.openid.net/contact/street2, then openid.ext1.value.email contains the second line of the street address. It is not email address.</p>
<p>Moreover, it is utterly wrong to identify the user with whatever the value of openid.ext1.value.email is.</p>
<p>The correct behavior is to identify the user using openid.claimed_id. Other parameters <strong>MUST NOT</strong> be used to identify the user. <strong>If RP uses any other parameter to identify the user, then it is a security hole. This is the root of problem. </strong></p>
<h2>3. Problem of not reading the specification and the importance of the deployment testing</h2>
<p>There is one thing that paper revealed clearly though. People do not read the spec. In this case, both the implementers at Smartsheet etc., nor the authors of this paper read the OpenID Authentication 2.0 and OpenID Attribute Exchange 1.0. It clearly shows how difficult it is to have the implementers read and implement the specs correctly.</p>
<p>Changing the popele&#8217;s behavior is one of the hardest thing to achieve, and the formal specification languages is not an easy read. I do not expect the situation to improve much in the coming days.</p>
<p>Then, what can we do to help the situation?</p>
<p>Test tools!</p>
<p>In this respect, for OpenID Connect, <a href="http://nat.sakimura.org/2012/03/22/openid-connect-test-facility-preview-available/">test tools has been developed by Andreas Åkre Solberg and Roland Hedberg</a>. Hopefully, the situation will be better for the OpenID Connect. [4]</p>
<p>&nbsp;</p>
<p>[1] It is kind of unfortunate that I did not have time to review the paper in detail till now.</p>
<p>[2] In page 6, the authors states: &#8220;Particularly, openid.signed contains the list from openid.ext1.required on BRM1, an element that describes which elements the RP requires the IdP to sign, such as email, firstname and lastname, as shown in the popup by the mouse cursor in Figure 8. However, since openid.signed (BRM3) can be controlled by the adversary through openid.ext1.required (BRM1), there is no guarantee that any of the elements that the RP requires the IdP to sign will be signed<br />
by the IdP (i.e., protected by openid.sig) in BRM3. &#8221;</p>
<p>[3] Actually, Figure 8 is very misleading. The authors omits vital information by replacing with [WORD] and [LIST]. In OpenID Attribute Exchange 1.0, the key names like openid.ext1.type.email mean nothing. It may as well mean an address or age or anything. Omitting the value part of the key=value pair makes the figure very misleading.</p>
<p>[4] In fact, the paper is in a way demonstrating the usefulness of the black box deployment testing. I believe this kind of methodology should be widely deployed. I highly value the paper in this respect.</p>
<hr />
<h2>Response from the authors</h2>
<p>The authors of the paper kindly provided me an response to the above article shortly after I have posted it.</p>
<p>Here is the response. I would like to take this opportunity to thank them deeply.</p>
<p><span style="font-size: medium;">Dear Nat,</span></p>
<p><span style="font-size: medium;">Thank you for writing the post and forwarding the link to us.</span></p>
<p><span style="font-size: medium;">I think we are on the same page about technical natures of the two vulnerability cases. However,  we feel that you misunderstood the purpose of the paper:  we never claimed that the problems we discovered actually are caused by OpenID protocol; we just point out the vulnerabilities in the websites that integrate (sometimes customized) OpenID schemes. Following are the details of our points:</span></p>
<p><span style="font-size: medium;">(1)   Again, the paper is about how securely real-world websites <strong>deploy</strong> SSO schemes. This emphasis is hopefully clear in the title, the abstract and the introduction. We took an end-to-end view about the studied websites, and examined their security as a whole. Given an end-to-end vulnerability, we mainly described the facts, but didn’t take a position about whether it was RP’s fault or IdP’s, or whether it was a protocol bug or an implementation one.</span></p>
<p><span style="font-size: medium;">(2)   Specifically about one of your paragraphs in the post:</span></p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="561"><span style="font-size: medium;">In section 4.1, the authors points out that although the RP requests the parameters to be signed with openid.ext1.required, since the request is not signed, the openid.ext1.required can be manipulated and thus the response in the openid.signed would not include all of what was in the openid.ext1.required.</span></p>
<p><span style="font-size: medium;"> </span></p>
<p><span style="font-size: medium;"><strong>This interpretation of openid.ext1.required is wrong.</strong><strong></strong></span></td>
</tr>
</tbody>
</table>
<p><span style="font-size: medium;">Please understand that we did not try to interpret openid.ext1.required in the paper, but simply stated a fact: the openid.signed would not include all of what was in the openid.ext1.required.</span></p>
<p><span style="font-size: medium;">(3)   Regarding “Figure 8 marking ‘protected by openid.sig’ is wrong,” the paragraph above figure 8 gives the context of this figure. The trace shown in figure 8 was the trace that we actually collected from the website. In such a trace, the indicated elements were indeed protected by openid.sig. Again, we were stating a fact about the specific trace, but didn’t imply that “the openid spec requires such a signature coverage for all traces.”  </span></p>
<p><span style="font-size: medium;">(4)   About the “broader impacts” section: similarly, we just stated the fact that “The source code showed that it only checked whether the signature covered all the elements in the openid.signed list, so a “verified” BRM3 does not ensure authenticity of the elements that the RP required the IdP to sign.” We didn’t attempt to say whether it was OpenID4Java’s fault.</span></p>
<p><span style="font-size: medium;">(5)   You wrote in the post that “Therefore, the authors’ claim ‘we examined other popular websites Yahoo! Mail,<a href="http://zoho.com/" target="_blank">zoho.com</a>, <a href="http://manymoon.com/" target="_blank">manymoon.com</a> and <a href="http://diigo.com/" target="_blank">diigo.com</a>. They were all vulnerable to this attack.’ cannot be verified without other evidences.” Actually these are all RP websites. The sentence we wrote was to state the fact that we checked these websites, and they were vulnerable in the same way. You seem to indicate that we made such a claim based on the fact of OpenID4Java. No, there is no such inference. It is an independent evidence to show that the same vulnerability might be quite common among many websites.</span></p>
<p><span style="font-size: medium;">(6)   Regarding your paragraph about the data type confusion case, again, we were describing our observations, and the fact that we found on a number of end-to-end vulnerable websites. We didn’t say whether it was due to the openid spec.</span></p>
<p><span style="font-size: medium;">I think that the biggest difference here is that we have different angles about the same set of technical understanding. This paper mainly states concrete facts about how real-world websites <strong>deployed</strong> SSO schemes, and your angle is mainly about what the specs say and how they <strong>should do</strong>. We didn’t discuss how they should do until section 5.</span></p>
<p><span style="font-size: medium;">Please feel free to let us know how you think.  If you agree with the above comments, we will really appreciate if this can be reflected on your blog. </span></p>
<p><span style="font-size: medium;"><br />
</span></p>
<p><span style="font-size: medium;">Thanks,</span></p>
<p><span style="font-size: medium;">Rui</span></p>
<p>(updated May 1, 2012)</p>
]]></content:encoded>
			<wfw:commentRss>http://nat.sakimura.org/2012/04/27/comments-on-wang-chen-wang-paper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenID Connect IdP on iPhone</title>
		<link>http://nat.sakimura.org/2012/04/15/openid-connect-idp-on-iphone/</link>
		<comments>http://nat.sakimura.org/2012/04/15/openid-connect-idp-on-iphone/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 06:57:23 +0000</pubDate>
		<dc:creator>Nat</dc:creator>
				<category><![CDATA[identity]]></category>
		<category><![CDATA[OpenID Connect]]></category>
		<category><![CDATA[privacy]]></category>

		<guid isPermaLink="false">http://nat.sakimura.org/?p=430</guid>
		<description><![CDATA[As part of the exercise to see if OpenID Connect Messages 1.0 were written appropriately so that other bindings can be produced, Jun Eijima and I have created a custom scheme binding of the OpenID Connect, and implemented it on iPhone. In the first pass, we did it in three...]]></description>
			<content:encoded><![CDATA[<p>As part of the exercise to see if OpenID Connect Messages 1.0 were written appropriately so that other bindings can be produced, Jun Eijima and I have created a custom scheme binding of the OpenID Connect, and implemented it on iPhone.</p>
<p>In the first pass, we did it in three steps (1. Registration, 2. Authorization, 3. Userinfo request) , exactly following the Standard model. However, this proved to be a user interface nightmare. In the Standard case, the registration and userinfo request/response happens server to server without a user-agent/browser involvement. Unfortunately, this is not the case for the IdP on iPhone case. All the communication has to be through Safari. Thus, all three steps stated above would involve browser dance, which is a pretty bad user experience.</p>
<p>In the second incarnation, we have decided to overlay the registration and the userinfo request / response over the authorization request / response. We further decided that only request by reference is supported. This has an advantage that the client can be authenticated by the TLS session.</p>
<p>The binding thus became like this:</p>
<h2>1. Prepare a request parameter file</h2>
<p>Request Object will look like:</p>
<pre>{
        "response_type": "token id_token userinfo",
        "client_id": "https://example.com/",
        "scope": "openid profile",
	"userinfo":{
		"claims":{
			"email":null,
			"name":null,
			"picture":null
		}
	},
	"registration":{
		"claims":{
        		"type":"client_association",
        		"contacts":"contact@example.com",
        		"application_name":"Sample RP",
        		"logo_url":"https://example.com/rp/logo.png",
        		"policy_url":"https://example.com/rp/policy.html",
        		"redirect_uris":"httsp://example.com/rp/authz/callback.php"
		}
	}
}</pre>
<p>&nbsp;</p>
<p>This is then captured into a file with a URL https://example.com/rp/rpf.json</p>
<p>Note that the client_id is not something the IdP gives out to the client, in this case. Instead, it is the fully qualified URL.</p>
<h2>2. Make an authorization request</h2>
<p>Next step is to make the authorization request.</p>
<p>It is a straight forward &#8220;request by reference&#8221; except that it uses custome scheme &#8220;openid://&#8221; instead of normal https://.</p>
<p>Typically, the user arrives at the web site and clicks [Login] button, which is linked to something like:</p>
<pre>openid://authz?request_uri=https://example.com/rp/rpf.json&amp;state=a_f2fkEx&amp;nonce=4f8921ce98f89</pre>
<pre></pre>
<pre><a href="http://nat.sakimura.org/wp-content/uploads/2012/04/photo-2.png"><img class="aligncenter size-full wp-image-432" title="photo 2" src="http://nat.sakimura.org/wp-content/uploads/2012/04/photo-2.png" alt="" width="320" /></a></pre>
<h2>3. IdP fetches the request file</h2>
<p>When the IdP on iPhone is invoked through the custom scheme as in section 2., the IdP obtains the URL of the request file and fetches it.</p>
<p>When doing so, the IdP should check the SSL certificate&#8217;s CN to the client_id.</p>
<h2>4. User Authorizes</h2>
<p>Assuming that the iPhone has a password lock, we can skip the authentication. (If you want, you can set a pin in the IdP application as well.) Thus, the user is shown the authorization dialogue.</p>
<p><a href="http://nat.sakimura.org/wp-content/uploads/2012/04/authorize-iphone-idp.png"><img class="aligncenter size-full wp-image-431" title="authorize-iphone-idp" src="http://nat.sakimura.org/wp-content/uploads/2012/04/authorize-iphone-idp.png" alt="" width="320" /></a></p>
<h2>5. Response Returned</h2>
<p>Once obtained the user authorization, the IdP returns the response in the fragment to the return_uri. The fragment has userinfo token in addition to usual access token and ID token. The page at the return_uri then obtains the fragment, typically by using javascript, and send it back to the client web server for further processing.</p>
<p>In the fragment are three tokens in this case:</p>
<ul>
<li>access_token : Normal OAuth 2.0 access token.</li>
<li>id_token: JWS signed OpenID Connect ID Token. Public key corresponding to the signing key is found in iss &amp; user_id member.</li>
<ul>
<li>iss: Issuer of this token. Unlike the normal case where it is a URL, in this self issued IdP, it is the public key of the key pair that was generated for the client.</li>
<li>user_id: Same as iss. Thus, if iss==user_id, the client can identify that it is a self issued IdP.</li>
<li>nonce: defined in Messages.</li>
<li>exp: ditto</li>
<li>iat: ditto</li>
<li>&#8230;</li>
</ul>
<li>userinfo_token: JWT that include the userinfo JSON as the body.</li>
</ul>
<div></div>
<p>Then the web server inspects id_token, and logs the user in.</p>
<p>&nbsp;</p>
<p><a href="http://nat.sakimura.org/wp-content/uploads/2012/04/photo-11.png"><img class="aligncenter size-full wp-image-436" title="After logged in" src="http://nat.sakimura.org/wp-content/uploads/2012/04/photo-11.png" alt="" width="320" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>6. Advantages and Issues of IdP on a smartphone</h2>
<p>There are several advantages that IdP on a smartphone has.</p>
<ol>
<li>Only YOU know where you went: Unlike when using a third party IdP, only you know where you visited.</li>
<li>In the phone authentication: An App inside the phone can authenticate against IdP on the phone. No network connection is needed for this.</li>
</ol>
<p>On the other hand, there are short comings as well.</p>
<ol>
<li>The RP has no way of knowing if the IdP on the smart phone is installed and configured.</li>
</ol>
<p>If there is a good way to deal with this problem, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://nat.sakimura.org/2012/04/15/openid-connect-idp-on-iphone/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>OpenID Connect Stripped down to just &#8220;Authentication&#8221;</title>
		<link>http://nat.sakimura.org/2012/03/31/openid-connect-stripped-down-to-just-authentication/</link>
		<comments>http://nat.sakimura.org/2012/03/31/openid-connect-stripped-down-to-just-authentication/#comments</comments>
		<pubDate>Sat, 31 Mar 2012 04:19:33 +0000</pubDate>
		<dc:creator>Nat</dc:creator>
				<category><![CDATA[identity]]></category>
		<category><![CDATA[OpenID Connect]]></category>

		<guid isPermaLink="false">http://nat.sakimura.org/?p=413</guid>
		<description><![CDATA[So, OpenID Connect provides a lot of advanced facilities to fulfill so many additional feature requested by the member community. It indeed is full of feature that is not Authentication. However, that does not mean that it cannot be used for the simple case of &#8220;Just Authentication&#8221;. Indeed, it is...]]></description>
			<content:encoded><![CDATA[<p>So, OpenID Connect provides a lot of advanced facilities to fulfill so many additional feature requested by the member community. It indeed is full of feature that is not Authentication. However, that does not mean that it cannot be used for the simple case of &#8220;Just Authentication&#8221;.</p>
<p>Indeed, it is actually quite simple to do it. I would use code flow as the base case in this article, because I believe that is the flow people should use for such cases.</p>
<h2>Making an OpenID Connect request</h2>
<p>In order for the client to make an OpenID Connect request, it needs to have the following information about the server:</p>
<ul>
<li><code>client identifier</code> - An unique identifier issued to the client (RP) to identify itself to the authorization server. (e.g., 3214244 )</li>
<li><code>client secret</code> - A shared secret established between the authorization server and client used for signing requests.</li>
<li><code>end-user authorization endpoint</code> - The authorization server&#8217;s HTTP endpoint capable of authenticating the end-user and obtaining authorization. (e.g., https://server.example.com/authorize )</li>
<li><code>token endpoint</code> - The authorization server&#8217;s HTTP endpoint capable of issuing access tokens.</li>
</ul>
<p>In the simplest cases, this information is obtained by the client developer, having read the server&#8217;s documentation and pre-registered their application.</p>
<p>Then, for a bear bone authentication request then would put a link like in the HTML page:</p>
<blockquote>
<pre>&lt;a href="https://server.example.com/authorize?grant_type=code&amp;scope=openid&amp;client_id=3214244&amp;state=af1Ef"&gt;
 Login with Example.com
&lt;/a&gt;</pre>
</blockquote>
<p>User initiates the login by clicking on the &#8220;Login with Example.com&#8221; link, and is taken to the server where he is asked username/password etc. if he is not logged into example.com yet. Once he agrees to login to  the RP, the browser is redirected back to the call back URL at the RP by 302 redirect. A PHP Server side code may look like:</p>
<blockquote>
<pre>&lt;?php
 header("Location: https://client.example.com/cb?code=8rFowidZfjt&amp;state=af1Ef");
?&gt;</pre>
</blockquote>
<p><span style="color: #999999;"><em>Note: state is the parameter that is used to protect against XSRF in this case. It binds the request to the browser so it cannot be as static as above but that&#8217;s a detail so I skip it here.</em></span></p>
<p>That&#8217;s simple enough is it not?</p>
<h2>Calling the Token endpoint to get id_token</h2>
<p>Now that the RP has the &#8216;code&#8217;, let&#8217;s get the id_token, which is the user login information assertion, from the token endpoint. What do you do? Just GET it with HTTP Basic Auth using client_id, client_secret, and the code you got. So, using PHP and cURL, it would look like:</p>
<blockquote>
<pre>&lt;?php
 $code = $_GET['code'];
 $ch = curl_init('https://server.example.com/token?code=' . $code);
 curl_setopt($ch, CURLOPT_HEADER, 1);
 curl_setopt($ch, CURLOPT_USERPWD, $client_id . ":" . $client_secret);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
 $response = curl_exec($ch);
 ?&gt;</pre>
</blockquote>
<p>The result, $response, would contain a JSON like this (line wraps for display purposes only):</p>
<blockquote>
<pre>{
 "access_token": "SlAV32hkKG",
 "token_type": "Bearer",
 "refresh_token": "8xLOxBtZp8",
 "expires_in": 3600,
 "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.
eyJpc3MiOiJodHRwczovL3NlcnZlci5leGFtcGxlLmNvbSIsInVzZXJfaWQiOiIyNDgy
ODk3NjEwMDEiLCJhdWQiOiJodHRwOi8vY2xpZW50LmV4YW1wbGUuY29tIiwiZXhwIjox
MzExMjgxOTcwfSA.
eDesUD0vzDH3T1G3liaTNOrfaeWYjuRCEPNXVtaazNQ"</pre>
<pre>}</pre>
</blockquote>
<p>Never mind what are <code>"access_token", "token_type"</code> etc. What you only care about is the <code>"id_token"</code>.</p>
<p><code>"id_token"</code> is encoded in a format called  <a href="http://tools.ietf.org/html/draft-jones-json-web-token-07">JSON Web Token (JWT)</a>. JWT is the concatenation of &#8220;header&#8221;, &#8220;body&#8221;, &#8220;signature&#8221; by periods (.). Since you got this through TLS protected channel directly however, you do not need to check the signature for integrity, so you just take out the second portion of it and base64_decode it to get the information out of the id_token. So in PHP you may do like [2]:</p>
<blockquote>
<pre>&lt;?php
$res = json_decode($response, true);
$id_token = $res['id_token'];
$id_array = mb_split(".", $id_token);
$id_body = base64_decode($id_array[1]); 
?&gt;</pre>
</blockquote>
<p>The resulting assertion, $id_body in the above example,  about the user (after pretty formatting)  is:</p>
<blockquote>
<pre>{
 "iss": "https://server.example.com",
 "user_id": "248289761001",
 "aud": "http://client.example.com",
 "exp": 1311281970
}</pre>
</blockquote>
<p>&#8220;iss&#8221; is showing the issuer of this token, in this case, the server.example.com. This is a name space of the  <code>user_id,</code> which is unique within the issuer and never reassigned.</p>
<p>When the client stores the user identifier, it MUST store the tuple of the  <code>user_id</code> and <code>iss</code>.</p>
<p>&#8220;aud&#8221; stands for &#8220;audience&#8221; and it shows who is the audience of this token. In this case, it is the RP itself. If it is different, you better throw it away.</p>
<p>&#8220;exp&#8221; is the expiry time of the token. If the current time is after &#8220;exp&#8221;, e.g., in PHP, if  <code>$exp &gt; time();</code>  the RP should throw it away as well.</p>
<p>So, that is it. Now you know who is the user, i.e., <span style="color: #ff0000;">you have authenticated the user.</span></p>
<p>Is it complex? Nah. It cannot get much simpler than this. It will not take more than ten minutes for the relying party to write a code just to authenticate the user.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://nat.sakimura.org/2012/03/31/openid-connect-stripped-down-to-just-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenID Connect Test Facility Preview Available</title>
		<link>http://nat.sakimura.org/2012/03/22/openid-connect-test-facility-preview-available/</link>
		<comments>http://nat.sakimura.org/2012/03/22/openid-connect-test-facility-preview-available/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 18:42:52 +0000</pubDate>
		<dc:creator>Nat</dc:creator>
				<category><![CDATA[OpenID Connect]]></category>
		<category><![CDATA[fedlab]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://nat.sakimura.org/?p=407</guid>
		<description><![CDATA[Andreas Åkre Solberg and Roland Hedberg from Fedlab opened a technology preview of the OpenID Connect Test Facility. It is publicly available now. Start right away to test your OpenID Connect Provider: http://openidtest.uninett.no/ This is an early preview of a pretty complex set of software, so they are asking you...]]></description>
			<content:encoded><![CDATA[<p>Andreas Åkre Solberg and Roland Hedberg from Fedlab opened a technology preview of the OpenID Connect Test Facility. It is publicly available now.</p>
<p>Start right away to test your OpenID Connect Provider:</p>
<ul>
<li><a href="http://openidtest.uninett.no/" target="_blank">http://openidtest.uninett.no/</a></li>
</ul>
<p>This is an early preview of a pretty complex set of software, so they are asking you to be patient, and report any issues to them. You can do that by posting to our <a href="https://github.com/andreassolberg/fedlab/issues" target="_blank">github issue tracker</a> or respond to <a href="http://lists.openid.net/mailman/listinfo/openid-specs-ab">OpenID AB/Connect WG mailing list</a>.</p>
<p>Here is a video demo of how it all works. It is pretty cool!</p>
<p><iframe src="http://player.vimeo.com/video/38634031?title=0&amp;byline=0&amp;portrait=0" frameborder="0" width="400" height="300"></iframe></p>
<p><a href="http://vimeo.com/38634031">OpenID Connect Testing</a> from <a href="http://vimeo.com/user1318427">Andreas Åkre Solberg</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>Followings are related links.</p>
<ul>
<li><a href="http://openid.net/connect/" target="_blank">The OpenID Connect Specification</a></li>
<li><a href="http://lists.openid.net/mailman/listinfo/openid-specs-ab" target="_blank">The OpenID Connect Mailinglist</a></li>
<li><a href="https://github.com/andreassolberg/fedlab" target="_blank">Federation Lab OpenID Connect Frontend (Node.js)</a></li>
<li><a href="https://github.com/rohe/pyoidc" target="_blank">OpenID Connect Backend (Python)</a></li>
</ul>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://nat.sakimura.org/2012/03/22/openid-connect-test-facility-preview-available/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>2012 NSTIC/IDtrust Workshop Panel topics?</title>
		<link>http://nat.sakimura.org/2012/03/13/2012-nsticidtrust-workshop-panel-topics/</link>
		<comments>http://nat.sakimura.org/2012/03/13/2012-nsticidtrust-workshop-panel-topics/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 18:28:19 +0000</pubDate>
		<dc:creator>Nat</dc:creator>
				<category><![CDATA[identity]]></category>
		<category><![CDATA[privacy]]></category>

		<guid isPermaLink="false">http://nat.sakimura.org/?p=403</guid>
		<description><![CDATA[So, I will be a panelist in the following workshop. 2012 NSTIC/IDtrust Workshop:   “Technologies and Standards Enabling the Identity Ecosystem” March 13-14, 2012 NIST &#8211; Administration Building &#8211; Green Auditorium – Gaithersburg, MD 8:45 am Welcome – NSTIC GoalsJeremy Grant, NIST 9:15 am Level – Setting: “An Introduction to the 3rd...]]></description>
			<content:encoded><![CDATA[<p>So, I will be a panelist in the following workshop.</p>
<h2>2012 NSTIC/IDtrust Workshop:   “Technologies and Standards Enabling the Identity Ecosystem”</h2>
<p>March 13-14, 2012<br />
NIST &#8211; Administration Building &#8211; Green Auditorium – Gaithersburg, MD</p>
<div>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td rowspan="1" colspan="1" valign="top" width="103">8:45 am</td>
<td rowspan="1" colspan="1" valign="top" width="535"><strong>Welcome – NSTIC Goals</strong><em>Jeremy Grant, NIST</em></td>
</tr>
<tr>
<td rowspan="1" colspan="1" valign="top" width="103">9:15 am</td>
<td rowspan="1" colspan="1" valign="top" width="535"><strong>Level – Setting: “An Introduction to the 3rd Epoch of IDtrust”</strong><em>Ian Glazer, Gartner</em></td>
</tr>
<tr>
<td rowspan="1" colspan="1" valign="top" width="103">9:30 am</td>
<td rowspan="1" colspan="1" valign="top" width="535"><strong>Keynote-Mapping the Global IDentity Ecosystem</strong><em>Speakers:  Karen O’Donoghue, ISOC and Lucy Lynch, ISOC</em></td>
</tr>
<tr>
<td rowspan="1" colspan="1" valign="top" width="103">10:00 am</td>
<td rowspan="1" colspan="1" valign="top" width="535"><strong>Panel: Gaps and Challenges for Advancing the Global Identity Ecosystem</strong><strong></strong><em>Moderator: <strong> </strong>Lucy Lynch, ISOC</em><em> </em><em></em><em>Panelists:</em></p>
<p><em></em>·         Tom Smedinghoff, Edwards Wildman Palmer LLP</p>
<p>·         John Bradley, OpenID Foundation</p>
<p>·         Ken Klingenstein, Internet2</p>
<p>·         Leif Johansson, NORDUnet</p>
<p>·         <strong>Nat Sakimura, NRI / OpenID Foundation</strong></td>
</tr>
</tbody>
</table>
</div>
<div>
<p>&nbsp;</p>
<p>Possible Topics:</p>
<ul>
<li>Gap between US and EU &#8211; EU&#8217;s Data Protection Regulation requires &#8220;Explicit Consent&#8221; while US&#8217;s Consumer Privacy Bill of Rights allows &#8220;Respect for Context (Implicit Consent, necessity) &#8221; judged from the context.</li>
<li>What constitutes &#8220;meaningful consent&#8221;?</li>
<li>&#8220;Data Protection&#8221; v.s. &#8220;Privacy Protection&#8221;</li>
<li>Level of Protection, Level of Control.</li>
<li>&#8220;Rights to be forgotten&#8221; v.s. &#8220;Rights to change one&#8217;s mind&#8221;.</li>
<li>Is deletion of data (rights to be forgotten) realistic (esp. for the ones that were passed to third parties)?</li>
<li>Provider Linkability and Consumer Linkability [1]</li>
<li>Cross boarder transfer of the data</li>
<li>Why do we expect that it works this time? : Business model around authentication and attribute transfer.</li>
</ul>
<p>&nbsp;</p>
<p>[1] Different service providers colluding and linking personal data to create unwanted &#8220;identity&#8221; is a violation of privacy. On the other hand, linking the data location for the user so that he can effectively control the data improves the privacy control.</p>
<p>&nbsp;</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://nat.sakimura.org/2012/03/13/2012-nsticidtrust-workshop-panel-topics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The relationship between endpoint responses and response_type, scope pair</title>
		<link>http://nat.sakimura.org/2012/02/22/the-relationship-between-endpoint-responses-and-response_type-scope-pair/</link>
		<comments>http://nat.sakimura.org/2012/02/22/the-relationship-between-endpoint-responses-and-response_type-scope-pair/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 02:10:13 +0000</pubDate>
		<dc:creator>Nat</dc:creator>
				<category><![CDATA[identity]]></category>
		<category><![CDATA[OpenID Connect]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[openid]]></category>
		<category><![CDATA[response_type]]></category>
		<category><![CDATA[scope]]></category>

		<guid isPermaLink="false">http://nat.sakimura.org/?p=368</guid>
		<description><![CDATA[So it seems there is a little bit of confusion around what needs to be returned from which endpoint among the readers of OpenID Connect specification. It actually is pretty clear if you understand what OAuth 2.0 response_type parameter is, but since it is not spelled out clearly in the...]]></description>
			<content:encoded><![CDATA[<p>So it seems there is a little bit of confusion around what needs to be returned from which endpoint among the readers of OpenID Connect specification. It actually is pretty clear if you understand what OAuth 2.0 response_type parameter is, but since it is not spelled out clearly in the OAuth 2.0 spec, people seem to find it confusing.</p>
<p>The response_type parameter, as I understand, indicates what is to be returned from the authorization endpoint.</p>
<p>Thus, if response_type=token, the access token is returned from the authorization endpoint, while if response_type=code, the code is returned. As such, if response_type=code%20token, then both code and access token are to be returned from the authorization endpoint.</p>
<p>Here is a table that describes this relationship in OpenID Connect when scope includes &#8220;openid&#8221;.</p>
<div dir="ltr">
<table id="table-01">
<colgroup>
<col width="130" />
<col width="85" />
<col width="140" />
<col width="264" /></colgroup>
<tbody>
<tr>
<th>
<p dir="ltr">response_type</p>
</th>
<th>
<p dir="ltr">Authz EP response<sup>[1]</sup></p>
</th>
<th>
<p dir="ltr">Token EP response</p>
</th>
<th>
<p dir="ltr">When it is to be used</p>
</th>
</tr>
<tr>
<td>
<p dir="ltr">code</p>
</td>
<td>
<ul>
<li>code</li>
</ul>
</td>
<td>
<ul>
<li>access_token</li>
<li>id_token</li>
<li>(refresh_token)</li>
</ul>
</td>
<td>Used in a conventional web sites where most of the processing are done at the server.</td>
</tr>
<tr>
<td>
<p dir="ltr">token</p>
</td>
<td>
<ul>
<li>access_token</li>
</ul>
</td>
<td>
<p style="text-align: center;" dir="ltr">N/A</p>
</td>
<td>Used primarily when the browser needs to access resources, such as in HTML5 canvas application.</td>
</tr>
<tr>
<td>
<p dir="ltr">id_token</p>
</td>
<td>
<ul>
<li>id_token</li>
</ul>
</td>
<td>
<p style="text-align: center;" dir="ltr">N/A</p>
</td>
<td>Used primarily when the browser application needs to recognize the user.</td>
</tr>
<tr>
<td>
<p dir="ltr">code id_token</p>
</td>
<td>
<ul>
<li>code</li>
<li>id_token</li>
</ul>
</td>
<td>
<ul>
<li>access_token</li>
<li>id_token</li>
<li>(refresh_token)</li>
</ul>
</td>
<td>Used when the browser needs to personalize the view while only the server needs access to profile and other data.</td>
</tr>
<tr>
<td>
<p dir="ltr">token id_token</p>
</td>
<td>
<ul>
<li>access_token</li>
<li>id_token</li>
</ul>
</td>
<td style="text-align: center;">N/A</td>
<td>Used when only the browser needs to identify the user and access to the data.</td>
</tr>
<tr>
<td>
<p dir="ltr">code token id_token</p>
</td>
<td>
<ul>
<li>access_token</li>
<li>code</li>
<li>id_token</li>
</ul>
</td>
<td>
<ul>
<li>access_token</li>
<li>id_token</li>
<li>(refresh_token)</li>
</ul>
</td>
<td>Used when both the browser and the server needs to identify the user as well as the access to the data.The access_token returned by the Token EP is used by the server, and the access_token returned by the Authz EP is used by the browser.  It is for those use cases where both the browser and the server need the access_token. By doing so, the brwsr does not need to send the access_token to the server, improving security.</td>
</tr>
</tbody>
</table>
</div>
<p>[1] All the AuthZ EP responses are returned in the fragment except for the cases where the response_type included only &#8220;code&#8221;. See <em>OAuth 2.0 Multiple Response Type Encoding Practices</em> for more details.</p>
<p>It is possible to have response_type=id_token without scope being openid, but in that case, id_token is undefined, and is out of scope of OpenID Connect standard.</p>
<p>So, it is pretty simple. Only the thing to remember is that Authorization Endpoint always returns what was stated in the response_type.</p>
]]></content:encoded>
			<wfw:commentRss>http://nat.sakimura.org/2012/02/22/the-relationship-between-endpoint-responses-and-response_type-scope-pair/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Approve OpenID Connect Implementer&#8217;s Drafts!</title>
		<link>http://nat.sakimura.org/2012/02/08/approve-openid-connect-implementers-drafts/</link>
		<comments>http://nat.sakimura.org/2012/02/08/approve-openid-connect-implementers-drafts/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 07:12:40 +0000</pubDate>
		<dc:creator>Nat</dc:creator>
				<category><![CDATA[identity]]></category>
		<category><![CDATA[OpenID Connect]]></category>
		<category><![CDATA[vote]]></category>

		<guid isPermaLink="false">http://nat.sakimura.org/?p=362</guid>
		<description><![CDATA[Hi. OpenID Conenct Implementer&#8217;s Draft voting has finally started. We had a technical problem that delayed the start of the voting almost 23 hours, but as promised, we have started it on the Feb. 7, PST![1] So here it goes! Voting Page ===&#62; https://openid.net/foundation/members/polls/62 The specifications in questions are: The specifications...]]></description>
			<content:encoded><![CDATA[<p>Hi.</p>
<p>OpenID Conenct Implementer&#8217;s Draft voting has finally started. We had a technical problem that delayed the start of the voting almost 23 hours, but as promised, we have started it on the Feb. 7, PST![1] So here it goes!</p>
<p>Voting Page ===&gt; <a href="https://openid.net/foundation/members/polls/62">https://openid.net/foundation/members/polls/62</a></p>
<p>The specifications in questions are:</p>
<p>The specifications are posted at these locations:</p>
<ul>
<li>http://openid.net/specs/openid-connect-basic-1_0-15.html</li>
<li>http://openid.net/specs/openid-connect-discovery-1_0-07.html</li>
<li>http://openid.net/specs/openid-connect-registration-1_0-08.html</li>
<li>http://openid.net/specs/openid-connect-messages-1_0-07.html</li>
<li>http://openid.net/specs/openid-connect-standard-1_0-07.html</li>
<li>http://openid.net/specs/oauth-v2-multiple-response-types-1_0-03.html</li>
</ul>
<p>A description of OpenID Connect can be found at http://openid.net/connect/. The working group page is http://openid.net/wg/connect/.</p>
<p>The vote closes on Feb. 15.</p>
<p>OIDF Members, please go to the<a href="https://openid.net/foundation/members/polls/62"> voting page and vote early!</a></p>
<p>[1] Thanks Darin Richardson of Refresh Media for sorting this out quickly.</p>
]]></content:encoded>
			<wfw:commentRss>http://nat.sakimura.org/2012/02/08/approve-openid-connect-implementers-drafts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DMARC.org &#8211; Domain-based Message Authentication, Reporting and Conformance</title>
		<link>http://nat.sakimura.org/2012/02/01/dmarc-org-domain-based-message-authentication-reporting-and-conformance/</link>
		<comments>http://nat.sakimura.org/2012/02/01/dmarc-org-domain-based-message-authentication-reporting-and-conformance/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 15:31:02 +0000</pubDate>
		<dc:creator>Nat</dc:creator>
				<category><![CDATA[identity]]></category>

		<guid isPermaLink="false">http://nat.sakimura.org/?p=358</guid>
		<description><![CDATA[DMARC &#8211; What is it? DMARC, which stands for &#8220;Domain-based Message Authentication, Reporting &#38; Conformance&#8221;, is a technical specification created by a group of organizations that want to help reduce the potential for email-based abuse by solving a couple of long-standing operational, deployment, and reporting issues related to email authentication...]]></description>
			<content:encoded><![CDATA[<p>DMARC &#8211; What is it?</p>
<p>DMARC, which stands for &#8220;Domain-based Message Authentication, Reporting &amp; Conformance&#8221;, is a technical specification created by a group of organizations that want to help reduce the potential for email-based abuse by solving a couple of long-standing operational, deployment, and reporting issues related to email authentication protocols.</p>
<p>DMARC standardizes how email receivers perform email authentication using the well-known SPF and DKIM mechanisms. This means that senders will experience consistent authentication results for their messages at AOL, Gmail, Hotmail, Yahoo! and any other email receiver implementing DMARC. We hope this will encourage senders to more broadly authenticate their outbound email which can make email a more reliable way to communicate.</p>
<p>DMARC.org&#8217;s<span style="color: #000000; font-family: arial, sans-serif; font-size: medium; line-height: normal;"> founding contributors include:</span></p>
<ul style="color: #000000; font-family: arial, sans-serif; line-height: normal; font-size: medium;">
<li><strong>Receivers:</strong> AOL, Comcast, GMail, Hotmail, Yahoo! Mail</li>
<li><strong>Senders:</strong> American Greetings, Bank of America, Facebook, Fidelity, LinkedIn, Paypal</li>
<li><strong>Intermediaries &amp; Vendors:</strong> Agari, Cloudmark, eCert, ReturnPath, Trusted Domain Project</li>
</ul>
<p>via <a href="http://dmarc.org/">DMARC.org &#8211; Domain-based Message Authentication, Reporting and Conformance</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nat.sakimura.org/2012/02/01/dmarc-org-domain-based-message-authentication-reporting-and-conformance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scopes and Claims in OpenID Connect</title>
		<link>http://nat.sakimura.org/2012/01/26/scopes-and-claims-in-openid-connect/</link>
		<comments>http://nat.sakimura.org/2012/01/26/scopes-and-claims-in-openid-connect/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 23:47:15 +0000</pubDate>
		<dc:creator>Nat</dc:creator>
				<category><![CDATA[identity]]></category>
		<category><![CDATA[OpenID Connect]]></category>
		<category><![CDATA[claims]]></category>
		<category><![CDATA[scopes]]></category>

		<guid isPermaLink="false">http://nat.sakimura.org/?p=349</guid>
		<description><![CDATA[In OpenID Connect, there are notions of &#8220;scopes&#8221; and &#8220;claims&#8221;. Some people see some overlap there and wonders why they are like that. Here is my attempt to explain the relationship between the two. OpenID Connect defined scopes OpenID Connect defines several scopes. They are: ￼openid - REQUIRED. Informs the Authorization...]]></description>
			<content:encoded><![CDATA[<p>In OpenID Connect, there are notions of &#8220;scopes&#8221; and &#8220;claims&#8221;. Some people see some overlap there and wonders why they are like that. Here is my attempt to explain the relationship between the two.</p>
<h2>OpenID Connect defined scopes</h2>
<p>OpenID Connect defines several scopes. They are:</p>
<ul>
<li>￼<strong>openid</strong> - REQUIRED. Informs the Authorization Server that the Client is making an OpenID Connect request. If the openid scope value is not present, the request MUST NOT be treated as an OpenID Connect request. The openid value also requests that the ID Token associated with the authentication session be returned. If the response_type includes token, the ID Token is returned in the Authorization Response along with the Access Token. If the response_type includes code, the ID Token is returned as part of the Token Endpoint response. This scope value requests access to the user_id Claim at the UserInfo Endpoint.</li>
<li><strong>profile</strong> - OPTIONAL. This requests that access to the End-User&#8217;s profile Claims excluding the address and email Claims at the UserInfo Endpoint be granted by the issued Access Token.</li>
<li><strong>email</strong> - OPTIONAL. This requests that access to the email and verified Claims at the UserInfo Endpoint be granted by the issued Access Token.</li>
<li><strong>address</strong> - OPTIONAL. This requests that access to address Claim at the UserInfo Endpoint be granted by the issued Access Token.</li>
<li><strong>phone</strong> - OPTIONAL. This requests that access to the phone_number Claim at the UserInfo Endpoint be granted by the issued Access Token.</li>
</ul>
<p>They can be regarded as the shorthand for the full claims in OpenID Request Object.</p>
<h2>OpenID Request Object</h2>
<p>The OpenID Request Object is used to provide OpenID request parameters that MAY differ from the default ones. Implementing support for the OpenID Request Object is OPTIONAL. Supporting it is necessary for implementations that need to request or provide sets of Claims other than the default UserInfo, and ID Token Claim sets.</p>
<p>The OpenID Request Object is a JWT [JWT] that is passed as the value of the &#8220;request&#8221; parameter in the Authorization Request. Parameters that affect the information returned from the UserInfo Endpoint are in the &#8220;userinfo&#8221; member. Parameters that affect the information returned in the ID Token are in the &#8220;id_token&#8221; member.</p>
<p>It also includes other OAuth parameters. Thus, in case of scope=openid%20profile, then the equivalent request object will look like:</p>
<pre>{
 "response_type": "code id_token",
 "client_id": "s6BhdRkqt3",
 "redirect_uri": "https://client.example.com/cb",
 "scope": "openid profile",
 "state": "af0ifjsldkj",
 "id_token":
   {
     "claims":
       {
        "auth_time": null,
       },
   },
 "userinfo":
   {
     "claims":
       {
         "name": null,
         "nickname": {"optional": true},
         "email": null,
         "verified": null,
         "picture": {"optional": true}
       }
   }
}</pre>
<h2>Mapping OpenID Connect scopes to Connect claims</h2>
<p>So let us go ahead and map the scopes to the claims.</p>
<h3>openid</h3>
<p>The scope <code>openid</code> can be mapped to <code>id_token</code> claim in the request object. That is:</p>
<pre>"id_token": {
  "claims": {
    "auth_time": null
  }
}</pre>
<p>Note that there are other claims that can go into id_token member, such as max_age. However, just stating &#8220;openid&#8221; in the scope is equivalent to requesting this claim set. If you need to specify in finer grain, you have to use request object so that the &#8220;id_token&#8221; claim will look like:</p>
<pre> "id_token":
   {
     "claims":
       {
        "auth_time": null,
        "acr": { "values":["2"] }
       },
     "max_age": 86400,

   }</pre>
<h3> profile</h3>
<p>Similarly, the &#8220;profile&#8221; scope is equivalent to request the following claims in the request object.</p>
<pre> "userinfo":
   {
     "claims":
       {
         "user_id": null,
         "name": {"optional": true},
         "nickname": {"optional": true},
         "profile": {"optional": true},
         "picture": {"optional": true},
         "website": {"optional": true},
         "gender":  {"optional": true},
         "birthday":  {"optional": true},
         "locale":  {"optional": true},
         "zoneinfo":  {"optional": true},
         "updated_time": {"optional": true}
       }
   }</pre>
<h3>email</h3>
<p>As expected, &#8216;email&#8217; scope is equivalent to the following:</p>
<pre> "userinfo":
   {
     "claims":
       {
         "email": null,
         "verified": null
       }
   }</pre>
<h3>address</h3>
<p>Similarly, &#8216;address&#8217; scope is equivalent to the following:</p>
<pre> "userinfo":
   {
     "claims":
       {
         "address":
           {
             "formatted": null
           }
        }
    }</pre>
<p>Note that there are other optional claims that may go into &#8220;address&#8221; claim. They are:</p>
<ul>
<li><strong>formatted</strong> - The full mailing address, formatted for display or use with a mailing label. This field MAY contain newlines. This is the Primary Sub-Field for this field, for the purposes of sorting and filtering.</li>
<li><strong>street_address</strong> - The full street address component, which may include house number, street name, PO BOX, and multi-line extended street address information. This field MAY contain newlines.</li>
<li><strong>locality</strong> - The city or locality component.</li>
<li><strong>region</strong> - The state, province, prefecture or region component.</li>
<li><strong>postal_code</strong> - The zip code or postal code component.</li>
<li><strong>country</strong> - The country name component.</li>
</ul>
<p>We have not defined the detailed format of those claims because there is no agreed upon universal address system in the world. I even had a problem in having a claim name like &#8220;street_address&#8221;. You may think that street address is universal, but it is not true. For example, there is no &#8220;street address&#8221; defined in Japan. It only has residencial address that is assigned to an area with a house ever built. Often, an American asked for an &#8220;address&#8221; to get to my house when visiting me. Sorry, no luck. Now that you have Google maps that directs you, you can reach my house that way as well, but before, you could not. It is not defined in terms of street, nor they are numbered in sequence. It is an OID for the piece of land with a house. You had to locate the &#8220;address&#8221; on a map, then find the street that has no name, and try to get there often by counting the number of roads in between, etc. Different countries have different addressing system. It is best left for each country to define their own claims if more structured address claim is needed.</p>
<h2>Conclusion</h2>
<p>Hopefully, now you have clear idea of the relationship between the &#8220;scope&#8221; and &#8220;claims&#8221;.</p>
<p>OpenID Connect scopes can be thought of as the short hands for predefined sets of claims.  They are handy, but sometimes are too blunt. Under such circumstances, you would have to use claims.</p>
<p>You are free to define your own &#8220;scopes&#8221;. However, I believe that it is a good practice to define claims that maps to it. A custom &#8220;scope&#8221; is supposed to be defined as a URL. It would be pretty cool if you put the equivalent claim file to the URL so that the semantics of the &#8220;scope&#8221; would be machine readable.</p>
]]></content:encoded>
			<wfw:commentRss>http://nat.sakimura.org/2012/01/26/scopes-and-claims-in-openid-connect/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

