<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>The Hogg Blog : Security</title><link>http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx</link><description>Tags: Security</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>SecPAL Parser Updated for VS2008 and F#1.9.6.16</title><link>http://blogs.msdn.com/thehoggblog/archive/2009/09/26/secpal-parser-updated-for-vs2008-and-f-1-9-6-16.aspx</link><pubDate>Sun, 27 Sep 2009 01:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9899907</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/9899907.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=9899907</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=9899907</wfw:comment><description>&lt;TABLE class=FullWidth class="FullWidth"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;DIV id=ctl00_ctl00_MasterContent_Content_PostRepeater_ctl00_BodyDiv class=discussionListContent&gt;
&lt;P&gt;I finally got around to updating the SecPAL Parser to run on the latest version of Visual Studio and F#. Development experience should be much cleaner now because F# is far better integrated into VS. If you run into any problems please post a note or drop me an email. For more information please see our &lt;A href="http://secpal.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33592" mce_href="http://secpal.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33592"&gt;SecPAL CodeBox Community Site&lt;/A&gt;. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9899907" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/SecPAL/default.aspx">SecPAL</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Web+Service+Security/default.aspx">Web Service Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/F_2300_/default.aspx">F#</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/DSL/default.aspx">DSL</category></item><item><title>A Graphical DSL for Describing SOA Applications</title><link>http://blogs.msdn.com/thehoggblog/archive/2009/01/27/a-soa-graphical-dsl.aspx</link><pubDate>Wed, 28 Jan 2009 09:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9379930</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/9379930.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=9379930</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=9379930</wfw:comment><description>&lt;P&gt;Last October we ran a SOA workshop in Redmond, with the goal being to have members of the MCS field, global practices and other customer facing organizations discuss scenarios and patterns that they see on a regular basis. Having run several of these workshops in the psat, one challenge that is hard to overcome is ensuring people describe their scenarios and solutions in a standard way. &lt;/P&gt;
&lt;P&gt;Given the lack of a standard vocabulary for many (most?) domains within our industry this is obviously made more difficult. In an attempt to overcome this shortfall myself, Piyush Gupta and Sudarsan Srinivasan&amp;nbsp;spent about a month decomposing a number of customer solutions into their constituent patterns - thus building a catalog of patterns that participants at our workshop could use when describing solutions to their scenarios. Where such patterns were already documented, we normalized on terms from sources such as Hohpe's Integration Patterns, SOA Patterns, Workflow Patterns, Patterns and Practices and IBM's dev center.&lt;/P&gt;
&lt;P&gt;Even armed with a standard vocabulary, the next problem becomes how do you &lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;succinctly &lt;/SPAN&gt;present complex system designs without requiring large numbers of UML objects. Christopher Alexander aluded to the solution to this problem through the use of a visual notation to accompany each pattern. So I searched around and found that Matthew Oskowis had created a nice little Visio template including icons for each of Gregor Hohpe's patterns. This helped us for about 50% of the patterns and so I extended it to include the additional patterns that we had identified. &lt;/P&gt;
&lt;P&gt;When using this visual notation it became too difficult expecting everyone to recognize each of these icons, so I also extended each icon to include the pattern name. It makes the diagrams a little clumsy - but they are still quite readable. As you can see in the diagram below it is also obvious that these icons convey a lot of information in a small amount of space - more so than an equivalent UML model would for example.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The diagram below illustrates one such example, where a service agent is performing requestor side caching allowing configuration information to be retrieved from a central configuration service and cached. The Configuration Notification Service also allows the client (should it subscribe) to be notified of changes to this configuration. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG title="Requestor side caching" style="WIDTH: 288px; HEIGHT: 233px" height=233 alt="Requestor side caching" src="http://blogs.msdn.com/photos/jason_hogg/images/9379934/original.aspx" width=288 mce_src="http://blogs.msdn.com/photos/jason_hogg/images/9379934/original.aspx"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For my presentation for tomorrow's SOA BP conference I will be walking through a number of scenarios using this SOA DSL, so figured I would first post it on the blog for people that are interested in using it. If you use it or extend it let me know how you go, or share your updates. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9379930" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/thehoggblog/attachment/9379930.ashx" length="335360" type="application/vnd.visio" /><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Design+Patterns/default.aspx">Design Patterns</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/DSL/default.aspx">DSL</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/S_2B00_S/default.aspx">S+S</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/SOA/default.aspx">SOA</category></item><item><title>Are banks encouraging phone phishing attacks?</title><link>http://blogs.msdn.com/thehoggblog/archive/2009/01/06/are-banks-encouraging-phone-phishing-attacks.aspx</link><pubDate>Wed, 07 Jan 2009 02:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9286465</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/9286465.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=9286465</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=9286465</wfw:comment><description>&lt;P&gt;I recently called the support number to verify a charge on my Wells Fargo account and it surprised me when the automated teller requested that I enter my card number and then my pin number. I was always lead to believe that we should never share our pin numbers as that obviously breaches the security of our ATM cards - so I hung up and waited until I could talk with a customer representative. I just spoke with such a representative and apparently the bank is ok for you to share your pin number with an automated teller. &lt;/P&gt;
&lt;P&gt;This seems very strange to me as how am I to determine whether in fact I am talking with an automated teller owned by Wells Fargo or an automated teller owned by someone with malicious intent. This possibility is greatly increased by the large number of phone numbers that the banks have - preventing me from even really knowing whether I am talking with Wells Fargo or not. This is made all the worse given the large number of phone numbers that banks appear to have nowadays. The enquiry I just made has had me dial 4 different numbers during which time I was also transferred 3 times - meaning I really have no idea who I am talking to. I can also imagine would be perpetrators obtaining numbers that are 1 digit off of major banks and obtaining ATM card information that way.&lt;/P&gt;
&lt;P&gt;Is it just me or does this seem like a huge risk? Or is there something that I am missing here in terms of why this isn't a security risk? Also, do banks other than Wells Fargo also require customers to enter their pin numbers? &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9286465" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category></item><item><title>Geneva Identity Management Framework</title><link>http://blogs.msdn.com/thehoggblog/archive/2008/10/27/geneva-identity-management-framework.aspx</link><pubDate>Mon, 27 Oct 2008 22:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9018849</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/9018849.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=9018849</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=9018849</wfw:comment><description>&lt;P&gt;For anyone who has followed my blogs around developing an STS or writing authorization policies you will be very interested in &lt;A class="" href="http://www.identityblog.com/" mce_href="http://www.identityblog.com/"&gt;Kim Cameron&lt;/A&gt;'s announcement at PDC of the Geneva Identity Management platform. Genvea includes:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Geneva Framework - A .NET framework for writing interoperable, claims aware applicatoins&lt;/LI&gt;
&lt;LI&gt;Geneva STS - An STS integrated with AD.&amp;nbsp;Supports issuance (finally) and consumption of Cardspace Cards.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;CardSpace Geneva - A federation client &lt;/LI&gt;&lt;/UL&gt;
&lt;P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;In addition to these framework like components, there are also a couple of services (biult using Geneva) including:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;Microsoft Federation Gateway - Provides the basis for the Microsoft Services Identity backbone - brokering access to Microsoft cloud applications and developre services&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;Microsoft Connector&amp;nbsp;Services - Federates AD to the Microsoft Federation Gateway. Provides lightweight access to the federation gateway.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;.NET Access Control Service - Next generation service (STS) that performs claims transformation. It receives authentication information and issues authz decisions. This includes a management portal and API's for managing and writing authz policies. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;&amp;nbsp;I haven't had a chance to play with any of these tools yet, but will be very interested to see how the Access Control Service's capabilities compare with SecPAL... :-)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9018849" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Web+Service+Security/default.aspx">Web Service Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/PDC2008/default.aspx">PDC2008</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/S_2B00_S/default.aspx">S+S</category></item><item><title>patterns &amp; practices Improving Web Services Security: Now Available!</title><link>http://blogs.msdn.com/thehoggblog/archive/2008/06/20/patterns-practices-improving-web-services-security-now-available.aspx</link><pubDate>Fri, 20 Jun 2008 17:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8625462</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/8625462.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=8625462</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=8625462</wfw:comment><description>&lt;P&gt;Over the last 12 months we have had a lot of people who used the &lt;EM&gt;Web Service Security - Scenarios, Patterns and Implementation Guidance&lt;/EM&gt; ask us where the implementation guidance for WCF was. Great news. JD Meier, Jason Taylor, Prashant Bansode and Rob Boucher and the rest of his P&amp;amp;P team have just released their guide which includes Security Fundamentals for Web Services, WCF Security Fundamentals and Scenario specific guidance. Great stuff - and a must read for anyone designing secure distributed systems based on WCF. Available from: &lt;A href="http://www.codeplex.com/WCFSecurityGuide" mce_href="http://www.codeplex.com/WCFSecurityGuide"&gt;http://www.codeplex.com/WCFSecurityGuide&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=8625462" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Web+Service+Security/default.aspx">Web Service Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Design+Patterns/default.aspx">Design Patterns</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>SAML STS for WSE 3.0 (reposted)</title><link>http://blogs.msdn.com/thehoggblog/archive/2007/11/20/saml-sts-for-wse-3-0-reposted.aspx</link><pubDate>Wed, 21 Nov 2007 09:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6450918</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>14</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/6450918.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=6450918</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=6450918</wfw:comment><description>&lt;P&gt;Every week or so I get another email asking where the sample code for the SAML STS for WSE 3.0 has been moved to now that GotDotNet GotNuked. It wasn't moved anywhere. So I figured I would repost it here for those that needs i. For those new to this you should also take a look at Pablo Cibraro's&amp;nbsp;&lt;A class="" href="http://weblogs.asp.net/cibrax/search.aspx?q=saml&amp;amp;o=Relevance" mce_href="http://weblogs.asp.net/cibrax/search.aspx?q=saml&amp;amp;o=Relevance"&gt;blog&lt;/A&gt;&amp;nbsp;(Pablo was one of the developers on this sample) as he extended this to support credential caching and more. &lt;/P&gt;
&lt;P&gt;A few caveats that people should be aware of when looking at this sample code:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;For obvious reasons, where at all possibly you should seek a WCF based solution first. There still appear to be a few people that cannot use WCF yet - which is why I am reposting this. &lt;/LI&gt;
&lt;LI&gt;We did do interop testing between a RC version of WCF and this STS - but this was released before WCF went gold - so if interop is important to you then you should test that.&lt;/LI&gt;
&lt;LI&gt;The code within this requires extensive knowledge of .NET security API's. Do not consider deploying this if you do not understand the entire solution.&lt;/LI&gt;
&lt;LI&gt;As with all things security related you should ensure you put together an appropriate security threat model and as part of your solution design... &lt;/LI&gt;
&lt;LI&gt;And of course batteries are not included!&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Most common issues encountered:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Configuring the access rights to the certifcates is probably the number one issue people run into. If you need help managing certs / permissions download this awesome&amp;nbsp;&lt;A class="" href="http://blogs.msdn.com/thehoggblog/archive/2007/08/20/swiss-army-knife-of-x-509-certificate-tools.aspx" mce_href="http://blogs.msdn.com/thehoggblog/archive/2007/08/20/swiss-army-knife-of-x-509-certificate-tools.aspx"&gt;tool&lt;/A&gt;. &lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6450918" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/thehoggblog/attachment/6450918.ashx" length="1065836" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Web+Service+Security/default.aspx">Web Service Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category></item><item><title>Sample declarative access control policy</title><link>http://blogs.msdn.com/thehoggblog/archive/2007/08/28/sample-declarative-access-control-policy.aspx</link><pubDate>Wed, 29 Aug 2007 02:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4620131</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/4620131.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=4620131</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=4620131</wfw:comment><description>&lt;P&gt;In my previous &lt;A class="" href="http://blogs.msdn.com/thehoggblog/archive/2007/08/26/parser-for-secpal-simplified-english-grammar-now-available.aspx" mce_href="http://blogs.msdn.com/thehoggblog/archive/2007/08/26/parser-for-secpal-simplified-english-grammar-now-available.aspx"&gt;post&lt;/A&gt; I mentioned that we have now released a parser for SecPAL that allows policies to be written in a human readable simplified English grammar. I thought it might be worth including an example - based on the scenario that was used in the GridToday post on &lt;A class="" href="http://www.gridtoday.com/grid/1546527.html" mce_href="http://www.gridtoday.com/grid/1546527.html"&gt;Access Control in Grid Computing Environments&lt;/A&gt; which (funnily enough) is very similar to the two pages of F# available &lt;A class="" href="http://blogs.msdn.com/thehoggblog/archive/2007/06/15/writing-secpal-assertions-in-f.aspx" mce_href="http://blogs.msdn.com/thehoggblog/archive/2007/06/15/writing-secpal-assertions-in-f.aspx"&gt;here&lt;/A&gt; and very similar to the C# sample AttributeScenario solution included inside the &lt;A class="" href="http://research.microsoft.com/research/downloads/details/81e28b29-10be-4551-9ede-1690f32e1581/details.aspx" mce_href="http://research.microsoft.com/research/downloads/details/81e28b29-10be-4551-9ede-1690f32e1581/details.aspx"&gt;v1.1&lt;/A&gt; release of SecPAL. &lt;/P&gt;
&lt;P&gt;The sample shows the policies being specified in C# using a similar approach to that you might use to specify dynamic SQL. Such policies could just as easily be read from a file etc.&amp;nbsp;&amp;nbsp;In the future I will provide some more advanced samples - including more discussion about each of the samples - but for now just remember that another of SecPAL's strengths&amp;nbsp;is its ability to create generic access control policies through the use of variables. In the simplified English grammar variables are prefixed by&amp;nbsp;% signs. Variables are substituted for concrete values during evaluation. Enjoy... &lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;using&lt;/FONT&gt;&lt;FONT size=2&gt; System;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;using&lt;/FONT&gt;&lt;FONT size=2&gt; System.Collections.Generic;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;using&lt;/FONT&gt;&lt;FONT size=2&gt; System.Text;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;using&lt;/FONT&gt;&lt;FONT size=2&gt; Microsoft.Research.SecPal.Authorization;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;using&lt;/FONT&gt;&lt;FONT size=2&gt; Microsoft.Research.SecPal.Parser;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;namespace&lt;/FONT&gt;&lt;FONT size=2&gt; DeclarativeTest&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;class&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Program&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;static&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; Main(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;[] args)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000 size=2&gt;// Input policies &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// 1. Policy restricting access to a resource to those principals possessing a valid email address&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt; resourceAccessPolicy = &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#a31515 size=2&gt;"LA says %p can read digitalContent:'file://public/' "&lt;/FONT&gt;&lt;FONT size=2&gt; +&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;" if %p possesses %a"&lt;/FONT&gt;&lt;FONT size=2&gt; +&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;" where %a matches rfc822Name:'.*@microsoft.com' "&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// 2. Policy delegating the rights to an STS to make statements about possession of email attributes&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt; trustPolicy = &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#a31515 size=2&gt;"LA says K-STS can say %p possesses %a"&lt;/FONT&gt;&lt;FONT size=2&gt; +&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;" where %a matches rfc822Name:'.*@microsoft.com' "&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// 3. Identity assertion that would normally be included inside a token when the user requests access to a resource&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt; identityPolicy = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"K-STS says K-JAHOGG possesses rfc822Name:'jahogg@microsoft.com' "&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Authorization Query&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Query created based on the specifics of the resource access request&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt; authzQuery = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"LA says K-JAHOGG can read digitalContent:'file://public/foo.txt' "&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Error - keyholder principals are getting recreated each time&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;Assertion&lt;/FONT&gt;&lt;FONT size=2&gt; a1 = &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Interpretor&lt;/FONT&gt;&lt;FONT size=2&gt;.parseAssertion(resourceAccessPolicy);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;Assertion&lt;/FONT&gt;&lt;FONT size=2&gt; a2 = &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Interpretor&lt;/FONT&gt;&lt;FONT size=2&gt;.parseAssertion(trustPolicy);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;Assertion&lt;/FONT&gt;&lt;FONT size=2&gt; a3 = &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Interpretor&lt;/FONT&gt;&lt;FONT size=2&gt;.parseAssertion(identityPolicy);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;Assertion&lt;/FONT&gt;&lt;FONT size=2&gt;[] assertionList = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Assertion&lt;/FONT&gt;&lt;FONT size=2&gt;[3] { a1, a2, a3 };&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;AuthorizationQuery&lt;/FONT&gt;&lt;FONT size=2&gt; aq = &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Interpretor&lt;/FONT&gt;&lt;FONT size=2&gt;.parseAuthQuery(authzQuery);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;Console&lt;/FONT&gt;&lt;FONT size=2&gt;.WriteLine(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Authorization result"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// Make an authorization decision &lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;IList&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Answer&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt; answers =&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;AuthorizationEngine&lt;/FONT&gt;&lt;FONT size=2&gt;.MakeAuthorizationDecision(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;LocalAuthorityPrincipal&lt;/FONT&gt;&lt;FONT size=2&gt;(),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assertionList,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; aq,&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;List&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;AuditRule&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt;());&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;Console&lt;/FONT&gt;&lt;FONT size=2&gt;.WriteLine(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Answer was "&lt;/FONT&gt;&lt;FONT size=2&gt; + (answers.Count &amp;gt; 0));&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;&lt;/FONT&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4620131" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/SecPAL/default.aspx">SecPAL</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Web+Service+Security/default.aspx">Web Service Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Grid/default.aspx">Grid</category></item><item><title>Parser for SecPAL simplified English grammar now available! </title><link>http://blogs.msdn.com/thehoggblog/archive/2007/08/26/parser-for-secpal-simplified-english-grammar-now-available.aspx</link><pubDate>Mon, 27 Aug 2007 00:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4579556</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/4579556.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=4579556</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=4579556</wfw:comment><description>&lt;DIV class=wikidoc&gt;One of the great strengths of SecPAL is its unique support for multiple representations of a security policy; XML for interoperability; and a simplified English grammar for human readbility. The SecPAL v1.1 Research Release (available from http://research.microsoft.com/projects/secpal) allows SecPAL assertions to be created using the rich and flexible.NET object model or deserialized from (or serialized into XML) XML according to the SecPAL Schema Specification (also available at the aforementioned URL). &lt;BR&gt;&lt;BR&gt;We have now also created a sample parser that allows SecPAL policies and authorization queries to be specified using a simplified English grammar and then translated into the SecPAL object model. This allows policies to be specified declaratively in a human readable form. The parser is written using F# and uses the Lexx and Yacc tools that accompany F#. Full source code is included - so if you are looking for a good project to start learning F# - or if you want to see a complete parser implementation developed using F# and the accompanying tools then this is a great place to start. &lt;/DIV&gt;
&lt;DIV class=wikidoc&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=wikidoc&gt;I really enjoyed working on this sample as it gave me an opportunity to learn a lot more about F#&amp;nbsp;- so over the next couple of posts I will share a lot more information on how the sample works including some tips about F# that I have learned. I will also start posting additional additional access control patterns specified declaratively - hopefully making the samples much easier to follow than the more length samples written purely in C# or F#. &lt;/DIV&gt;
&lt;DIV class=wikidoc&gt;&lt;BR&gt;The parser sample is available from here: &lt;A class=externalLink href="http://www.codeplex.com/secpal/Release/ProjectReleases.aspx?ReleaseId=6667"&gt;http://www.codeplex.com/secpal/Release/ProjectReleases.aspx?ReleaseId=6667&lt;SPAN class=externalLinkIcon&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4579556" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/SecPAL/default.aspx">SecPAL</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Web+Service+Security/default.aspx">Web Service Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Grid/default.aspx">Grid</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/F_2300_/default.aspx">F#</category></item><item><title>Swiss Army Knife of X.509 Certificate Tools</title><link>http://blogs.msdn.com/thehoggblog/archive/2007/08/20/swiss-army-knife-of-x-509-certificate-tools.aspx</link><pubDate>Mon, 20 Aug 2007 20:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4483118</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/4483118.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=4483118</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=4483118</wfw:comment><description>&lt;P&gt;Anyone who has dealt with X.509 certificates when trying to design, test and deploy secure Web services will know what an ordeal it can be to locate certificates in various cert stores using different cert identifiers, modify security properties of the private key to allow services accounts to sign or decrypt messages and all the other messing around that is associated with X.509 certificates. I happened to bump into&amp;nbsp;Christian Geuer-Pollmann from the European Microsoft Innovation Center last week - and he showed me an awesome tool they have built to greatly simplify such challenges. This tool is available for download from &lt;A class="" href="http://wcf.netfx3.com/files/folders/authorization/entry11442.aspx" mce_href="http://wcf.netfx3.com/files/folders/authorization/entry11442.aspx"&gt;here&lt;/A&gt;. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4483118" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Service+Factory/default.aspx">Service Factory</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Web+Service+Security/default.aspx">Web Service Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category></item><item><title>A Java implementation of SecPAL?</title><link>http://blogs.msdn.com/thehoggblog/archive/2007/08/08/a-java-implementation-of-secpal.aspx</link><pubDate>Thu, 09 Aug 2007 02:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4300587</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/4300587.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=4300587</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=4300587</wfw:comment><description>&lt;P&gt;Panos, from the University of Newcastle just dropped me a note to say that he is making progress with his Java based SecPAL implementation - which is very exciting. I noticed that he has moved away from XSB and has decided instead to create his own custom datalog implementation - which is very cool - I am sure that took a coulple of very late nights! If you are interested in learning more take a look at Panos' &lt;A class="" href="http://www.periorellis.com/BLOG/archives/00000134.html" mce_href="http://www.periorellis.com/BLOG/archives/00000134.html"&gt;blog&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=4300587" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/SecPAL/default.aspx">SecPAL</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Web+Service+Security/default.aspx">Web Service Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Grid/default.aspx">Grid</category></item><item><title>The IEEE Computer Security Foundations Conference</title><link>http://blogs.msdn.com/thehoggblog/archive/2007/07/07/the-ieee-computer-security-foundations-conference.aspx</link><pubDate>Sun, 08 Jul 2007 03:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3755062</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/3755062.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=3755062</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=3755062</wfw:comment><description>&lt;P&gt;The 20th IEEE &lt;A class="" href="http://www.dsi.unive.it/CSF20/" mce_href="http://www.dsi.unive.it/CSF20/"&gt;Computer Security Foundations &lt;/A&gt;conference is underway in Venice at the moment, and our friends from Microsoft Research in Cambridge (Moritz Y. Becker, Cedric Fournet and Andrew D. Gordon)&amp;nbsp;presented the first paper of the conference - based on their formal design for SecPAL. The paper "Design and Semantics of a Decentralized Authorization Language" is of course available from &lt;A class="" href="http://research.microsoft.com/projects/secpal/" mce_href="http://research.microsoft.com/projects/secpal/"&gt;here&lt;/A&gt;. I have also included a photo of Moritz presenting which Andy just sent us. &lt;/P&gt;
&lt;P&gt;&lt;IMG title="Mo Presenting" style="WIDTH: 500px; HEIGHT: 375px" height=375 alt="Mo Presenting" src="http://blogs.msdn.com/photos/jason_hogg/images/3754776/500x375.aspx" width=500 mce_src="http://blogs.msdn.com/photos/jason_hogg/images/3754776/500x375.aspx"&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=3755062" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/SecPAL/default.aspx">SecPAL</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Web+Service+Security/default.aspx">Web Service Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Grid/default.aspx">Grid</category></item><item><title>Access Control Requirements for Grid Computing Environments</title><link>http://blogs.msdn.com/thehoggblog/archive/2007/07/03/access-control-requirements-for-grid-computing-environments.aspx</link><pubDate>Tue, 03 Jul 2007 20:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3673402</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/3673402.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=3673402</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=3673402</wfw:comment><description>&lt;P&gt;One question I hear a lot is "How does SecPAL compare with [InsertRandomSecurityTechnologyAcronymHere]?". Well the good news is that&amp;nbsp;&lt;A class="" href="http://www.cs.virginia.edu/~humphrey/" mce_href="http://www.cs.virginia.edu/~humphrey/"&gt;Marty Humphrey&lt;/A&gt;, Sang-Min Park, Jun Feng, Norm Beekwilder and Glenn Wasson from the Department of Computer Science at the University of Virginia have been studying just this question using real requirements from their grid network as the basis for this evaluation. The results of their study have been published in a paper called &lt;A class="" href="http://www.cs.virginia.edu/~humphrey/papers/GridFTP_SecPAL_2007.pdf" mce_href="http://www.cs.virginia.edu/~humphrey/papers/GridFTP_SecPAL_2007.pdf"&gt;Fine Grained Access Control for GridFTP using SecPAL&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;They have identified and categorized a number of requirements and then performed an in-depth analysis evaluating the extent to which SecPAL (and other security technologies) meet these requirements. They also consider six specific data access use-cases that have been problematic in today’s Grids: attribute-based access, role-based access, “role-deny” access, impersonation-based access, delegation-based access, and capability-based access and show actual SecPAL policies that they used to solve these use-cases.&lt;/P&gt;
&lt;P&gt;One of the reasons why I think this paper is so important is that&amp;nbsp;the UVa folks started their evaluation with a thorough understanding of their requirements - and documented them. So if you are in the process of evaluating a new access control solution (or perhaps building a custom access control solution) you will definitely gain by using the requirements in this paper as a starting point for your work. &lt;/P&gt;
&lt;P&gt;All in all a really great paper - and the best news is that the paper has officially been accepted for &lt;A class="" href="http://www.grid2007.org/" mce_href="http://www.grid2007.org/"&gt;Grid2007&lt;/A&gt; - so if you are interested in hearing more hopefully you will be able to watch the presentation at Grid2007 in Austin Texas. &lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3673402" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/SecPAL/default.aspx">SecPAL</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Grid/default.aspx">Grid</category></item><item><title>SecPAL Query Editor Now Available</title><link>http://blogs.msdn.com/thehoggblog/archive/2007/06/21/secpal-query-editor-now-available.aspx</link><pubDate>Fri, 22 Jun 2007 01:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3449384</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/3449384.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=3449384</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=3449384</wfw:comment><description>&lt;P&gt;A couple of people have remarked to us that they like the flexibility that SecPAL provides, but feel that it is difficult for people to get to grips with the API's when they first start evaluating SecPAL. &lt;/P&gt;
&lt;P&gt;For this reason Lonnie Wall (a consultant from &lt;A class="" href="http://www.rdacorp.com/" mce_href="http://www.rdacorp.com/"&gt;RDA Corp&lt;/A&gt;) has just released some sample C# source code for a SecPAL query editor and released it on our &lt;A class="" href="http://www.codeplex.com/secpal/Release/ProjectReleases.aspx?ReleaseId=5122" mce_href="http://www.codeplex.com/secpal/Release/ProjectReleases.aspx?ReleaseId=5122"&gt;SecPAL CodePlex &lt;/A&gt;workspace. In addition to providing a GUI based interface to our samples*, the query editor also includes:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A series of task specific wizards for performing tasks such as establishing trust relationships, protecting resources and writing queries. &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;The ability to review security policies and tokens using our new simplified English grammar.&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;The ability to load / save your authorization context into XML based on our &lt;A class="" href="http://research.microsoft.com/projects/secpal/downloadSecPALSpecification.aspx" mce_href="http://research.microsoft.com/projects/secpal/downloadSecPALSpecification.aspx"&gt;SecPAL Schema&lt;/A&gt;.&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;A graphical interface for reviewing query results - including direct access to the graphical proof graph viewer. &lt;/LI&gt;
&lt;LI&gt;The ability to review the samples source code from within the editor.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The code is of course just sample, and although it only touches on the surface of SecPAL's capabilities I think it should hopefully provide a good starting point for people evaluating SecPAL. More importantly, it should also demonstrate one approach in which SecPAL could be integrated into products - hiding the complexity of our API's from end users.&lt;/P&gt;
&lt;P&gt;The query editor functions best with our v1.1 release, so if you haven't already installed v1.1 download it from &lt;A class="" href="http://research.microsoft.com/research/downloads/details/81e28b29-10be-4551-9ede-1690f32e1581/details.aspx" mce_href="http://research.microsoft.com/research/downloads/details/81e28b29-10be-4551-9ede-1690f32e1581/details.aspx"&gt;here&lt;/A&gt;. We are definitely looking for feedback, so if you have any comments / suggestions post them on the workspace. Also, if there are other examples of UI's that you like (or dislike) post some pointers to our workspace so other people can also comment.&lt;/P&gt;
&lt;P&gt;* If you haven't had a chance to check our samples out yet - take this opportunity to review them. The samples include common access control patterns such as: establishing trust relationships, audit logging, unconstrained delegation (impersonation), constrained delegation, role exclusion, exists quantification, revocation, role based security, role exculusion, multi-level delegation, two man scenario, user and application scenario and much much more... &amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3449384" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/SecPAL/default.aspx">SecPAL</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Grid/default.aspx">Grid</category></item><item><title>Writing SecPAL Assertions In F# - Contd</title><link>http://blogs.msdn.com/thehoggblog/archive/2007/06/20/writing-secpal-assertions-in-f-contd.aspx</link><pubDate>Wed, 20 Jun 2007 19:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3427769</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/3427769.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=3427769</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=3427769</wfw:comment><description>&lt;P&gt;In my earlier &lt;A class="" href="http://blogs.msdn.com/thehoggblog/archive/2007/06/15/writing-secpal-assertions-in-f.aspx" mce_href="http://blogs.msdn.com/thehoggblog/archive/2007/06/15/writing-secpal-assertions-in-f.aspx"&gt;post&lt;/A&gt; I showed how SecPAL could be used to grant access to a particular user based on a token issued by an STS that we explicitly established a trust relationship with using the SecPAL "canSay" predicate. Now I am going to show you something that I think is really cool&amp;nbsp;- and something that demonstrates the advantage of our underlying &lt;A class="" href="http://en.wikipedia.org/wiki/Datalog" mce_href="http://en.wikipedia.org/wiki/Datalog"&gt;Datalog&lt;/A&gt; engine. We are going to make three small changes to the code I showed you in the earlier post to demonstrate how instead of an authorization query being used to determine whether a particualr user can access a resource, we are going to ask who all the users are that can possibly access a resouce based on the policies we have defined. &lt;/P&gt;
&lt;P&gt;This kind of query is simple for SecPAL. We simply change our authorization query from including a concreate value (&lt;EM&gt;LA says jason can read &lt;/EM&gt;&lt;A href="file://public/foo.txt"&gt;&lt;EM&gt;file://public/foo.txt&lt;/EM&gt;&lt;/A&gt;) to a query that includes a variable (&lt;EM&gt;LA says %p can read &lt;/EM&gt;&lt;A href="file://public/foo.txt"&gt;&lt;EM&gt;file://public/foo.txt&lt;/EM&gt;&lt;/A&gt;) at which point Datalog will evaluate what all the possible principals are that can read this resource and will then return a list of substitutions. In addition to the substitutions it will also include proof graphs for each possible substitution showing exactly why it is that a particular user could access this resource. Anyone who has used Prolog in the past will likely realize that this is similar to how Prolog works and this is in fact because Datalog is in a subset of Prolog!&lt;/P&gt;
&lt;P&gt;Now &lt;STRONG&gt;before&lt;/STRONG&gt; you run this code take a look at this and the original resource access policy and decide which of our users will in fact be granted access to read this file. Not all of them will be... and it should hopefully be obvious which one will not be granted access.&lt;/P&gt;
&lt;P&gt;In order to make this change three pieces of code need to change:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1. Create additional users &lt;/STRONG&gt;- We will create five additional users, four of which are actually the SecPAL developers, and the fifth is not.&lt;/P&gt;&lt;PRE&gt;// Define the users within the simple scenario
let User1 = KeyHolderPrincipal(new RSACryptoServiceProvider(), "John")
let User2 = KeyHolderPrincipal(new RSACryptoServiceProvider(), "Greg")
let User3 = KeyHolderPrincipal(new RSACryptoServiceProvider(), "Jason")
let User4 = KeyHolderPrincipal(new RSACryptoServiceProvider(), "Larry")
let User5 = KeyHolderPrincipal(new RSACryptoServiceProvider(), "Fred")

&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;2. Issue tokens for the additional users&lt;/STRONG&gt; - For this example I am being lazy and simply putting all the claims about possession of attributes in one token. In reality each user would normally be issued their own token. &lt;/P&gt;&lt;PRE&gt;// Create a Token to identify our Users with 
let token = Token(issuer=PrincipalIssuer(STS),
                  claims=[ Claim(fact=PossessFact(User1, 
                                                  new SecPALAttribute(AttributeType.rfc822Name,@"john@microsoft.com")));
                           Claim(fact=PossessFact(User2, 
                                                  new SecPALAttribute(AttributeType.rfc822Name,@"greg@microsoft.com")));
                           Claim(fact=PossessFact(User3, 
                                                  new SecPALAttribute(AttributeType.rfc822Name,@"jason@microsoft.com")));
                           Claim(fact=PossessFact(User4, 
                                                  new SecPALAttribute(AttributeType.rfc822Name,@"larry@microsoft.com")));
                           Claim(fact=PossessFact(User4, 
                                                  new SecPALAttribute(AttributeType.rfc822Name,@"fred@hotmail.com")))
                                                  ]) 

let tokens = [ token ]

&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;3. Modify our authorization query&lt;/STRONG&gt; - We now change the authorization query so that we leave a variable in the query. SecPAL will then determine all the valid users are for this this variable can be unified. &lt;/P&gt;&lt;PRE&gt;// Create our Authorization Query 
//		LA says %p can read &lt;A href="file://public/foo.txt?let"&gt;file://public/foo.txt?
let&lt;/A&gt; query = AuthorizationQuery
               (expression=AssertionExpression
                   (assertion=AtomicAssertion
                       (principal=ResourceGuard, 
                        fact=ActionFact(PrincipalVariable("p"), ActionVerbs.read, 
                                        Resource(ResourceType.digitalContent, 
                                                 System.Uri(@"file://public/foo.txt"))))))


&lt;/PRE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3427769" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/SecPAL/default.aspx">SecPAL</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Grid/default.aspx">Grid</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/F_2300_/default.aspx">F#</category></item><item><title>Writing SecPAL assertions in F#</title><link>http://blogs.msdn.com/thehoggblog/archive/2007/06/15/writing-secpal-assertions-in-f.aspx</link><pubDate>Sat, 16 Jun 2007 02:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3323346</guid><dc:creator>Jason Hogg</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/thehoggblog/comments/3323346.aspx</comments><wfw:commentRss>http://blogs.msdn.com/thehoggblog/commentrss.aspx?PostID=3323346</wfw:commentRss><wfw:comment>http://blogs.msdn.com/thehoggblog/rsscomments.aspx?PostID=3323346</wfw:comment><description>&lt;P&gt;I figured I would try to learn F# over this summer - and thought what better way to start than create a couple of SecPAL samples in F#. I thought this might help people that are interested in learning more about &lt;A class="" href="http://research.microsoft.com/fsharp/fsharp.aspx" mce_href="http://research.microsoft.com/fsharp/fsharp.aspx"&gt;F#&lt;/A&gt;, or potentially F# users that are interested in learning more about how &lt;A class="" href="http://blogs.msdn.com/thehoggblog/archive/2007/04/20/secpal-access-control-for-grid-computing-environments.aspx" mce_href="http://blogs.msdn.com/thehoggblog/archive/2007/04/20/secpal-access-control-for-grid-computing-environments.aspx"&gt;SecPAL&lt;/A&gt; can be used for access control scenarios. The sample below is simplified version of our classic multi-domain scenario (see &lt;A class="" href="http://www.gridtoday.com/grid/1546527.html" mce_href="http://www.gridtoday.com/grid/1546527.html"&gt;here &lt;/A&gt;for a complete description). In short we have three parties: A resource guard that is responsible for protecting access to a resource, an STS that is trusted to issue claims about users, and a user that wants to access a file.&lt;/P&gt;
&lt;P mce_keep="true"&gt;In order to support this scenario we have the following assertions:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;SecPAL policies&lt;/DIV&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Resource access policy - &lt;EM&gt;LA &lt;STRONG&gt;says&lt;/STRONG&gt; %p read file://public/ &lt;STRONG&gt;if&lt;/STRONG&gt; %p possesses %a &lt;STRONG&gt;where&lt;/STRONG&gt; %a match &lt;/EM&gt;&lt;A href="mailto:.*@microsoft.com"&gt;&lt;EM&gt;.*@microsoft.com&lt;/EM&gt;&lt;/A&gt; &lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Trust policy - &lt;EM&gt;LA &lt;STRONG&gt;says&lt;/STRONG&gt; STS &lt;STRONG&gt;canSay&lt;/STRONG&gt; %p possesses %a &lt;STRONG&gt;where&lt;/STRONG&gt; %a match &lt;/EM&gt;&lt;A href="mailto:.*@microsoft.com"&gt;&lt;EM&gt;.*@microsoft.com&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;SecPAL token&lt;/DIV&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;EM&gt;STS &lt;STRONG&gt;says&lt;/STRONG&gt; User possesses rfc822Name:&lt;/EM&gt;&lt;A href="mailto:jason@microsoft.com"&gt;&lt;EM&gt;jason@microsoft.com&lt;/EM&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;SecPAL authorization query&lt;/DIV&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;EM&gt;LA &lt;STRONG&gt;says&lt;/STRONG&gt; Jason can read &lt;/EM&gt;&lt;A href="file://public/foo.txt"&gt;&lt;EM&gt;file://public/foo.txt&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt;?&lt;/EM&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;When run the code will output a textual proof graph illustrating exactly what the chain of deductions were that lead to this authorization decision being approved. If you want to use our graphical proof graph viewer take a look at this &lt;A class="" href="http://www.codeplex.com/secpal/Thread/View.aspx?ThreadId=11187" mce_href="http://www.codeplex.com/secpal/Thread/View.aspx?ThreadId=11187"&gt;post&lt;/A&gt;. You will have to add an audit policy but that is really straight forward.&lt;/P&gt;
&lt;P mce_keep="true"&gt;The F# code for this scenario is included below. In the my next few blog posts I will show you how to modify this code to do some extra cool things... In the mean time let me know if you have any questions, or if there are any scenarios you would like me to demonstrate.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Thanks to &lt;A class="" href="http://blogs.msdn.com/dsyme/" mce_href="http://blogs.msdn.com/dsyme/"&gt;Don Syme&lt;/A&gt; and Can Erton of the F-Sharp team for reviewing my code before I released it! &lt;BR&gt;&lt;/P&gt;&lt;PRE&gt;// Title: Simple SecPAL security scenario (F#)
#light
// Update the pointer below to your SecPAL DLL (The SecPAL .NET implementation is available from &lt;A href="http://research.microsoft.com/projects/secpal"&gt;http://research.microsoft.com/projects/secpal&lt;/A&gt;) &lt;/PRE&gt;&lt;PRE&gt;#I "C:\Users\jahogg\Documents\Microsoft SecPal Research Release\Bin\Microsoft.Research.SecPal.dll"
#r "Microsoft.Research.SecPal.dll"

open Microsoft.Research.SecPal.Authorization 
open System.Security.Cryptography
open System.Collections.Generic
type SecPALAttribute = Microsoft.Research.SecPal.Authorization.Attribute

// Define the users within the simple scenario
let User = KeyHolderPrincipal(new RSACryptoServiceProvider(), "Jason")
let STS = KeyHolderPrincipal(new RSACryptoServiceProvider(), "STS")
let ResourceGuard = LocalAuthorityPrincipal("ResourceGuard") // ResouceGuard == LocalAuthority == LA

// Define Resource Access Policy 
//		LA says %p read file://public/ if %p possesses %a where %a match ".*@microsoft.com" 					
let claims = [Claim(fact=ActionFact(PrincipalVariable("p"),
                                    ActionVerbs.read,
                                    Resource(ResourceType.digitalContent,
                                             System.Uri(@"file://public/"))),
                    condition=PossessFact(PrincipalVariable("p"),
                                          AttributeVariable("a")),
                    constraint=AttributeMatchConstraint("a",AttributeType.rfc822Name, @".*@microsoft\.com"));
              // LA says STS canSay %p possesses %a where %a match ".*@microsoft.com" 					
              Claim(fact=CanSayFact(STS,
                                    fact=PossessFact(PrincipalVariable("p"),
                                                     AttributeVariable("a"))),
                    constraint=AttributeMatchConstraint("a",AttributeType.rfc822Name, @".*@microsoft\.com")) ]

let policy = Policy(PrincipalIssuer(ResourceGuard), claims)
let policies = [ policy ]

// Create a Token to identify our User with 
//		STS says User possesses rfc822Name:"jahogg@microsoft.com"
let token = Token(issuer=PrincipalIssuer(STS),
                  claims=[ Claim(fact=PossessFact(User, 
                                                  new SecPALAttribute(AttributeType.rfc822Name,@"jason@microsoft.com")))]) 

let tokens = [ token ]

// Create our Authorization Query 
//		LA says Jason can read file://public/foo.txt?

let query = AuthorizationQuery
               (expression=AssertionExpression
                   (assertion=AtomicAssertion
                       (principal=ResourceGuard, 
                        fact=ActionFact(User, ActionVerbs.read, 
                                        Resource(ResourceType.digitalContent, 
                                                 System.Uri(@"file://public/foo.txt"))))))

// Perform our Authorization Query using the Authorization Engine		
let answers = AuthorizationEngine.MakeAuthorizationDecision(ResourceGuard, tokens, policies, query) 
 
// Determine if access was granted
let results = (if (answers.Count &amp;lt; 1) then "Denied" else "Authorized") 

// Print out the results
printf "The result is %s \n" results
printf "Answer count = %i \n\n" answers.Count

// Iterate over the Proofs
for answer in answers do
    // Output variable substitutions
    let subs = answer.Substitution 
    for sub in subs do
        System.Console.WriteLine ("Name " + sub.Key.Name + " = " + sub.Value.ToString());
    // Output proof graphs
    let proofs = answer.ProofGraphs 
    for proof in proofs do
        System.Console.Write("Expression = ")
        System.Console.WriteLine(proof.Expression)
        System.Console.WriteLine("Graph = ")
        System.Console.WriteLine(proof.ProofRoot)

// Press any key to continue (Homer "Where's the any key?")
System.Console.ReadLine()

&lt;/PRE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3323346" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/SecPAL/default.aspx">SecPAL</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Web+Service+Security/default.aspx">Web Service Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/Grid/default.aspx">Grid</category><category domain="http://blogs.msdn.com/thehoggblog/archive/tags/F_2300_/default.aspx">F#</category></item></channel></rss>