<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Eugenio Pace : Claims</title><link>http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/</link><description>Tags: Claims</description><dc:language>en-US</dc:language><generator>Telligent Community 5.6.583.14036 (Build: 5.6.583.14036)</generator><item><title>Claims Identity Guide–Hands On Labs</title><link>http://blogs.msdn.com/b/eugeniop/archive/2011/06/13/claims-identity-guide-hands-on-labs.aspx</link><pubDate>Mon, 13 Jun 2011 16:53:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10173987</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=10173987</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=10173987</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2011/06/13/claims-identity-guide-hands-on-labs.aspx#comments</comments><description>&lt;p&gt;Training content based on our guides has been as popular as the content itself. You can now &lt;a href="http://claimsid.codeplex.com/releases/view/68061"&gt;download the “Release Candidate” for labs&lt;/a&gt; corresponding to the &lt;a href="http://claimsid.codeplex.com/releases/view/67606"&gt;new guide&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The labs are more than just a mirror of the guide. We took the opportunity of adding a few things that complement and extend what is explained in the book. A notable addition is using ADFS v2. &lt;/p&gt;  &lt;p&gt;The guide talks a lot about “using ADFS for a production environment”, but all samples shipped use a “simulated STS” (this is of course than for convenience and to minimize the dependencies on your dev environment). Well, now you will have a chance of using experimenting and learning about ADFS v2.&lt;/p&gt;  &lt;p&gt;But there’s more of course. &lt;/p&gt;  &lt;p&gt;Here’s the&amp;#160; compete “Table of Contents”. Feedback always very welcome.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-38-15-metablogapi/7624.image_5F00_4606B9C9.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-38-15-metablogapi/3404.image_5F00_thumb_5F00_5D71482D.png" width="622" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Lab 1&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Exercise 1&lt;/u&gt;: &lt;b&gt;Making Applications Claims-aware&lt;/b&gt;. In this exercise you will modify two Adatum web applications (a-Order and a-Expense) that currently use forms-based authentication to make them claims-aware, and to provide the user with a single sign-on (SSO) experience.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Exercise 2&lt;/u&gt;: &lt;b&gt;Enabling Single Sign-Out&lt;/b&gt;. In this exercise you will add code to the applications so that users logging out of one are automatically logged out of the other. &lt;/p&gt;  &lt;p&gt;&lt;u&gt;Exercise 3&lt;/u&gt;: &lt;b&gt;Using WIF Session Mode&lt;/b&gt;. In this exercise you will modify the applications to change the behavior of the WIF modules so that token information is stored in the session instead of the authentication cookie.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Lab 2&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Exercise 1:&lt;/u&gt; &lt;b&gt;Federating Adatum and Litware&lt;/b&gt;. In this exercise, you will modify the Adatum a-Order web application to trust the Adatum federation provider, and configure the Adatum federation provider to trust both the Adatum and Litware identity providers.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Exercise 2:&lt;/u&gt; &lt;b&gt;Home Realm Discovery&lt;/b&gt;. In this exercise, you will modify the a-Order web application to send a &lt;b&gt;whr&lt;/b&gt; parameter to the federation provider. You will then modify the Adatum federation provider to use the value of the &lt;b&gt;whr&lt;/b&gt; parameter to determine the identity provider the user should authenticate with. &lt;/p&gt;  &lt;p&gt;&lt;u&gt;Exercise 3:&lt;/u&gt; &lt;b&gt;Federation with ADFS&lt;/b&gt;. In this optional exercise, you will replace the custom Adatum federation provider with ADFS.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Lab 3&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Exercise 1:&lt;/u&gt; &lt;b&gt;Adding ACS as a Trusted Issuer&lt;/b&gt;. In this exercise you will start with a version of the a-Order application similar to that you used in previous labs, and modify it to use Windows Azure AppFabric Access Control Service (ACS) as the trusted issuer and identity provider in addition to the Adatum federation provider and simulated issuer.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Exercise 2&lt;/u&gt;: &lt;b&gt;Adding the Facebook Identity Provider and Home Realm Discovery&lt;/b&gt;. In this exercise you will add Facebook as an identity provider to your ACS namespace. This illustrates how, by taking advantage of ACS, you can easily change the options a user has for authentication when using your applications; without requiring any modification of the application or of your own local token issuer or federation provider. &lt;/p&gt;  &lt;p&gt;&lt;u&gt;Exercise 3:&lt;/u&gt; &lt;b&gt;Adding a Custom OpenID Identity Provider&lt;/b&gt;. In this exercise you will use the ACS Management API to programmatically add a relying party application that uses the OpenID identity provider.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Exercise 4&lt;/u&gt;: &lt;b&gt;Replacing the Adatum Federation Provider with ADFS&lt;/b&gt;. In this optional additional exercise you will replace the existing Adatum federation provider with an ADFS instance, and configure this to use ACS as a token issuer and identity provider.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Lab 4&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Exercise 1&lt;/u&gt;: &lt;b&gt;Using Claims with SOAP Web Services&lt;/b&gt;. In this exercise, you will modify the SOAP-based Adatum a-Order web service to use claims. You will also modify the desktop client application to work with the new version of the service.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Exercise 2&lt;/u&gt;: &lt;b&gt;Using Claims with REST Web Services&lt;/b&gt;. In this exercise, you will modify the REST-based Adatum a-Order web service to use claims. You will also modify the desktop client application to work with the new version of the service. &lt;/p&gt;  &lt;p&gt;&lt;u&gt;Exercise 3:&lt;/u&gt; &lt;b&gt;Federation with ADFS&lt;/b&gt;. In this optional exercise, you will replace the custom Adatum federation provider with ADFS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10173987" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Access+Control+Service/">Access Control Service</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federation+Provider/">Federation Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Geneva/">Geneva</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/ADFS/">ADFS</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity/">Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/ACS/">ACS</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/claims+transformation/">claims transformation</category></item><item><title>Intuit Data Services + Windows Azure + Identity</title><link>http://blogs.msdn.com/b/eugeniop/archive/2011/04/07/intuit-data-services-windows-azure-identity.aspx</link><pubDate>Fri, 08 Apr 2011 05:15:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10151239</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=10151239</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=10151239</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2011/04/07/intuit-data-services-windows-azure-identity.aspx#comments</comments><description>&lt;p&gt;This week, we completed a small PoC for &lt;a href="http://www.brabantcourt.com/"&gt;brabant court&lt;/a&gt;, a customer that is building a Windows Azure application that integrates with Intuit’s Data Services (IDS). &lt;/p&gt;  &lt;p&gt;A couple words on &lt;em&gt;mabbled &lt;/em&gt;from brabant court.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Mabbled is a Windows Azure app (ASP.NET MVC 3, EF Code First, SQL Azure, AppFabric ACS|Caching, jQuery) that provides complementary services to users of Intuit QuickBooks desktop and QuickBooks Online application. Mabbled achieves this integration with the &lt;/em&gt;&lt;a href="https://ipp.developer.intuit.com/ipp/federated/Get_Building/Azure"&gt;&lt;em&gt;Windows Azure SDK for Intuit Partner Platform&lt;/em&gt;&lt;/a&gt;&lt;em&gt; (IPP). An overriding design goal of mabbled is to leverage as much of Microsoft’s platform and services as possible in order to avoid infrastructure development and focus energy on developing compelling business logic. A stumbling block for mabbled’s developers has been identity management and interop between Intuit and the Windows Azure application.&lt;/em&gt;&amp;#160;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In this PoC we demonstrate how to integrate WIF with an Intuit/Windows Azure ASP.NET app. Intuit uses SAML 2.0 tokens and SAMLP. SAML 2.0 tokens are supported out of the box in WIF, but not the protocol. &lt;/p&gt;  &lt;p&gt;I used one of Intuit’s sample apps (&lt;i&gt;OrderManagement&lt;/i&gt;) as the base which currently doesn’t use WIF at all. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The goal:&lt;/strong&gt; to supply to the .NET Windows Azure app, identity information originated in Intuit’s Workplace, using the WIF programming model (e.g. &lt;b&gt;&lt;i&gt;ClaimsPrincipal&lt;/i&gt;&lt;/b&gt;) and to use and leverage as much standard infrastructure as possible (e.g. ASP.NET authorization, &lt;i&gt;&lt;strong&gt;IPrincipal.IsInRole&lt;/strong&gt;&lt;/i&gt;, etc.). &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Why? &lt;/strong&gt;The biggest advantage of this approach is the elimination of any dependency to custom code to deal with identity related concerns (e.g. querying for roles, user information, etc.). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h4&gt;How it works today?&lt;/h4&gt;  &lt;p&gt;&lt;b&gt;&amp;#160;&lt;/b&gt;If you’ve seen Intuit’s sample app, you know that they provide a handler for the app that parses a SAML 2.0 token posted back from their portal (&lt;a href="http://workplace.intuit.come"&gt;http://workplace.intuit.com&lt;/a&gt;). This SAML token contains 3 claims: &lt;strong&gt;&lt;em&gt;LoginTicket&lt;/em&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;em&gt;TargetUrl &lt;/em&gt;&lt;/strong&gt;and &lt;strong&gt;&lt;em&gt;RealmId&lt;/em&gt;&lt;/strong&gt;. Of these, &lt;strong&gt;&lt;em&gt;LoginTicket&lt;/em&gt;&lt;/strong&gt; is also encrypted. &lt;/p&gt;  &lt;p&gt;The sample app includes a couple of helper classes that use the Intuit API to retrieve user information such as roles, profile info such as e-mail, last login date, etc. This API uses the &lt;b&gt;&lt;i&gt;LoginTicket&lt;/i&gt;&lt;/b&gt; as the handle to get this information (sort of an API key).&lt;/p&gt;  &lt;p&gt;Some of this information is then persisted in cookies, or in session, etc. The problem with this approach is identity data is not based on .NET standard interfaces. So the app is :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/8206.image_5F00_6A9FD053.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/2437.image_5F00_thumb_5F00_7842668E.png" width="640" height="132" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;where &lt;em&gt;&lt;strong&gt;RoleHelper.UserisInRole&lt;/strong&gt;&lt;/em&gt; is:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/2330.image_5F00_3D7ABDB8.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/3326.image_5F00_thumb_5F00_3CA257CE.png" width="640" height="117" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;WIF provides a nice integration into standard .NET interfaces, so code like this in a web page, just works: &lt;em&gt;&lt;strong&gt;this.User.IsInRole(role);&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The app currently includes a ASP.NET Http handler (called &amp;quot;&lt;strong&gt;&lt;em&gt;SamlHandler&lt;/em&gt;&lt;/strong&gt;”) whose responsibility is to receive the SAML 2.0 token, parse it, validate it and decrypt the claim. Sounds familiar? if it does, it’s because WIF does the same &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/5164.wlEmoticon_2D00_smile_5F00_303434A5.png" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h4&gt;What changed?&lt;/h4&gt;  &lt;p&gt;I had trouble parsing the token with WIF’s &lt;strong&gt;&lt;em&gt;FederationAuthenticationModule&lt;/em&gt;&lt;/strong&gt; (probably because of the encrypted claim which I think it is not supported, but I need to double check). &lt;/p&gt;  &lt;p&gt;Inside the original app handler, I’m taking the parsed SAML token (using the existing Intuit’s code) and extracting the claims supplied in it.&lt;/p&gt;  &lt;p&gt;Then, I query Intuit Workplace for the user’s general data (e.g. e-mail, name, last name, etc.) and for the roles he is a member of (this requires 2 API calls using the &lt;strong&gt;&lt;em&gt;LoginTicket&lt;/em&gt;&lt;/strong&gt;). All this information also goes into the Claims collection in the &lt;b&gt;&lt;i&gt;ClaimsPrincipal&lt;/i&gt;&lt;/b&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/3835.image_5F00_6F91E835.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/7167.image_5F00_thumb_5F00_3F8796B4.png" width="640" height="324" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After that I create a ClaimsPrincipal and I add all this information to the claim set:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/5504.image_5F00_426CD59A.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/0317.image_5F00_thumb_5F00_6E3D2989.png" width="640" height="440" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The last step is to create a session for this user, and for that I’m (re)using WIF’s &lt;b&gt;&lt;i&gt;SessionAuthenticationModule&lt;/i&gt;&lt;/b&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/3056.image_5F00_02FEFC3D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/4530.image_5F00_thumb_5F00_41F07CD8.png" width="640" height="114" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This uses whatever mechanism you configured in WIF. Because this was a quick test, I left all defaults. But since this is a Windows Azure app, I suggest you should follow &lt;a href="http://msdn.microsoft.com/en-us/library/ff803371.aspx#sec4"&gt;the specific recommendations&lt;/a&gt; for this.&lt;/p&gt;  &lt;p&gt;The handler’s original structure is the same (and I think it would need some refactoring, especially with regards to error handling, but that was out of scope for this PoC &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/5164.wlEmoticon_2D00_smile_5F00_303434A5.png" /&gt;)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h4&gt;Some highlights of this code:&lt;/h4&gt;  &lt;ol&gt;   &lt;li&gt;Some API calls require a &lt;b&gt;&lt;i&gt;dbid&lt;/i&gt;&lt;/b&gt; parameter that is passed as a query string from Intuit to the app in a later call. I’m parsing the &lt;b&gt;&lt;i&gt;dbid&lt;/i&gt;&lt;/b&gt; from the &lt;b&gt;&lt;i&gt;TargetUrl&lt;/i&gt;&lt;/b&gt; claim to avoid a 2 pass claims generation process and solve everything here. This is not ideal, but not too bad. It would be simpler to get the &lt;strong&gt;&lt;em&gt;dbid&lt;/em&gt;&lt;/strong&gt; in the SAML token.&lt;/li&gt;    &lt;li&gt;The sample app uses local mapping mechanism to translate “Workplace roles” into “Application Roles” (it uses a small XML document stored in config to do the mapping). I moved all this here so the &lt;b&gt;&lt;i&gt;ClaimsPrincipal&lt;/i&gt;&lt;/b&gt; contains everything the application needs right away. I didn’t attempt to optimize any of this code and I just moved the code pieces from the original location to here. This is the “RoleMappingHelper”.&lt;/li&gt;    &lt;li&gt;I removed everything from the session. The “&lt;b&gt;&lt;i&gt;LoginTicket&lt;/i&gt;&lt;/b&gt;” for instance, was one of the pieces of information stored in session, but I found strange that it is sent as an encrypted claim in the SAML token, but then it is stored in a cookie. I removed all this.&lt;/li&gt;    &lt;li&gt;The WIF &lt;b&gt;&lt;i&gt;SessionAuthenticationModule&lt;/i&gt;&lt;/b&gt; (SAM) is then used to serialize/encrypt/chunk &lt;b&gt;&lt;i&gt;ClaimsPrincipal&lt;/i&gt;&lt;/b&gt;. This is all standard WIF behavior as described before.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h4&gt;The web application:&lt;/h4&gt;  &lt;p&gt;In the web app, I first changed the config to add WIF module and config:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/0638.image_5F00_27B013B4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/1665.image_5F00_thumb_5F00_77A5C232.png" width="640" height="171" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Notice that the usual&lt;b&gt;&lt;i&gt; FederationAutheticationModule&lt;/i&gt;&lt;/b&gt; is not there. That’s because its responsibilities are now replaced by the handler. The SAM however is there and therefore &lt;u&gt;it will automatically reconstruct&lt;/u&gt; the &lt;b&gt;&lt;i&gt;ClaimsPrincipal&lt;/i&gt;&lt;/b&gt; if it finds the &lt;b&gt;&lt;i&gt;FedAuth&lt;/i&gt;&lt;/b&gt; cookies created inside the handler. The result is that the application now will receive the complete &lt;b&gt;&lt;i&gt;ClaimsPrincipal&lt;/i&gt;&lt;/b&gt; on each request.&lt;/p&gt;  &lt;p&gt;This is the “&lt;i&gt;CustomerList.aspx&lt;/i&gt;” page (post authentication):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/2335.image_5F00_29E94A18.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/2744.image_5F00_thumb_5F00_05280CD4.png" width="640" height="479" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The second big change was to refactor all &lt;b&gt;&lt;i&gt;RoleHelper&lt;/i&gt;&lt;/b&gt; methods to use the standard interfaces:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/4722.image_5F00_125E701A.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/4338.image_5F00_thumb_5F00_2D2A9626.png" width="640" height="143" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;An interesting case is the &lt;b&gt;&lt;i&gt;IsGuest &lt;/i&gt;&lt;/b&gt; property that originally checked that the user was a member of any role (the roles a user was a member of were stored in session too, which I’m not a big fan of). This is now resolved with this single query to the Claims collection:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/6813.image_5F00_0B5EBD95.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/5811.image_5F00_thumb_5F00_453DDAB4.png" width="573" height="171" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The structure of the app was left more or less intact, but I did delete a lot of code that was not needed anymore.&lt;/p&gt;  &lt;p&gt;Again, a big advantage of this approach is that it allows you to plug any existing standard infrastructure into the app (like&lt;b&gt;&lt;i&gt; [Authorize] &lt;/i&gt;&lt;/b&gt;attribute in an MVC application) and it “just works”.&lt;/p&gt;  &lt;p&gt;In this example, the &lt;b&gt;&lt;i&gt;“CustomerList.aspx”&lt;/i&gt;&lt;/b&gt; page for example has this code at the beginning of &lt;strong&gt;&lt;em&gt;PageLoad&lt;/em&gt;&lt;/strong&gt; event:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/1526.image_5F00_2E9B8C6D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/3276.image_5F00_thumb_5F00_2D56F38E.png" width="640" height="160" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As mentioned above, the &lt;b&gt;&lt;i&gt;RoleHelper&lt;/i&gt;&lt;/b&gt; methods are now using the &lt;b&gt;&lt;i&gt;ClaimsPrincipal&lt;/i&gt;&lt;/b&gt; to resolve the “&lt;b&gt;&lt;i&gt;IsInRole&lt;/i&gt;&lt;/b&gt;” question (through &lt;strong&gt;&lt;em&gt;HttpContext.User.IsInRole&lt;/em&gt;&lt;/strong&gt;). But you could achieve something similar with pure ASP.NET infrastructure. Just as a quick test, I added this to the web.config:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/3683.image_5F00_2BA627BA.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/0045.image_5F00_thumb_5F00_7F892AC8.png" width="379" height="159" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And now when trying to browse “&lt;i&gt;CustomerList.aspx&lt;/i&gt;” you get an “Access Denied” because the user is not supplying a claim of type role with value “&lt;i&gt;SuperAdministrator&lt;/i&gt;”:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/5758.clip_5F00_image006_5F00_57767BA9.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/6825.clip_5F00_image006_5F00_thumb_5F00_27D85D1D.jpg" width="640" height="306" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h4&gt;Final notes&lt;/h4&gt;  &lt;p&gt;A more elegant approach would probably be to use deeper WIF extensibility to implement the appropriate “protocol”, etc., but that seems to be justified only if you are really implementing a “complete” protocol/handler (SAMLP in this case). That’s much harder work.&lt;/p&gt;  &lt;p&gt;This is a more pragmatic approach that works for&lt;i&gt; this&lt;/i&gt; case. I think it fulfills the goal of isolating as much “plumbing” as possible from the application code. When WIF evolves to support SAMLP natively for example, you would simply replace infrastructure, leaving your app mostly unchanged.&lt;/p&gt;  &lt;p&gt;Finally, one last observation: we are calling the Intuit API a couple times to retrieve user info. This could be completely avoided if the original SAML token sent by Intuit contained the information right away! There might be good reasons why they are not doing it today. Maybe it’s in their roadmap. Once again, with this design, changes in your app would be minimized if that happens. &lt;/p&gt;  &lt;p&gt;This was my first experience with Intuit’s platform and I was surprised how easy it was to get going and for their excellent support. &lt;/p&gt;  &lt;p&gt;I want to thank Daz Wilkin (brabant court Founder) for spending a whole day with us. Jarred Keneally from Intuit for all his assistance and Federico Boerr &amp;amp; Scott Densmore from my team for helping me polish the implementation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10151239" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Architecture/">Architecture</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federation+Provider/">Federation Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/patterns+_2600_+practices/">patterns &amp; practices</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/session/">session</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WIF/">WIF</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/claims+transformation/">claims transformation</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Intuit/">Intuit</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Workplace/">Workplace</category></item><item><title>Web Single Sign Out–Part II</title><link>http://blogs.msdn.com/b/eugeniop/archive/2011/02/24/web-single-sign-out-part-ii.aspx</link><pubDate>Thu, 24 Feb 2011 21:01:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10133760</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=10133760</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=10133760</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2011/02/24/web-single-sign-out-part-ii.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Following up on &lt;a href="http://blogs.msdn.com/b/eugeniop/archive/2011/02/16/single-sign-out-websso.aspx"&gt;previous post&lt;/a&gt;, there were 2 questions:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Where do these green checks images come from? There are nowhere in a-Order or in a-Expense… you would spend hours looking for the PNG, or JPG or GIF and you will never find it, because it is very well concealed. Can you guess where it comes from?&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I was referring to the green checks displayed here:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/2061.image_5F00_5DE0DA34.png"&gt;&lt;img title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/1411.image_5F00_thumb_5F00_4FA26144.png" width="640" height="478" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The &lt;strong&gt;&lt;em&gt;src&lt;/em&gt;&lt;/strong&gt; for these is a rather cryptic&amp;#160; &lt;strong&gt;&lt;em&gt;src=http://localhost/a-Order/?wa=signoutcleanup1.0&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;And the answer is: it’s coming from within WIF (the FAM more specifically). If you explore the FAM with Reflector you will see a byte array embedded in the code. That byte array is the GIF for the green check. Exercise to the reader: is this the only behaviour? Can the FAM do something else? under which circumstances?&lt;/p&gt;  &lt;p&gt;The second question was:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;&lt;strong&gt;Bonus question&lt;/strong&gt;: how does the IdP know all the applications the user accessed to?&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;No WIF magic here. The issuer will have to keep a list of all the RP. In our sample (that we expect to release really soon) we use exactly the technique described in Vittorio’s book. We have a small helper class “&lt;em&gt;&lt;strong&gt;SingleSignonManager&lt;/strong&gt;&lt;/em&gt;” that keeps track of RPs in cookies:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/7635.image_5F00_13528127.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/3438.image_5F00_thumb_5F00_4907C681.png" width="640" height="197" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Then, when the signout request is received, we simply iterate over the list and return the right markup:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/1385.image_5F00_434CACDB.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/7635.image_5F00_thumb_5F00_0CFB84CC.png" width="640" height="129" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The &lt;strong&gt;&lt;em&gt;SingleSignoutManager&lt;/em&gt;&lt;/strong&gt; class is mentioned in Vittorio’s book but not available there, so we included it in the sample. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10133760" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/patterns+_2600_+practices/">patterns &amp; practices</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WIF/">WIF</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity/">Identity</category></item><item><title>Single Sign Out–WebSSO</title><link>http://blogs.msdn.com/b/eugeniop/archive/2011/02/16/single-sign-out-websso.aspx</link><pubDate>Wed, 16 Feb 2011 18:46:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10130537</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=10130537</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=10130537</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2011/02/16/single-sign-out-websso.aspx#comments</comments><description>&lt;p&gt;While reviewing all the existing samples we’ve noticed that our implementation of &lt;strong&gt;Single Sign Out&lt;/strong&gt; was kind of….weak.&amp;#160; It wasn’t really fully implemented and wasn’t very clear what was happening either (or what it should happen)&lt;/p&gt;  &lt;p&gt;We’ve fixed all that now in scenario 1: &lt;strong&gt;WebSSO&lt;/strong&gt;. Things get more complicated when more than 1 STS is in the picture, and even more so when the identity provider uses other protocols (for example, all our scenarios using ACS and Google or ACS and LiveID). But for WebSSO, things are more or less straight forward.&lt;/p&gt;  &lt;h3&gt;WebSSO scenario recap:&lt;/h3&gt;  &lt;p&gt;If you remember for previous posts or the book, in our first chapter we had Adatum with 2 applications: &lt;strong&gt;a-Order&lt;/strong&gt; and &lt;strong&gt;a-Expense&lt;/strong&gt;. We wanted that Adatum employees login to one or the other seamlessly:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/7183.image_5F00_6437D68F.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/6786.image_5F00_thumb_5F00_38575CD3.png" width="640" height="434" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;John opens the browser on his desktop (that already has a been authenticated with AD)&lt;/li&gt;    &lt;li&gt;Opens a-Order home page&lt;/li&gt;    &lt;li&gt;Gets redirected to the IdP. He’s authenticated (e.g. Kerberos ticket)&lt;/li&gt;    &lt;li&gt;A token is given to him. The token is posted back to a-Order. He’s in.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Sometime later, he browses a-Expense.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;No session with a-Expense yet, he’s redirected to IdP&lt;/li&gt;    &lt;li&gt;He’s already authenticated, gets a new token for a-Expense.&lt;/li&gt;    &lt;li&gt;Voila&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;So far, so good. Nothing really new. What happens now if John wants to &lt;strong&gt;&lt;em&gt;signoff. &lt;/em&gt;&lt;/strong&gt;We don’t want our system to be a roach motel: once in, never out… what happens is actually pretty straight forward, but there are some subtle considerations. When John signs-off, he should sign off from all relying parties and the IdP.&lt;/p&gt;  &lt;p&gt;This diagram illustrates the process:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/4456.clip_5F00_image002_5F00_7095D3EB.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/6116.clip_5F00_image002_5F00_thumb_5F00_572DD0B1.jpg" width="605" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;John clicks on “Logout” (on any of the relying parties: a-Order in our example). This results on a &lt;strong&gt;wa=signout1.0&lt;/strong&gt; to be sent to the IdP. The Idp cleans up its own session with the user and then (here comes the tricky part)returns a page to the user with a list of image tags (HTML image tags). An image tag for each RP the IdP has issued a security token for John. The &lt;strong&gt;src&lt;/strong&gt; url for these images will be actually something like:&lt;/p&gt;  &lt;p&gt;src=http://localhost/a-Expense/?wa=signoutcleanup1.0 &lt;/p&gt;  &lt;p&gt;src=http://localhost/a-Order/?wa=signoutcleanup1.0 &lt;/p&gt;  &lt;p&gt;With these tags, the browser will attempt to get the image from these URL (which happens to be located in each RP: a-Order and a_expense), and in fact you will see something like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/2061.image_5F00_5DE0DA34.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/1411.image_5F00_thumb_5F00_4FA26144.png" width="640" height="478" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The HTML:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/7380.image_5F00_6427B0C2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/7183.image_5F00_thumb_5F00_0F0014D5.png" width="640" height="240" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Where do these green checks images come from? There are nowhere in a-Order or in a-Expense… you would spend hours looking for the PNG, or JPG or GIF and you will never find it, because it is very well concealed. Can you guess where it comes from?&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;&lt;strong&gt;Hint:&lt;/strong&gt; page 115 of Vittorio’s &lt;a href="http://www.amazon.com/Programming-Windows-Identity-Foundation-Dev/dp/0735627185/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1297876830&amp;amp;sr=1-1"&gt;excellent book&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;&lt;strong&gt;Bonus question&lt;/strong&gt;: how does the IdP know all the applications the user accessed to?&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;    &lt;p&gt;By the way, all this is now working on the new updated samples which we will post to &lt;a href="http://claimsid.codeplex.com"&gt;our CodePlex site&lt;/a&gt;&amp;#160; very soon.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10130537" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/patterns+_2600_+practices/">patterns &amp; practices</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/a_2D00_Expense/">a-Expense</category></item><item><title>ACS as a Federation Provider – Claims transformation</title><link>http://blogs.msdn.com/b/eugeniop/archive/2011/02/14/acs-as-a-federation-provider-claims-transformation.aspx</link><pubDate>Mon, 14 Feb 2011 23:31:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10129261</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=10129261</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=10129261</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2011/02/14/acs-as-a-federation-provider-claims-transformation.aspx#comments</comments><description>&lt;p&gt;To work properly, a-Order needs a number of claims to be supplied:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;User name&lt;/li&gt;    &lt;li&gt;Organization&lt;/li&gt;    &lt;li&gt;Role&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The &amp;quot;Organization” claim is used to filter orders belonging to a specific customer of Adatum. For example, Litware users (like Rick) will eventually end up with a token containing a claim with “Organization=Litware”. All this is done in step 3 here in the diagram below:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/3716.image_5F00_12B7A005.png"&gt;&lt;img title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/1651.image_5F00_thumb_5F00_67AF8C32.png" width="640" height="395" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Adatum’s FP takes whatever token it gets from the outside world and “normalizes” it to whatever the application needs. ADFS for example, ships with a &lt;a href="http://technet.microsoft.com/en-us/library/dd807118(WS.10).aspx"&gt;powerful language&lt;/a&gt; to define these transformations. In our sample, we ship a simple “simulation” of a real STS, so our rules are all coded in C# and are obviously not “production”:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/5428.image_5F00_5C18D816.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/7181.image_5F00_thumb_5F00_0A9EBB2C.png" width="640" height="285" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;With ACS in the picture there are 2 places where transformation could happen though:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;In ACS&lt;/li&gt;    &lt;li&gt;In Adatum’s FP&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt; In this scenario Adatum owns both (its own on-premises issuers and an instance in ACS), so it has full control of either components. Which one to use depends on many factors and there’s no “single right” way of doing it. Let’s consider one reason to keep mappings on Adatum’s side. for this we’ll pick one of the transformations required: the simple rule of associating “&lt;strong&gt;&lt;u&gt;Mary@Gmail.com&lt;/u&gt;&lt;/strong&gt;”&amp;#160; with &lt;u&gt;&lt;strong&gt;Organization=“Mary Inc”&lt;/strong&gt;&lt;/u&gt;. &lt;/p&gt;  &lt;p&gt;This rule would be fixed in ACS, there is no dynamic discovery or lookup code that ACS can execute at this time. It is likely that Adatum keeps a master record of all the companies it works with and the contact information associated with them. If that is the case, it’s probably better to have ADFS call a component or the master record database using the built-in SQL integration&amp;#160; capabilities (if using ADFS). If Mary changes her e-mail, everything would just work. If the rule was in ACS, it would require Adatum to update the rule every time there’s an update.&lt;/p&gt;  &lt;p&gt;Of course, ACS does provide an API for updating the configuration. So you could achieve something similar by just automating the update. Different companies will be more or less comfortable with one approach or the other.&lt;/p&gt;  &lt;p&gt;The highest order bit in this situation is that the app remains completely isolated from these changes, as &lt;a href="http://blog.codingoutloud.com/"&gt;CodingOutLoud&lt;/a&gt; mentioned in &lt;a href="http://blogs.msdn.com/b/eugeniop/archive/2011/02/09/acs-as-a-federation-provider-a-little-bit-deeper-into-the-sample-home-realm-discovery.aspx"&gt;his comment&lt;/a&gt; in a previous post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10129261" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Access+Control+Service/">Access Control Service</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/patterns+_2600_+practices/">patterns &amp; practices</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/ADFS/">ADFS</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity/">Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/ACS/">ACS</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/claims+transformation/">claims transformation</category></item><item><title>Our next project – Claims based Identity and Access Control</title><link>http://blogs.msdn.com/b/eugeniop/archive/2011/02/04/our-next-project-claims-based-identity-and-access-control.aspx</link><pubDate>Sat, 05 Feb 2011 06:40:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10125177</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=10125177</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=10125177</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2011/02/04/our-next-project-claims-based-identity-and-access-control.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/0066.image_5F00_7523404F.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 2px 11px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="left" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/0550.image_5F00_thumb_5F00_77D8CF75.png" width="157" height="189" /&gt;&lt;/a&gt;Not surprisingly maybe, security in general, and authentication &amp;amp; authorization in particular, is a consistently highly rated concern for our customers. These concerns are especially elevated&amp;#160; with those considering the cloud, because they don’t have as much control on the cloud as they would typically have in their own datacenters. Sometimes, one could argue, for their own benefit, but that is a different discussion.&lt;/p&gt;  &lt;p&gt;The “&lt;a href="http://msdn.microsoft.com/en-us/library/ff423674.aspx"&gt;Claims Identity Guide&lt;/a&gt;” published in December 2009, was a foundational component in our “Cloud series” that followed it: &lt;i&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff728592.aspx"&gt;Moving Applications to the Cloud&lt;/a&gt;&lt;/i&gt;, &lt;i&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff966499.aspx"&gt;Developing Application for the Cloud&lt;/a&gt;&lt;/i&gt; and the recently released &lt;i&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/gg490765.aspx"&gt;Windows Phone 7 Developer Guide&lt;/a&gt;&lt;/i&gt;. The identity content in all of them, is essentially based on the core scenarios and design principles described in the claims guide.&lt;/p&gt;  &lt;p&gt;With the Claims guide we also pioneered a new style and design in our books, and it was very well received! We’ve got some great feedback from you on the content and the approach. Exciting things are happening in the identity space and we want to continue to help you create great solutions using these new components.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Our next project then is an extension to this guide that will address two new areas:&lt;/p&gt;  &lt;ol&gt;   &lt;p&gt;1- &lt;b&gt;Access Control Service&lt;/b&gt; (ACS) V2, in the Windows Azure Platform will be available in production soon. ACS opens the doors to advanced identity management scenarios including federation, interop with popular identity standards such as OpenId, OAuth, SWT and SAML, use of popular social identity providers such as Facebook, Windows Live ID and Google. All of this is available today in labs.&lt;/p&gt;    &lt;p&gt;2- &lt;b&gt;SharePoint 2010 &lt;/b&gt;is “claims enabled”, meaning that it natively supports advanced identity management based on WS-Federation. &lt;/p&gt; &lt;/ol&gt;  &lt;p&gt;Interestingly (or not maybe), the core scenarios remain the same but the implementation details change and new interesting things can now be done much more easily. More or less our scope now looks like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/0871.image_5F00_3DE98C89.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/7725.image_5F00_thumb_5F00_3519843D.png" width="640" height="431" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The “blue” line is the existing content, “green” and “black” are the new chapters. Notice that they almost mirror what’s covered today. News and updates (including drafts, early samples, etc) will be published on &lt;a href="http://claimsid.codeplex.com"&gt;http://claimsid.codeplex.com&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;As usual, we welcome feedback very much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10125177" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federation+Provider/">Federation Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Geneva/">Geneva</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/patterns+_2600_+practices/">patterns &amp; practices</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/ADFS/">ADFS</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity/">Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/ACS/">ACS</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SharePoint/">SharePoint</category></item><item><title>A year’s balance–next project</title><link>http://blogs.msdn.com/b/eugeniop/archive/2011/01/26/a-year-s-balance-next-project.aspx</link><pubDate>Wed, 26 Jan 2011 18:02:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10120609</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=10120609</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=10120609</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2011/01/26/a-year-s-balance-next-project.aspx#comments</comments><description>&lt;p&gt;A little bit late for a year balance since the year has already started, or so I’m told. Anyway, as we prepare for the next project, I reflected on my team’s work for the last 18 months. 18 months is more than a year, so you might wonder why am I doing a year balance on the work done on 18 months? Good question. &lt;/p&gt;  &lt;p&gt;Does content that nobody sees and uses really exist? Like &lt;a href="http://en.wikipedia.org/wiki/If_a_tree_falls_in_a_forest"&gt;the tree falling where nobody can listen&lt;/a&gt;. Does it make a sound? I figured that what you cared the most is the stuff that was available to you, not what we actually do here in the remote American northwest and keep to ourselves. &lt;/p&gt;  &lt;p&gt;Let’s say then, that the &lt;strong&gt;&lt;em&gt;output&lt;/em&gt;&lt;/strong&gt; of that last 18 months was available to &lt;strong&gt;&lt;em&gt;you&lt;/em&gt;&lt;/strong&gt; in the last 12 months. Makes sense?&lt;/p&gt;  &lt;p&gt;And here it is:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/7762.image_5F00_3F657A51.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/8357.image_5F00_thumb_5F00_63E6E208.png" width="643" height="307" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff423674.aspx"&gt;A Guide to Claims based Identity&lt;/a&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This guide published a year ago, laid the foundations for all subsequent books. We heavily reused the core designs explained in this little book. We also explored a new format for our books, and a new style. This book inaugurated the “tubemap”: the diagram we used from then on to explain in a single picture the entire scope of the content. &lt;/p&gt;  &lt;p&gt;&lt;img title="Ff423674.a9471d21-d7f7-48b8-8a64-686fe99f5411(en-us,PandP.10).png" alt="Ff423674.a9471d21-d7f7-48b8-8a64-686fe99f5411(en-us,PandP.10).png" src="http://i.msdn.microsoft.com/dynimg/IC382614.png" width="223" height="267" /&gt;&lt;/p&gt;  &lt;p&gt;Credits to our brilliant partner, &lt;a href="http://blogs.southworks.net/mwoloski/"&gt;Matias Woloski&lt;/a&gt;. Little known secret: VS 2010 samples of the book are available on &lt;a href="http://claimsid.codeplex.com/"&gt;codeplex&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff728592.aspx"&gt;Moving Applications to the Cloud&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Our first book specifically focused on Windows Azure. We explored the considerations of migrating (and optimizing) applications for the cloud. As a colorful anecdote, this book includes an Excel spreadsheet with dollar amounts! A technical book with economics! Some were very opposed to it, and $ is a big deal in PaaS (and SaaS, and IaaS, and XaaS)! Money is a big motivator and every month, you get direct feedback on how you are using the platform. Other nuggets worth mentioning: MSBuild tasks to automate deployment,&amp;#160; setting up multiple environments (think “Dev”, “Test”, etc.). It’s quite a popular book: made it to the top 25 in O’Reilly this week.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff966499.aspx"&gt;Developing Applications for the Cloud&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Our second book on Windows Azure Platform. This time with no legacy constraints. Ah! the joy of building something from scratch using the greatest and latest!&amp;#160; Notice the “1” and “2” on the covers of this and the other book? Well, it turns out people had quite some difficulty differentiating one from the other. So we re-designed the cover with the numbers now. Yes, we learned quite a bit on book design too. In addition to the end to end case study,&lt;/p&gt;  &lt;p&gt;In addition to the end-to-end scenario (the surveys application we use as the “case study”), a popular chapter has been: troubleshooting Windows Azure apps. My personal favorite content is the little framework we wrote for asynchronous processing with queues and workers. Seems like a common pattern and I’ve already used it in many places.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/gg490765.aspx"&gt;Windows Phone 7 Developer Guide&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The ying-yang of the Microsoft platform in one single book: small, portable devices on one end and the massive, infinitely scalable datacenter in the backend: Windows Phone 7 and Windows Azure. The most controversial aspects of the book? Use of the MVVM pattern is the by far top of the list. Second in the rankings? Use of &lt;a href="http://msdn.microsoft.com/en-us/devlabs/ee794896.aspx"&gt;Rx (Reactive Extensions)&lt;/a&gt; for asynchronous communications. Rx is like Linq in its beginnings: mind twisting at first, confusing perhaps, too much “black magic”, but impossible to live without it afterwards. Glad to see the framework available broadly now: .NET, JavaScript, Silverlight, etc. &lt;/p&gt;  &lt;p&gt;With regards to MVVM, well…Silverlight might not be fully optimized for this pattern, but we still believe it is worth considering and paying the extra cost if things like testability are important for you. testability is important to us, so we decided to implement it and show you how. We ported &lt;a href="http://compositewpf.codeplex.com/"&gt;Prism&lt;/a&gt; to the phone and replaced &lt;a href="http://unity.codeplex.com/"&gt;Unity&lt;/a&gt; with &lt;a href="http://funq.codeplex.com/"&gt;Funq&lt;/a&gt; for increased efficiency. But of course you don’t have to use any of that. We do expect you to slice and dice the guide as you see fit. Go ahead rip it off. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So, what’s next? What’s next comes in detail in the next post. But here’s in short: what we’d like to do is to extend the identity guide to include some really compelling and demanded scenarios (federation with social identity providers, SharePoint, Access Control Service, etc.) What do you think? Are you passionate about tokens and STSs and claims and WS-Federation, etc.? Have strong opinions on all of these? I’d love to know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10120609" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure+Architecture+Guide/">Windows Azure Architecture Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Phone+7/">Windows Phone 7</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WAG/">WAG</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity/">Identity</category></item><item><title>Claims Identity Guide samples updated</title><link>http://blogs.msdn.com/b/eugeniop/archive/2010/08/02/claims-identity-guide-samples-updated.aspx</link><pubDate>Tue, 03 Aug 2010 06:26:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10045259</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=10045259</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=10045259</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2010/08/02/claims-identity-guide-samples-updated.aspx#comments</comments><description>&lt;p&gt;I’ve just uploaded to CodePlex updated samples for the &lt;a href="http://msdn.microsoft.com/en-us/library/ff423674.aspx"&gt;Claims based Identity Guide&lt;/a&gt;. This have all been adapted to work on Visual Studio 2010, .NET 4.0 and MVC 2.0. See &lt;a href="http://claimsid.codeplex.com/releases/view/50000"&gt;here for downloading&lt;/a&gt; the bits.&lt;/p&gt;  &lt;p&gt;From the release notes:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Required configuration changes for IIS, DevFabric and Windows Azure&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Both solutions &lt;strong&gt;&lt;em&gt;1-SingleSignOn&lt;/em&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;em&gt;5-WindowsAzure&lt;/em&gt;&lt;/strong&gt; involve the &lt;em&gt;&lt;strong&gt;a-expense.ClaimsAware&lt;/strong&gt;&lt;/em&gt; project.    &lt;br /&gt;This solution is configured by default to run hosted in IIS, but the solution &lt;strong&gt;&lt;em&gt;5-WindowsAzure&lt;/em&gt;&lt;/strong&gt; will run in a different environment (DevFabric and Windows Azure).    &lt;br /&gt;Please find the notes about the required required in the microsoft.identityModel section of the web.config of the a-expense.ClaimsAware project.    &lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Cookies encrypted using RSA&lt;/b&gt;    &lt;br /&gt;As mentioned in the guide, the federation cookies are now encrypted using an RSA algorithm as we recommend in the guide. This change enables the involved sites to support web farm scenarios. This involves the following changed lines from the previous release:&lt;/p&gt;  &lt;p&gt;&lt;b&gt;In global.asax.cs&lt;/b&gt;&lt;/p&gt;  &lt;pre&gt;protected void Application_Start()
{
	FederatedAuthentication.ServiceConfigurationCreated += this.OnServiceConfigurationCreated;            

	...
}

