<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Southworks Blogs &#187; PDC08</title>
	<atom:link href="http://blogs.southworks.net/category/pdc08/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.southworks.net</link>
	<description>Powered by Southworks</description>
	<lastBuildDate>Wed, 05 Jun 2013 14:29:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>IssueTracker Azure Edition &#8211; a Cloud Application</title>
		<link>http://blogs.southworks.net/mwoloski/2009/02/13/issuetracker-azure-edition-a-cloud-application/</link>
		<comments>http://blogs.southworks.net/mwoloski/2009/02/13/issuetracker-azure-edition-a-cloud-application/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 10:25:49 +0000</pubDate>
		<dc:creator>Matias Woloski</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Federation]]></category>
		<category><![CDATA[Geneva]]></category>
		<category><![CDATA[Identity]]></category>
		<category><![CDATA[LiveID]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[PDC08]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[azure]]></category>

		<guid isPermaLink="false">http://24.367</guid>
		<description><![CDATA[... <a href="http://blogs.southworks.net/mwoloski/2009/02/13/issuetracker-azure-edition-a-cloud-application/" class="more-link">read more<img src="http://blogs.southworks.net/wp-content/themes/southworks/assets/img/arrow-blue.png" width="12" height="12" alt="" /></a>]]></description>
			<content:encoded><![CDATA[<p>Couple of weeks ago <a href="http://dunnry.com/blog/AzureIssueTrackerReleased.aspx">Ryan Dunn announced</a> <a href="http://www.codeplex.com/azureissuetracker">Azure Issue Tracker</a>. From this post:</p>
<p><em>&quot;This sample application is a simple issue tracking service and website that pulls together a couple of the Azure services:&#160; <strong>SQL Data Services</strong> and <strong>.NET Access Control Service</strong>.&quot;<a href="http://blogs.southworks.net/mwoloski/files/2009/02/windowslivewriterissuetrackerazureeditionacloudapplicatio-f4dcimage-2.png"><img height="238" alt="image" src="http://blogs.southworks.net/mwoloski/files/2009/02/windowslivewriterissuetrackerazureeditionacloudapplicatio-f4dcimage-thumb.png" width="284" align="right" border="0" /></a></em></p>
<p>I&#8217;ve been working with Ryan and other guys at DPE and <a href="http://blogs.southworks.net">Southworks</a> to put together this sample before PDC. With all the back and&#160; forth (the .NET services were not working as reliable as they work now) we were not able to pull it through at that time. Well, it&#8217;s now live and you can download the source code. Some of its features:</p>
<ul>
<li>[Identity] .NET Services Access Control as a relying party and claims transformation STS</li>
<li>[Identity] Federation against LiveID and claim mapping between email -&gt; tasks. I hinted the implementation in <a href="http://blogs.southworks.net/mwoloski/2008/11/09/azure-services-platform-passive-federation-access-control-2/">these</a> <a href="http://blogs.southworks.net/mwoloski/2008/11/07/azure-services-platform-passive-federation-access-control-1/">post</a>.</li>
<li>[Identity] Claims aware application and service layer (by doing identity delegation with ActAs)</li>
<li>[Data] Storage on SDS using the flexible schema to extend the data model of the issue</li>
<li>[General] Multi tenancy at all levels (identity, data, programming model)</li>
<li>[General] Clean separation of concerns using ASP.NET MVC, Geneva Framework, WCF and WF.</li>
</ul>
<p>This is the standard edition. The enterprise edition is coming with features related to manageability (Management API, Powershell CmdLets, MMC, SCOM, etc.) and identity federations against third party STS. Stay tuned!</p>
<p><a href="http://www.codeplex.com/azureissuetracker/Release/ProjectReleases.aspx?ReleaseId=22138">Download the code</a></p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Azure @ PDC Buenos Aires</title>
		<link>http://blogs.southworks.net/mwoloski/2008/11/18/windows-azure-pdc-buenos-aires/</link>
		<comments>http://blogs.southworks.net/mwoloski/2008/11/18/windows-azure-pdc-buenos-aires/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 04:41:56 +0000</pubDate>
		<dc:creator>Matias Woloski</dc:creator>
				<category><![CDATA[PDC08]]></category>
		<category><![CDATA[Presentation]]></category>
		<category><![CDATA[azure]]></category>

		<guid isPermaLink="false">http://24.362</guid>
		<description><![CDATA[... <a href="http://blogs.southworks.net/mwoloski/2008/11/18/windows-azure-pdc-buenos-aires/" class="more-link">read more<img src="http://blogs.southworks.net/wp-content/themes/southworks/assets/img/arrow-blue.png" width="12" height="12" alt="" /></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been two weeks already that we&#8217;ve got back from LA after attending PDC. Lots of things announced there.</p>
<p>Microsoft Argentina organized the local-mini version of PDC. I will be there showing Windows Azure with <a href="http://blogs.southworks.net/erossetto">Edgardo</a>.</p>
<p><a href="http://blogs.southworks.net/mwoloski/files/2008/11/windowslivewriterwindowsazurepdcbuenosaires-9e0eimage-4.png"><img height="406" alt="image" src="http://blogs.southworks.net/mwoloski/files/2008/11/windowslivewriterwindowsazurepdcbuenosaires-9e0eimage-thumb-1.png" width="640" border="0" /></a> </p>
<p>The talk will be mainly demos (as usual <img src='http://blogs.southworks.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  and explain some concepts around Windows Azure.</p>
<p>You can register here (it seems it&#8217;s all booked though): <a title="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032394696&amp;Culture=es-AR" href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032394696&amp;Culture=es-AR">http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032394696&amp;Culture=es-AR</a></p>
<p>Other <em><a href="http://www.southworks.net">southies</a> </em>will be presenting as well at this event: </p>
<ul>
<li><a href="http://blogs.southworks.net/msalias">Martin Salias</a> will be talking about the future of the languages (F# and C#) </li>
<li><a href="http://blogs.southworks.net/parancibia">Paulo Arancibia</a> and <a href="http://blogs.southworks.net/jdominguez">Julian Dominguez</a> will be showing how to develop data driven apps using the new DataGrid and Ribbon controls of WPF.</li>
</ul>
<p>See you there&#8230;</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Azure Services Platform &#8211; Passive Federation &amp; Access Control #2</title>
		<link>http://blogs.southworks.net/mwoloski/2008/11/09/azure-services-platform-passive-federation-access-control-2/</link>
		<comments>http://blogs.southworks.net/mwoloski/2008/11/09/azure-services-platform-passive-federation-access-control-2/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 16:19:50 +0000</pubDate>
		<dc:creator>Matias Woloski</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Federation]]></category>
		<category><![CDATA[Geneva]]></category>
		<category><![CDATA[Identity Management]]></category>
		<category><![CDATA[LiveID]]></category>
		<category><![CDATA[PDC08]]></category>
		<category><![CDATA[Zermatt]]></category>
		<category><![CDATA[azure]]></category>

		<guid isPermaLink="false">http://24.359</guid>
		<description><![CDATA[... <a href="http://blogs.southworks.net/mwoloski/2008/11/09/azure-services-platform-passive-federation-access-control-2/" class="more-link">read more<img src="http://blogs.southworks.net/wp-content/themes/southworks/assets/img/arrow-blue.png" width="12" height="12" alt="" /></a>]]></description>
			<content:encoded><![CDATA[</p>
<p>In the <a href="http://blogs.southworks.net/mwoloski/2008/11/07/azure-services-platform-passive-federation-access-control-1/">previous post</a> I introduced a scenario where you can use .NET Services Access Control and Windows LiveID to delegate authentication and authorization. In this post we will go through the different pieces needed in the application to perform authorization checks. First thing will be configure the passive federation using Geneva on the application and later we will create an ASP.NET MVC action filter to perform the access check against the incoming claims. </p>
<p><strong>Note</strong>: all the code showed here is using Microsoft Identity Framework &quot;Zermatt&quot; Beta 1. The new Geneva Framework might have some changes.</p>
<h3>Configuring passive federation on the website</h3>
<p>Configure passive federation on the website is about defining which SAML token version we will accept and the certificate we will use to decrypt the incoming token. The following configuration uses Zermatt Beta 1, so this probably changes on Geneva.</p>
<div>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">&lt;</span><span style="color: #800000">microsoft.identityModel</span><span style="color: #0000ff">&gt;</span>
    <span style="color: #0000ff">&lt;</span><span style="color: #800000">tokenHandlers</span><span style="color: #0000ff">&gt;</span>
      <span style="color: #0000ff">&lt;</span><span style="color: #800000">remove</span> <span style="color: #ff0000">type</span><span style="color: #0000ff">=&quot;Microsoft.IdentityModel.Tokens.Saml11.Saml11TokenHandler, Microsoft.IdentityModel, Version=0.4.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot;</span> <span style="color: #0000ff">/&gt;</span>
      <span style="color: #0000ff">&lt;</span><span style="color: #800000">add</span> <span style="color: #ff0000">type</span><span style="color: #0000ff">=&quot;Microsoft.IdentityModel.Tokens.Saml11.Saml11TokenHandler, Microsoft.IdentityModel, Version=0.4.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot;</span><span style="color: #0000ff">&gt;</span>
        <span style="color: #0000ff">&lt;</span><span style="color: #800000">samlSecurityTokenRequirement</span><span style="color: #0000ff">&gt;</span>
          <span style="color: #0000ff">&lt;</span><span style="color: #800000">allowedAudienceUris</span><span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;</span><span style="color: #800000">add</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;http://localhost/YourApp/&quot;</span> <span style="color: #0000ff">/&gt;</span>
          <span style="color: #0000ff">&lt;/</span><span style="color: #800000">allowedAudienceUris</span><span style="color: #0000ff">&gt;</span>
        <span style="color: #0000ff">&lt;/</span><span style="color: #800000">samlSecurityTokenRequirement</span><span style="color: #0000ff">&gt;</span>
      <span style="color: #0000ff">&lt;/</span><span style="color: #800000">add</span><span style="color: #0000ff">&gt;</span>
    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">tokenHandlers</span><span style="color: #0000ff">&gt;</span>
    <span style="color: #0000ff">&lt;</span><span style="color: #800000">federatedAuthentication</span> <span style="color: #ff0000">enabled</span><span style="color: #0000ff">=&quot;true&quot;</span><span style="color: #0000ff">&gt;</span>
    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">federatedAuthentication</span><span style="color: #0000ff">&gt;</span>
    <span style="color: #0000ff">&lt;</span><span style="color: #800000">serviceCertificate</span><span style="color: #0000ff">&gt;</span>
      <span style="color: #0000ff">&lt;</span><span style="color: #800000">certificateReference</span> <span style="color: #ff0000">findValue</span><span style="color: #0000ff">=&quot;01 20 ...&quot;</span> <span style="color: #ff0000">storeLocation</span><span style="color: #0000ff">=&quot;LocalMachine&quot;</span> <span style="color: #ff0000">storeName</span><span style="color: #0000ff">=&quot;My&quot;</span> <span style="color: #ff0000">x509FindType</span><span style="color: #0000ff">=&quot;FindByThumbprint&quot;</span> <span style="color: #0000ff">/&gt;</span>
    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">serviceCertificate</span><span style="color: #0000ff">&gt;</span>
  <span style="color: #0000ff">&lt;/</span><span style="color: #800000">microsoft.identityModel</span><span style="color: #0000ff">&gt;</span></pre>
</div>
<p>When the user click on the sign in button, the link will point to to the .NET Services Access Control passive STS url. The following method uses Geneva to generate this WS-Federation url.</p>
<div>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">string</span> GetFederationUrl(<span style="color: #0000ff">string</span> realm, <span style="color: #0000ff">string</span> issuer, <span style="color: #0000ff">string</span> homeRealm, <span style="color: #0000ff">string</span> returnUrl)
{
    FederatedAuthenticationModule fam = <span style="color: #0000ff">new</span> FederatedAuthenticationModule();
    fam.Realm = realm;
    fam.Issuer = issuer;
    fam.Reply = returnUrl;
    SignInRequestMessage signInMsg = fam.CreateSignInRequest();
    signInMsg.Parameters.Add(<span style="color: #006080">&quot;whr&quot;</span>, homeRealm);
    <span style="color: #0000ff">string</span> url = signInMsg.WriteQueryString();
    <span style="color: #0000ff">return</span> url;
}</pre>
</div>
<p>The following code and configuration will give you an idea of the url that is being built. Pay attention to this url because a small change might break the whole thing.</p>
<div>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">string</span> url = GetFederationUrl(ConfigurationManager.AppSettings[<span style="color: #006080">&quot;AccessControlRealm&quot;</span>],
                            ConfigurationManager.AppSettings[<span style="color: #006080">&quot;AccessControlIssuer&quot;</span>],
                            ConfigurationManager.AppSettings[<span style="color: #006080">&quot;AccessControlHomeRealm&quot;</span>],
                            replyTo);</pre>
</div>
<div>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #008000">&lt;!-- Windows Azure Federation --&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">add</span> <span style="color: #ff0000">key</span><span style="color: #0000ff">=&quot;AccessControlRealm&quot;</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;http://localhost/YourApp/&quot;</span><span style="color: #0000ff">/&gt;</span> <span style="color: #008000">&lt;!-- should match to a scope --&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">add</span> <span style="color: #ff0000">key</span><span style="color: #0000ff">=&quot;AccessControlIssuer&quot;</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;https://accesscontrol.windows.net/passivests/yoursolution/LiveFederation.aspx&quot;</span><span style="color: #0000ff">/&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">add</span> <span style="color: #ff0000">key</span><span style="color: #0000ff">=&quot;AccessControlDefaultReply&quot;</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;http://localhost/YourApp&quot;</span> <span style="color: #0000ff">/&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">add</span> <span style="color: #ff0000">key</span><span style="color: #0000ff">=&quot;AccessControlHomeRealm&quot;</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;http://login.live.com&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
</div>
<p>The AccessControlRealm config is important because it will match the scope on your solution. You will have to configure the scope to encrypt with the public key of your website certificate and create the claim mappings from Windows LiveID to your well known claims. If you don&#8217;t have the scope created or configured to output at least one claim you will get a 403 Forbidden on the .NET Services Access Control STS.</p>
<p><a href="http://blogs.southworks.net/mwoloski/files/2008/11/windowslivewriterazureservicesplatformpassivefederationac-bdb7image-4.png"><img height="424" alt="image" src="http://blogs.southworks.net/mwoloski/files/2008/11/windowslivewriterazureservicesplatformpassivefederationac-bdb7image-thumb-1.png" width="640" border="0" /></a> </p>
<h3>Performing access check in the web site</h3>
<p>Now that we have everything configured and the token should be coming back to our website, it&#8217;s time to do the access check. By using Geneva, the token will be transformed to a Principal object and it will be accessed through the ClaimsPrincipal static class. On the other hand, ASP.NET MVC allow us to plug into the action execution pipeline and get access to the context data like route values. The following code shows an ActionFilterAttribute that will grab the claims from the the Geneva ClaimsPrincipal and will call a strategy class that will perform the access check. If the access check is not successful, the filter will render a NotAuthorized view.</p>
<div>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">namespace</span> YourApp.Identity
{
    <span style="color: #0000ff">using</span> System;
    ...

    <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> ClaimAuthorizationRouteFilterAttribute : ActionFilterAttribute
    {
        <span style="color: #0000ff">public</span> ClaimAuthorizationRouteFilterAttribute(<span style="color: #0000ff">string</span>[] operations)
        {
            <span style="color: #0000ff">this</span>.Operations = operations;
        }

        <span style="color: #0000ff">public</span> <span style="color: #0000ff">string</span>[] Operations { get; set; }

        <span style="color: #0000ff">public</span> <span style="color: #0000ff">override</span> <span style="color: #0000ff">void</span> OnActionExecuting(ActionExecutingContext context)
        {
            var identity = ClaimsPrincipal.Current.Identity <span style="color: #0000ff">as</span> IClaimsIdentity;
            var claims = identity.Claims.ToArray();
            var routeData = context.RouteData.Values.ToArray();
            var strategy = CreateAuthorizationStrategy();
            var executionContext = <span style="color: #0000ff">new</span> ExecutionContext()
            {
                ClaimsNeeded = Operations,
                OperationContextData = routeData,
            };

            <span style="color: #0000ff">if</span> (!strategy.IsAuthorizedFor(executionContext, claims))
            {
                context.Result = <span style="color: #0000ff">new</span> ViewResult
                {
                    ViewName = <span style="color: #006080">&quot;NotAuthorized&quot;</span>
                };
            }

            <span style="color: #0000ff">base</span>.OnActionExecuting(context);
        }

    }
}</pre>
</div>
<p>Finally, the following code shows an implemented strategy for a multi tenant application that manage projects.</p>
<div>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">namespace</span> YourApp.Identity
{
    <span style="color: #0000ff">using</span> System.Linq;
    <span style="color: #0000ff">using</span> System;

    <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> StandardAuthorizationStrategy : IAuthorizationStrategy
    {
        <span style="color: #0000ff">private</span> <span style="color: #0000ff">const</span> <span style="color: #0000ff">string</span> ProjectClaimType = <span style="color: #006080">&quot;urn:Project&quot;</span>;
        <span style="color: #0000ff">private</span> <span style="color: #0000ff">const</span> <span style="color: #0000ff">string</span> TenantClaimType = <span style="color: #006080">&quot;urn:Tenant&quot;</span>;
        <span style="color: #0000ff">private</span> <span style="color: #0000ff">const</span> <span style="color: #0000ff">string</span> OperationClaimType = <span style="color: #006080">&quot;urn:Operation&quot;</span>;

        <span style="color: #0000ff">public</span> <span style="color: #0000ff">bool</span> IsAuthorizedFor(ExecutionContext context, Microsoft.IdentityModel.Claims.Claim[] claims)
        {
            <span style="color: #0000ff">bool</span> authorized = <span style="color: #0000ff">true</span>;
            var tenantClaim = claims.SingleOrDefault(c =&gt; c.ClaimType == TenantClaimType);
            var operationClaims = claims.Where(c =&gt; c.ClaimType == OperationClaimType);
            var projectClaims = claims.Where(c =&gt; c.ClaimType == ProjectClaimType);
        var tenant = context.OperationContextData[<span style="color: #006080">&quot;Tenant&quot;</span>].ToString();
        var project = context.OperationContextData[<span style="color: #006080">&quot;Project&quot;</span>].ToString();

            <span style="color: #0000ff">if</span> (!<span style="color: #0000ff">string</span>.IsNullOrEmpty(tenant))
            {
                authorized &amp;= tenantClaim.Value.Equals(<span style="color: #006080">&quot;*&quot;</span>, StringComparison.OrdinalIgnoreCase) ||
                              tenantClaim.Value.Equals(tenant, StringComparison.OrdinalIgnoreCase);
            }

            <span style="color: #0000ff">if</span> (!<span style="color: #0000ff">string</span>.IsNullOrEmpty(project))
            {
                authorized &amp;= projectClaims.Where( p =&gt; p.Value.Equals(<span style="color: #006080">&quot;*&quot;</span>, StringComparison.OrdinalIgnoreCase)).Count() &gt; 0 ||
                              projectClaims.Where( p =&gt; p.Value.Equals(project, StringComparison.OrdinalIgnoreCase)).Count() &gt; 0;
            }

            <span style="color: #0000ff">if</span> (context.Operations != <span style="color: #0000ff">null</span>)
            {
                <span style="color: #0000ff">bool</span> temp = <span style="color: #0000ff">true</span>;
                <span style="color: #0000ff">foreach</span> (<span style="color: #0000ff">string</span> op <span style="color: #0000ff">in</span> context.ClaimsNeeded)
                {
                    temp &amp;= operationClaims.Where(o =&gt; o.Value.Equals(op, StringComparison.OrdinalIgnoreCase)).Count() &gt; 0 ||
                            operationClaims.Where(o =&gt; o.Value.Equals(<span style="color: #006080">&quot;*&quot;</span>, StringComparison.OrdinalIgnoreCase)).Count() &gt; 0;
                }
                authorized &amp;= temp;
            }

            <span style="color: #0000ff">return</span> authorized;
        }
    }
}</pre>
</div>
<p>The only thing left is to put an attribute above the action. The following attribute specifies that the New action will be executed if the incoming token contains the following &quot;urn:Operation&quot; claims.</p>
<div>
<pre style="padding-right: 0px;padding-left: 0px;font-size: 8pt;padding-bottom: 0px;margin: 0em;width: 100%;color: black;padding-top: 0px;font-family: consolas, &#39;Courier New&#39;, courier, monospace"><span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> ProjectsController : Controller
{

        [ClaimAuthorizationRouteFilter(<span style="color: #0000ff">new</span> <span style="color: #0000ff">string</span>[] {
                                            <span style="color: #006080">&quot;AddUser&quot;</span>,
                                            <span style="color: #006080">&quot;AddUsersToProject&quot;</span>,
                                            <span style="color: #006080">&quot;CreateProject&quot;</span> })]
        <span style="color: #0000ff">public</span> ActionResult New() {
        ....

    }

    ...

}</pre>
</div>
<p>So if a user browses to: http://yourapp/Contoso/Projecsts/New, the filter will call the strategy that will check:</p>
<ul>
<li>if the user contains a tenant claim with the value &quot;Contoso&quot; (taken from the route data) </li>
<li>if the user contains three operation claims: AddUser, AddUsersToProject and CreateProject </li>
</ul>
<p>And if a user browses to: http://yourapp/Contoso/Projecsts/some-project/Edit, the filter will call the strategy that will check:</p>
<ul>
<li>if the user contains a &quot;tenant&quot; claim with the value &quot;Contoso&quot; (taken from the route data) </li>
<li>if the user contains the &quot;operation&quot; claims specified in the Edit action </li>
<li>if the user contains a &quot;project&quot; claim with the value &quot;some-project&quot; </li>
</ul>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Azure Services Platform &#8211; Passive Federation &amp; Access Control #1</title>
		<link>http://blogs.southworks.net/mwoloski/2008/11/07/azure-services-platform-passive-federation-access-control-1/</link>
		<comments>http://blogs.southworks.net/mwoloski/2008/11/07/azure-services-platform-passive-federation-access-control-1/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 07:45:05 +0000</pubDate>
		<dc:creator>Matias Woloski</dc:creator>
				<category><![CDATA[Federation]]></category>
		<category><![CDATA[Geneva]]></category>
		<category><![CDATA[Identity Management]]></category>
		<category><![CDATA[LiveID]]></category>
		<category><![CDATA[PDC08]]></category>
		<category><![CDATA[Zermatt]]></category>
		<category><![CDATA[azure]]></category>

		<guid isPermaLink="false">http://24.356</guid>
		<description><![CDATA[... <a href="http://blogs.southworks.net/mwoloski/2008/11/07/azure-services-platform-passive-federation-access-control-1/" class="more-link">read more<img src="http://blogs.southworks.net/wp-content/themes/southworks/assets/img/arrow-blue.png" width="12" height="12" alt="" /></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.southworks.net/mwoloski/files/2008/11/windowslivewritercloudcomputing-d6a0image-5.png"><img height="34" alt="image" src="http://blogs.southworks.net/mwoloski/files/2008/11/windowslivewritercloudcomputing-d6a0image-thumb.png" width="237" align="right" border="0" /></a>
<p>The last couple of months together with other people at <a href="http://www.southworks.net">Southworks</a> we&#8217;ve been working with the DPE team on samples, demos, hands on labs for PDC all related to the cloud computing services Microsoft announced at PDC, the Azure Services Platform.&#160; </p>
</p>
<p>During the week, I attended <a href="http://www.identityblog.com/">Kim Cameron</a>&#8216;s and <a href="http:/blogs.msdn.com/vibro.net">Vittorio Bertocci</a> session where they talked about identity federation and claim based architecture using &quot;Geneva&quot; Server, Microsoft Federation Gateway, &quot;Geneva&quot; Framework (previously known as Zermatt) and the .NET Services Access Control. I enjoyed watching Vittorio during the session.&#160; </p>
<p>Other interesting things we did in the identity arena with <a href="http://dunnry.com">Ryan Dunn</a> is use the .NET Services Access Control and Windows Live ID to delegate authentication and authorization to the cloud. In this post I will introduce the scenario where you can federate your application against .NET Services Access Control which indeed federates against Windows LiveID. This will allow users of your application to log in to your application using their Windows LiveID account and then use .NET Services Access Control to transform the email claim to a set of claims to perform authorization access checks.</p>
<h3><strong>Identity + Access Control</strong> using <strong>Windows Live ID + .NET Services Access Control</strong></h3>
<p>Windows Live ID can authenticate users of your web site and then use .NET Services Access Control to map claims between the Live ID (email) and some other claim (like role, operation, task). The image below shows a claim mapping that you would create in your .NET Services account.</p>
<p><a href="http://blogs.southworks.net/mwoloski/files/2008/11/windowslivewritercloudcomputing-d6a0image-7.png"><img height="219" alt="image" src="http://blogs.southworks.net/mwoloski/files/2008/11/windowslivewritercloudcomputing-d6a0image-thumb-2.png" width="569" border="0" /></a> </p>
<p>The output claims could be used later in the application to perform access check against resources or modify the UI according to the incoming claims. The flow is governed by the WS-Federation protocol as shown below:</p>
<p>&#160;</p>
<p><a href="http://blogs.southworks.net/mwoloski/files/2008/11/windowslivewritercloudcomputing-d6a0image-13.png"><img height="480" alt="image" src="http://blogs.southworks.net/mwoloski/files/2008/11/windowslivewritercloudcomputing-d6a0image-thumb-5.png" width="590" border="0" /></a> </p>
<p>In a nutshell, the browser will click on the Sign In link on the website and it will be redirected to the token issuer, in this case the .NET Services Access Control passive STS. The home realm on the url will be login.live.com and the .NET Services STS trust on Windows LiveID tokens. The user will log in on Windows LiveID and it will send the token back to the .NET Services STS. Finally the claim mapping will occur and the token will come back to the website with the authorization claims.</p>
<p>In the following post I will show how to configure your application to read the incoming token claims and do access check over page urls.</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
