<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Justin Smith's Blog</title><subtitle type="html">Creative titles are so 2008</subtitle><id>http://blogs.msdn.com/justinjsmith/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/justinjsmith/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2008-02-13T14:20:49Z</updated><entry><title>Mix 09 Deck</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2009/04/28/mix-09-deck.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2009/04/28/mix-09-deck.aspx</id><published>2009-04-28T14:53:14Z</published><updated>2009-04-28T14:53:14Z</updated><content type="html">&lt;p&gt;For some reason the slide deck I presented at Mix didn’t show up on the Mix 09 website. If you are interested in the deck, see the link below.&lt;/p&gt; &lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-50fa692ec9deac1c.skydrive.live.com/embedrowdetail.aspx/Blog/ACSMix-justinsm%20v9.pptx" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9573657" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author><category term="Services in the Cloud" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/Services+in+the+Cloud/default.aspx" /><category term="Access Control Service" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx" /><category term=".NET Services" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx" /></entry><entry><title>Interesting article on Azure Services</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2009/03/26/interesting-article-on-azure-services.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2009/03/26/interesting-article-on-azure-services.aspx</id><published>2009-03-26T08:20:16Z</published><updated>2009-03-26T08:20:16Z</updated><content type="html">&lt;p&gt;Today I caught up on some press material on Azure Services. For those that haven’t seen it, the picture version of Azure Services is below:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="azure" border="0" alt="azure" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/InterestingarticleonAzureServices_12CD/azure_3.jpg" width="485" height="229" /&gt;&lt;/p&gt;  &lt;p&gt;One article published in late February popped out at me: &lt;a href="http://blogs.zdnet.com/microsoft/?p=2173" target="_blank"&gt;http://blogs.zdnet.com/microsoft/?p=2173&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Among other things, this article brings good questions regarding how aligned and integrated the Azure Services platform is today. A quote from the article:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“Our engineering efforts are fully aligned with Red Dog now,” said Shewchuk. “We expect them (Red Dog) to be available with a fully integrated developer experience” upon which CSD and its customers can count when working with .Net Services, SQL Data Services and other components.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;To be clear, the end results of this engineering alignment aren’t fully apparent yet. As John indicates, we are working on it.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9510082" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author><category term="Access Control Service" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx" /><category term=".NET Services" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx" /><category term="Azure" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/Azure/default.aspx" /><category term="Azure Services" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/Azure+Services/default.aspx" /></entry><entry><title>TokenClient (Mix) introduction</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2009/03/24/tokenclient-mix-introduction.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2009/03/24/tokenclient-mix-introduction.aspx</id><published>2009-03-25T05:53:31Z</published><updated>2009-03-25T05:53:31Z</updated><content type="html">&lt;p&gt;This week at Mix I demonstrated a new &lt;strong&gt;&lt;em&gt;experimental&lt;/em&gt;&lt;/strong&gt; client API (TokenClient) for interacting with the Access Control Service (ACS). The purpose of this API is to simplify the developer interaction with the ACS Security Token Service. It still uses WS-Trust on the wire, but restricts the WS-Trust options to what I believe to be the bare minimum.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;NOTE:&lt;/b&gt; this code requires the Geneva Fx (version released at PDC 08) in order to work. The assembly version # is 0.5.1.0.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;NOTE NOTE:&lt;/b&gt; This code is highly experimental – I’ve written it to demonstrate a core capability of ACS. As a result, it hasn’t been rigorously tested, and I am absolutely certain that there are bugs.&lt;/p&gt;  &lt;p&gt;Recalling earlier posts, remember that ACS simply accepts claims and uses access control rules to transform those input claims to output claims. Claims in, Claims out – all the live long day. The client API shown here reflects that simplicity.&lt;/p&gt;  &lt;p&gt;ACS receives “claims in” if those claims are wrapped in a token. As a result, the TokenClient type has a method that will package claims into a signed and encrypted token. There are other methods that send that token to ACS, and still other methods that return the ACS issued claims in a couple of different handy formats.&lt;/p&gt;  &lt;p&gt;First let’s discuss instantiation. In order to create a token, a TokenClient object needs to be able to sign and encrypt a token. This information is packaged in a TokenClientSettings object. The TokenClient type constructor accepts a TokenClientSettings object as shown below.&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;TokenClientSettings settings = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; TokenClientSettings() {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;  LocalIssuerAddress = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Uri(&lt;span style="color: #006080"&gt;&amp;quot;http://localhost/myissuer&amp;quot;&lt;/span&gt;),&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;  LocalIssuerSigningCertificate = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; X509Certificate2(&lt;span style="color: #006080"&gt;&amp;quot;sign.pfx&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;pwd&amp;quot;&lt;/span&gt;),&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;  Scope = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Uri(&lt;span style="color: #006080"&gt;&amp;quot;http://localhost/myservice&amp;quot;&lt;/span&gt;),&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;  ScopeEncryptingCertificate = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; X509Certificate2(“enc.cer&lt;span style="color: #006080"&gt;&amp;quot;, &amp;quot;&lt;/span&gt;pwd&lt;span style="color: #006080"&gt;&amp;quot;),&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;  SolutionName = &amp;quot;&lt;/span&gt;justindemoaccount&amp;quot;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;};&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;TokenClient client = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; TokenClient(settings);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;
  &lt;table border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;
      &lt;tr&gt;
        &lt;td valign="top" width="157"&gt;
          &lt;p&gt;Property Name&lt;/p&gt;
        &lt;/td&gt;

        &lt;td valign="top" width="481"&gt;
          &lt;p&gt;Description&lt;/p&gt;
        &lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td valign="top" width="157"&gt;
          &lt;p&gt;LocalIssuerAddress&lt;/p&gt;
        &lt;/td&gt;

        &lt;td valign="top" width="481"&gt;
          &lt;p&gt;The value of the SAML issuer for the self-issued token. This address will need to be registered with ACS&lt;/p&gt;
        &lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td valign="top" width="157"&gt;
          &lt;p&gt;LocalIssuerSigningCertificate&lt;/p&gt;
        &lt;/td&gt;

        &lt;td valign="top" width="481"&gt;
          &lt;p&gt;The X509Certificate2 object (with private key) that will be used to sign the self-issued token&lt;/p&gt;
        &lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td valign="top" width="157"&gt;
          &lt;p&gt;Scope&lt;/p&gt;
        &lt;/td&gt;

        &lt;td valign="top" width="481"&gt;
          &lt;p&gt;The Scope URI that the token will be sent to (in an RST)&lt;/p&gt;
        &lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td valign="top" width="157"&gt;
          &lt;p&gt;ScopeEncryptingCertificate&lt;/p&gt;
        &lt;/td&gt;

        &lt;td valign="top" width="481"&gt;
          &lt;p&gt;In cases where an ACS issued token will be decrypted, this certificate is used. &lt;/p&gt;
        &lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td valign="top" width="157"&gt;
          &lt;p&gt;SolutionName&lt;/p&gt;
        &lt;/td&gt;

        &lt;td valign="top" width="481"&gt;
          &lt;p&gt;Your solution name. This is needed to direct the RST to the correct address.&lt;/p&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;&lt;/table&gt;