private void OnServiceConfigurationCreated(object sender, ServiceConfigurationCreatedEventArgs e)
{
	List&amp;lt;CookieTransform&amp;gt; sessionTransforms =
	new List&amp;lt;CookieTransform&amp;gt;(
	new CookieTransform[] 
		{
		new DeflateCookieTransform(), 
		new RsaEncryptionCookieTransform(e.ServiceConfiguration.ServiceCertificate),
		new RsaSignatureCookieTransform(e.ServiceConfiguration.ServiceCertificate) 
		});
	SessionSecurityTokenHandler sessionHandler = new SessionSecurityTokenHandler(sessionTransforms.AsReadOnly());

	e.ServiceConfiguration.SecurityTokenHandlers.AddOrReplace(sessionHandler);
}
									&lt;/pre&gt;

&lt;p&gt;These are exactly the same settings we use in the &lt;a href="http://msdn.microsoft.com/en-us/library/ff728592.aspx"&gt;Windows Azure Architecture Guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;In web.config:&lt;/b&gt;&lt;/p&gt;

&lt;pre&gt;&amp;lt;configuration&amp;gt;
    ...
    &amp;lt;microsoft.identityModel&amp;gt;
        ...
        &amp;lt;service&amp;gt;
            ...
			&amp;lt;serviceCertificate&amp;gt;
                &amp;lt;certificateReference x509FindType=&amp;quot;FindBySubjectDistinguishedName&amp;quot; findValue=&amp;quot;CN=localhost&amp;quot;/&amp;gt;
			&amp;lt;/serviceCertificate&amp;gt;
        &amp;lt;/service&amp;gt;
    &amp;lt;/microsoft.identityModel&amp;gt;