&lt;/p&gt;

&lt;p&gt;Next, let’s instantiate an IEnumerable&amp;lt;Microsoft.IdentityModel.Claims.Claim&amp;gt; object. &lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;Claim[] claims = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Claim[] { &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Claim(&lt;span style="color: #006080"&gt;@&amp;quot;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;                                                     &lt;span style="color: #006080"&gt;&amp;quot;justin@calculatordemo.com&amp;quot;&lt;/span&gt;) };&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;This claim value is completely made up. It’s just a value that I’ve decided to use. Similarly, the claim type is fairly arbitrary. I chose UPN out of convenience – you can choose any claim type you like (as long as you set that claim type up in your ACS scope).&lt;/p&gt;

&lt;p&gt;Next, let’s send those claims to ACS and see what claims we get back:&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;IEnumerable&amp;lt;Claim&amp;gt; acsIssuedClaims = client.TransformForClaims(claims);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Next, we can dump these claims to the console:&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (Claim claim &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; acsIssuedClaims) {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (claim.ClaimType != &lt;span style="color: #006080"&gt;&amp;quot;http://schemas.microsoft.com/ws/2008/06/identity/claims/confirmationkey&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;     Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;===================================&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;     Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;Claim Value: {0}&amp;quot;&lt;/span&gt;, claim.Value);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;     Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;\tClaim Type: {0}&amp;quot;&lt;/span&gt;, claim.ClaimType);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;     Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;\tClaim Issuer: {0}&amp;quot;&lt;/span&gt;, claim.Issuer);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;     Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;===================================\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Before we compile and run this sample, we need to setup ACS. The steps below roughly approximate what to do:&lt;/p&gt;

&lt;p&gt;1) Login to the &lt;a href="http://portal.ex.azure.microsoft.com"&gt;http://portal.ex.azure.microsoft.com&lt;/a&gt; and browse to the ACS management portal&lt;/p&gt;

&lt;p&gt;2) Create a new scope (&lt;a href="http://localhost/myservice"&gt;http://localhost/myservice&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;3) Setup a new Identity Issuer:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;a. Name: SimpleClaimIssuer&lt;/p&gt;

  &lt;p&gt;b. Uri: (&lt;a href="http://localhost/myissuer"&gt;http://localhost/myissuer&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;c. Certificate (the public key only version of sign.cer)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;4) Setup the encryption preferences:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;a. Certificate (the public key verision of enc.cer)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;5) Add a rule:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;a. Input: UPN &lt;a href="mailto:justin@calculatordemo.com"&gt;justin@calculatordemo.com&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;b. Output: Action: Read&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When you press F5 in the project, you will see the Action claim print to the console. In essence, the TokenClient will have created a token that contains a UPN claim, sent it to ACS for transformation, received the result, decrypted and verified the result, and printed the claims to the console.&lt;/p&gt;

&lt;p&gt;A link to download the code is below. Enjoy and please let me know as you find bugs… Again – this code is highly experimental…&lt;/p&gt;
&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-50fa692ec9deac1c.skydrive.live.com/embedrowdetail.aspx/Blog/Microsoft.AccessControl.TokenClient.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9506529" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author><category term="Services in the Cloud" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/Services+in+the+Cloud/default.aspx" /></entry><entry><title>Federated website sample</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2009/02/12/federated-website-sample.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2009/02/12/federated-website-sample.aspx</id><published>2009-02-12T22:19:00Z</published><updated>2009-02-12T22:19:00Z</updated><content type="html">&lt;P&gt;The Geneva Framework FAM is the&amp;nbsp;simplest way to experience ACS and ASP.NET. My friends in platform evangelism wrote a cool app that uses ACS, LiveID, and the Geneva Framework. It's called issuetracker, and I recommend checking it out: &lt;A href="http://www.codeplex.com/azureissuetracker" mce_href="http://www.codeplex.com/azureissuetracker"&gt;http://www.codeplex.com/azureissuetracker&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9416046" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author><category term="Access Control Service" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx" /><category term=".NET Services" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx" /></entry><entry><title>Setting up a solution in .NET Services</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2009/01/16/setting-up-a-solution-in-net-services.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2009/01/16/setting-up-a-solution-in-net-services.aspx</id><published>2009-01-16T22:35:26Z</published><updated>2009-01-16T22:35:26Z</updated><content type="html">&lt;p&gt;My co-worker Jenny Lo wrote a good post on how to get started with .NET Services. If you are wondering how to get started this should do the trick.&lt;/p&gt;  &lt;p&gt;&lt;a title="https://blogs.msdn.com/jennylo/archive/2008/11/04/a-step-by-step-guide-from-creating-a-net-services-solution-to-running-the-multicast-sample.aspx" href="https://blogs.msdn.com/jennylo/archive/2008/11/04/a-step-by-step-guide-from-creating-a-net-services-solution-to-running-the-multicast-sample.aspx"&gt;https://blogs.msdn.com/jennylo/archive/2008/11/04/a-step-by-step-guide-from-creating-a-net-services-solution-to-running-the-multicast-sample.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9331829" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author></entry><entry><title>Access Control Service - Common Interaction Model</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2009/01/16/access-control-service-common-interaction-model.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2009/01/16/access-control-service-common-interaction-model.aspx</id><published>2009-01-16T17:32:00Z</published><updated>2009-01-16T17:32:00Z</updated><content type="html">&lt;p&gt;In my &lt;a href="http://blogs.msdn.com/justinjsmith/archive/2008/11/06/access-control-service-a-simple-scenario.aspx"&gt;previous post&lt;/a&gt; I described at a high level a simple scenario that leverages the Access Control Service. Now I'd like to describe the interactions between messaging participants and the .NET Access Control Service.&lt;/p&gt;  &lt;p&gt;Recall the scenario: a multi-tenant payroll application is running in the cloud - it uses the Access Control Service to simplify federation with enterprise identity providers and handle RBAC processing.&lt;/p&gt;  &lt;p&gt;The interaction pattern for this scenario is shown below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/AccessControlServiceCommonInteractionMod_C5A4/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="405" alt="image" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/AccessControlServiceCommonInteractionMod_C5A4/image_thumb.png" width="644" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h5&gt;Step 0&lt;/h5&gt;  &lt;p&gt;Before using the ACS, the payroll app (called Relying Party in the diagram) must establish a trust with ACS. This is done via a public key certificate exchange. The Relying Party administrator or developer defines or obtains a certificate from the certificate authority of it's choosing, then uploads the public key certificate to ACS. &lt;/p&gt;  &lt;h5&gt;Step 1&lt;/h5&gt;  &lt;p&gt;Next, the Relying Party administrator or developer will define access control rules in ACS. As indicated in &lt;a href="http://blogs.msdn.com/justinjsmith/archive/2008/11/06/access-control-service-a-simple-scenario.aspx"&gt;my earlier post&lt;/a&gt;, the content of the rules is up to the administrator or developer. When this step is completed, ACS is setup and ready for use.&lt;/p&gt;  &lt;h5&gt;Step 2&lt;/h5&gt;  &lt;p&gt;The requestor sends a request for a token (Request for Security Token or RST) to ACS. An RST almost always contains claims (eg username / password, or another token issued from an identity provider). &lt;/p&gt;  &lt;h5&gt;Step 3&lt;/h5&gt;  &lt;p&gt;ACS then checks the claims in the RST. It then uses the input claims to determine the claims that will be sent in the RST response (called RSTR). Consider a simple rule: (Input) Username foo –&amp;gt; (Output) Role Administrator. If the input claim is Username foo, then the output claim is Role Administrator. ACS simply chains these rules together and calculates the output claim set.&lt;/p&gt;  &lt;h5&gt;Step 4&lt;/h5&gt;  &lt;p&gt;After the output claim set is determined, the claims are packaged into a SAML token and returned to the requestor. The token is signed with the ACS certificate and encrypted with the certificate used in step 0. There’s a little more to it than that, because the RP has to be able to differentiate its ACS STS from other ACS STSs. This will surely be a subsequent topic.&lt;/p&gt;  &lt;h5&gt;Step 5&lt;/h5&gt;  &lt;p&gt;The requestor then sends the token to the Relying Party along with a payload of its choosing.&lt;/p&gt;  &lt;h5&gt;Step 6&lt;/h5&gt;  &lt;p&gt;Upon receipt of the token + payload, the Relying Party verifies / validates the token, checks the claims in the token, then processes the payload accordingly. Concretely this means that the Relying Party verifies the token signature &amp;amp; decrypts the token. If the token signature / encryption keys are OK, the Relying Party then checks the claims in the token. If that endpoint or operation on the Relying Party requires Administrative privileges, then the token must contain an Administrator claim. Think of it like a simple toll gate. If the correct claim is present, the call proceeds. If not, then the call fails.&lt;/p&gt;  &lt;h5&gt;Claims Transformer&lt;/h5&gt;  &lt;p&gt;At a high level, ACS receives input claims and transforms them into output claims. We simplify these types of transformations into rules, and provide customers the ability to define these rules on a portal or through a simple API.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9329645" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author><category term="Services in the Cloud" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/Services+in+the+Cloud/default.aspx" /><category term="Access Control Service" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx" /><category term=".NET Services" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx" /></entry><entry><title>Access Control Service - A Simple Scenario</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2008/11/06/access-control-service-a-simple-scenario.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2008/11/06/access-control-service-a-simple-scenario.aspx</id><published>2008-11-07T07:42:56Z</published><updated>2008-11-07T07:42:56Z</updated><content type="html">&lt;p&gt;To the already initiated claims disciples, the Access Control Service is a multi-tenant Resource STS. The behavior of each STS is determined by simple rules - the rules control how each STS &lt;em&gt;&lt;strong&gt;transforms claims&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;To those not already initiated in the claims methodology, the previous definition may seem a bit obtuse. If that's the case, then consider a simple scenario:&lt;/p&gt;  &lt;h5&gt;Background&lt;/h5&gt;  &lt;p&gt;Let's say you work for a software vendor (Foo) that sells a web application (how about employee payroll management) to businesses. You have an existing on-premise offering and an existing install base. This version of your software integrates with customer identity providers (e.g. Active Directory, Tivoli, etc.). &lt;/p&gt;  &lt;p&gt;Customer administrators can allow other employees access to the payroll system - this is driven by group membership (e.g. Domain Users have access). Internally the application uses a set of pre-defined roles, and assigns permissions based on role membership. As an example, consider the following simple model:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Active Directory Group= HR Payroll --&amp;gt; Application Role = Administrator&lt;/p&gt;    &lt;p&gt;Application Role = Administrator --&amp;gt; Permission = CreatePayroll&lt;/p&gt;    &lt;p&gt;Application Role = Administrator --&amp;gt; Permission = PrintPayrollChecks&lt;/p&gt;    &lt;p&gt;... &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This approach is known as &lt;a href="http://en.wikipedia.org/wiki/Role-Based_Access_Control"&gt;Role Bases Access Control (RBAC)&lt;/a&gt;. It's very simple, powerful, and very common.&lt;/p&gt;  &lt;p&gt;Given that Foo's existing offering is on-premise it works well. Initial setup requires some basic plumbing with a &lt;strong&gt;&lt;em&gt;single&lt;/em&gt;&lt;/strong&gt; on-premise identity provider and a bit of configuration by the application administrator.&lt;/p&gt;  &lt;h5&gt;The Winds of Change&lt;/h5&gt;  &lt;p&gt;Some of your existing customers and many prospects are asking for a hosted / cloud version of your payroll application. As your team considers options, it becomes apparent that a good long term approach is to modify the existing on-premise application to be multi-tenant. Modifying a single tenant application to be multi-tenant isn't a joke, but customers are demanding it, so you proceed.&lt;/p&gt;  &lt;p&gt;One of the things your team realizes pretty quickly is that the RBAC model in the on-premise application has to change a bit. The core concept of mapping groups to roles to permissions appears to still be viable, but now there are multiple identity providers. Your application now has to be able to differentiate Bar Corporation Groups from Baz Corporation Groups.&lt;/p&gt;  &lt;p&gt;Luckily most of the software vendors that sell identity providers have built versions of their identity providers that will expose groups and other identity attributes outside of the corporate LAN. I believe that Microsoft's offering in this area is outstanding (Geneva Server, Geneva Framework, Microsoft Services Connector and the Federation Gateway - see &lt;a href="http://www.identityblog.com/"&gt;Kim Cameron's blog&lt;/a&gt; for fantastic details). Concretely, this means that the hosted, multi-tenant version of your application can federate with lots of different corporate identity providers.&lt;/p&gt;  &lt;h5&gt;The Access Control Service&lt;/h5&gt;  &lt;p&gt;There is still a problem, however. You'll have to add quite a bit of code to your application to accept and parse tokens from these identity providers. To top it off, you'll have to make it pretty flexible and configurable. This is where the Access Control Service shines. In a nutshell, it is a service that simplifies interactions with any standards based identity provider, and allows you to define rules that transform Groups to Application Roles to Application Permissions.&lt;/p&gt;  &lt;p&gt;To put it another way, your application won't have to directly interact with any identity providers. It can trust tokens from the Access Control Service. The Access Control Service will handle the gory details of decrypting, verifying and parsing tokens, extracting Groups (or other identity attributes) from tokens, and mapping Groups to Application Roles to Permissions. The end result is a single sign-on experience for your customers, and a simplified code base. &lt;/p&gt;  &lt;p&gt;Up next - the common interaction model of the Access Control Service &amp;amp; why claims disciples call it a &lt;em&gt;&lt;strong&gt;claims transformer&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9051762" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author><category term="Access Control Service" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx" /><category term=".NET Services" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx" /></entry><entry><title>.NET Services - Launch at PDC 08</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2008/10/27/net-services-launch-at-pdc-08.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2008/10/27/net-services-launch-at-pdc-08.aspx</id><published>2008-10-27T15:39:03Z</published><updated>2008-10-27T15:39:03Z</updated><content type="html">&lt;p&gt;Today we announced the CTP release of .NET Services! For quite a while now, I have been working on this project. It's great to see it announced and to have customers use our services. .NET Services consist of three services: the Service Bus, the Workflow Service, and my personal favorite: The Access Control Service. &lt;/p&gt;  &lt;p&gt;My focus has almost exclusively been on the Access Control Service, so expect it to be the main topic of this blog for quite a while. The Service Bus, Workflow Service, and the portals use the Access Control Service so I will likely spend some time on those as well.&lt;/p&gt;  &lt;p&gt;In a nutshell, the Access Control Service allows you factor access control code into a manageable collection of rules. Combined with Geneva Server and the Geneva Framework, you can do things like map groups to roles, and roles to permissions. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9018394" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author></entry><entry><title>Access Control rule changes in BizTalk Services R12</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2008/07/16/access-control-rule-changes-in-biztalk-services-r12.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2008/07/16/access-control-rule-changes-in-biztalk-services-r12.aspx</id><published>2008-07-16T17:12:32Z</published><updated>2008-07-16T17:12:32Z</updated><content type="html">&lt;p&gt;Yesterday we released a new version of BizTalk Services (R12). Over the next few weeks I'll be updating my blog with descriptions of the identity related features we added in this release. For now I'd like to describe one of the most obvious changes to the way you create, view, and manage access control rules.&lt;/p&gt;  &lt;p&gt;To explain what these modes do, let me first describe the changes we made. Here are a few of the key concepts:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Every Identity Service account owns a Security Token Service (STS). &lt;/li&gt;    &lt;li&gt;An STS is composed of one or more scopes. &lt;/li&gt;    &lt;li&gt;A scope contains zero or more access control rules.&lt;/li&gt;    &lt;li&gt;An STS owner can grant another Identity Service account permission to edit the access control rules in a scope&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;2-4 are new. The messaging (also called relay) service uses these concepts. It has no Identity Service special privileges. It is using the same core features available to everyone else. The Messaging Service owns an STS and it defines a root scope of http://connect.biztalk.net/services/. When you create a new account (newaccount) in the Identity Service, the messaging service creates a new scope &lt;a href="http://connect.biztalk.net/services/newaccount"&gt;http://connect.biztalk.net/services/newaccount&lt;/a&gt;. The Messaging Service then grants (newaccount) the permission to edit access control rules in (and only in) that scope. This new account provisioning is done in a provisioning agent that uses our public API.&lt;/p&gt;  &lt;p&gt;Newaccount can also create a scope within that scope (like&amp;#160; &lt;a href="http://connect.biztalk.net/services/newaccount/newestscope"&gt;http://connect.biztalk.net/services/newaccount/newestscope&lt;/a&gt;). NewAccount can then grant another IdentityService account permission to edit access control rules within that scope.&lt;/p&gt;  &lt;p&gt;The behavior here is functionally similar to what an ISV might want (allow one of their customers to define access control rules for their &amp;#8220;chunk&amp;#8221; of the service).&lt;/p&gt;  &lt;p&gt;It is important to note that the access control rules that belong to the scope &lt;a href="http://connect.biztalk.net/services/newaccount"&gt;http://connect.biztalk.net/services/newaccount&lt;/a&gt; are &lt;b&gt;owned &lt;/b&gt;by the Messaging Service. NewAccount does not own the rules, it has just been granted permission to edit rules within that scope.&lt;/p&gt;  &lt;p&gt;When designing the UI we wanted the experience of editing access control rules in a scope owned by another account to be distinct from the experience of editing access control rules in scopes you own. Our first attempt at drawing this ownership boundary is to set the default UI mode to show only the scopes you own. We called the default mode &amp;#8220;Basic&amp;#8221;. The mode that provides visibility into scopes owned by other accounts is called &amp;#8220;Advanced&amp;#8221;. In short, if you want to work with the access control rules in the messaging service scope (or the workflow scope), you can switch the mode to &amp;#8220;Advanced&amp;#8221; (shown below).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/AccessControlrulechangesinBizTalkService_8F80/clip_image001_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="141" alt="clip_image001" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/AccessControlrulechangesinBizTalkService_8F80/clip_image001_thumb.jpg" width="170" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In keeping with the traditions of BizTalk Services, we love feedback &amp;#8211; let us know what you think&amp;#8230;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8739328" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author></entry><entry><title>BizTalk Services and "Add Service Reference"</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2008/04/08/biztalk-services-and-add-service-reference.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2008/04/08/biztalk-services-and-add-service-reference.aspx</id><published>2008-04-08T21:34:07Z</published><updated>2008-04-08T21:34:07Z</updated><content type="html">&lt;p&gt;One of the little known features of BizTalk Services is it's support for metadata. There's a sample in the SDK (default path: C:\Program Files\Microsoft BizTalk Services SDK\Samples\Communication\ExploringFeatures\Metadata\MetadataExchange\CS30) that shows you how to listen for incoming metadata requests through the relay. It tracks with the WCF metadata story and is built on WCF extensibility points. In fact, if you open the machine.config file, you will see the policy importers and the WSDL extensions.&lt;/p&gt;  &lt;p&gt;The end user experience is quite simple. At some point, you setup the service behavior&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;behaviors&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;serviceBehaviors&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
     &lt;span class="rem"&gt;&amp;lt;!-- Application Behaviors --&amp;gt;&lt;/span&gt;
     &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;behavior&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;serviceMetadata&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;serviceMetadata&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
     &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;behavior&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;serviceBehaviors&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;behaviors&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;

&lt;p&gt;Next you define an endpoint - (Notice the binding is the RelayBinding and not the normal metadata binding.)&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;endpoint&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;MexEndpoint&amp;quot;&lt;/span&gt;
          &lt;span class="attr"&gt;contract&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;IMetadataExchange&amp;quot;&lt;/span&gt;
          &lt;span class="attr"&gt;binding&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;relayBinding&amp;quot;&lt;/span&gt;
          &lt;span class="attr"&gt;bindingConfiguration&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;default&amp;quot;&lt;/span&gt; 
          &lt;span class="attr"&gt;address&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;mex&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;That's about all that's required to expose metadata.&lt;/p&gt;

&lt;p&gt;Consuming it is just as easy. From a new VS project, all you have to do is right click the project and select &amp;quot;Add Service Reference&amp;quot; (VS 2008).&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/BizTalkServicesandAddServiceReference_C1B0/image9.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="247" alt="image" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/BizTalkServicesandAddServiceReference_C1B0/image9_thumb.png" width="268" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;In the next window, enter the service bus URI (like sb://connect.biztalk.net/services/justinjsmith/Echo) and click Go:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/BizTalkServicesandAddServiceReference_C1B0/addref_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="287" alt="addref" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/BizTalkServicesandAddServiceReference_C1B0/addref_thumb_1.png" width="354" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;When you click OK, the tooling (think svcutil) will generate the proxy code and config for you. In an empty project, literally the only two lines of code you have to write are:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;EchoContractClient client = &lt;span class="kwrd"&gt;new&lt;/span&gt; EchoContractClient();
Console.WriteLine(client.Echo(&lt;span class="str"&gt;&amp;quot;hi there&amp;quot;&lt;/span&gt;));&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8370072" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author></entry><entry><title>First week at the new job</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2008/03/22/first-week-at-the-new-job.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2008/03/22/first-week-at-the-new-job.aspx</id><published>2008-03-22T17:01:50Z</published><updated>2008-03-22T17:01:50Z</updated><content type="html">&lt;p&gt;This week I started a new job at Microsoft - I've moved from Developer and Platform Evangelism to the Connected Systems Division. I'm now a program manager on the BizTalk Services team (&lt;a href="http://biztalk.net"&gt;http://biztalk.net&lt;/a&gt;). It was hard to leave DPE, but this seems like the right opportunity. For those that haven't seen BizTalk.net, it's an incubation project for messaging, security, and workflow services that run at scale in Microsoft's hosted environment.&lt;/p&gt;  &lt;p&gt;The week was a whirlwind, and I am having a blast. The team is very agile, and it has the atmosphere of a startup. Truly cool. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8331356" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author><category term="About Justin" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/About+Justin/default.aspx" /><category term="BizTalk Services" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/BizTalk+Services/default.aspx" /><category term="BizTalk.NET Services" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/BizTalk.NET+Services/default.aspx" /></entry><entry><title>Robots and BizTalk Services</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2008/02/28/robots-and-biztalk-services.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2008/02/28/robots-and-biztalk-services.aspx</id><published>2008-02-28T18:58:23Z</published><updated>2008-02-28T18:58:23Z</updated><content type="html">&lt;p&gt;I just posted a new screencast on Channel 9: &lt;a title="http://channel9.msdn.com/Showpost.aspx?postid=386824" href="http://channel9.msdn.com/Showpost.aspx?postid=386824"&gt;http://channel9.msdn.com/Showpost.aspx?postid=386824&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;It's purpose is to show off the power of claims and claims transformation, especially in a hosted service like BizTalk Services. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7936869" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author><category term="Services in the Cloud" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/Services+in+the+Cloud/default.aspx" /><category term="BizTalk Services" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/BizTalk+Services/default.aspx" /><category term="BizTalk.NET Services" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/BizTalk.NET+Services/default.aspx" /><category term="Robotics" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/Robotics/default.aspx" /></entry><entry><title>Claims and the Calculator sample in the BizTalk Services SDK</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2008/02/27/claims-and-the-calculator-sample-in-the-biztalk-services-sdk.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2008/02/27/claims-and-the-calculator-sample-in-the-biztalk-services-sdk.aspx</id><published>2008-02-27T23:01:00Z</published><updated>2008-02-27T23:01:00Z</updated><content type="html">&lt;p&gt;The identity provider in BizTalk Services is a way for applications to delegate identity and access control to a hosted service. In other words, an application can use BizTalk Services to answer the all-important question &amp;quot;Who are you and what are you allowed to do?&amp;quot;. If you haven't checked it out, I strongly recommend it (&lt;a href="http://biztalk.net"&gt;http://biztalk.net&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;The identity provider can be used without the connectivity service. The calculator sample in the SDK is an example (as of R10, it installs by default in the C:\Program Files\Microsoft BizTalk Services SDK\Samples\AccessControl directory). This entry examines the calculator sample that uses a certificate, and this blog post is not a substitute for reading the readme...&lt;/p&gt;  &lt;p&gt;As indicated in the readme, running this sample requires you to login to &lt;a href="http://biztalk.net"&gt;http://biztalk.net&lt;/a&gt;, go to &amp;quot;Manage Access Control&amp;quot;, &amp;quot;Rules&amp;quot;, and setup a few claims mappings. After you login, click on the following (right hand side):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/SendandListeninBizTalkServices_A7F4/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="114" alt="image" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/SendandListeninBizTalkServices_A7F4/image_thumb.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The Rules link takes you to a page that lets you map input claims to output claims. In the case of the Calculator sample, you are going to map BizTalk.NET usernames to Resource+Operation claims. These Resource+Operation claims are demanded by the calculator service (running on your machine). WCF shields you from quite a bit of the protocol level goo here. The following is an example of what it looks like in the web UI:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/SendandListeninBizTalkServices_A7F4/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="434" alt="image" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/SendandListeninBizTalkServices_A7F4/image_thumb_1.png" width="644" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;There's lots of interesting things going on here. For now, let me just focus on the Output Claim Value field. It's the concatenation of (in this case) the service URL, &amp;quot;#&amp;quot;, the service contract name, &amp;quot;.&amp;quot;, and the action of the operation:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;&amp;lt;Value&amp;gt; ::= &amp;lt;Service Url&amp;gt; &amp;quot;#&amp;quot; &amp;lt;Service Contract Name&amp;gt; &amp;quot;.&amp;quot; &amp;lt;Operation Action&amp;gt;&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This may sound very scientific, but the reality is that it's simply a matter of a choice made by the ServiceAuthorizationManager derived type that's included in the Calculator sample (available at C:\Program Files\Microsoft BizTalk Services SDK\Samples\AccessControl\CalculatorServiceWithCertificate\FederatedAccessManager). You can change it to be whatever you want (of &amp;lt;Read&amp;gt; or &amp;lt;Write&amp;gt; could have been substituted for contract name + operation action).&lt;/p&gt;  &lt;p&gt;After you setup the input and output claim mapping for the calculator service, you have a system like the following:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/SendandListeninBizTalkServices_A7F4/image_8.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="484" alt="system" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/SendandListeninBizTalkServices_A7F4/image_thumb_3.png" width="438" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Step 1: Present identity claims to BizTalk.NET&lt;/p&gt;  &lt;p&gt;Step 2: Receive the claims that are mapped to that identity&lt;/p&gt;  &lt;p&gt;Step 3: Send those claims to the Calculator Service&lt;/p&gt;  &lt;p&gt;Step 4: If the claim (URL+ContractName+Action) is present, the ServiceAuthorizationManager allows the WCF infrastructure to invoke the calculator implementation.&lt;/p&gt;  &lt;h4&gt;In effect, the calculator service delegates identity and access control to BizTalk Services.&lt;/h4&gt;  &lt;p&gt;I think that's way cool.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7924187" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author><category term="Services in the Cloud" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/Services+in+the+Cloud/default.aspx" /><category term="BizTalk Services" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/BizTalk+Services/default.aspx" /><category term="BizTalk.NET Services" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/BizTalk.NET+Services/default.aspx" /></entry><entry><title>enableWebScript, UriTemplate, and HTTP methods</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2008/02/15/enablewebscript-uritemplate-and-http-methods.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2008/02/15/enablewebscript-uritemplate-and-http-methods.aspx</id><published>2008-02-15T23:55:28Z</published><updated>2008-02-15T23:55:28Z</updated><content type="html">&lt;p&gt;A little while ago I ran into an interesting set of errors that may be of interest to you. Consider the following service contract snippet:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;[OperationContract]
[WebGet(UriTemplate=&lt;span class="str"&gt;&amp;quot;foobar/{value}&amp;quot;&lt;/span&gt;)]
&lt;span class="kwrd"&gt;String&lt;/span&gt; GetData(String &lt;span class="kwrd"&gt;value&lt;/span&gt;);&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;If you add the enableWebScript behavior to an endpoint that is using the WebHttpBinding, you will see this exception when the ServiceHost starts:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;System.InvalidOperationException: Endpoints using 'UriTemplate' cannot be used with 'System.ServiceModel.Description.WebScriptEnablingBehavior'.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The reason for this error is rooted in the origin of the enableWebScript behavior. One of it's design objectives was to simplify working with the ASP.NET AJAX stack (Javascript proxy, JSON messages, etc). The AJAX stack doesn't have the equivalent of the UriTempalte type. It simply puts parameters in query strings (gets) and constructs entity bodies (posts). This is the default behavior of the WCF stack when the WebGet / WebInvoke annotations do not have a value for UriTemplate. Since any value of UriTemplate would be incompatible with the ASP.NET AJAX stack, we throw when it's present.&lt;/p&gt;

&lt;p&gt;If you want JSON messages from a contract and you want to use the UriTemplate niceness, you can change your contract to:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;[OperationContract]
[WebGet(UriTemplate=&lt;span class="str"&gt;&amp;quot;foobar/{value}&amp;quot;&lt;/span&gt;, ResponseFormat=WebMessageFormat.Json)]
&lt;span class="kwrd"&gt;String&lt;/span&gt; GetData(S&lt;span class="kwrd"&gt;tring&lt;/span&gt; &lt;span class="kwrd"&gt;value&lt;/span&gt;);&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Then, instead of using the enableWebScript behavior, use the WebHttpBehavior. You'll lose compat with the ASP.NET AJAX client stack (and the JS proxy), but you have the URI you are looking for.&lt;/p&gt;

&lt;p&gt;The same is true if you are using the WebInvoke attribute and any HTTP method other than POST. The AJAX client stack only knows GET and POST...&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7724901" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author><category term="WCF" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/WCF/default.aspx" /><category term="REST" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/REST/default.aspx" /><category term="Web Programming with WCF" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/Web+Programming+with+WCF/default.aspx" /><category term="JSON" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/JSON/default.aspx" /><category term="ASP.NET AJAX" scheme="http://blogs.msdn.com/justinjsmith/archive/tags/ASP.NET+AJAX/default.aspx" /></entry><entry><title>Life at Microsoft</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/justinjsmith/archive/2008/02/13/life-at-microsoft.aspx" /><id>http://blogs.msdn.com/justinjsmith/archive/2008/02/13/life-at-microsoft.aspx</id><published>2008-02-13T22:20:49Z</published><updated>2008-02-13T22:20:49Z</updated><content type="html">&lt;p&gt;I'm not prone to publish non-techie topics on this blog, but I can't help this one :). I'm often asked what life is like at Microsoft, and this video pretty much sums it up...&lt;/p&gt;  &lt;p&gt;&lt;a title="http://on10.net/blogs/tina/Life-At-Microsoft/" href="http://on10.net/blogs/tina/Life-At-Microsoft/"&gt;http://on10.net/blogs/tina/Life-At-Microsoft/&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7681655" width="1" height="1"&gt;</content><author><name>justinjsmith</name><uri>http://blogs.msdn.com/members/justinjsmith.aspx</uri></author></entry></feed>