&amp;lt;/configuration&amp;gt;
									&lt;/pre&gt;

&lt;p&gt;&lt;b&gt;Request validation in ASP.NET 4&lt;/b&gt;

  &lt;br /&gt;ASP.NET by default validates all the POSTs done to the web application. This validation checks that the input is not dangerous. By default, an XML document that is not encoded is considered dangerous by ASP.NET. A token is normally submitted to the site as an XML document that is not encoded. To avoid getting an exception when the token is posted, you will add a class that will check if the input is indeed a security token. If it is it will return true and will let the request continue. If not, it will throw the regular &amp;quot;A potentially dangerous Request.Form value was detected...&amp;quot; exception.&lt;/p&gt;

&lt;p&gt;The class &lt;strong&gt;&lt;em&gt;WsFederationRequestValidator&lt;/em&gt;&lt;/strong&gt; has been added for this purpose and it is enabled through the following web.config line: &lt;/p&gt;

&lt;pre&gt;&amp;lt;system.web&amp;gt;
    &amp;lt;httpRuntime requestValidationType=&amp;quot;WsFederationRequestValidator&amp;quot; /&amp;gt;
&amp;lt;/system.web&amp;gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10045259" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure+Architecture+Guide/">Windows Azure Architecture Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WIF/">WIF</category></item><item><title>Windows Azure Architecture Guide – Part 2 – TailSpin Surveys – AuthN and AuthZ</title><link>http://blogs.msdn.com/b/eugeniop/archive/2010/05/24/windows-azure-architecture-guide-part-2-tailspin-surveys-authn-and-authz.aspx</link><pubDate>Mon, 24 May 2010 23:38:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10014176</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=10014176</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=10014176</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2010/05/24/windows-azure-architecture-guide-part-2-tailspin-surveys-authn-and-authz.aspx#comments</comments><description>&lt;p&gt;Tailspin &lt;em&gt;Surveys&lt;/em&gt; is a multitenant, SaaS solution, targeting many different customers. Some of these customers might be “enterprise” with “Big-IT” and are likely to demand advanced integration capabilities for identity (e.g. identity federation). Others, potentially smaller, are likely to not require these. Even smaller companies (e.g. someone working from home) might even want to reuse one of their existing identities (their e-mail provider, their LiveID, etc)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/4251.image_5F00_40A13DE4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-38-15-metablogapi/2021.image_5F00_thumb_5F00_071E2DED.png" width="640" height="446" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;These 3 possibilities are illustrated above:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Adatum&lt;/strong&gt; (the “big company”) uses ADFS to issue tokens for TailSpin &lt;em&gt;Surveys&lt;/em&gt;. They want their employees (e.g. John) to have SSO between their own applications (potentially on-premises, but not necessarily). TailSpin &lt;em&gt;Surveys&lt;/em&gt; will just &lt;em&gt;trust&lt;/em&gt; their &lt;strong&gt;identity provider &lt;/strong&gt;(ADFS in the example). Tokens issued by Adatum’s identity provider are therefore accepted in Tailspin Surveys. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Fabrikam&lt;/strong&gt; (the “small company”). It has AD, but no ADFS (or any other equivalent infrastructure). The can’t issue tokens that TailSpin can understand and they have no desire to change anything from their side. For customers like Fabrikam, TailSpin provides an identity provider of their own that they can use (they federate with themselves). The biggest drawback is that Fabrikam users will have to remember another username/password, but…not many employees in Fabrikam use Surveys anyway. With this architecture however, TailSpin prepares better for the future. When Fabrikam upgrades their infrastructure, they would simply change the trust relationship. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Mark working from Home&lt;/strong&gt; (a super small company). Mark doesn’t have an ADFS under his desk. It is likely that Mark does most of his work from a single PC, with quite a bit of software being delivered to him as a service (like &lt;em&gt;Surveys&lt;/em&gt;). Mark however, already uses LiveID for mail (e.g.Hotmail) and various other things. For people like Mark, TailSpin offers the opportunity to associate this external identities with the application. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;What’s important is that the application (&lt;em&gt;Surveys&lt;/em&gt;) is completely agnostic of how the users authenticates. All this is delegated. trust is established as part of the on-boarding process when a new tenant subscribes to &lt;em&gt;Surveys.&lt;/em&gt; This of course can be highly automated or completely manual. &lt;/p&gt;  &lt;p&gt;If all this sounds familiar to you, don’t worry. You are not crazy :-). We have covered this same scenario many times already:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/09/01/exploring-the-service-provider-track-first-station-fabrikam-shipping-part-i-the-scenario-challenges.aspx"&gt;Exploring the Service Provider track – First station: Fabrikam Shipping – Part I (the scenario &amp;amp; challenges)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/09/03/exploring-the-service-provider-track-fabrikam-shipping-part-ii-solution.aspx"&gt;Exploring the Service Provider track – Fabrikam Shipping Part II (Solution)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Fortunately, most of the design needed for TailSpin is already covered in the “&lt;a href="http://msdn.microsoft.com/en-us/library/ff423674.aspx"&gt;Claims Identity Guide&lt;/a&gt;”. There’s quite a bit we are reusing from it. Since Surveys is an MVC application we will be using exactly the same approach for securing it with claims. This other post describes how it works:&lt;a href="http://blogs.msdn.com/b/eugeniop/archive/2010/04/03/wif-and-mvc-how-it-works.aspx"&gt;WIF and MVC – How it works&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/09/03/exploring-the-service-provider-track-fabrikam-shipping-part-ii-solution.aspx"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10014176" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Architecture/">Architecture</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SaaS/">SaaS</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Azure+Services+Platform/">Azure Services Platform</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/IssueTracker/">IssueTracker</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/patterns+_2600_amp_3B00_+practices/">patterns &amp;amp; practices</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/ADFS/">ADFS</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure+Architecture+Guide/">Windows Azure Architecture Guide</category></item><item><title>WIF and MVC – How it works</title><link>http://blogs.msdn.com/b/eugeniop/archive/2010/04/03/wif-and-mvc-how-it-works.aspx</link><pubDate>Sat, 03 Apr 2010 16:03:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9990065</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9990065</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9990065</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2010/04/03/wif-and-mvc-how-it-works.aspx#comments</comments><description>&lt;p&gt;I got a few questions from people on how the “&lt;a href="http://msdn.microsoft.com/en-us/library/ff359105(v=PandP.10).aspx"&gt;Federation with Multiple Partners&lt;/a&gt;” sample of the &lt;a href="http://msdn.microsoft.com/en-us/library/ff423674(v=PandP.10).aspx"&gt;guide&lt;/a&gt; works, so I figured I would just write it down in one place for eternity.&lt;/p&gt;  &lt;p&gt;The guide explains all sequence in quite some detail (see pages 88 to 97), but sometimes a diagram is more helpful, so here’s a sequence diagram that describes all interactions:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WIFandMVCHowitworks_E6AF/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WIFandMVCHowitworks_E6AF/image_thumb_1.png" width="640" height="453" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;An un-authenticated user browses a protected resource, say the “Shipping” page (which translates into a method in a Controller).&lt;/li&gt;    &lt;li&gt;The Controller is decorated with the &lt;strong&gt;&lt;em&gt;AuthenticateAndAuthorizeAttribute&lt;/em&gt;&lt;/strong&gt; which implements MVC’s &lt;em&gt;&lt;strong&gt;IAuthorizationFilter&lt;/strong&gt;&lt;/em&gt; interface. Because the user is not authenticated yet, it will issue a SignInRequest to the configured issuer (this results in a redirection to the issuer). Among other tings it passes the user original URL in the context (wctx) of the request (in this example is the “Shipping” page).&lt;/li&gt;    &lt;li&gt;The Issuer authenticates the user with whatever means and if successful, it issues a token for the user for that application.&lt;/li&gt;    &lt;li&gt;The Token and the the context information is passed back to the app to a specific destination (indicated in the realm). In the MVC application, this is just another controller (“Home” in our sample, method “FederationResult”). This controller is &lt;u&gt;&lt;strong&gt;not&lt;/strong&gt;&lt;/u&gt; decorated by the &lt;strong&gt;&lt;em&gt;AuthenticateAndAuthorizeAttribute&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt;    &lt;li&gt;The request however, does go through the WIF Module (the “FAM” in the diagram above). WIF will validate the token and create a &lt;strong&gt;&lt;em&gt;ClaimsPrincipal&lt;/em&gt;&lt;/strong&gt; that is eventually passed on to the controller.&lt;/li&gt;    &lt;li&gt;The Home Controller inspects the context parameter, extracts the original URL (remember the context is preserved throughout all hops) and then redirects the user there.&lt;/li&gt;    &lt;li&gt;The redirect will go again through the filter, but this time the user is authenticated.&lt;/li&gt;    &lt;li&gt;Any authorization rules are performed (in our example, we checked for specific Roles) and if all checks pass…&lt;/li&gt;    &lt;li&gt;The specific controller is finally called (e.g. Shipping).&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;A couple notes:&lt;/p&gt;  &lt;p&gt;Everything within the green box above happens only when there’s no session established or when the session expires. Once there’s a session, the requests only go through the filter.&lt;/p&gt;  &lt;p&gt;In our sample, there’re actually &lt;u&gt;two&lt;/u&gt; Issuers. This is because the sample deals with “Multiple Partners” each one with its own Identity Provider, a scenario that makes convenient to have another intermediate Issuer (a.k.a. “Federation Provider”). I didn’t add it in the diagram above just to keep things simple and focus on the specifics of MVC and WIF.&lt;/p&gt;  &lt;p&gt;Because the protocol uses redirections, interactions in the diagram above are “logical”. Whenever you see an arrow with “redirection” label, what actually happens is that the response is sent to the browser and then the browser initiates the interaction with whatever you are redirected to:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WIFandMVCHowitworks_E6AF/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WIFandMVCHowitworks_E6AF/image_thumb_4.png" width="640" height="209" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In our sample we chose to use “roles” as a way of providing access:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WIFandMVCHowitworks_E6AF/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WIFandMVCHowitworks_E6AF/image_thumb_2.png" width="474" height="141" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;But it should be clear that you could use &lt;em&gt;anything&lt;/em&gt;. Repeat: &lt;em&gt;“roles are claims, but not every claim is a role”&lt;/em&gt; :-)&lt;/p&gt;  &lt;p&gt;Also, this declarative model might not always work. You might have to make decisions on the parameters of the call, and since you have access to the claims collection (through the principal), you can programmatically use them for more advanced behavior. Using roles is just convenient for an examples.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9990065" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federation+Provider/">Federation Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/patterns+_2600_+practices/">patterns &amp; practices</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/MVC/">MVC</category></item><item><title>Windows Azure Guidance – First version of a-Expense in the cloud</title><link>http://blogs.msdn.com/b/eugeniop/archive/2010/03/23/windows-azure-guidance-first-version-of-a-expense-in-the-cloud.aspx</link><pubDate>Tue, 23 Mar 2010 23:16:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9983968</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9983968</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9983968</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2010/03/23/windows-azure-guidance-first-version-of-a-expense-in-the-cloud.aspx#comments</comments><description>&lt;p&gt;Available for download &lt;a href="http://wag.codeplex.com/releases/view/42449"&gt;here&lt;/a&gt;, you’ll find the first step in taking a-Expense to Windows Azure. Highlights of this release are:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Use of SQL Azure as the backend store for application entities (e.g. expense reports) &lt;/li&gt;    &lt;li&gt;Uses Azure storage for user profile information (the “Reimbursement method” user preference) &lt;/li&gt;    &lt;li&gt;Application no longer queries AD for user attributes needed in the application (Cost Center and employee’s Manager, the expense default approver). These are received as claims in the security token issued by Adatum’s STS. &lt;/li&gt;    &lt;li&gt;Authentication is now claims based.&amp;#160;&amp;#160; &lt;/li&gt;    &lt;li&gt;Logging and tracing are now done through Windows Azure infrastructure. &lt;/li&gt;    &lt;li&gt;Deployment to Windows Azure is automated. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;#1&lt;/strong&gt; is straight forward thanks to SQL Azure relatively high fidelity with SQL Server. &lt;/p&gt;  &lt;p&gt;For &lt;strong&gt;#2&lt;/strong&gt;, we used the providers included in the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=413E88F8-5966-4A83-B309-53B7B77EDF78&amp;amp;displaylang=en"&gt;Windows Azure training kit&lt;/a&gt; (with a few modifications/simplifications). The main challenge here is to initially migrate the data from the “on premises” SQL Server to Azure storage. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;#3&lt;/strong&gt; is relatively simple by using WIF. The main changes are in the &lt;strong&gt;&lt;em&gt;UserRepository&lt;/em&gt;&lt;/strong&gt; class where instead of calling the (Simulated)LDAPProvider, we simply inspect the claims collection in the current principal:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WindowsAzureGuidanceFirstversionofaExpen_AD0E/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WindowsAzureGuidanceFirstversionofaExpen_AD0E/image_thumb.png" width="640" height="272" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;#4&lt;/strong&gt; requires “claims enabling” a-Expense. Look inside the web.config for all extra config sections added by WIF:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WindowsAzureGuidanceFirstversionofaExpen_AD0E/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WindowsAzureGuidanceFirstversionofaExpen_AD0E/image_thumb_1.png" width="640" height="50" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;It also requires a valid “Issuer” of claims. We have included a “Simulated” Issuer that creates the token we need. You’ll find this as part of the solution:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WindowsAzureGuidanceFirstversionofaExpen_AD0E/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WindowsAzureGuidanceFirstversionofaExpen_AD0E/image_thumb_2.png" width="575" height="480" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;And of course in the application configuration:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WindowsAzureGuidanceFirstversionofaExpen_AD0E/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WindowsAzureGuidanceFirstversionofaExpen_AD0E/image_thumb_3.png" width="640" height="123" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;We are also using a WIF configuration that is “web farm friendly”. Check the &lt;strong&gt;global.asax&lt;/strong&gt; file for details. Here’s a note on the Claims Guide hat talks about it:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WindowsAzureGuidanceFirstversionofaExpen_AD0E/clip_image001_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WindowsAzureGuidanceFirstversionofaExpen_AD0E/clip_image001_thumb.jpg" width="447" height="259" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;#5&lt;/strong&gt; is also rather simple. Because we are using EntLib blocks, we just defined the right trace listener:     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WindowsAzureGuidanceFirstversionofaExpen_AD0E/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WindowsAzureGuidanceFirstversionofaExpen_AD0E/image_thumb_4.png" width="640" height="111" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The complement to this is a new class in the project (WebRole) where all the initialization happens:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WindowsAzureGuidanceFirstversionofaExpen_AD0E/image_12.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WindowsAzureGuidanceFirstversionofaExpen_AD0E/image_thumb_5.png" width="640" height="223" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;#6&lt;/strong&gt; is just a bunch of PowerShell scripts. We are using the &lt;a href="http://code.msdn.microsoft.com/azurecmdlets"&gt;Azure CmdLets&lt;/a&gt; built by &lt;a href="http://dunnry.com/blog/"&gt;Ryan’s&lt;/a&gt; team which are great! These hide us all the underlying details of the Windows Azure Management API.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Some lessons learned&lt;/strong&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Request information to Azure Mgmt API is case sensitive. We spent quite some time with a silly bug that was just misspelling “a&lt;strong&gt;E&lt;/strong&gt;xpense” (it should have been “a&lt;strong&gt;e&lt;/strong&gt;xpense”). You don’t get a very insightful error message (“Invalid request”). &lt;/li&gt;    &lt;li&gt;As expected, it is a good practice to polish as much as possible on the local development environment before uploading the application to the cloud. You can also test portions online and on-premises (for example: your website can run on the dev fabric, and connect to SQL Azure). We are still working on the details and recommendations. &lt;/li&gt;    &lt;li&gt;“Deployment stuck”: sometimes there’s something wrong in the package that prevents the app to start. For example, a missing assembly. The symptom is that the deployment never starts and no errors are reported. This is because the startup of the app fails before diagnostics is initialized. &lt;/li&gt;    &lt;li&gt;Use of the API for deployments also allows us to share access to our Windows Azure environment without sharing the (single) LiveID account. Remember the API is protected with a set of certificates that can be individually distributed and revoked. &lt;/li&gt; &lt;/ol&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9983968" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Architecture/">Architecture</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Azure+Services+Platform/">Azure Services Platform</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Azure/">Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/patterns+_2600_+practices/">patterns &amp; practices</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SQL+Azure/">SQL Azure</category></item><item><title>Windows Azure Guidance – a-Expense “before” on CodePlex</title><link>http://blogs.msdn.com/b/eugeniop/archive/2010/03/15/windows-azure-guidance-a-expense-before-on-codeplex.aspx</link><pubDate>Tue, 16 Mar 2010 03:37:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9979207</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9979207</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9979207</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2010/03/15/windows-azure-guidance-a-expense-before-on-codeplex.aspx#comments</comments><description>&lt;p&gt;First build of our samples is now available on &lt;a href="http://wag.codeplex.com"&gt;CodePlex&lt;/a&gt;. This initial version is the “before the cloud” baseline application, so you won’t find anything related to Windows Azure here. &lt;/p&gt;  &lt;p&gt;This week we will take this simple baseline and start moving it to the cloud.&lt;/p&gt;  &lt;p&gt;Goals for this next iteration are to:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Claims-enable the application to keep SSO experience for users. We will use WIF for this.&lt;/li&gt;    &lt;li&gt;Remove dependency with AD for querying the user Manager and Cost Center. This will be done by sending this information as claims as opposed to having the application querying AD. We want to avoid having to call back into Adatum from a-Expense. &lt;/li&gt;    &lt;li&gt;Deploy an Identity Provider on Adatum (e.g ADFS). This is the issuer of security tokens for a-Expense. It will be configured to issue the claim set a-Expense needs (e.g. employee, Cost Center, employee manager) &lt;/li&gt;    &lt;li&gt;Move database to SQL Azure. This is straight forward. We may add some connection retry logic to the data access layer to increase resiliency. But it should “just work”.&lt;/li&gt;    &lt;li&gt;Move the Profile storage to Azure Table storage. This database is fairly small and has a simple data model. There’s really no need for full relational support.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;How it works:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;John @ Adatum opens the browser from his domain joined machine (he’d be already authenticated against AD)&lt;/li&gt;    &lt;li&gt;John browses a-Expense (hosted on Azure)&lt;/li&gt;    &lt;li&gt;Since there’s no session yet between a-Expense and John, a-Expense will redirect him to the configured trusted claims issuer (in this case Adatum’s ADFS)&lt;/li&gt;    &lt;li&gt;ADFS authenticates John (using the Kerberos ticket in John obtained at logon) and issues a token including: John’s name, his manager name (e.g. Mary) and the Cost center he belongs to.&lt;/li&gt;    &lt;li&gt;John’s browser posts this information back to a-Expense where WIF parses the token, validates it and creates an &lt;em&gt;IClaimsPrincipal&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;John’s preferences (e.g. the reimbursement method) are retrieved from his profile. There are no changes to the application as it is using the contract of ASP.NET Profile provider.&lt;/li&gt;    &lt;li&gt;Any exceptions are logged to Windows Azure diagnostics. Again, no changes to application as it was using EntLib for this. It just requires a configuration update. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;In a nutshell:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/AzureGuidanceaExpensewalkthrough_F5AF/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/AzureGuidanceaExpensewalkthrough_F5AF/image_thumb.png" width="640" height="300" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;We are trying to keep things as simple as possible. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9979207" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Architecture/">Architecture</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Azure/">Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/patterns+_2600_+practices/">patterns &amp; practices</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/a_2D00_Expense/">a-Expense</category></item><item><title>A Guide to Claims based Identity – Released - The strategy behind it and our plans</title><link>http://blogs.msdn.com/b/eugeniop/archive/2010/03/08/a-guide-to-claims-based-identity-released-the-strategy-behind-it-and-our-plans.aspx</link><pubDate>Tue, 09 Mar 2010 00:01:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9975173</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9975173</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9975173</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2010/03/08/a-guide-to-claims-based-identity-released-the-strategy-behind-it-and-our-plans.aspx#comments</comments><description>&lt;p&gt;As most of you know, the &lt;a href="http://msdn.microsoft.com/en-us/library/ff423674.aspx"&gt;Guide for Claims based Identity&lt;/a&gt; is officially released. We’ve been “technically done” for a couple months, but it just takes some time for all content to be pushed to MSDN, an ISBN to approved, the final PDF to be ready for publishing and the process with the printer to be started. &lt;/p&gt;  &lt;p&gt;So now that this is done I wanted to take an opportunity to share with you the reasons we invested on this guide and our plans moving forward.&lt;/p&gt;  &lt;p&gt;There should be little doubt that Microsoft is betting heavily on “the cloud”. We knew this for quite a bit, way before Windows Azure was even called that. So one key question we asked ourselves at that time: what can we do &lt;em&gt;today&lt;/em&gt; to help customers prepare for that? And “today” is a very important constraint. Back in June 2009, we knew Azure was coming, but features and implementation details were constantly changing. Investing on Azure specifics, would not have been wise; as the shelf-life of our deliverables would have been very short.&lt;/p&gt;  &lt;p&gt;Looking at various scenarios for application development, it became quite clear to us that identity management was pretty basic thing that you had to get it right before considering serious development on the cloud. Especially if you are a company with quite a bit of on-premises investments considering moving some of those to the cloud. And this is a big segment of our customers.&lt;/p&gt;  &lt;p&gt;So you take this, you add the fact that key technologies were in the last phase of being released (e.g. WIF and ADFS) and you now see why writing a guide on claims based identity made sense to me…It’d be small, simple deliverable, but a key stepping stone to our work on the cloud.&lt;/p&gt;  &lt;p&gt;But there’re always tradeoffs. And the compromise was not to ship anything targeting Azure in 2009. Many questioned this and asked me: why aren’t you doing anything for this key platform? claims? identity? single-sign-on? WTF?&lt;/p&gt;  &lt;p&gt;In retrospective I’m very happy of my decision and investment proposal. The jury is out on the guide itself of course, but here are some proof-points on the rationale for writing it:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This year’s &lt;a href="http://www.rsaconference.com/2010/usa/index.htm"&gt;RSA conference&lt;/a&gt; in San Francisco was about . . . the cloud. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;During his keynote, Scott Charney (our own CVP Trustworthy Computing), said:&lt;/p&gt;    &lt;p&gt;&lt;i&gt;“…&lt;b&gt;identity&lt;/b&gt; is so important in the context of the internet generally. It actually becomes &lt;b&gt;an amplified issue in the cloud&lt;/b&gt;. It gets its own place in the stack…”&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://travisspencer.com/"&gt;Travis Spencer&lt;/a&gt;, security expert (who we were very lucky to have as a reviewer for our guide), commented on the RSA conference:&lt;/p&gt;    &lt;p&gt;&lt;i&gt;…&lt;b&gt;identity&lt;/b&gt; is going to be a fundamental obstacle that we must overcome.&amp;#160; Including wording on his slides, Charney said identity over 25 times in his short address.&amp;#160; Microsoft, all the other speakers, and myself believe that &lt;strong&gt;identity is key in the adoption of cloud computing&lt;/strong&gt; which is the future of all organizations… &lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;And this is from Art Coviello (Executive Vice President, EMC Corporation and President, RSA, The Security Division of EMC)&lt;/p&gt;    &lt;p&gt;&lt;i&gt;…enterprises [will] start to outsource their infrastructures to external service providers. But you won't want any part of that unless service&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;providers can demonstrate their ability to effectively enforce policy, prove compliance and manage multi- tenancy. At this stage, &lt;b&gt;federation becomes an important capability&lt;/b&gt;.&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;Organizations will &lt;b&gt;need&lt;/b&gt; the ability to dictate and &lt;b&gt;federate identity&lt;/b&gt; and policy to their service providers on how information is accessed and handled.&lt;/i&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Hey, even “amplified” was a word I used back then :-).&lt;/p&gt;  &lt;p&gt;These are just a couple of examples that are very much in line with our strategy in delivering this guide: a required step towards cloud guidance.&lt;/p&gt;  &lt;p&gt;Which brings me to the next topic: our plans for the next months.&lt;/p&gt;  &lt;p&gt;Scott, our Dev Lead, has written &lt;a href="http://scottdensmore.typepad.com/blog/2010/02/getting-our-heads-in-the-cloud.html"&gt;an excellent summary&lt;/a&gt;, so I won’t bore you with different words and same meaning. We just started this project, again with a world class team and extended reviewers. What’s important to highlight though, is that in tune with the cloud’s agility, we are aiming at smaller pieces of content available more often. &lt;/p&gt;  &lt;p&gt;My next posts will be about the scenarios, challenges and topics we want to cover. As usual, we’d live your input.&lt;/p&gt;  &lt;p&gt;I very much look forward to working on this project and to getting your feedback so we can help you be more successful.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9975173" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Azure+Services+Platform/">Azure Services Platform</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Azure/">Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Geneva/">Geneva</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/patterns+_2600_+practices/">patterns &amp; practices</category></item><item><title>Just Released – Claims-Identity Guide online</title><link>http://blogs.msdn.com/b/eugeniop/archive/2010/01/29/just-released-claims-identity-guide-online.aspx</link><pubDate>Fri, 29 Jan 2010 20:12:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9955485</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9955485</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9955485</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2010/01/29/just-released-claims-identity-guide-online.aspx#comments</comments><description>&lt;p&gt;The entire book is now available for browsing online on MSDN here: &lt;a title="http://msdn.microsoft.com/en-us/library/ff359115%28lightweight%29.aspx" href="http://msdn.microsoft.com/en-us/library/ff359115%28lightweight%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/ff359115%28lightweight%29.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, to be honest, it doesn’t look as nice as the printed book (small preview here):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/JustReleasedClaimsIdentityGuideonline_A14A/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/JustReleasedClaimsIdentityGuideonline_A14A/image_thumb_2.png" width="526" height="323" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;But everything is in there! (and doesn’t look that bad at all either, it’s just I really like the printed version :-) ).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;strong&gt;What’s in there?&lt;/strong&gt;&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/JustReleasedClaimsIdentityGuideonline_A14A/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/JustReleasedClaimsIdentityGuideonline_A14A/image_thumb_1.png" width="530" height="480" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If you are new to identity federation, reading the &lt;a href="http://msdn.microsoft.com/en-us/library/ff359103.aspx"&gt;Preface&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/ff359101.aspx"&gt;Introduction to Claims&lt;/a&gt; are strongly recommended before diving into any of the scenarios. &lt;a href="http://msdn.microsoft.com/en-us/library/ff359108.aspx"&gt;Claim Based Architectures&lt;/a&gt; is optional, but a good read anyway to understand the underlying protocols and how WIF works.&lt;/p&gt;  &lt;p&gt;Here’s a quick map of the technologies covered in each of the following chapters:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="726"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="264"&gt;         &lt;p align="center"&gt;&lt;strong&gt;Chapter&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="247"&gt;         &lt;p align="center"&gt;&lt;strong&gt;Technologies&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="213"&gt;         &lt;p align="center"&gt;&lt;strong&gt;Topics&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="264"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff359102.aspx"&gt;Web Single-Sign On&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="248"&gt;ASP.NET WebForms &lt;/td&gt;        &lt;td valign="top" width="213"&gt;         &lt;ul&gt;           &lt;li&gt;Single company SSO.&lt;/li&gt;            &lt;li&gt;Using WIF on WebForms based applications.&lt;/li&gt;            &lt;li&gt;”Before” and “after” scenario.&lt;/li&gt;            &lt;li&gt;Using claims for user profile information.&lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="263"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff359102.aspx"&gt;Windows Azure&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="248"&gt;ASP.NET WebForms on Azure&lt;/td&gt;        &lt;td valign="top" width="213"&gt;         &lt;ul&gt;           &lt;li&gt;Hosting a claims-aware application on Windows Azure.&lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="263"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff359110.aspx"&gt;Federation&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="248"&gt;ASP.NET WebForms&lt;/td&gt;        &lt;td valign="top" width="213"&gt;         &lt;ul&gt;           &lt;li&gt;SSO across security realms.&lt;/li&gt;            &lt;li&gt;Simple Home Realm Discovery.&lt;/li&gt;            &lt;li&gt;Federation Provider (R-STS).&lt;/li&gt;            &lt;li&gt;Claims transformation.&lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="263"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff359113.aspx"&gt;Web Services&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="248"&gt;WCF, WPF&lt;/td&gt;        &lt;td valign="top" width="213"&gt;         &lt;ul&gt;           &lt;li&gt;Federation across security-realms with “Active clients” using WCF bindings.&lt;/li&gt;            &lt;li&gt;Claims transformation.&lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="263"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff359105.aspx"&gt;Federation with Multiple Partners&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="270"&gt;ASP.NET MVC&lt;/td&gt;        &lt;td valign="top" width="213"&gt;         &lt;ul&gt;           &lt;li&gt;Using WIF on MVC applications.&lt;/li&gt;            &lt;li&gt;More advanced Home Realm Discovery.&lt;/li&gt;            &lt;li&gt;Managing multiple trust relationships.&lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;We also have a couple of &lt;a href="http://msdn.microsoft.com/en-us/library/ff359122.aspx"&gt;Appendices&lt;/a&gt; for more details on relevant protocols, certificates, etc. Worth reading if you are interested in the lower level details and the what happens “under the hood”.&lt;/p&gt;  &lt;p&gt;All sample code is available for download &lt;a href="http://claimsid.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37515"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;if you have any feedback, which is &lt;u&gt;&lt;em&gt;always very welcome&lt;/em&gt;&lt;/u&gt;, please join us in our &lt;a href="http://claimsid.codeplex.com/Thread/List.aspx"&gt;discussion board&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9955485" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federation+Provider/">Federation Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Geneva/">Geneva</category></item><item><title>ADFS / WIF on Amazon EC2</title><link>http://blogs.msdn.com/b/eugeniop/archive/2010/01/12/adfs-wif-on-amazon-ec2.aspx</link><pubDate>Wed, 13 Jan 2010 04:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9947533</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9947533</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9947533</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2010/01/12/adfs-wif-on-amazon-ec2.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://stvrly.wordpress.com/2010/01/06/windows-server-2008-adfs-and-amazon-ec2/" mce_href="http://stvrly.wordpress.com/2010/01/06/windows-server-2008-adfs-and-amazon-ec2/"&gt;Steve Riley’s post&lt;/a&gt; on growing interest from Amazon customers on identity federation is consistent with what I hear from our own customers. &lt;/p&gt;  &lt;p&gt;As part of &lt;a href="http://claimsid.codeplex.com/" mce_href="http://claimsid.codeplex.com/"&gt;our project&lt;/a&gt;, we actually tested the two scenarios he describes on EC2:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;i&gt;“I imagine most scenarios involve applications on Amazon EC2 instances obtaining tokens from an ADFS server located inside your corporate network. This makes sense when your users are in your own domains and the applications running on Amazon EC2 are yours.”&lt;/i&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This would be exactly Scenario #1 in the guide, hosting a-Expense sample on EC2:&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ADFSWIFonAmazonEC2_123FE/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ADFSWIFonAmazonEC2_123FE/image_2.png"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ADFSWIFonAmazonEC2_123FE/image_thumb.png" style="border: 0px none ; display: inline;" title="image" alt="image" mce_src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ADFSWIFonAmazonEC2_123FE/image_thumb.png" width="640" border="0" height="241"&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The guide covers a similar deployment on Windows Azure.&amp;nbsp; &lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;i&gt;“Another scenario involves a forest living entirely inside Amazon EC2. Imagine you’ve created the next killer SaaS app. As customers sign up, you’d like to let them use their own corpnet credentials rather than bother with creating dedicated logons (your customers will love you for this). You’d create an application domain in which you’d deploy your application, configured to trust tokens only from the application’s ADFS. Your customers would configure their ADFS servers to issue tokens not for your application but for your application domain ADFS, which in turn issues tokens to your application. Signing up new customers is now much easier.”&lt;/i&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;And this is exactly what we cover in the chapter “Federation with Multiple Partners” with Fabrikam Shipping sample:&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ADFSWIFonAmazonEC2_123FE/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ADFSWIFonAmazonEC2_123FE/image_4.png"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ADFSWIFonAmazonEC2_123FE/image_thumb_1.png" style="border: 0px none ; display: inline;" title="image" alt="image" mce_src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ADFSWIFonAmazonEC2_123FE/image_thumb_1.png" width="640" border="0" height="404"&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;Note: You could implement all these with ADFS v1 and Windows Server 2003. But now that Amazon support Win2008, you can deploy ADFS v2 so the story is even better.&lt;/p&gt;  &lt;p&gt;In both cases, if the IP (the ADFS server in each company) is exposed to the internet, then users will also have easy access to EC2 hosted systems using the same corporate credentials.&lt;/p&gt;  &lt;p&gt;The bottom line is that with ADFS &amp;amp; WIF it is very easy to enable a seamless login experience for your applications, regardless of where they are actually hosted. What’s the catch? Well, your app has to be “claims aware”. If you are application uses say, Windows integrated security, then you need to either:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;1- Convert it so it understands claims.&lt;/p&gt;    &lt;p&gt;2- Leave it on your premises.&lt;/p&gt;    &lt;p&gt;3- Host it in an environment that supports the required network protocols. Typically, you need a VPN between the 2 datacenters (yours and the hoster’s). &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;#1 depends on your application architecture. The first scenario of the guide examines a simple “before and after”. For #3, you can use Amazon’s Virtual Private Cloud service, albeit at a much higher cost.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Update&lt;/b&gt;: fixed typos. Added link to David Chappell's &lt;a href="http://download.microsoft.com/download/6/C/2/6C2DBA25-C4D3-474B-8977-E7D296FBFE71/EC2-Windows%20SSO%20v1%200--Chappell.pdf" mce_href="http://download.microsoft.com/download/6/C/2/6C2DBA25-C4D3-474B-8977-E7D296FBFE71/EC2-Windows%20SSO%20v1%200--Chappell.pdf"&gt;whitepaper&lt;/a&gt;. &lt;br&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9947533" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/S_2B00_S/">S+S</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Ientity/">Federated Ientity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Geneva/">Geneva</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Amazon+EC2/">Amazon EC2</category></item><item><title>Updated code samples &amp; chapters for Claims Identity Guide – Release Candidate</title><link>http://blogs.msdn.com/b/eugeniop/archive/2009/12/21/updated-code-samples-chapters-for-claims-identity-guide-release-candidate.aspx</link><pubDate>Mon, 21 Dec 2009 23:12:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9939842</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9939842</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9939842</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2009/12/21/updated-code-samples-chapters-for-claims-identity-guide-release-candidate.aspx#comments</comments><description>&lt;p&gt;In synch with the availability of &lt;a href="http://blogs.msdn.com/card/archive/2009/12/18/announcing-the-ad-fs-2-0-release-candidate-and-more.aspx"&gt;ADFS V2.0 Release Candidate&lt;/a&gt;, I’m very happy to announce that we are posting a &lt;a href="http://claimsid.codeplex.com/"&gt;new update&lt;/a&gt; of the guide. Our own “RC”. &lt;/p&gt;  &lt;p&gt;You’ll find new samples and new chapters. Both content complete now.&lt;/p&gt;  &lt;p&gt;We are now covering the following scenarios:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Single Sign on for web applications:&lt;/strong&gt; one company, 2 applications, before and after claims &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Windows Azure&lt;/strong&gt;: an extension of scenario 1, this shows how to host a web application in Windows Azure and keeping SSO experience. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Simple federation sample&lt;/strong&gt;: 2 companies collaborating. SSO across different security realms. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Federation with multiple partners:&lt;/strong&gt; demonstrates an application with multiple federation relationships. It also shows WIF and MVC. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Web Services:&lt;/strong&gt; this is essentially scenario #3, but using WCF and a WPF smart client. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The samples are packaged now as a self-extractable zip file and includes a dependency checking tool that will help you identify, install and configure all pre-requisites:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedcodesampleschaptersforClaimsIdent_10B31/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedcodesampleschaptersforClaimsIdent_10B31/image_thumb.png" width="463" height="480" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Note: the tool is not yet signed, you will need to first run &lt;em&gt;Set-ExecutionPolicy RemoteSigned &lt;/em&gt;in PowerShell.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The documents cover all scenarios listed above, in addition to the introductory chapters which are a must read if you are new to the world of claims. We have also included four appendices on various common subjects (e.g. certificates usage, detailed message exchange between clients and relaying parties, standards used, etc).&lt;/p&gt;  &lt;p&gt;Please bear in mind, that these documents are not formatted to the final layout. That’s something we’ll do at the end of the project. However, the content is complete and we expect only minor changes and fixes to happen from now on.&lt;/p&gt;  &lt;p&gt;I want to thank my team for all their hard work, and all external reviewers and advisors for all their feedback!&lt;/p&gt;  &lt;p&gt;I hope you enjoy this guide!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Link to download: &lt;a title="http://claimsid.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37515" href="http://claimsid.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37515"&gt;http://claimsid.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37515&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9939842" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federation+Provider/">Federation Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category></item><item><title>RIA Services and WIF – Part II</title><link>http://blogs.msdn.com/b/eugeniop/archive/2009/11/25/ria-services-and-wif-part-ii.aspx</link><pubDate>Wed, 25 Nov 2009 18:26:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9928701</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9928701</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9928701</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2009/11/25/ria-services-and-wif-part-ii.aspx#comments</comments><description>&lt;p&gt;As promised in &lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/11/22/updated-ria-and-wif-samples.aspx"&gt;my previous post&lt;/a&gt;, here’s the second part of my findings playing with WIF and RIA Services beta. This time, I used the HRApp sample available &lt;a href="http://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=2387"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The initial steps are essentially the same I described before:&lt;/p&gt; &lt;p&gt;1- Installed the sample and make sure it runs&lt;/p&gt; &lt;p&gt;2- Ran “&lt;strong&gt;FedUtil&lt;/strong&gt;” which:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;a- Created an STS and added it to the solution. &lt;/p&gt; &lt;p&gt;b- Change the application &lt;strong&gt;web.config&lt;/strong&gt; with necessary settings for WIF (added modules, added federation information, etc)&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;3- F5 and voila. It just works:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandWIFPartII_5A28/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandWIFPartII_5A28/image_thumb.png" width="640" height="471"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandWIFPartII_5A28/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandWIFPartII_5A28/image_thumb_2.png" width="633" height="516"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;My next step was to make a few modifications to:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;1- Transfer “Roles” information to the UI. I&amp;nbsp; wanted that information to be available on the Silverlight app and eventually drive UI behavior based on that.&lt;/p&gt; &lt;p&gt;2- Add finer grained Authorization logic to the service. For example, I wanted not only authenticated users to approve sabbaticals, but only those who are “Managers”&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;More good news! It turns out this is very easy to implement:&lt;/p&gt; &lt;p&gt;For #1, I simply used the same technique I used in &lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/10/09/ria-services-and-windows-identity-foundation-claims-enabling-a-ria-application.aspx"&gt;my original prototype&lt;/a&gt; (adding a RoleProvider that inspects the Role claims):&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public override string&lt;/span&gt;[] GetRolesForUser(&lt;span style="color: blue"&gt;string &lt;/span&gt;username)
{
    &lt;span style="color: blue"&gt;var &lt;/span&gt;id = &lt;span style="color: #2b91af"&gt;HttpContext&lt;/span&gt;.Current.User.Identity &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IClaimsIdentity&lt;/span&gt;;
    &lt;span style="color: blue"&gt;return &lt;/span&gt;(&lt;span style="color: blue"&gt;from &lt;/span&gt;c &lt;span style="color: blue"&gt;in &lt;/span&gt;id.Claims
            &lt;span style="color: blue"&gt;where &lt;/span&gt;c.ClaimType == &lt;span style="color: #2b91af"&gt;ClaimTypes&lt;/span&gt;.Role
            &lt;span style="color: blue"&gt;select &lt;/span&gt;c.Value).ToArray();
}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note: in RIA Services beta, “RiaContext” has been replaced by “WebContext”. So instead of using: &lt;strong&gt;&lt;em&gt;RiaContext.Current.User.Roles&lt;/em&gt;&lt;/strong&gt; you use: &lt;strong&gt;&lt;em&gt;WebContext.Current.User.Roles&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The second requirement is even easier. RIA Services ships with a built in attribute you can use to decorate a method in your service: &lt;strong&gt;&lt;em&gt;RequiresRoleAttribute&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;So, I simply replaced “&lt;strong&gt;&lt;em&gt;RequiresAuthentication&lt;/em&gt;&lt;/strong&gt;” in the original sample for:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="code"&gt;[&lt;span style="color: #2b91af"&gt;RequiresRole&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Manager"&lt;/span&gt;)]
&lt;span style="color: blue"&gt;public void &lt;/span&gt;ApproveSabbatical(&lt;span style="color: #2b91af"&gt;Employee &lt;/span&gt;current)
{
    &lt;span style="color: green"&gt;// Start custom workflow here
    &lt;/span&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;(current.EntityState == &lt;span style="color: #2b91af"&gt;EntityState&lt;/span&gt;.Detached)
    {
        &lt;span style="color: blue"&gt;this&lt;/span&gt;.ObjectContext.Attach(current);
    }
    current.CurrentFlag = &lt;span style="color: blue"&gt;false&lt;/span&gt;;
}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;The STS that FedUtil created for me, adds this claim to the token when I authenticate (see inside &lt;strong&gt;&lt;em&gt;GetOutputIdentityClaims&lt;/em&gt;&lt;/strong&gt; method in &lt;strong&gt;&lt;em&gt;CustomSecurityTokenService.cs&lt;/em&gt;&lt;/strong&gt;):&lt;/p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;pre class="code"&gt;
    &lt;span style="color: #2b91af"&gt;ClaimsIdentity &lt;/span&gt;outputIdentity = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ClaimsIdentity&lt;/span&gt;();

    &lt;span style="color: green"&gt;// Issue custom claims.
    // TODO: Change the claims below to issue custom claims required by your application.
    // Update the application's configuration file too to reflect new claims requirement.

    &lt;/span&gt;outputIdentity.Claims.Add( &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Claim&lt;/span&gt;( System.IdentityModel.Claims.&lt;span style="color: #2b91af"&gt;ClaimTypes&lt;/span&gt;.Name, principal.Identity.Name ) );
    outputIdentity.Claims.Add( &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Claim&lt;/span&gt;( &lt;span style="color: #2b91af"&gt;ClaimTypes&lt;/span&gt;.Role, &lt;span style="color: #a31515"&gt;"Manager" &lt;/span&gt;) );&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If now I change “Manager” for “Employee”, RIA will raise an “Access Denied” exception:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandWIFPartII_5A28/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandWIFPartII_5A28/image_thumb_3.png" width="360" height="480"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This works for Roles, but what if you wanted to express access rules based on other claim types (repeat after me: Roles are Claims, Claims are not Roles)? Let’s say, you have to be in a “Manager” role working in the “HR” group to approve sabbaticals:&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="code"&gt;[&lt;span style="color: #2b91af"&gt;RequiresRole&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Manager"&lt;/span&gt;)]
[&lt;span style="color: #2b91af"&gt;RequiresGroupMembership&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"HR"&lt;/span&gt;)]
&lt;span style="color: blue"&gt;public void &lt;/span&gt;ApproveSabbatical(&lt;span style="color: #2b91af"&gt;Employee &lt;/span&gt;current)
&lt;/pre&gt;
&lt;p&gt;All you need to do is create a &lt;strong&gt;&lt;em&gt;RequiresGroupMembershipAttribute&lt;/em&gt;&lt;/strong&gt; and inspect the claim set for presence of a claim of type “Group” with value “HR”:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;RequiresGroupMembershipAttribute &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;AuthorizationAttribute
&lt;/span&gt;{
    &lt;span style="color: blue"&gt;public string &lt;/span&gt;requiredGroup;
 
    &lt;span style="color: blue"&gt;public &lt;/span&gt;RequiresGroupMembershipAttribute(&lt;span style="color: blue"&gt;string &lt;/span&gt;group)
    {
        &lt;span style="color: blue"&gt;this&lt;/span&gt;.requiredGroup = group;
    }

    &lt;span style="color: blue"&gt;public override bool &lt;/span&gt;Authorize(&lt;span style="color: #2b91af"&gt;IPrincipal &lt;/span&gt;principal)
    {
        &lt;span style="color: blue"&gt;var &lt;/span&gt;identity = ((principal &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IClaimsPrincipal&lt;/span&gt;).Identity &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IClaimsIdentity&lt;/span&gt;);
        &lt;span style="color: blue"&gt;return &lt;/span&gt;identity.Claims.Exists(c =&amp;gt; c.ClaimType == &lt;span style="color: #a31515"&gt;"http://hrapp/Org/Groups" &lt;/span&gt;&amp;amp;&amp;amp; 
                                                 c.Value == requiredGroup);
        
    }
}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and add the claim to the STS:&lt;/p&gt;&lt;pre class="code"&gt;outputIdentity.Claims.Add( &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Claim&lt;/span&gt;( System.IdentityModel.Claims.&lt;span style="color: #2b91af"&gt;ClaimTypes&lt;/span&gt;.Name, principal.Identity.Name ) );
outputIdentity.Claims.Add( &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Claim&lt;/span&gt;( &lt;span style="color: #2b91af"&gt;ClaimTypes&lt;/span&gt;.Role, &lt;span style="color: #a31515"&gt;"Manager" &lt;/span&gt;) );
outputIdentity.Claims.Add( &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Claim&lt;/span&gt;( &lt;span style="color: #a31515"&gt;"http://hrapp/Org/Groups"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"HR"&lt;/span&gt;) );&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Of course you could refactor the above to accept &lt;em&gt;any&lt;/em&gt; claims, not just Groups or Roles. Something like:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;RequiresClaimAttribute &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;AuthorizationAttribute
&lt;/span&gt;{
    &lt;span style="color: blue"&gt;private string &lt;/span&gt;requiredClaimType;
    &lt;span style="color: blue"&gt;private string &lt;/span&gt;requiredClaimValue; 

    &lt;span style="color: blue"&gt;public &lt;/span&gt;RequiresClaimAttribute(&lt;span style="color: blue"&gt;string &lt;/span&gt;claimType, &lt;span style="color: blue"&gt;string &lt;/span&gt;value)
    {
        &lt;span style="color: blue"&gt;this&lt;/span&gt;.requiredClaimType = claimType;
        &lt;span style="color: blue"&gt;this&lt;/span&gt;.requiredClaimValue = value;
    }

    &lt;span style="color: blue"&gt;public override bool &lt;/span&gt;Authorize(&lt;span style="color: #2b91af"&gt;IPrincipal &lt;/span&gt;principal)
    {
        &lt;span style="color: blue"&gt;var &lt;/span&gt;identity = ((principal &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ClaimsPrincipal&lt;/span&gt;).Identity &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IClaimsIdentity&lt;/span&gt;);
        &lt;span style="color: blue"&gt;return &lt;/span&gt;identity.Claims.Exists(c =&amp;gt; c.ClaimType == requiredClaimType &amp;amp;&amp;amp; 
                                           c.Value == requiredClaimValue);
    }
}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and &lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;RequiresGroupMembershipAttribute &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;RequiresClaimAttribute
&lt;/span&gt;{
    &lt;span style="color: blue"&gt;public &lt;/span&gt;RequiresGroupMembershipAttribute(&lt;span style="color: blue"&gt;string &lt;/span&gt;group) : &lt;span style="color: blue"&gt;base&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"http://hrapp/Org/Groups"&lt;/span&gt;, group)
    {
    }
}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then, you could write:&lt;/p&gt;&lt;pre class="code"&gt;[&lt;span style="color: #2b91af"&gt;RequiresRole&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Manager"&lt;/span&gt;)]
[&lt;span style="color: #2b91af"&gt;RequiresGroupMembership&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"HR"&lt;/span&gt;)]
[&lt;span style="color: #2b91af"&gt;RequiresClaim&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"http://hrapp/Location"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"UK"&lt;/span&gt;)]
&lt;span style="color: blue"&gt;public void &lt;/span&gt;ApproveSabbatical(&lt;span style="color: #2b91af"&gt;Employee &lt;/span&gt;current)
  &lt;/pre&gt;&lt;pre class="code"&gt;&amp;nbsp;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt; Caveats: this is sample code, so I’ve not invested much in error handling, etc. This is “as is”.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9928701" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/RIA+Services/">RIA Services</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/RIA/">RIA</category></item><item><title>Updated RIA and WIF samples – Part I</title><link>http://blogs.msdn.com/b/eugeniop/archive/2009/11/22/updated-ria-and-wif-samples.aspx</link><pubDate>Sun, 22 Nov 2009 14:37:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9926927</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9926927</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9926927</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2009/11/22/updated-ria-and-wif-samples.aspx#comments</comments><description>&lt;p&gt;Some time ago, I &lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/10/09/ria-services-and-windows-identity-foundation-claims-enabling-a-ria-application.aspx"&gt;put together a simple demo&lt;/a&gt; integrating WIF in RIA Services. Now &lt;a href="http://blogs.msdn.com/brada/archive/2009/11/18/welcome-to-wcf-ria-services-beta.aspx"&gt;RIA is a Beta&lt;/a&gt; and there’s a lot of cool stuff in there. The good news from an identity perspective is that it just works :-).&lt;/p&gt;  &lt;p&gt;I’ve been playing a little bit with a couple of new samples and with the previous (updated) HRApp. The first one is the “CyclingClassifieds” you can download from &lt;a href="http://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=2400"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;The identity&amp;#160; architecture of the application is simple enough for a first exploration. Out of the box, it is configured for Windows integrated security, so if you run the sample it will simply recognize the user you are logged in as in your network. The app has an “auto-provisioning” feature that automatically registers external users into the application. There’s a stored procedure that will try to locate the user name in the database (Users table), and if it is not found, it will simply add a new record:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/image_thumb.png" width="640" height="312" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;“Claims-enabling” this app is simple, because authentication has already been factored out. The app as it is designed today&lt;u&gt; is not responsible for identifying its users&lt;/u&gt;. Something else does it for the application (Windows).&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;Steps:&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;1- First you need to install WIF and WIF SDK. We want the SDK to use the Visual Studio integrated tools.&lt;/p&gt;  &lt;p&gt;2- Make sure the app runs before any changes. One line of code you will need to change is in the &lt;strong&gt;&lt;em&gt;GetUserId&lt;/em&gt;&lt;/strong&gt; method of the &lt;strong&gt;&lt;em&gt;CyclingClassifiedsService:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/image_thumb_1.png" width="640" height="195" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;It is well explained in the comments in there.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;3- Next step is to change the configuration and “claims enable” the app. Right click on the web site and select “&lt;strong&gt;Add STS Reference&lt;/strong&gt;”:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/clip_image002_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/clip_image002_thumb.png" width="431" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;4- This will start FedUtil wizard:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/clip_image004_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/clip_image004_thumb.png" width="640" height="464" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Because this app is very simple and only requires authentication really (there are no roles or any other claims that will be used here), simply select all defaults. &lt;/p&gt;  &lt;p&gt;On the second screen, you have multiple options on which &lt;strong&gt;&lt;em&gt;Issuer&lt;/em&gt;&lt;/strong&gt; to use. The &lt;strong&gt;&lt;em&gt;Issuer&lt;/em&gt;&lt;/strong&gt; is the system that will return Security Tokens (with all claims) to the application. The application will be configured to trust this Issuer. I selected “Create a new STS project in the current solution”, because I wanted the sample to remain self-contained. Of course you could have chosen a real issuer somewhere else (e.g. your ADFS, an existing development Issuer, etc).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/clip_image006_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/clip_image006_thumb.png" width="598" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;5- After all this is done, the solution will have an additional project. There’s some boilerplate code, but the heart of the issuer is the class &lt;b&gt;&lt;i&gt;CustomSecurityTokenService&lt;/i&gt;&lt;/b&gt;:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/clip_image008_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/clip_image008_thumb.png" width="633" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Fedutil will create a template with some default claims (search for &lt;b&gt;&lt;i&gt;GetOutputClaimsIdentity&lt;/i&gt;&lt;/b&gt; method). This is one place :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/clip_image010_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/clip_image010_thumb.png" width="640" height="263" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The web.config file will also be updated with new configuration settings. Very similar to what I explained in the previous post. (e.g. WIF modules, etc) &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;6- Compile and run the app. The first screen you will see is the Issuer login page:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/image_thumb_2.png" width="640" height="471" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;No password is really verified because this is a “fake” Issuer. Clicking submit, will initiate the process of issuing a token (essentially all under the &lt;strong&gt;&lt;em&gt;GetOutputClaimsIdentity&lt;/em&gt;&lt;/strong&gt; method) and redirection to the original site where the normal RIA app life cycle starts. A breakpoint in the AuthorizationService file will reveal “WIF magic” happening:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/image_thumb_3.png" width="644" height="306" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Notice that the type of the user identity is “ClaimsIdentity”. &lt;/p&gt;  &lt;p&gt;Finally:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/UpdatedRIAandWIFsamples_55B9/image_thumb_4.png" width="640" height="466" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;if you browse the contents of the &lt;strong&gt;&lt;em&gt;User&lt;/em&gt;&lt;/strong&gt; table you should now find a record for “Adam Carter” in it.&lt;/p&gt;  &lt;p&gt;I will now do the same for the HRApp and post my findings.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9926927" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/RIA+Services/">RIA Services</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/RIA/">RIA</category></item><item><title>WIF is RTM</title><link>http://blogs.msdn.com/b/eugeniop/archive/2009/11/17/wif-is-rtm.aspx</link><pubDate>Tue, 17 Nov 2009 20:54:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9923844</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9923844</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9923844</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2009/11/17/wif-is-rtm.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WIFisRTM_B57F/WIF_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="WIF" border="0" alt="WIF" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/WIFisRTM_B57F/WIF_thumb.jpg" width="392" height="74" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Windows Identity Foundation is here! Congrats to my colleagues shipping great Framework. &lt;/p&gt;  &lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/evalcenter/dd440951.aspx" href="http://msdn.microsoft.com/en-us/evalcenter/dd440951.aspx"&gt;http://msdn.microsoft.com/en-us/evalcenter/dd440951.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9923844" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Geneva/">Geneva</category></item><item><title>Claims based Identity Guide – New release and PDC goodness</title><link>http://blogs.msdn.com/b/eugeniop/archive/2009/11/14/claims-based-identity-guide-new-release-and-pdc-goodness.aspx</link><pubDate>Sat, 14 Nov 2009 15:25:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9922470</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9922470</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9922470</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2009/11/14/claims-based-identity-guide-new-release-and-pdc-goodness.aspx#comments</comments><description>&lt;p&gt;New updated chapters &amp;amp; samples are posted on &lt;a href="http://claimsid.codeplex.com/"&gt;CodePlex&lt;/a&gt;. The samples are all updated for &lt;a href="http://msdn.microsoft.com/en-us/evalcenter/dd440951.aspx"&gt;WIF RC&lt;/a&gt; and include new scenarios and technologies (e.g. web services with WCF and web sites with MVC). &lt;/p&gt;  &lt;p&gt;If you are going to &lt;a href="http://microsoftpdc.com/"&gt;PDC&lt;/a&gt;, lot’s of interesting things are happening there. Of all things, you will have a chance to see (and speak) to the faces behind the blogs: &lt;a href="http://blogs.msdn.com/vbertocci"&gt;Vittorio Bertocci&lt;/a&gt;, &lt;a href="http://blogs.southworks.net/mwoloski"&gt;Matias Woloski&lt;/a&gt;, &lt;a href="http://www.pluralsight.com/community/blogs/keith"&gt;Keith Brown&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;We have printed a limited amount of “preview” copies of the Guide. You can get them at Pluralsight’s (#441), patterns &amp;amp; practices and Identity booths.&lt;/p&gt;  &lt;p&gt;In addition to the “previews”, Pluralsight is giving away a ton of great content: (3) &lt;a href="http://www.zune.net/en-us/products/zunehd/default.htm"&gt;Zune HD&lt;/a&gt;s loaded with &lt;a href="http://www.pluralsight.com/main/olt/Courses.aspx"&gt;Pluralsight &lt;em&gt;On-Demand!&lt;/em&gt;&lt;/a&gt; content, &lt;a href="http://twitpic.com/gnuos"&gt;Pluralsight Cloud tag t-shirts&lt;/a&gt; &amp;amp; &lt;a href="http://twitpic.com/ibft1"&gt;1-week subscriptions&lt;/a&gt; to &lt;a href="http://www.pluralsight.com/main/olt/Courses.aspx"&gt;Pluralsight &lt;em&gt;On-Demand!&lt;/em&gt;&lt;/a&gt;. And, if &lt;a href="mailto:psmarketing@pluralsight.com"&gt;let them know&lt;/a&gt;, they will be hosting their first-ever annual Pluralsight Customer Appreciation Party. Invite required for entrance.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Sessions you don’t want to miss:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://microsoftpdc.com/Sessions/P09-21"&gt;Windows Identity Foundation Overview&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://microsoftpdc.com/Speakers/Vittorio-Bertocci"&gt;Vittorio Bertocci&lt;/a&gt; in 403AB on Wednesday at 11:30 AM&lt;/p&gt;  &lt;p&gt;   &lt;p&gt;&lt;a href="http://microsoftpdc.com/Sessions/P09-21/ICS"&gt;&lt;/a&gt;&lt;/p&gt; Hear how Windows Identity Foundation makes advanced identity capabilities and open standards first class citizens in the Microsoft .NET Framework. Learn how the Claims Based access model integrates …&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://microsoftpdc.com/Sessions/BOF103"&gt;&lt;font size="4"&gt;Claims-Based Identity&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://microsoftpdc.com/Speakers/Keith-Brown"&gt;Keith Brown&lt;/a&gt; in 309 on Thursday at 11:30 AM&lt;/p&gt;  &lt;p&gt;Are you interested in or currently building out applications that use claims-based identity? Come join others who are also working on similar systems and discuss your successes and pain points with …&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://microsoftpdc.com/Sessions/SVC10"&gt;&lt;font size="4"&gt;Software + Services Identity Roadmap Update&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://microsoftpdc.com/Speakers/Kim-Cameron"&gt;Kim Cameron&lt;/a&gt;, &lt;a href="http://microsoftpdc.com/Speakers/Dmitry-Sotnikov"&gt;Dmitry Sotnikov&lt;/a&gt; in Petree Hall D on Tuesday at 11:00 AM&lt;/p&gt;  &lt;p&gt;   &lt;p&gt;&lt;a href="http://microsoftpdc.com/Sessions/SVC10/ICS"&gt;&lt;/a&gt;&lt;/p&gt; At PDC 2008, Microsoft unveiled a comprehensive offering of identity software and services, based on the industry standard claims-based architecture, and designed to address the rapidly growing …&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h5&gt;&lt;a href="http://microsoftpdc.com/Sessions/SVC17"&gt;&lt;font size="4"&gt;Enabling Single Sign-On to Windows Azure Applications&lt;/font&gt;&lt;/a&gt;&lt;/h5&gt;  &lt;p&gt;&lt;a href="http://microsoftpdc.com/Speakers/Hervey-Wilson"&gt;Hervey Wilson&lt;/a&gt; in 403AB on Wednesday at 3:15 PM&lt;/p&gt;  &lt;p&gt;   &lt;p&gt;&lt;a href="http://microsoftpdc.com/Sessions/SVC17/ICS"&gt;&lt;/a&gt;&lt;/p&gt; Learn how the Windows Identity Foundation, Active Directory Federation Services 2.0, and the claims-based architecture can be used to provide a uniform programming model for identity and single …&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h5&gt;&lt;a href="http://microsoftpdc.com/Sessions/SVC26"&gt;&lt;font size="4"&gt;How Microsoft SharePoint 2010 was Built with the Windows Identity Foundation&lt;/font&gt;&lt;/a&gt;&lt;/h5&gt;  &lt;p&gt;&lt;a href="http://microsoftpdc.com/Speakers/Sesha-Mani"&gt;Sesha Mani&lt;/a&gt; in 403AB on Thursday at 3:00 PM&lt;/p&gt;  &lt;p&gt;   &lt;p&gt;&lt;a href="http://microsoftpdc.com/Sessions/SVC26/ICS"&gt;&lt;/a&gt;&lt;/p&gt; Explore how SharePoint 2010 has undergone a shift in identity and access control by adopting the claims-based object model offered by Windows Identity Foundation (WIF). Learn how SharePoint 2010 …&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h5&gt;&lt;a href="http://microsoftpdc.com/Sessions/PR11"&gt;&lt;font size="4"&gt;Leveraging and Extending Microsoft SharePoint Server 2010 Identity Features&lt;/font&gt;&lt;/a&gt;&lt;/h5&gt;  &lt;p&gt;&lt;a href="http://microsoftpdc.com/Speakers/Venky-Veeraraghavan"&gt;Venky Veeraraghavan&lt;/a&gt; in 403AB on Tuesday at 3:00 PM&lt;/p&gt;  &lt;p&gt;   &lt;p&gt;&lt;a href="http://microsoftpdc.com/Sessions/PR11/ICS"&gt;&lt;/a&gt;&lt;/p&gt; Get an architectural and programmatic overview of Claims based Identity implemented in SharePoint 2010 including how identity is dealt with at Sign-in and for service calls both within SharePoint and …&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Have a great time in L.A.!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9922470" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/S_2B00_S/">S+S</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Azure/">Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Geneva/">Geneva</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/PDC09/">PDC09</category></item><item><title>Claims based Identity &amp; Access Control Guide – Updated drafts &amp; samples available</title><link>http://blogs.msdn.com/b/eugeniop/archive/2009/10/20/claims-based-identity-access-control-guide-updated-drafts-samples-available.aspx</link><pubDate>Tue, 20 Oct 2009 19:28:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9910140</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9910140</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9910140</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2009/10/20/claims-based-identity-access-control-guide-updated-drafts-samples-available.aspx#comments</comments><description>&lt;p&gt;Yesterday, we uploaded a new release of the Guide and the samples. You can download the content from &lt;a href="http://claimsid.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=34687"&gt;here&lt;/a&gt;. (Note: if you downloaded them yesterday, you might want to check again. We mistakenly uploaded the samples with no docs. It is fixed now). &lt;/p&gt;  &lt;p&gt;You’ll find:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Updated introduction &amp;amp; WebSSO chapters, incorporating quite a bit of feedback &lt;/li&gt;    &lt;li&gt;New updated samples, including scenario #2 (Federation with Partners). This is inspired in &lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/08/24/next-station-federation-between-adatum-its-customers.aspx"&gt;this article&lt;/a&gt; I wrote some time ago.&amp;#160; &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;Getting started with the samples:&lt;/h2&gt;  &lt;p&gt;Just download the zip file, expand somewhere in your disk. There’s a &lt;strong&gt;readme.htm&lt;/strong&gt; with some very basic instructions and prerequisites.You’ll have to run &lt;strong&gt;StartHere.cmd&lt;/strong&gt; batch file with elevated privileges (this essentially installs necessary certificates). Open the solution (as admin), compile and run.&lt;/p&gt;  &lt;p&gt;Prerequisites haven’t changed:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Visual Studio 2008 &lt;/li&gt;    &lt;li&gt;IIS (for HTTPS) &lt;/li&gt;    &lt;li&gt;WIF &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;There are 2 scenarios folders now: scenario #1 (WebSSO), which is the same we published a couple of weeks ago. Then there’s the new one that shows federation between Adatum’s&lt;strong&gt;&lt;em&gt; a-Order&lt;/em&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;em&gt;Litware&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;The first time you open Visual Studio, it will create some new web sites for you.It might happen that those websites already exist from previous drop, you might want to delete them beforehand if you expand the files in a different location.&lt;/p&gt;  &lt;p&gt;Make sure the default app is “Litware Portal”:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ClaimsbasedIdentityAccessControlGuideUpd_F691/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ClaimsbasedIdentityAccessControlGuideUpd_F691/image_thumb_1.png" width="392" height="395" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This is the launching point for the application from Litware’s perspective.&lt;/p&gt;  &lt;p&gt;The major changes from the code in Scenario #1 is that now &lt;strong&gt;&lt;em&gt;Adatum.IdentityProvider&lt;/em&gt;&lt;/strong&gt; has been extended to other things, namely manage the trust relationship between Adatum and Litware. That’s why we now call it &lt;strong&gt;Adatum.Issuer&lt;/strong&gt;. This new functionality includes transforming claims issued by Litware into claims understood by a-Order. All this is happening in the &lt;strong&gt;FederationSecurityTokenService&lt;/strong&gt; class.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ClaimsbasedIdentityAccessControlGuideUpd_F691/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ClaimsbasedIdentityAccessControlGuideUpd_F691/image_thumb_2.png" width="392" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Adatum.Issuer is a “mock” STS and its implementation is no more and no less than what is strictly needed for the sample to work. In the real world you would replace it, as we did in our test Lab, with a real/production quality issuer such as ADFS v2.&lt;/p&gt;  &lt;p&gt;The transformation rules in our mock STS are trivial and are all implemented in the &lt;strong&gt;&lt;em&gt;GetOutputClaimsIdentity&lt;/em&gt;&lt;/strong&gt; method override:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;protected override &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IClaimsIdentity &lt;/span&gt;GetOutputClaimsIdentity(&lt;span style="color: #2b91af"&gt;IClaimsPrincipal &lt;/span&gt;principal, &lt;span style="color: #2b91af"&gt;RequestSecurityToken &lt;/span&gt;request, &lt;span style="color: #2b91af"&gt;Scope &lt;/span&gt;scope)
        {
            &lt;span style="color: blue"&gt;var &lt;/span&gt;outputIdentity = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ClaimsIdentity&lt;/span&gt;();

            &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;null &lt;/span&gt;== principal)
            {
                &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;InvalidRequestException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;The caller's principal is null.&amp;quot;&lt;/span&gt;);
            }

            &lt;span style="color: blue"&gt;var &lt;/span&gt;claimsIdentity = (&lt;span style="color: #2b91af"&gt;ClaimsIdentity&lt;/span&gt;) principal.Identity;
            &lt;span style="color: blue"&gt;var &lt;/span&gt;issuer = claimsIdentity.Claims.First().Issuer;

            &lt;span style="color: blue"&gt;switch &lt;/span&gt;(issuer)
            {
                &lt;span style="color: blue"&gt;case &lt;/span&gt;&lt;span style="color: #a31515"&gt;&amp;quot;litware&amp;quot;&lt;/span&gt;:
                    ProcessClaimsFromLitwareIssuer(claimsIdentity, outputIdentity);
                    &lt;span style="color: blue"&gt;break&lt;/span&gt;;
                &lt;span style="color: blue"&gt;default&lt;/span&gt;:
                    &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;InvalidOperationException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Issuer not trusted.&amp;quot;&lt;/span&gt;);
            }

            &lt;span style="color: blue"&gt;return &lt;/span&gt;outputIdentity;
        }&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;The samples contain a number of annotations and hints here and there to explain what is happening. Make sure you hover with the mouse over this little information icon to get extra context:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ClaimsbasedIdentityAccessControlGuideUpd_F691/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ClaimsbasedIdentityAccessControlGuideUpd_F691/image_thumb_3.png" width="402" height="326" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;This is still under development of course, so expect quite some changes. But we hope you’ll find it useful anyway. Feedback is very much welcome as always.&lt;/p&gt;

&lt;p&gt;Very special thanks to the following people for their extensive feedback and suggestions for this Guide:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/mszcool/default.aspx"&gt;Mario Szpuszta&lt;/a&gt;, &lt;a href="http://weblogs.asp.net/cibrax/"&gt;Pablo Cibraro&lt;/a&gt;, &lt;a href="http://travisspencer.com/"&gt;Travis Spencer&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/mariofontana/default.aspx"&gt;Mario Fontana&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/thehoggblog/"&gt;Jason Hogg&lt;/a&gt;, &lt;a href="http://www.dasblonde.net/"&gt;Michele Leroux Bustamante&lt;/a&gt;, &lt;a href="http://pfelix.wordpress.com/"&gt;Pedro Felix&lt;/a&gt;. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9910140" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Architecture/">Architecture</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/S_2B00_S/">S+S</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federation+Provider/">Federation Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Geneva/">Geneva</category></item><item><title>RIA Services and Windows Identity Foundation – Claims enabling a RIA application</title><link>http://blogs.msdn.com/b/eugeniop/archive/2009/10/09/ria-services-and-windows-identity-foundation-claims-enabling-a-ria-application.aspx</link><pubDate>Fri, 09 Oct 2009 20:35:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9905540</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9905540</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9905540</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2009/10/09/ria-services-and-windows-identity-foundation-claims-enabling-a-ria-application.aspx#comments</comments><description>&lt;p&gt;Recently a Customer asked me if an application using RIA Services could use WIF. I’m fairly new to RIA Services so I didn’t know the answer right away, however I suspected the integration should not be too hard, so I spend a couple of days spiking a solution.&lt;/p&gt;  &lt;p&gt;The good news: it just works!&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;What I did:&lt;/p&gt;  &lt;p&gt;I took one of the samples available from the RIA Services website (&lt;b&gt;&lt;i&gt;HRApp&lt;/i&gt;&lt;/b&gt;, you can download it here: &lt;a href="http://code.msdn.microsoft.com/RiaServices"&gt;http://code.msdn.microsoft.com/RiaServices&lt;/a&gt;, more specifically: &lt;a href="http://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=2387"&gt;http://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=2387&lt;/a&gt; ) &lt;/p&gt;  &lt;p&gt;After installing and verifying everything worked, I “claims enabled” it by running “FedUtil.exe”. I configured it to point to Adatum Issuer (exactly the same you can download from the Guide CodePlex site: &lt;a href="http://claimsid.codeplex.com"&gt;http://claimsid.codeplex.com&lt;/a&gt;). &lt;/p&gt;  &lt;p&gt;As expected, FedUtil changed a few setting in the app config file to enable claims: WIF modules were registered and the relationship with Adatum Issuer was established:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandClaims_9341/clip_image001_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandClaims_9341/clip_image001_thumb.jpg" width="640" height="201" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandClaims_9341/clip_image002_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandClaims_9341/clip_image002_thumb.jpg" width="640" height="97" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I then ran the application again and I was gladly surprised to be first redirected to the Issuer for authentication:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandClaims_9341/clip_image003_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image003" border="0" alt="clip_image003" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandClaims_9341/clip_image003_thumb.jpg" width="614" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you have installed the Guide samples, you are probably familiar with this screen and you know that it will issue a set of claims for a user “Mary” that includes 2 roles “Orders approvers”, “Employees”. When I click on “continue button”, claims are issued and sent to the RIA application where now I’m authenticated and recognized:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandClaims_9341/clip_image004_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandClaims_9341/clip_image004_thumb.jpg" width="618" height="542" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you break into the application (server side) and inspect the &lt;b&gt;&lt;i&gt;User&lt;/i&gt;&lt;/b&gt; object from the &lt;b&gt;&lt;i&gt;HttpContext&lt;/i&gt;&lt;/b&gt; you’ll notice there’s a “&lt;b&gt;&lt;i&gt;ClaimsIdentity&lt;/i&gt;&lt;/b&gt;” and you have access of course to the claims collection, etc. That is part of the “magic” performed by WIF modules:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandClaims_9341/clip_image005_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image005" border="0" alt="clip_image005" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandClaims_9341/clip_image005_thumb.jpg" width="584" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;On the Silverlight side, you can see that now the &lt;b&gt;&lt;i&gt;User&lt;/i&gt;&lt;/b&gt; object in the &lt;b&gt;&lt;i&gt;RiaContext&lt;/i&gt;&lt;/b&gt; also reflects the content obtained in the server side. This is thanks to some of the magic wiring RIA Services does for us:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandClaims_9341/clip_image006_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/RIAServicesandClaims_9341/clip_image006_thumb.jpg" width="640" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;RIA Services out of the box implementations rely on ASP.NET infrastructure. I didn’t want to change the sample app too much, so I created a very simple &lt;b&gt;&lt;i&gt;RoleProvider&lt;/i&gt;&lt;/b&gt; that would simply resolve &lt;em&gt;GetRolesForUser&lt;/em&gt; through the &lt;i&gt;ClaimsIdentity&lt;/i&gt;. Here’s the (only) method that I implemented from the &lt;b&gt;&lt;i&gt;RoleProvider&lt;/i&gt;&lt;/b&gt; base class:&lt;/p&gt;  &lt;p&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="color: blue"&gt;public override string&lt;/span&gt;[] GetRolesForUser(&lt;span style="color: blue"&gt;string &lt;/span&gt;username)    &lt;br /&gt;{    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;var &lt;/span&gt;id = &lt;span style="color: #2b91af"&gt;HttpContext&lt;/span&gt;.Current.User.Identity &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IClaimsIdentity&lt;/span&gt;;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;return &lt;/span&gt;(&lt;span style="color: blue"&gt;from &lt;/span&gt;c &lt;span style="color: blue"&gt;in &lt;/span&gt;id.Claims    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;where &lt;/span&gt;c.ClaimType == &lt;span style="color: #2b91af"&gt;ClaimTypes&lt;/span&gt;.Role    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;select &lt;/span&gt;c.Value).ToArray();    &lt;br /&gt;}&lt;/p&gt; &lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Roles are enabled in the web.config:&lt;/p&gt;  &lt;p&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;roleManager &lt;/span&gt;&lt;span style="color: red"&gt;enabled&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;true&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;defaultProvider&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;GenevaRoles&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;providers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;GenevaRoles&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;HRApp.Web.GenevaRolesProvider, HRApp.Web&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;providers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;roleManager&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Of course, Roles are Claims, but not all Claims are roles. You could extend the RIA User object to hold whatever other information you want. So you could end up having any other profile data in the user object that comes from a Claim (e.g. the “Cost Center” claim that our Issuer gives us).&lt;/p&gt;  &lt;p&gt;Many thanks to &lt;a href="http://blogs.msdn.com/erwinvandervalk"&gt;Erwin&lt;/a&gt; for his help.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9905540" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/RIA+Services/">RIA Services</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/RIA/">RIA</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Silverlight/">Silverlight</category></item><item><title>Claims based Identity &amp; Access Control Guide – Early drafts available</title><link>http://blogs.msdn.com/b/eugeniop/archive/2009/10/02/claims-based-identity-access-control-guide-early-drafts-available.aspx</link><pubDate>Sat, 03 Oct 2009 02:20:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9902625</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9902625</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9902625</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2009/10/02/claims-based-identity-access-control-guide-early-drafts-available.aspx#comments</comments><description>&lt;p&gt;We finally have a &lt;a href="http://claimsid.codeplex.com/"&gt;CodePlex site&lt;/a&gt; for sharing early content with you all. Check the &lt;a href="http://claimsid.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33883"&gt;downloads section&lt;/a&gt; for:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A few intro chapters (some of the “theory”, technologies and protocols behind claims based identity) &lt;/li&gt;    &lt;li&gt;The first scenario (roughly described in my post &lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/08/19/welcome-to-the-enterprise-line-our-next-stop-will-be-station-1-sso-mind-the-gap.aspx"&gt;here&lt;/a&gt;, but better and nicer, and written in English :-)) &lt;/li&gt;    &lt;li&gt;The sample code for this first chapter &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The first scenario is fairly basic. However, I think people with little previous experience with Claims will find this really useful. Those who are very experienced, will probably not find a lot of new content at this point.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Few things to highlight:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;On the code:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;We wanted to keep it very very simple. Right now the only pre-requisites are: IIS and Windows Identity Foundation (WIF). IIS is needed because some pieces of the samples require HTTPS. WIF is needed because, well…this is about claims right? All the rest is mocked or simulated.&lt;/p&gt;  &lt;p&gt;We tried to minimize the amount of setup required, but there are a few steps that are needed (e.g. installing a certificate, enabling HTTPS). There’s a small script that explains what to do. But we added quite some checking and verification here and there to highlight if something is likely to fail due to a problem in the configuration.&lt;/p&gt;  &lt;p&gt;The IIS web sites are created the first time you open the solution in Visual Studio. Running the samples you should see:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ClaimsbasedIdentityAccessControlGuideEar_13EB8/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ClaimsbasedIdentityAccessControlGuideEar_13EB8/image_thumb.png" width="640" height="376" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Wherever you see the little blue “i” icon, there will be a tip with further explanations.&lt;/p&gt;  &lt;p&gt;Many things in the samples are simulated. For example, &lt;strong&gt;&lt;em&gt;a-Order &lt;/em&gt;&lt;/strong&gt;in the chapter is described as a Windows Authentication enabled app. We don’t want to mess-up with your AD or with your machine accounts &amp;amp; groups. Also, when we claims-enable an app we don’t want to require you to necessarily deploy ADFS. Therefore we included in the solution a “fake” Issuer to create the required claims. The Guide explains the differences between the real scenario and the simulation though; and steps to configure a real scenario.&lt;/p&gt;  &lt;p&gt;Following a-Expense (Claims Aware), for example leads you to:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ClaimsbasedIdentityAccessControlGuideEar_13EB8/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ClaimsbasedIdentityAccessControlGuideEar_13EB8/image_thumb_1.png" width="640" height="411" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Notice the extra explanation. Generally, you will not see anything automagically happening. The intent is that everything not obvious will have a tips like this or an in-line comment.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;On the chapters:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The first three chapters are introductory and you will see a lot of TBDs and comments. All of this is, of course, work in progress; but we’d love your input. &lt;/p&gt;  &lt;p&gt;The introduction chapters are mostly “theory”: background, context, terminology, etc. The fourth chapter is the first scenario: WebSSO. You will see callouts here and there from one of our four main characters in the book:&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;Bharath&lt;/strong&gt;, the Security Expert&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;Jana&lt;/strong&gt;, the Architect&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;Poe&lt;/strong&gt;, the Operations guy&lt;/p&gt;  &lt;p&gt;- &lt;strong&gt;Markus&lt;/strong&gt;, the Developer&lt;/p&gt;  &lt;p&gt;The intent is to highlight specific points of views from each of these guys and enrich the guidance we want to provide.&lt;/p&gt;  &lt;p&gt;Important note: these chapters are NOT formatted to the final layout. So, for example, the callouts will be on the margins in the final book. Please concentrate on the content and not on the format for now.&lt;/p&gt;  &lt;p&gt;Hope you like it! Let us know what you think!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9902625" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SSO/">SSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/WebSSO/">WebSSO</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims+Guide/">Claims Guide</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Geneva/">Geneva</category></item><item><title>Exploring the Service Provider track – Fabrikam Shipping Part II (Solution)</title><link>http://blogs.msdn.com/b/eugeniop/archive/2009/09/03/exploring-the-service-provider-track-fabrikam-shipping-part-ii-solution.aspx</link><pubDate>Fri, 04 Sep 2009 07:45:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9891204</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9891204</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9891204</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2009/09/03/exploring-the-service-provider-track-fabrikam-shipping-part-ii-solution.aspx#comments</comments><description>&lt;p&gt;Now that we presented the &lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/09/01/exploring-the-service-provider-track-first-station-fabrikam-shipping-part-i-the-scenario-challenges.aspx"&gt;scenario &amp;amp; the requirements&lt;/a&gt;, let’s take a look at the solution. &lt;/p&gt;  &lt;h2&gt;What is conceptual solution we propose?&lt;/h2&gt;  &lt;p&gt;&lt;strong&gt;Fabrikam Shipping in the pre-Claims era: &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This diagram shows &lt;strong&gt;Fabrikam Shipping&lt;/strong&gt; today if used by Adatum (no claims, no federation):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ExploringtheServiceProvidertrackFabrikam_9DAE/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ExploringtheServiceProvidertrackFabrikam_9DAE/image_thumb.png" width="640" height="398" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You will see the usual suspects for a typical .NET web application. Furthermore, Fabrikam is using standard providers for authentication, authorization and profile. In this configuration, everyone in Adatum must use, of course, user name &amp;amp; passwords. The username is the handle associated with a role in the roles database, which drives application behavior (what you can do).&lt;/p&gt;  &lt;p&gt;In the example, John from sales, can only Order New Shipments, but Peter from Customer Service, can Manage them.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Making Fabrikam Shipping Claims-Aware&lt;/h3&gt;  &lt;p&gt;What we want now, is Fabrikam to be claims aware and trust claims issued by Adatum. Claims issued by Adatum will be used for authentication and authorization. We also want to map Adatum &lt;em&gt;internal&lt;/em&gt; roles to Fabrikam’s for authorization purposes: who will be a “&lt;strong&gt;Shipment Creator&lt;/strong&gt;”? Who will be an “&lt;strong&gt;Administrator&lt;/strong&gt;”?&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ExploringtheServiceProvidertrackFabrikam_9DAE/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ExploringtheServiceProvidertrackFabrikam_9DAE/image_thumb_1.png" width="640" height="396" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Let’s see how this would work:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;When John attempts to use &lt;strong&gt;FS&lt;/strong&gt; for the first time (e.g. htt&lt;strong&gt;ps://adatum.fabrikamshipping.com&lt;/strong&gt;), because there’s no session established yet (John is un-authenticated from &lt;strong&gt;FS&lt;/strong&gt; point of view) he will be redirected to Fabrikam’s Issuer (e.g. &lt;strong&gt;https://login.fabrikam.com&lt;/strong&gt;). Fabrikam’s Issuer is trusted by the application. &lt;/li&gt;    &lt;li&gt;Again, John will be redirected to Adatum’s Issuer, because that is what Fabrikam’s Issuer trusts. &lt;/li&gt;    &lt;li&gt;If John uses a domain joined desktop, he’d already be authenticated in his network and will have a valid Kerberos token. This token is used by the Adatum’s Issuer to create Adatum’s claims: &lt;strong&gt;employee name&lt;/strong&gt;, &lt;strong&gt;employee address&lt;/strong&gt;, &lt;strong&gt;cost center&lt;/strong&gt;, and &lt;strong&gt;department&lt;/strong&gt; John works for.&amp;#160;&amp;#160; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The process unwinds then: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Adatum’s claims are sent back to Fabrikam’s Issuer, where they are transformed: &lt;/li&gt; &lt;/ol&gt;  &lt;blockquote&gt;   &lt;p&gt;- &lt;strong&gt;Name&lt;/strong&gt;, &lt;strong&gt;address&lt;/strong&gt; and &lt;strong&gt;cost center&lt;/strong&gt; are simply copied (no transformation)&lt;/p&gt;    &lt;p&gt;- Other rules are applied that will result in a “role” claims to be issued (any of the valid roles &lt;strong&gt;FS&lt;/strong&gt; understands)&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;More examples of mappings:&lt;/p&gt;    &lt;p&gt;&lt;em&gt;exists([issuer == &amp;quot;Adatum&amp;quot;]) =&amp;gt; issue(type = &amp;quot;Role&amp;quot;, value = &amp;quot;Shipment Creator&amp;quot;);&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;Which can be interpreted as:&lt;/p&gt;    &lt;p&gt;&lt;em&gt;“Any employee from Adatum can create shipment orders”&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;c:[type == “http://schemas.xmlsoap.org/claims/Group”, value == &amp;quot;Shipments&amp;quot;] =&amp;gt; issue(type = “Role”, value = “Shipment Manager”);&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;that would implement the rule:&lt;/p&gt;    &lt;p&gt;&lt;em&gt;“Any employee from Adatum in “Shipments” (indicated by group membership) department can manage shipment orders”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/em&gt;2&lt;em&gt;. &lt;/em&gt;After these transformation happens, John is finally directed back to the application with the transformed claims.&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="855"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="853"&gt;         &lt;blockquote style="margin-right: 0px" dir="ltr"&gt;           &lt;p&gt;Adatum &lt;em&gt;could&lt;/em&gt; issue Fabrikam’s specific claims, but we don’t want to pollute Adatum’s Issuer with Fabrikam specific concepts (like Fabrikam roles). Fabrikam will allow Adatum to issue any claims they want or can, and then will allow Adatum to configure the system to map these Adatum claims into Fabrikam claims.&amp;#160;&amp;#160; &lt;/p&gt;         &lt;/blockquote&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Fabrikam will do this for &lt;em&gt;every new Customer&lt;/em&gt; using &lt;strong&gt;Fabrikam Shipping&lt;/strong&gt;. Yet, their application will always understand &lt;em&gt;the same&lt;/em&gt; set of claims: “&lt;strong&gt;Shipment Creator&lt;/strong&gt;”, etc. &lt;strong&gt;FS&lt;/strong&gt; stays decoupled.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="856"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="854"&gt;&lt;strong&gt;Note 1:            &lt;br /&gt;&lt;/strong&gt;This scenario is almost identical to &lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/03/09/architecting-cloud-applications-for-the-enterprise-part-iv-supercloudysoftware-sketches-issuetracker-enterprise-edition.aspx"&gt;IssueTracker&lt;/a&gt;. If you feel &lt;em&gt;deja-vu,&lt;/em&gt; don’t be surprised. Only in IssueTracker, we used .NET Services ACS as the Service Provider (Fabrikam) Issuer.           &lt;br /&gt;          &lt;br /&gt;&lt;strong&gt;Note 2:            &lt;br /&gt;&lt;/strong&gt;This scenario is also similar (but not quite the same) to &lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/08/24/next-station-federation-between-adatum-its-customers.aspx"&gt;Adatum’s a-Order&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt;. Some key differences: Fabrikam is a multi-tenant system, probably with a provisioning experience, that &lt;strong&gt;a-Order&lt;/strong&gt; lacked. This is because in our fictitious (but hopefully realistic) world, the Customer &lt;em&gt;churn&lt;/em&gt; in &lt;strong&gt;Fabrikam Shipping&lt;/strong&gt; is much higher than in &lt;strong&gt;a-Order. &lt;/strong&gt;That is, we assume the frequency customers join and leave Fabrikam is higher. Thus, Fabrikam needs to automate this as much as possible.&amp;#160; &lt;br /&gt;          &lt;br /&gt;&lt;strong&gt;Note 3:            &lt;br /&gt;&lt;/strong&gt;Yes, there will be another post with Adatum’s side of the story. But I’m sure by now you’ll guess what’s in there. &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I’ll cover provisioning in the next post, as it has some interesting discussion points. But you can see some hints &lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/03/16/azure-issuetracker-enterprise-simple-demos.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Feedback very much welcome.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Post-post announcement:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;We hope to have a some running code and much much polished chapters soon. We’ll probably upload those to a CodePlex site. Stay tuned!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9891204" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Architecture/">Architecture</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Web+Client/">Web Client</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SaaS/">SaaS</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/S_2B00_S/">S+S</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/-NET+Services/">.NET Services</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/IssueTracker/">IssueTracker</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federation+Provider/">Federation Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category></item><item><title>Exploring the Service Provider track – First station: Fabrikam Shipping – Part I (the scenario &amp; challenges)</title><link>http://blogs.msdn.com/b/eugeniop/archive/2009/09/01/exploring-the-service-provider-track-first-station-fabrikam-shipping-part-i-the-scenario-challenges.aspx</link><pubDate>Wed, 02 Sep 2009 01:57:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9890115</guid><dc:creator>Eugenio Pace - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/rsscomments.aspx?WeblogPostID=9890115</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/eugeniop/commentapi.aspx?WeblogPostID=9890115</wfw:comment><comments>http://blogs.msdn.com/b/eugeniop/archive/2009/09/01/exploring-the-service-provider-track-first-station-fabrikam-shipping-part-i-the-scenario-challenges.aspx#comments</comments><description>&lt;p&gt;Once again, thanks everybody that wrote us with reviews, feedback and suggestions! Please keep it coming! Also: we hope to have soon a CodePlex site where we can start sharing more. We are still working out some details. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;As usual, the Disclaimer:&lt;/strong&gt; this post and the next ones are early drafts to share with you the direction we are taking. They might (and I hope they will) change quite a bit in the &lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/08/11/announcing-new-project-patterns-practices-claims-based-authentication-authorization-guide.aspx"&gt;actual Guide&lt;/a&gt;! We might end up not covering one of these scenarios in the book. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;An additional disclaimer for this post:&lt;/strong&gt; I wrote the whole scenario following the same template of the previous posts and it resulted in a very loooong article. So I divided it into two parts. This is Part I –&amp;gt; the scenario, the challenges and the requirements. Part II will be the solution.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;An Ode to Simplification: &lt;/strong&gt;there’s been quite some debate internally to this project as how to name things, especially “STS” vs. “Issuer” vs. “I-STS” vs. “R-STS” vs. “FP”, etc. Keith has started this on &lt;a href="http://www.pluralsight.com/community/blogs/keith/archive/2009/07/14/issuer-vs-sts.aspx"&gt;his blog&lt;/a&gt; some time ago. We definitely want to keep things &lt;u&gt;simple&lt;/u&gt;. As simple as possible, but not simpler. For now we have settled on the term “Issuer”, independently of the logical role it takes part in. In simpler words: what we used to call “Identity Provider” is now an “Issuer”. What we called a “Federation provider” is also an “Issuer”.&lt;/p&gt;  &lt;p&gt;Keith is writing a whole section of our book on “Jargon” and meaning of the different terms.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Credits:&lt;/strong&gt; this scenario is largely inspired on Vittorio’s PDC demo. See &lt;a href="http://blogs.msdn.com/vbertocci/archive/2009/06/16/announcing-fabrikamshipping-in-depth-semi-realistic-sample-for-geneva-framework.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ExploringtheServiceProvidertrackFirststa_880A/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/eugeniop/WindowsLiveWriter/ExploringtheServiceProvidertrackFirststa_880A/image_thumb_2.png" width="189" height="131" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The &lt;strong&gt;themes&lt;/strong&gt; for the first “Service Provider” scenario are:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Identity in a SaaS application &lt;/li&gt;    &lt;li&gt;Federation with multiple Customers &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;There’s 1 &lt;strong&gt;variations&lt;/strong&gt; in this scenario:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Automating the on-boarding process &lt;/li&gt; &lt;/ol&gt;  &lt;h2&gt;The Introduction&lt;/h2&gt;  &lt;p&gt;Fabrikam is a company that provides shipping services. As part of their offering, they have an application (&lt;strong&gt;Fabrikam Shipping&lt;/strong&gt; – &lt;strong&gt;FS&lt;/strong&gt;) that allows its customers to create new shipping orders, track them, etc. &lt;strong&gt;Fabrikam Shipping&lt;/strong&gt; is delivered as a service and runs in Fabrikam’s datacenter. Fabrikam Customers use a browser to access it.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;FS&lt;/strong&gt; is a fairly standard .NET web application: the web site is based on ASP.NET 3.5, the backend is SQL Server, etc. In the current version, users are required to authenticate using (guess what): username and password!!&lt;/p&gt;  &lt;p&gt;Fabrikam uses ASP.NET standard providers for authentication (Membership), authorization (Roles provider) and personalization (Profile).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Fabrikam Shipping&lt;/strong&gt; is also a &lt;em&gt;multi-tenant&lt;/em&gt; application: the same instance of the app is used by many customers.&lt;/p&gt;  &lt;p&gt;One sunny day in Seattle, they sign a great deal with a marquee Customer: Adatum Corp. And Adatum doesn’t like the username and password, because they are &lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/08/19/welcome-to-the-enterprise-line-our-next-stop-will-be-station-1-sso-mind-the-gap.aspx"&gt;working hard to get rid of identity silos&lt;/a&gt;. They have 3 concerns:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Usability&lt;/strong&gt; for their employees. Lack of SSO, forgetting passwords, using sticky notes to remember them, etc. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Maintenance costs&lt;/strong&gt;: &lt;/li&gt;    &lt;ol&gt;     &lt;li&gt;What happens if an employee forgets his or her corporate password? He will probably call Adatum’s IT help desk. What happens if they use FS and they forget its password? who should they call? Consider this:&lt;/li&gt;      &lt;ol&gt;       &lt;li&gt;If they instruct employees to call &lt;strong&gt;Fabrikam’s&lt;/strong&gt; help desk, there would be a special procedure for IT guys, would probably require training, etc.&lt;/li&gt;        &lt;li&gt;If they instruct employees to call Fabrikam directly, they would impact #1 &lt;/li&gt;     &lt;/ol&gt;      &lt;li&gt;When a new employee is hired, he is already provisioned in Adatum’s systems. They don’t want special processes for &lt;strong&gt;FS.&lt;/strong&gt; &lt;/li&gt;   &lt;/ol&gt;    &lt;li&gt;&lt;strong&gt;Liability&lt;/strong&gt;:       &lt;ol&gt;       &lt;li&gt;Adatum has authentication policies that are there for a reason. They also want to retail control on who has access to what (regardless of where that is deployed) and &lt;strong&gt;FS&lt;/strong&gt; is no exception. &lt;/li&gt;        &lt;li&gt;If an employee leaves the company, he should &lt;u&gt;not&lt;/u&gt; have access to &lt;strong&gt;FS&lt;/strong&gt; anymore, effective immediately. If they used username / passwords, they could potentially access &lt;strong&gt;FS&lt;/strong&gt; from other places, even if they are not an Adatum employee anymore. &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Back to &lt;strong&gt;FS&lt;/strong&gt;:&lt;/p&gt;  &lt;p&gt;Access Control to &lt;strong&gt;FS&lt;/strong&gt; is based on Roles. There are 3 roles:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;“&lt;strong&gt;Shipment Creators&lt;/strong&gt;”. Anyone in this role can create new orders. &lt;/li&gt;    &lt;li&gt;“&lt;strong&gt;Shipment Managers&lt;/strong&gt;”. Can create and modify existing shipment orders. &lt;/li&gt;    &lt;li&gt;“&lt;strong&gt;Administrators&lt;/strong&gt;”. Can configure the system (e.g. look and feel, shipping preferences, billing, etc). &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;FS&lt;/strong&gt; also keeps profile information for users, to avoid repeatedly entering common information and preferences. More concretely, &lt;strong&gt;FS&lt;/strong&gt; allows its users to store:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Package &lt;strong&gt;Sender&lt;/strong&gt; information (sender address) &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Cost Center&lt;/strong&gt; information for billing &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Fabrikam can open the bills to its Customers by Cost Center. With this, 2 employees from Adatum belonging to 2 different departments would get 2 different bills.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Key Requirements.&lt;/h2&gt;  &lt;p&gt;Adatum wants &lt;strong&gt;SSO&lt;/strong&gt; for its employees.&lt;/p&gt;  &lt;p&gt;Fabrikam wants to &lt;strong&gt;avoid storing configuration information&lt;/strong&gt; about the shipment that can become stale later on (e.g. the package sender information).&lt;/p&gt;  &lt;p&gt;Fabrikam wants to &lt;strong&gt;bill customers by Cost Center&lt;/strong&gt; if they supply one. &lt;/p&gt;  &lt;p&gt;Some assumptions:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Adatum has an &lt;strong&gt;Issuer&lt;/strong&gt; (see &lt;a href="http://blogs.msdn.com/eugeniop/archive/2009/08/19/welcome-to-the-enterprise-line-our-next-stop-will-be-station-1-sso-mind-the-gap.aspx"&gt;Scenario #1&lt;/a&gt;) &lt;/li&gt;    &lt;li&gt;Fabrikam can change anything in their application&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;We’ll look at the solution space in the next post.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9890115" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Web+Client/">Web Client</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/SaaS/">SaaS</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/S_2B00_S_5F00_Run/">S+S_Run</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/S_2B00_S_5F00_Build/">S+S_Build</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federated+Identity/">Federated Identity</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Federation+Provider/">Federation Provider</category><category domain="http://blogs.msdn.com/b/eugeniop/archive/tags/Identity+Provider/">Identity Provider</category></item></channel></rss>
