<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Dmitrii blog</title><subtitle type="html">Few ramblings about work related activities and technologies that I have to work with.</subtitle><id>http://blogs.technet.com/dmitrii/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.technet.com/dmitrii/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2007-06-25T19:42:00Z</updated><entry><title>Claim Based Authentication IV</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2009/10/04/claim-based-authentication-iv.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2009/10/04/claim-based-authentication-iv.aspx</id><published>2009-10-05T05:14:56Z</published><updated>2009-10-05T05:14:56Z</updated><content type="html">&lt;p&gt;In previous three posts we examined how claim authentication flow works for users in the same domain as SharePoint site and for users from other organizations. As we have seen, the value for Role claim was based on the Active Directory group membership. For instance, Frank Miller from Fabrikam was given role of DrugTrial1Auditors in Contoso SharePoint site because he was member of DrugTrial1Auditors AD group in Fabrikom.com domain. With current configuration Contoso has no say which users from Fabrikam have DrugTrial1Auditors role on Contoso SharePoint site. Contoso trusts Fabrikam administrators to ensure that only authorized employees for DrugfTrial1Auditors belong to the Fabrikam DrugTrial1Auditors group. This can be perfect in some situations, but sometimes it might be not the best solution. What if Contoso wants to control what type of access users from Fabrikam should have to the Contoso SharePoint site, but at the same time they do not want to manage or create accounts for Fabrikam users? There is a great solution for it and step 8 in the demonstration shows a sample on how we can use SQL server database as source for external attributes for claim values. Figure 1 shows example tables for this solution.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Figure 1. External data source for user information&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; margin: 5px 40px 5px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://blogs.technet.com/blogfiles/dmitrii/WindowsLiveWriter/ClaimBasedAuthenticationIV_224/image_3.png" width="665" height="455" /&gt; &lt;/p&gt;  &lt;p&gt;Table dbo.TS contains information about which SharePoint site belongs to which drug trial.&lt;/p&gt;  &lt;p&gt;Table dbo.URT contains a list of e-mail addresses of users, the role that they have, and the drug trial that they belong to.&lt;/p&gt;  &lt;p&gt;Table dbo.RS maps the roles in the database to the roles in the Contoso SharePoint site.&lt;/p&gt;  &lt;p&gt;To accommodate data in these tables we had to modify SharePoint site. It was reconfigured with new roles: Role#sp_admin and Role#sp_visitor. DrugTrial1Auditor role and DrugTrial1Admin role were removed from the portal. Also, new datasource was added: “HOL Doctors Role” database.&lt;/p&gt;  &lt;p&gt;Three new rules were created on the Contoso SharePoint RP. Each rule is using one of the database tables. Check out this site for ADFS v2 rule language format:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://technet.microsoft.com/en-us/library/dd807118(WS.10).aspx" href="http://technet.microsoft.com/en-us/library/dd807118(WS.10).aspx"&gt;http://technet.microsoft.com/en-us/library/dd807118(WS.10).aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The first rule check which trial the https://docs.contoso.com/ site belongs to:&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000a0"&gt;&lt;em&gt;=&amp;gt; add(store = &amp;quot;HOL Doctors Role&amp;quot;, types = (&amp;quot;&lt;/em&gt;&lt;em&gt;http://schemas.microsoft.com/ws/2008/06/identity/claims/trial&amp;quot;)&lt;/em&gt;&lt;em&gt;, query = &amp;quot;select trial from dbo.TS where dbo.TS.SharePointSite = {0}&amp;quot;, param = &amp;quot;&lt;/em&gt;&lt;em&gt;https://docs.contoso.com/&amp;quot;);&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;In second rule, we use the previously queried trial information with the user’s e-mail address and discover which role the user belongs to:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#0000a0"&gt;c1:[Type == &amp;quot;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress&amp;quot;]        &lt;br /&gt;&amp;amp;&amp;amp; c2:[Type == &amp;quot;http://schemas.microsoft.com/ws/2008/06/identity/claims/trial&amp;quot;]         &lt;br /&gt;=&amp;gt; add(store = &amp;quot;HOL Doctors Role&amp;quot;, types = (&amp;quot;http://schemas.microsoft.com/ws/2008/06/identity/claims/incomingtrialrole&amp;quot;), query = &amp;quot;select role from dbo.URT where dbo.URT.Trial = {1} and dbo.URT.UserName={0}&amp;quot;, param = c1.Value, param = c2.Value); &lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;In the third rule, we use a previously queried role claim to query the SharePoint role claim and assign the value to the outgoing role claim:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#0000a0"&gt;c:[Type == &amp;quot;http://schemas.microsoft.com/ws/2008/06/identity/claims/incomingtrialrole&amp;quot;]        &lt;br /&gt;=&amp;gt; issue(store = &amp;quot;HOL Doctors Role&amp;quot;, types = (&amp;quot;http://schemas.microsoft.com/ws/2008/06/identity/claims/role&amp;quot;), query = &amp;quot;select dbo.RS.SharePointGroup from dbo.RS where dbo.RS.Role = {0}&amp;quot;, param = c.Value); &lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Lets take a look at how claim flow will work in this new configuration.&amp;#160; Figure 2 shows slightly modified flow of authentication to Contoso SharePoint site from Fabrikam user.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Figure 2. Authentication by Fabrikam user to Contoso SharePoint site&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; margin: 5px 40px 5px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://blogs.technet.com/blogfiles/dmitrii/WindowsLiveWriter/ClaimBasedAuthenticationIV_224/image_6.png" width="610" height="539" /&gt; &lt;/p&gt;  &lt;p&gt;Fabrikam user Frank Miller will access Contoso SharePoint site. &lt;/p&gt;  &lt;p&gt;In step 1, Frank opens his browser and opens https://docs.contoso.com site. SharePoint site will provide its policy information a redirect Franks browser to a trusted STS. &lt;/p&gt;  &lt;p&gt;In step 2, Franks browser will access https://sts1.contoso.com and reads its policy. At this point Frank must select his home realm. If Information Card was already configured in Fabrikam forest for Contoso SharePoint site, the home realm discovery would automatically redirect his browser to his home STS. Without Information Card, he would be required to choose his STS server in the drop down list. At this point no claims yet have been exchanged and all authentication been done via anonymous authentication mechanism.&lt;/p&gt;  &lt;p&gt;In step 3, Franks computer will authenticate to the STS. Since our STS is running on the same computer as Domain Controller, it is already authenticated to it, so it just presents existing Kerberos ticket, which will have all required information in it, such as list of groups this user belongs to (list of SIDs of those groups).&lt;/p&gt;  &lt;p&gt;In step 4, Fabrikam STS will create and process new claim for Frank Miller. The first rule will create the following claim:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;Outgoing Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;strong&gt;Claim Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;E-Mail Address&lt;/td&gt;        &lt;td valign="top" width="200"&gt;frankm@fabrikam.com&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="200"&gt;DrugTrial1Auditors          &lt;br /&gt;Purchaser           &lt;br /&gt;Domain Users&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Next, it will pass this claim onto second and 3rd rules. Second rule allows to pass all claims with any E-Mail Address. 3rd rule will check value of the Role claim type and it will discard 2 values out of this claim. The final outgoing claim from Fabrikam STS for user Frank Miller should have the following information:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="402"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;Outgoing Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;strong&gt;Claim Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;E-Mail Address&lt;/td&gt;        &lt;td valign="top" width="200"&gt;frankm@fabrikam.com&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="200"&gt;DrugTrial1Auditors&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;In step 5 this claim is delivered back to Franks computer.&lt;/p&gt;  &lt;p&gt;So now Frank has his claim from Fabrikam STS. Can he present this claim to Contoso SharePoint site? It would not work because Contoso SharePoint site does not trust Fabrikam STS, it only trusts Contoso STS and it would accept claims only from Contoso STS.&lt;/p&gt;  &lt;p&gt;In step 6, Franks computer will deliver his claim to Contoso STS.&lt;/p&gt;  &lt;p&gt;Now it is up to Contoso STS to evaluate incoming claim and decide what to do with it. In steps 7, 8 and 9 Contoso STS receives incoming claim from Fabrikam STS and it will pass it onto Fabrikam IDP rule set configured on Contoso STS. If you remember, those rules will evaluate incoming claim values and will pass claims only if their E-Mail Address value ends with @fabrikam.com and its role value is equal to DrugTrial1Users. Incoming claim from Frank satisfies both criteria. At this point Contoso STS accepted incoming claim, it is not going back out yet to the user computer. The value of this claim should be the same as it came in:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="402"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;Outgoing Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;strong&gt;Claim Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;E-Mail Address&lt;/td&gt;        &lt;td valign="top" width="200"&gt;frankm@fabrikam.com&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="200"&gt;DrugTrial1Auditors&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Next, it will pass this claim onto Relying party rule set to create outgoing claim suitable for the SharePoint. Now Contoso SharePoint RP is configured with five rules for incoming claims. First one will pass Role claim type without any changes to its Role type. Second rule is a transformation rule. It will change the E-mail Address claim type to Name claim type, but will keep its value the same. The 3rd rule will identify that DrugTrial1 trial belongs to https://docs.contoso.com site. The forth rule will identify that Frank has Admin role in DrugTrial1 trial. And finally, the fifth rule will identify that Admin for DrugTrial1 mapped to sp_admin role in SharePoint site.&lt;/p&gt;  &lt;p&gt;The final claim for Frank Miller, coming out from Contoso STS destined for SharePoint RP should look like this:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="402"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;Outgoing Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;strong&gt;Claim Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Name&lt;/td&gt;        &lt;td valign="top" width="200"&gt;frankm@fabrikam.com&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="200"&gt;sp_admin&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;OK, to recoup, lets compare claim originated at Fabriakm STS and final claim delivered to Contoso SharePoint:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://blogs.technet.com/blogfiles/dmitrii/WindowsLiveWriter/ClaimBasedAuthenticationIV_224/image_7.png" width="698" height="159" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3284768" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author><category term="PKI" scheme="http://blogs.technet.com/dmitrii/archive/tags/PKI/default.aspx" /><category term="Security" scheme="http://blogs.technet.com/dmitrii/archive/tags/Security/default.aspx" /><category term="Windows Server 2008" scheme="http://blogs.technet.com/dmitrii/archive/tags/Windows+Server+2008/default.aspx" /><category term="Federation" scheme="http://blogs.technet.com/dmitrii/archive/tags/Federation/default.aspx" /><category term="Claims Based Authentication" scheme="http://blogs.technet.com/dmitrii/archive/tags/Claims+Based+Authentication/default.aspx" /><category term="SharePoint" scheme="http://blogs.technet.com/dmitrii/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Claims Based Authentication – Part III</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2009/10/03/claims-based-authentication-part-iii.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2009/10/03/claims-based-authentication-part-iii.aspx</id><published>2009-10-03T17:06:46Z</published><updated>2009-10-03T17:06:46Z</updated><content type="html">&lt;p&gt;This is continuation of two previous posts. Please check them out first, otherwise this one might not make much sense at all.&lt;/p&gt;  &lt;p&gt;Step 6 in step-step guide configures Fabrikam STS with Relying Party and shows how to configure Information Cards to automate home realm discovery. I’m not going to talk about Information Cards yet, for now we stick with STS configuration and claims flow.&lt;/p&gt;  &lt;p&gt;Afetr the RP for Contoso STS was created we configured three claim rules. The first rule is using AD as the directory source. It should be easy to predict the mappings in this rule. Just take a look back at how Fabrikam IDP on Contoso STS was configured.&amp;#160; It expects certain type of incoming claims. This rule has the following mappings:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;LDAP Attribute&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;strong&gt;Outgoing Claim Type&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;mail&lt;/td&gt;        &lt;td valign="top" width="200"&gt;E-Mail Address&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;tokenGroups&lt;/td&gt;        &lt;td valign="top" width="200"&gt;Role&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;This could be configured to just send this claim out to the relying party, but it was not. Fabrikam STS Administrator decided to provide some extra checks and only send out claims that match certain criteria.&lt;/p&gt;  &lt;p&gt;The following table shows two new rules:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="1137"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="30"&gt;&lt;strong&gt;Rule #&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="155"&gt;&lt;strong&gt;Rule Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="103"&gt;&lt;strong&gt;Incoming Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="155"&gt;&lt;strong&gt;Pass Through All Claim Values&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="214"&gt;&lt;strong&gt;Pass Through only a specific Claim Value&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="256"&gt;&lt;strong&gt;Pass through only claim values that end in a specific value&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="222"&gt;&lt;strong&gt;Pass through only claims that start with specific value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="30"&gt;1&lt;/td&gt;        &lt;td valign="top" width="155"&gt;Pass Through Incoming Claim&lt;/td&gt;        &lt;td valign="top" width="103"&gt;E-Mail Address&lt;/td&gt;        &lt;td valign="top" width="155"&gt;Yes&lt;/td&gt;        &lt;td valign="top" width="214"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="256"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="222"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="30"&gt;2&lt;/td&gt;        &lt;td valign="top" width="155"&gt;Pass Through Incoming Claim&lt;/td&gt;        &lt;td valign="top" width="103"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="155"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="214"&gt;DrugTrial1Auditors&lt;/td&gt;        &lt;td valign="top" width="256"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="222"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;The first rule will pass any E-Mail Address claim, but the second rule will filter out all claims that do not have DrugTrial1Auditors in its value.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;At this point users from Fabrikam are ready to access Contoso SharePoint site. &lt;/p&gt;  &lt;p&gt;What is the single qualifying requirement for Fabrikam user to get access to the Contoso site? Fabrikam user must be member of DrugTrial1Auditors Active Directory group. &lt;/p&gt;  &lt;p&gt;Lets examine the entire authentication flow for Fabrikam user. Figure 1 provides steps in this process.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Figure 1. Authentication by Fabrikam user to Contoso SharePoint site&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 5px 40px 5px 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://blogs.technet.com/blogfiles/dmitrii/WindowsLiveWriter/ClaimsBasedAuthenticationPartIII_D2B6/image_3.png" width="607" height="533" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Fabrikam user Frank Miller will access Contoso SharePoint site. &lt;/p&gt;  &lt;p&gt;In step 1, Frank opens his browser and opens &lt;a href="https://docs.contoso.com"&gt;https://docs.contoso.com&lt;/a&gt; site. SharePoint site will provide its policy information a redirect Franks browser to a trusted STS. &lt;/p&gt;  &lt;p&gt;In step 2, Franks browser will access &lt;a href="https://sts1.contoso.com"&gt;https://sts1.contoso.com&lt;/a&gt; and reads its policy. At this point Frank must select his home realm. If Information Card was already configured in Fabrikam forest for Contoso SharePoint site, the home realm discovery would automatically redirect his browser to his home STS. Without Information Card, he would be required to choose his STS server in the drop down list. At this point no claims yet have been exchanged and all authentication been done via anonymous authentication mechanism.&lt;/p&gt;  &lt;p&gt;In step 3, Franks computer will authenticate to the STS. Since our STS is running on the same computer as Domain Controller, it is already authenticated to it, so it just presents existing Kerberos ticket, which will have all required information in it, such as list of groups this user belongs to (list of SIDs of those groups).&lt;/p&gt;  &lt;p&gt;In step 4, Fabrikam STS will create and process new claim for Frank Miller. The first rule will create the following claim:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;Outgoing Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;strong&gt;Claim Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;E-Mail Address&lt;/td&gt;        &lt;td valign="top" width="200"&gt;frankm@fabrikam.com&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="200"&gt;DrugTrial1Auditors         &lt;br /&gt;Purchaser          &lt;br /&gt;Domain Users&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Next, it will pass this claim onto second and 3rd rules. Second rule allows to pass all claims with any E-Mail Address. 3rd rule will check value of the Role claim type and it will discard 2 values out of this claim. The final outgoing claim from Fabrikam STS for user Frank Miller should have the following information:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="402"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;Outgoing Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;strong&gt;Claim Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;E-Mail Address&lt;/td&gt;        &lt;td valign="top" width="200"&gt;frankm@fabrikam.com&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="200"&gt;DrugTrial1Auditors&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;In step 5 this claim is delivered back to Franks computer.&lt;/p&gt;  &lt;p&gt;So now Frank has his claim from Fabrikam STS. Can he present this claim to Contoso SharePoint site? It would not work because Contoso SharePoint site does not trust Fabrikam STS, it only trusts Contoso STS and it would accept claims only from Contoso STS.&lt;/p&gt;  &lt;p&gt;In step 6, Franks computer will deliver his claim to Contoso STS.&lt;/p&gt;  &lt;p&gt;Now it is up to Contoso STS to evaluate incoming claim and decide what to do with it. In step 7, Contoso STS receives incoming claim from Fabrikam STS and it will pass it onto Fabrikam IDP rule set configured on Contoso STS. If you remember, those rules will evaluate incoming claim values and will pass claims only if their E-Mail Address value ends with @fabrikam.com and its role value is equal to DrugTrial1Users. Incoming claim from Frank satisfies both criteria. At this point Contoso STS accepted incoming claim, it is not going back out yet to the user computer. The value of this claim should be the same:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="402"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;Outgoing Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;strong&gt;Claim Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;E-Mail Address&lt;/td&gt;        &lt;td valign="top" width="200"&gt;frankm@fabrikam.com&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="200"&gt;DrugTrial1Auditors&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Next, it will pass this claim onto Relying party rule set to create outgoing claim suitable for the SharePoint. Contoso SharePoint RP is configured with two rules for incoming claims. First one will pass Role claim type without any changes to its Role type. Second rule is a transformation rule. It will change the E-mail Address claim type to Name claim type, but will keep its value the same.&lt;/p&gt;  &lt;p&gt;The final claim for Frank Miller, coming out from Contoso STS destined for SharePoint RP should look like this:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="402"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;Outgoing Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;strong&gt;Claim Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Name&lt;/td&gt;        &lt;td valign="top" width="200"&gt;frankm@fabrikam.com&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="200"&gt;DrugTrial1Auditors&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In step 8, this claim is send back to Franks computer, in step 9 it is delivered to Contoso SharePoint site. SharePoint site will authenticate Frank Miller (frankm@fabrikam.com) at gives him appropriate rights configured for Role#DrugTrial1Auditors. Just like that simple and easy.&lt;/p&gt;  &lt;p&gt;In next post we’ll look at how role membership information can be outsourced to SQL database.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3284694" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author><category term="PKI" scheme="http://blogs.technet.com/dmitrii/archive/tags/PKI/default.aspx" /><category term="Security" scheme="http://blogs.technet.com/dmitrii/archive/tags/Security/default.aspx" /><category term="Windows Server 2008" scheme="http://blogs.technet.com/dmitrii/archive/tags/Windows+Server+2008/default.aspx" /><category term="Federation" scheme="http://blogs.technet.com/dmitrii/archive/tags/Federation/default.aspx" /><category term="Claims Based Authentication" scheme="http://blogs.technet.com/dmitrii/archive/tags/Claims+Based+Authentication/default.aspx" /><category term="SharePoint" scheme="http://blogs.technet.com/dmitrii/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Claims based Authentication – Part II</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2009/10/02/claims-based-authentication-part-ii.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2009/10/02/claims-based-authentication-part-ii.aspx</id><published>2009-10-02T19:07:57Z</published><updated>2009-10-02T19:07:57Z</updated><content type="html">&lt;p&gt;In previous post we started examination of the authentication process in our demo environment. Lets examine what happens in step 5 of the step-step guide. During this step Contoso STS was configured to work with Fabrikam STS. There were three primary steps in this process:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Add Fabrikam STS as Identity Provider (IDP) &lt;/li&gt;    &lt;li&gt;Configure rules for incoming claims from Fabrikam IDP. &lt;/li&gt;    &lt;li&gt;Configure RP rules to process claims after they pass through the IDP rules. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Fabrikam IDP is configured with two rules:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="1137"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="30"&gt;&lt;strong&gt;Rule #&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="155"&gt;&lt;strong&gt;Rule Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="103"&gt;&lt;strong&gt;Incoming Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="155"&gt;&lt;strong&gt;Pass Through All Claim Values&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="214"&gt;&lt;strong&gt;Pass Through only a specific Claim Value&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="256"&gt;&lt;strong&gt;Pass through only claim values that end in a specific value&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="222"&gt;&lt;strong&gt;Pass through only claims that start with specific value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="30"&gt;1&lt;/td&gt;        &lt;td valign="top" width="155"&gt;Pass Through Incoming Claim&lt;/td&gt;        &lt;td valign="top" width="103"&gt;E-Mail Address&lt;/td&gt;        &lt;td valign="top" width="155"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="214"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="256"&gt;@fabrikam.com&lt;/td&gt;        &lt;td valign="top" width="222"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="30"&gt;2&lt;/td&gt;        &lt;td valign="top" width="155"&gt;Pass Through Incoming Claim&lt;/td&gt;        &lt;td valign="top" width="103"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="155"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="214"&gt;DrugTrial1Auditors&lt;/td&gt;        &lt;td valign="top" width="256"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="222"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;So what does it mean? We are saying that Contoso STS will accept two types of claims from Fabrikam STS:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;E-Mail Address &lt;/li&gt;    &lt;li&gt;Role &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Also, it will evaluate the value of incoming claim and will pass only claims with specific identified values. One thing we have to keep in mind here is that some time in the design process folks from Contoso and Fabrikam have actually discussed the type of claims will be exchanged between each STS. Because if Fabrikam STS is configured to send different types of claims to Contoso, nothing will work. Also, IDP rules are not sending incoming claims to actual RP or the user browser, they are received, evaluated and if they pass the filter, they are passed through onto the configured STS RP.&lt;/p&gt;  &lt;p&gt;So next, RP rules must be modified to evaluate incoming claims and perform some action on them. Contoso SharePoint RP already has one rule set configured on it. Two new rules must be configured, one for each incoming claim type from Fabrikam IDP.&lt;/p&gt;  &lt;p&gt;Contoso SharePoint RP is configured with two additional rules:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="1133"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="36"&gt;&lt;strong&gt;Rule #&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="190"&gt;&lt;strong&gt;Rule Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="106"&gt;&lt;strong&gt;Incoming Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="122"&gt;&lt;strong&gt;Outgoing Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="145"&gt;&lt;strong&gt;Pass Through All Claim Values&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="197"&gt;&lt;strong&gt;Pass Through only a specific Claim Value&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="184"&gt;&lt;strong&gt;Pass through only claim values that end in a specific value&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="151"&gt;&lt;strong&gt;Pass through only claims that start with specific value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="40"&gt;1&lt;/td&gt;        &lt;td valign="top" width="190"&gt;Pass Through Incoming Claim&lt;/td&gt;        &lt;td valign="top" width="106"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="122"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="145"&gt;Yes&lt;/td&gt;        &lt;td valign="top" width="197"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="184"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="151"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="43"&gt;2&lt;/td&gt;        &lt;td valign="top" width="190"&gt;Transform Incoming Claim&lt;/td&gt;        &lt;td valign="top" width="106"&gt;E-Mail Address&lt;/td&gt;        &lt;td valign="top" width="122"&gt;Name&lt;/td&gt;        &lt;td valign="top" width="145"&gt;Yes&lt;/td&gt;        &lt;td valign="top" width="197"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="184"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="151"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;The first rule will pass through any “role” claim type, it doesn’t care about its value.&lt;/p&gt;  &lt;p&gt;The second rule will take the value of the “E-Mail Address” claim and pass this value but in a different claim type – in this case as claim type of “Name”. This is powerful stuff. Contoso SharePoint needs to identify a user by its name and it does so via claim type of “Name”. Fabrikam on the other hand does not send this type of claim from its STS. If we could not do claim transformation then this solution would not work or both parties would have to agree on every single claim and its syntax, and every application would be required to comply with those requirements. Claim transformation eliminates this limitation and gives us a lot of flexibility.&lt;/p&gt;  &lt;p&gt;Lets examine how one specific claim would go through Fabrikam IDP and then through Contoso SharePoint RP. In this example Fabrikam STS send the following Claim to Contoso STS:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;Incoming Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;strong&gt;Claim Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;E-Mail Address&lt;/td&gt;        &lt;td valign="top" width="200"&gt;markw@fabrikam.com&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="200"&gt;DrugTrial1Auditors&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Fabrikam IDP rules will examine this claim and since both conditions are met it will pass through it.&lt;/p&gt;  &lt;p&gt;Next, the Contoso SharePoint RP will evaluate this claim. After it goes through its rules the resulting claim should have the following information:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;Outgoing Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;strong&gt;Claim Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="200"&gt;DrugTrial1Auditors&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Name&lt;/td&gt;        &lt;td valign="top" width="200"&gt;markw@fabrikam.com&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;This data will be send to the end user and then presented to the SharePoint site for authentication.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="1177"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="1175"&gt;         &lt;p&gt;&lt;strong&gt;Key Learning's&lt;/strong&gt;&lt;/p&gt;          &lt;ol&gt;           &lt;li&gt;Before configuring rules on the IDP you need to identify what type of claims IDP STS will be sending to your STS. &lt;/li&gt;            &lt;li&gt;Rules configured on the IDP can be used to filter out incoming claims and pass through only ones that pass specific criteria. &lt;/li&gt;            &lt;li&gt;Rules configured on IDP and rules configured on RP are independent from each other. &lt;/li&gt;            &lt;li&gt;It is easy to do a simple transformation of one claim to another while keeping the value of the claim the same. &lt;/li&gt;         &lt;/ol&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In the next post we’ll examine how Fabrikam STS will construct outgoing claims and look at the whole flow of this process.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3284604" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author><category term="PKI" scheme="http://blogs.technet.com/dmitrii/archive/tags/PKI/default.aspx" /><category term="Security" scheme="http://blogs.technet.com/dmitrii/archive/tags/Security/default.aspx" /><category term="Windows Server 2008" scheme="http://blogs.technet.com/dmitrii/archive/tags/Windows+Server+2008/default.aspx" /><category term="Federation" scheme="http://blogs.technet.com/dmitrii/archive/tags/Federation/default.aspx" /><category term="Claims Based Authentication" scheme="http://blogs.technet.com/dmitrii/archive/tags/Claims+Based+Authentication/default.aspx" /><category term="SharePoint" scheme="http://blogs.technet.com/dmitrii/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Claims based Authentication - Part I</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2009/10/02/claims-based-authentication-part-i.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2009/10/02/claims-based-authentication-part-i.aspx</id><published>2009-10-02T15:39:19Z</published><updated>2009-10-02T15:39:19Z</updated><content type="html">&lt;p&gt;Claims based authentication is getting more ground and with more practical applications we’ll see more and more adoption of this technology. Recently I downloaded and went through step-step demonstration on using Microsoft Office SharePoint Server 2007 and Active Directory Federation Services v2 (ADFS v2) beta 2 software. You can download this great demo at this location (&lt;a title="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=57602615-e1ee-4775-8b79-367b7007e178" href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=57602615-e1ee-4775-8b79-367b7007e178"&gt;http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=57602615-e1ee-4775-8b79-367b7007e178&lt;/a&gt;). &lt;/p&gt;  &lt;p&gt;I have done simple implementations with ADFS v1 in the past and have read a good amount on ADFS v2 and in general on Claims based authentication, so I’m not new to this concept and technology in general. It doesn’t take long to go through all of the steps in this demonstration and it actually fairly easy and everything works. After going through all of the specified steps I scratched my head and thought, hmm, how is it exactly working, what is happening there, what kind of claims are going between IDP and RP, how are they configured and how can I modify this configuration to do other things? I like to visualize things, if it at all possible. This way I can see it, visually touch it and can get much better long term understanding on how this solution is actually working. So I decided to walk through this configuration and try to document some of those parts needed for better understanding of the entire message workflow. &lt;/p&gt;  &lt;p&gt;If you are new to Claims based authentication, this post might not make much sense to you. There are a lot of resources on this subject. At the the of this post I provide some links to blogs and white papers that I think are very informational and educational.&lt;/p&gt;  &lt;p&gt;First, I want to review the design of this demonstration. Figure 1 shows both Fabrikam and Contoso environments. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Figure 1. Base configuration of Fabrikam and Contoso&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; margin: 5px 40px 5px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://blogs.technet.com/blogfiles/dmitrii/WindowsLiveWriter/ClaimsbasedAuthenticationI_11E56/image_6.png" width="415" height="486" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you didn’t have a chance to review step-step document then here is a quick review of this solution. Contoso is doing business with Fabrikam and as part of their business environment they need to provide a secure collaboration portal. Contoso is using SharePoint 2007 to share documents between Contoso and Fabrikam. Contoso does not want to manage Fabrikams user accounts and Fabrikams does not want to have more than one user account and would like to have single sign on to access resources on Contoso SharePoint portal. Access to resources must be controlled via assigned roles. Some users should have only read access, some contributor access and some full access to the content.&lt;/p&gt;  &lt;p&gt;As you can see, each company has its own Active Directory environment. They do not have Active Directory Forest or domain trusts and users in one environment can’t authenticate to other environment via AD trusts. Contoso AD does not have duplicate accounts for Fabrikam users.&lt;/p&gt;  &lt;p&gt;Fabrikam users will access resources in Contoso SharePoint portal via Claims based authentication and they will have certain rights (roles) based on the assigned group membership in their own Fabrikam AD environment.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In step-step guide, in step 4 you’ll be asked to authenticate as Contoso\Administrator to the &lt;a href="https://docs.contoso.com"&gt;https://docs.contoso.com&lt;/a&gt; and add new roles to the site. In prior steps you configured this site to use “&lt;strong&gt;Role#Domain Admins&lt;/strong&gt;” as site administrator and configured ContosoSRV01 ADFS with RP for SharePoint site with couple claim rules. &lt;/p&gt;  &lt;p&gt;So what happens during this authentication and what type of claim is actually provided to the SharePoint site to give Contoso\Administrator administrative rights on the site? Figure 2 shows authentication steps.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Figure 2. Authentication by Contoso user&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; margin: 5px 40px 5px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://blogs.technet.com/blogfiles/dmitrii/WindowsLiveWriter/ClaimsbasedAuthenticationI_11E56/image_5.png" width="251" height="506" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In step 1, Administrator accesses &lt;a href="https://docs.contoso.com"&gt;https://docs.contoso.com&lt;/a&gt; site, his browser reads the policy on the SharePoint site, discovers that it need to get a Claim from &lt;strong&gt;sts1.contoso.com&lt;/strong&gt; and get redirected to it.&lt;/p&gt;  &lt;p&gt;In step 2, he chooses to use Windows Integrated Authentication to authenticate to STS. &lt;/p&gt;  &lt;p&gt;In step 3, he will get required claim from STS. STS is configured with the following rules:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="426"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;LDAP Attribute&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="224"&gt;&lt;strong&gt;Outgoing Claim Type&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Mail&lt;/td&gt;        &lt;td valign="top" width="224"&gt;*Name&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;tokenGroups&lt;/td&gt;        &lt;td valign="top" width="224"&gt;*Role&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;mail&lt;/td&gt;        &lt;td valign="top" width="224"&gt;E-Mail Address&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Based on these rules, the content of this claim will be the following:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="428"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="226"&gt;&lt;strong&gt;Claim Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Name&lt;/td&gt;        &lt;td valign="top" width="226"&gt;administrator@contoso.com&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="226"&gt;Domain Admins          &lt;br /&gt;Administrators           &lt;br /&gt;Domain Users           &lt;br /&gt;Enterprise Admins           &lt;br /&gt;Group Policy Creator Owners           &lt;br /&gt;Schema Admins           &lt;br /&gt;AD RMS Enterprise Administrators&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;E-Mail Address&lt;/td&gt;        &lt;td valign="top" width="226"&gt;administrator@contoso.com&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;In step 4 this claim is send back to the &lt;a href="https://docs.contoso.com"&gt;https://docs.contoso.com&lt;/a&gt; SharePoint site.&lt;/p&gt;  &lt;p&gt;Sharepoint site will take the claim, evaluate it and will find that one of the values in Claim Type Role is “Domain Admins” which matches its own configured Role type (“Role#Domain Admins”). Based on this match SharePoint will give our Administrator administrative rights to this site.&lt;/p&gt;  &lt;p&gt;OK, this is fairly easy stuff. One to one matching and we are in business. As we can see Administrator Role Claim value has multiple groups in it. Obvious question begs the answer, can we configure SharePoint roles provider with any of these groups to give this user administrative access on the SharePoint? and the answer is yes. To prove this we can do a quick test. We’ll modify SharePoint to use “&lt;strong&gt;Role#Schema Admins&lt;/strong&gt;” instead of “&lt;strong&gt;Role#Domain Admins&lt;/strong&gt;”. Since Administrator account is member of Schema Admins group, he will have administrative rights on the site. &lt;/p&gt;  &lt;p&gt;During step 4 (step-step guide) Administrator configures site with couple new roles: “&lt;strong&gt;Role#DrugTrial1Admins&lt;/strong&gt;” and “&lt;strong&gt;Role#DrugTrial1Auditors&lt;/strong&gt;”. At the end of step 4 we’ll authenticate as user Contoso\Danielw and verify that he has appropriate rights. Same flow will happen as shown in Figure 2. Based on the configured rules the claim will have the following values:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="428"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;Claim Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="226"&gt;&lt;strong&gt;Claim Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Name&lt;/td&gt;        &lt;td valign="top" width="226"&gt;danielw@contoso.com&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Role&lt;/td&gt;        &lt;td valign="top" width="226"&gt;Domain Users          &lt;br /&gt;DrugTrial1Admins           &lt;br /&gt;Developer&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;E-Mail Address&lt;/td&gt;        &lt;td valign="top" width="226"&gt;danielw@contoso.com&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Because Daniels claim type ‘Role” has value matching SharePoint configured role, he is will be given appropriate rights on this site.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="1184"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="1182"&gt;         &lt;p&gt;&lt;strong&gt;Key Learning's:&lt;/strong&gt;&lt;/p&gt;          &lt;ol&gt;           &lt;li&gt;In basic mapping of the tokenGroup LDAP attribute and Outgoing Claim type, the Role value configured on the SharePoint site must match the name of the Active Directory group. &lt;/li&gt;            &lt;li&gt;At this point we have one STS configured with single RP and we have a rule set corresponding to this RP. &lt;/li&gt;         &lt;/ol&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="1184"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="1182"&gt;         &lt;p&gt;&lt;strong&gt;Additional Research Items&lt;/strong&gt;&lt;/p&gt;          &lt;ol&gt;           &lt;li&gt;When user tries to authenticate to SharePoint, does it provide back to the user a set of Claim Types it is asking for or is it simply redirecting user to the STS and relies on STS to provide whatever claims it is configured with? It would be very nice and intelligent for SharePoint to only ask for what it needs and for STS to provide only the type of claims that RP has asked from it. &lt;/li&gt;         &lt;/ol&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In the next post we’ll continue examination of this configuration.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3284567" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author><category term="PKI" scheme="http://blogs.technet.com/dmitrii/archive/tags/PKI/default.aspx" /><category term="Security" scheme="http://blogs.technet.com/dmitrii/archive/tags/Security/default.aspx" /><category term="Windows Server 2008" scheme="http://blogs.technet.com/dmitrii/archive/tags/Windows+Server+2008/default.aspx" /><category term="Federation" scheme="http://blogs.technet.com/dmitrii/archive/tags/Federation/default.aspx" /><category term="Claims Based Authentication" scheme="http://blogs.technet.com/dmitrii/archive/tags/Claims+Based+Authentication/default.aspx" /><category term="SharePoint" scheme="http://blogs.technet.com/dmitrii/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Deleting old keys on Smart Card</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2009/03/07/deleting-old-keys-on-smart-card.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2009/03/07/deleting-old-keys-on-smart-card.aspx</id><published>2009-03-07T18:19:05Z</published><updated>2009-03-07T18:19:05Z</updated><content type="html">&lt;p&gt;If you use your smart card a lot and issue many certificates to your Smart Card there will be a moment when the storage on the card will get too small to accommodate new certificates. In most cases your IT department might ask you to send your card back for replacement or they will tell you to issue replacement certificates while reusing the same private key – too keep the size of new certificates on the card to a minimum. &lt;/p&gt;  &lt;p&gt;But it is fairly easy to delete old certificates from your card and free up space on it.&lt;/p&gt;  &lt;p&gt;Do delete certificate on Smart Card use the following command:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="615" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="613"&gt;&lt;strong&gt;certutil –delkey –csp &amp;quot;Microsoft Base Smart Card Crypto Provider&amp;quot; &lt;i&gt;KeyContainerName&lt;/i&gt;&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Of course you need to know KeyContainerName before you can run above command. &lt;/p&gt;  &lt;p&gt;To find the right container name on the card you can run the following command:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;certutil –key –csp &amp;quot;Microsoft Base Smart Card Crypto Provider&amp;quot;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This command will show container names, but it will not show associated certificates with containers.&lt;/p&gt;  &lt;p&gt;To list all certificates on the card use the following command:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;certutil –scinfo&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Make sure to find container corresponding to expired certificate that you want to remove from Smart Card. If you specify wrong container it will delete valid certificate and your card will become useless and then you’ll definitively have to contact help desk.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here is an example of the “certutil –key –csp &amp;quot;Microsoft Base Smart Card Crypto Provider&amp;quot;” output:&lt;/p&gt;  &lt;p&gt;C:\&amp;gt;certutil -key -csp &amp;quot;Microsoft base Smart Card Crypto Provider&amp;quot;&lt;/p&gt;  &lt;p&gt;Microsoft base Smart Card Crypto Provider:&lt;/p&gt;  &lt;p&gt;&lt;b&gt;484fdef3-4106-40aa-b060-73c36f70db7b&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;AT_KEYEXCHANGE&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;c364101a-df8f-49f1-b71d-13c67ec6032f&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;AT_KEYEXCHANGE&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;da73e850-19f7-454f-a4e9-7ceb15aa4b0d&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;AT_KEYEXCHANGE&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;le-S/MIMESignatureSmartcard-5-05811&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;AT_SIGNATURE&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;le-MSSmartcardUser-02c869ab-c62d--61905 [Default Container]&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;AT_KEYEXCHANGE&lt;/p&gt;  &lt;p&gt;CertUtil: -key command completed successfully.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3210291" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author></entry><entry><title>Provisioning Computers with ILM ‘2’</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2009/02/15/provisioning-computers-with-ilm-2.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2009/02/15/provisioning-computers-with-ilm-2.aspx</id><published>2009-02-16T02:13:51Z</published><updated>2009-02-16T02:13:51Z</updated><content type="html">&lt;p&gt;In previous post I talked about different ways to provide Registration Authority (RA) functionality for device certificates. The 4th method was using ILM ‘2’ workflow functionality to control group membership. A few days ago I decided to setup a demonstration on how it actually can be done. I used ILM ‘2’ RC0 software which at the moment of this writing can be downloaded from this location &lt;a title="http://technet.microsoft.com/en-us/evalcenter/cc872861.aspx" href="http://technet.microsoft.com/en-us/evalcenter/cc872861.aspx"&gt;http://technet.microsoft.com/en-us/evalcenter/cc872861.aspx&lt;/a&gt;. I used preinstalled VHD image to speed up my testing. Keep in mind that ILM ‘2’ only comes as 64 bit application and available VHD image is build for Hyper-V server.&lt;/p&gt;  &lt;p&gt;There is good walkthrough on how to create computer object in ILM ‘2’ and how to join this object to the security group, check &lt;a href="http://blogs.technet.com/doittoit/default.aspx"&gt;Bobby and Nima's ILM Blog&lt;/a&gt; blog for more information &lt;a title="http://blogs.technet.com/doittoit/archive/2008/06/25/extending-ilm-2-to-manage-and-provision-computer-objects.aspx" href="http://blogs.technet.com/doittoit/archive/2008/06/25/extending-ilm-2-to-manage-and-provision-computer-objects.aspx"&gt;http://blogs.technet.com/doittoit/archive/2008/06/25/extending-ilm-2-to-manage-and-provision-computer-objects.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So if you follow instructions in this blog it will walk you through all major steps required to configure ILM schema, modify ILMMA and ADMA, and create all required rules in ILM ‘2’ for object creation and workflow approval. &lt;/p&gt;  &lt;p&gt;After going through all configuration steps I was able to provision computer object to AD, it was shown in my target OU with the name I specified in ILM. I was happy. Then I came to the point of joining actual computer to the provisioned computer object. It didn’t work, while joining computer to AD it would create another object and it would not join it to already existing computer object. So I started troubleshooting it and trying to figure out what was going on. &lt;/p&gt;  &lt;p&gt;Obviously the first thing I did is opened computer object to see what is looks like. First discovery was that “Computer name pre-windows 2000” was some long pre-generated string, that looked like this - &lt;b&gt;$C41000-7T6LLPIABSAP&lt;/b&gt;. “Computer name pre-windows 2000” is actually samAccountName attribute on the computer object. So ILM was creating computer object in AD with right DN name, but it was not populating samAccountName with the same name and let AD to auto-generate it for us. As you know that would be a problem. While my actual computer name was named “TestPC1” and it was showing in OU as TestPC1 (CN name), its samAccountName didn’t match the computer name. While joining it to AD it didn’t find the object with samAccountName matching computer name and created a new computer object. OK, I asked around and got suggestion that we need to flow samAccountName from ILM to AD. No problem, I added the following attribute flow: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/dmitrii/WindowsLiveWriter/ProvisioningComputerswithILM2_F0B3/image_4.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="68" alt="image" src="http://blogs.technet.com/blogfiles/dmitrii/WindowsLiveWriter/ProvisioningComputerswithILM2_F0B3/image_thumb_1.png" width="630" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;After adding this attribute flow I created new computer in ILM, it showed up in AD, and its samAccountName was matching computer name. Great. Till I tried to join computer with that name to AD. Same problem, I was getting new computer object in AD and it was not joining to my object. &lt;/p&gt;  &lt;p&gt;OK, this started to frustrate me. I tried to Reset computer object, it complained to me about password not being strong enough for the password policy. This was odd. &lt;/p&gt;  &lt;p&gt;So I decided to compare computer object created via ADUC and computer object created with ILM. It is easy to do via ADSIEdit. I discovered that object type created by ILM was actually recognized by AD as User object, its userAccountControl attribute matched user object userAccountControl, not computer object. Very good. userAccountControl for computer object is 4128. &lt;/p&gt;  &lt;p&gt;Back to ILM attribute flow, created another one that looked like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/dmitrii/WindowsLiveWriter/ProvisioningComputerswithILM2_F0B3/image_6.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="64" alt="image" src="http://blogs.technet.com/blogfiles/dmitrii/WindowsLiveWriter/ProvisioningComputerswithILM2_F0B3/image_thumb_2.png" width="616" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Created another computer account in ILM, it showed up in AD, I tried to Reset this object – no complains, looked at it in ADSIEdit, all attributes were computer object related. Last test, join computer to AD – it worked. Life is good.&lt;/p&gt;  &lt;p&gt;So if you are trying to create computer object in AD via ILM ‘2’ I found that the following attribute flow will create the right computer object:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/dmitrii/WindowsLiveWriter/ProvisioningComputerswithILM2_F0B3/image_8.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="218" alt="image" src="http://blogs.technet.com/blogfiles/dmitrii/WindowsLiveWriter/ProvisioningComputerswithILM2_F0B3/image_thumb_3.png" width="643" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3202742" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author></entry><entry><title>Registration Authority and Device Certificates</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2009/01/25/registration-authority-and-device-certificates.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2009/01/25/registration-authority-and-device-certificates.aspx</id><published>2009-01-26T03:24:09Z</published><updated>2009-01-26T03:24:09Z</updated><content type="html">&lt;p&gt;Registration Authority (RA) in PKI implementations is used to authorize&amp;#160; issuance of certificates to the certificate subscriber. Usually it is used with user certificates, especially if they are issued on the Smart Cards. In some implementations it is necessary to provide RA functionality for device certificates. Usually it is done with PKI implementations that are covered by the Certificate Policy (CP) that require a “human sponsor” for every device certificate issued in the organization. One such CP is &lt;a href="http://www.cio.gov/fpkipa/documents/CommonPolicy.pdf" target="_blank"&gt;U.S. Common Policy CP&lt;/a&gt;, specifically check out section 4.1.1.3.&lt;/p&gt;  &lt;p&gt;Most organizations implement Microsoft CA and take advantage of the auto-enrollment functionality provided by MS CA and Windows platform. Windows XP and Vista, Windows Server 2003 and 2008 all can easily auto-enroll with certificates from Windows 2003 or 2008 Certificate Authority. While it is easily configured and target Windows devices just auto-enroll behind the scene with required certificates it does not satisfy the ‘human sponsor’ requirement specified by U.S. Common Policy CP.&lt;/p&gt;  &lt;p&gt;There are a few ways to keep auto-enrollment functionality and provide Registration Authority for device certificates. Here I’ll list a few way to do it with Microsoft products, from simple RA to full featured Identity Management solutions. As time goes, I’ll provide details on how to implement each of these solutions in your customer environment.&lt;/p&gt;  &lt;p&gt;One of the key questions to decide about auto-enrollment and approval workflow is where the “human sponsor” comes into play with any number of approvers and where or how it is triggered in the system to allow specific computer to auto-enroll with new certificate. &lt;/p&gt;  &lt;p&gt;The “human sponsor” usually should be the system administrator who owns the desktop or server. This person can be the initiator of the process, approver and the final executioner. Some companies might want to separate those roles between more than one person and maybe automate some of them.&lt;/p&gt;  &lt;p&gt;The technical part can be achieved in couple different ways as well. It might be decided to require approval of each certificate on the CA itself or we can handle approval by managing security group membership that have been granted auto-enroll permission. Adding computer object to a group will trigger auto-enrollment on that computer. &lt;/p&gt;  &lt;p&gt;Now it is really up to the customer to decide how they want to execute it and what components they want to automate, how much audit and historical data they want to have etc.&lt;/p&gt;  &lt;p&gt;Here are a few approaches to solve the “human sponsor” requirement with auto-enrollment functionality still intact.&lt;/p&gt;  &lt;h3&gt;1. Enrollment with manual approval workflow.&lt;/h3&gt;  &lt;p&gt;With this configuration server administrator would fill in form(s) asking to issue certificate to the installed system. The form(s) will go to the approving manager, get approved or denied. Approved form can be routed to the AD group manager who would find the computer object in AD and add it to the appropriate security group. &lt;/p&gt;  &lt;p&gt;In this approach the “human sponsor” is the system administrator. His request is approved by another manager and the execution is done by another administrator. It provides good separation of powers and in my opinion satisfy the requirements of the US Common Policy CP.&lt;/p&gt;  &lt;p&gt;On other hand this process can be very slow. It can take days, sometimes weeks. Things can get lost. Not the best way to accomplish desired result. &lt;/p&gt;  &lt;h3&gt;2. Automated enrollment with Computer Admin Acting as RA.&lt;/h3&gt;  &lt;p&gt;With this configuration server administrator will add the computer object to the desired security group. There is no forms to fill. Quick and easy.&lt;/p&gt;  &lt;p&gt;In this approach the “human sponsor” is the system administrator, he also acts as approver and executioner of the final step. While it might be acceptable and satisfy the US Common Policy CP it might not satisfy some other requirements as it puts little checks on certificate issuance to devices. &lt;/p&gt;  &lt;h3&gt;3. Automated enrollment with MS CA Certificate Manager as RA.&lt;/h3&gt;  &lt;p&gt;With this configuration certificate template will be configured to require manager approval before certificate issuance. Server administrator will be required to add computer object to security group that is authorized for auto-enrollment.&lt;/p&gt;  &lt;p&gt;In this approach the “human sponsor” is the system administrator. Computer will try to auto-enroll for certificate and its request will go into the Pending Requests folder. Certificate Manager will be required to approve or deny the request. After request is approved the subject computer will finish enrollment process and get the certificate.&lt;/p&gt;  &lt;p&gt;One of the potential issues in this design is figure out how Certificate Manager would know if the request is legit or not. &lt;/p&gt;  &lt;h3&gt;4. Automated enrollment with ILM 2 Workflow, ISO Manager act as RA.&lt;/h3&gt;  &lt;p&gt;With this configuration server administrator would logon to ILM 2 and create a request to add computer object to the desired security group. The workflow will route request to the manager who approves the request (or denies). The approval will trigger ILM to add computer object to the desired group and eventually target computer will auto-enroll with certificate.&lt;/p&gt;  &lt;p&gt;In this approach the ‘human sponsor” is the system administrator. manager is approver and ILM 2 is the executioner of the workflow tasks. ILM 2 can enforce group memberships and provide historical data on who and when request certificates and approved it. Of course you’ll need to implement ILM 2. &lt;/p&gt;  &lt;p&gt;I’ll set this up later in the lab and provide more details on how it works.&lt;/p&gt;  &lt;h3&gt;5. Automated enrollment with CLM Workflow, ISO Manager act as RA.&lt;/h3&gt;  &lt;p&gt;With this approach use Certificate Lifecycle Manager (CLM) product. More on it later.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3191354" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author></entry><entry><title>Old Certificates Identification and Removal</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2009/01/16/old-certificates-identification-and-removal.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2009/01/16/old-certificates-identification-and-removal.aspx</id><published>2009-01-16T17:35:00Z</published><updated>2009-01-16T17:35:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Certificate renewal on Web sites can be a big nightmare, especially if you have hundreds of them and if you don’t know when they are going to expire. Also, sometime you have change the Issuing CA from one to another and finding out the certificate chain on multiple sites can be a time consuming process. Of course you can open each site with IE or some other browser and look at each cert and document it that way. There are couple approaches that can help with automation of this task. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;The first one would be running a script on each web server. This script can collect information about all certificates installed and provide some intelligent reporting. The problems with this approach are multiple: web servers can be running different platforms, so the script that can easily run on Windows might not run on other web servers. Another problem would be to actually be able to find the actual servers to run the script and then the issue with rights to run the script on the target server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Another approach we can take is to run script on central workstation and target each web site from it. Open the site that is protected with SSL certificate, read information from the certificate and log it into the output report. This way we really don’t care about web server platform, its physical location and other potential issues. Sounds like a much better approach. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;So here is a little PowerShell script that can help you with identifying certificate expiration and certificate chain on the target web servers. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;First, you need to get a list of all web sites that have been protected with SSL certificates. Put URLs for these sites into input file (in this example, I call it sslinput.txt) that our script will read:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Websites&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;securesite.domain1.com&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;securesite.domain2.com&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;securesite.domainX.com&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Second, save the following script to the DiscoverSSL.PS1 file and run it from PowerShell command. The script will produce an output file (ssloutput.txt) with information about each certificate.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;$webinputpath = "C:\sslinput.txt"&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;$outputpath = "C:\ssloutput.txt"&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;function Get-RemoteCertificate ($serverName,$port)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;$client = New-Object System.Net.Sockets.tcpclient($serverName, $port)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;$sslStream = New-Object System.Net.Security.SslStream($client.GetStream(),$false, $null,$null)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;$sslStream.AuthenticateAsClient($serverName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;$remoteCert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($sslstream.remoteCertificate)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Add-Content $outputpath "Certificate for $servername on port $port"&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Add-Content $outputpath "Subject:&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;$remoteCert.Subject"&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;if ($remoteCert.Verify() -eq $true) {Add-Content $outputpath "Revocation status: OK"} else { Add-Content $outputpath "Revocation status: REVOKED"}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Add-Content $outputpath ""&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Add-Content $outputpath "---------------------------------------------------------------------------"&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Add-Content $outputpath ""&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;$client.close()&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;import-csv $webinputpath | foreach-object {get-remoteCertificate&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;-servername $_.websites -port 443}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 10pt 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Cambria color=#4f81bd size=4&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 11.0pt"&gt;&lt;FONT face=Calibri&gt;Limitations &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;This script will not provide information on certificates if the computer running this script does not trust the Root CA chaining from the issued SSL certificate.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;This script will not provide information on self issued certificates. See #1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;This script will not provide information on certificates if their common name does not match the input URL. It will not work if the input file provides IP addresses or DNS names that do not match the target certificate.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;4.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;In all 3 cases the output file will be logged with error message indicating that script could not authenticate to the target SSL certificate.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3183993" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author></entry><entry><title>More options with Re-Revocation solution</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2007/09/21/more-options-with-re-revocation-solution.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2007/09/21/more-options-with-re-revocation-solution.aspx</id><published>2007-09-21T18:59:00Z</published><updated>2007-09-21T18:59:00Z</updated><content type="html">&amp;nbsp; 
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 14pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Controlling the date&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;In previous post I've shown how we can re-revoke all certificates that were revoked post certain date. Solution used to create certutil.exe command with hardcoded date. To automate this solution we need to generate dynamic date. &lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;The following script will create input file with serial numbers of revoked certificates in the last 24 hours.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;sInFile = "cert-SN-in.txt"&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;sOutBatchFile = "serialnumbers.cmd"&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;const ForReading = 1, ForWriting = 2, ForAppending = 8, SUCCESS = 1, FAILURE = 0&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;strComputer = "."&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Set objWMIService = GetObject("winmgmts:" _&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;amp; "{impersonationLevel=impersonate}!\\" &amp;amp; strComputer &amp;amp; "\root\cimv2")&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Set colItems = objWMIService.ExecQuery("Select * from Win32_LocalTime")&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;set oFSO = wscript.createobject("scripting.filesystemobject")&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;set oOutFile = oFSO.CreateTextFile(sOutBatchFile,ForWriting,False)&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;For Each objItem in colItems&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;PriorDay = objitem.Day - 1&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;oOutFile.WriteLine("certutil -view -restrict " &amp;amp; """"&amp;amp; "RevokedWhen&amp;gt;=" &amp;amp; objItem.Month &amp;amp;"/" &amp;amp; PriorDay &amp;amp;"/" &amp;amp; objItem.Year &amp;amp;"""" &amp;amp; " -out SerialNumber &amp;gt; cert-SN-in.txt")&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Next&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;oOutFile.Close&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 0.375in; FONT-FAMILY: Calibri"&gt;Set oShell = WScript.CreateObject("WScript.Shell")&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in 0in 0in 0.375in; FONT-FAMILY: Calibri"&gt;oShell.Run(sOutBatchFile)&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 14pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Controlling Re-Revocation by reason code&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;So far the solution is re-revoking&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;all revoked certificates. This behavior might be undesirable. We might want to keep revoked certificates with reason code "On Hold" untouched so we can later un-revoke them.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Fortunately certutil.exe is flexible enough to give us this output.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;The following command will create an output file with serial numbers of revoked certificates with reason code "unspecified":&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;certutil -view -restrict "Revocation Reason=0x0" -out SerialNumber &amp;gt; cert-SN-in.txt&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2009683" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author><category term="PKI" scheme="http://blogs.technet.com/dmitrii/archive/tags/PKI/default.aspx" /><category term="Security" scheme="http://blogs.technet.com/dmitrii/archive/tags/Security/default.aspx" /></entry><entry><title>Re-Revoking Certificates with Different Reason Code</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2007/08/17/re-revoking-certificates-with-different-reason-code.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2007/08/17/re-revoking-certificates-with-different-reason-code.aspx</id><published>2007-08-18T02:53:00Z</published><updated>2007-08-18T02:53:00Z</updated><content type="html">&amp;nbsp; 
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;One of my customers is using 3rd party Card Management System (CMS) to manage their smart cards. One of many common management tasks that such systems perform is revocation of the smart card and in particular the certificates issued to the given smart card. Well, of course CMS only originates the revocation request - the actual revocation is performed on CA that issued certificates. Certificates can be revoked for different reasons and when you revoke it is good idea to specify the reason code for revocation. Some implementations require that the reason code is specified, and some implementations require that this reason code must be set to "key compromise". If you do not specify the reason code during revocation then it will be set to the default reason code which is&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;"unspecified".&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;So this particular&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;CMS does not specify the reason code when it sends revocation requests to CA. At the same time customer Security Policy dictates that all subscriber certificates will be revoked with "key compromise" reason code.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;As I mention before the default revocation reason code for Windows 2003 CA is "unspecified". It is not possible to change the default setting to any other reason code.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Since CMS doesn't specify the reason code for revocation all revoked certificates by this CMS are revoked with the reason code "unspecified". This is a problem for them and we had to find some quick and easy solution to change the reason code on already revoked certificates from "unspecified" to "key compromise".&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Fortunately it is possible to do in couple different ways. One of them is to use certutil.exe command to re-revoke already issued certificates and specify new required reason code.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Here is the command you need to run to revoke a certificate with Serial Number 18e877ea00000000000a and reason code "key compromise":&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;certutil -revoke "18e877ea00000000000a" 1&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;So far so good, but how do we know what Serial Number to put into this command? We need to know what certificates already have been revoked. Well, the same utility comes to our rescue. If you run the following command it will provide you with Serial Numbers of all revoked certificates after the specified date:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;certutil –view –restrict "RevokedWhen&amp;gt;=08/15/2007" –out SerialNumber&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;OK, so we run this command, get all serial numbers of revoked certificates, populate this numbers to the first command and re-revoke all of them with new reason code. Cool, but what kind of output does this command provide to us? Can we easily grab serial numbers out from it?&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;The output from this command looks similar to this:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;1/1/2006 12:00 AM&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;Schema:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Column Name&lt;SPAN style="mso-spacerun: yes"&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;&amp;nbsp; &lt;/SPAN&gt;Localized Name&lt;SPAN style="mso-spacerun: yes"&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; &lt;/SPAN&gt;Type&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;MaxLength&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;----------------------------&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;----------------------------&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;------&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;---------&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;SerialNumber&lt;SPAN style="mso-spacerun: yes"&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;/SPAN&gt;Serial Number&lt;SPAN style="mso-spacerun: yes"&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; &lt;/SPAN&gt;String&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;128 -- Indexed&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;Row 1:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Serial Number: "61153ff1000000000006"&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;Row 2:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Serial Number: "18daada4000000000007"&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;Row 3:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Serial Number: "18e2c82a000000000008"&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;Row 4:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Serial Number: "18e3c5d4000000000009"&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;Row 5:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Serial Number: "18e877ea00000000000a"&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Can we get actual numbers out of this output? To the rescue comes Visual Basic script that parse through this information and as it finds anything between "" it takes it, and then creates the revocation command and executes that command.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;First we run this command and create the output file with serial numbers:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;certutil –view –restrict "RevokedWhen&amp;gt;=08/15/2007" –out SerialNumber &amp;gt; sn-input.txt&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Then we can run the following VBScript to re-revoke all certificates that have been revoked since 8/15/07. Here is the sample script to do it:&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;sInFile = "sn-input.txt"&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;sDelimiter = """"&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;const ForReading = 1, ForWriting = 2, ForAppending = 8&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;set oShell = wscript.createobject("wscript.shell")&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;set oFSO = wscript.createobject("scripting.filesystemobject")&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;if oFSO.FileExists(sInFile) then&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&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; &lt;/SPAN&gt;set oInFile = oFSO.OpenTextFile(sInFile,ForReading)&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;else&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&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; &lt;/SPAN&gt;wscript.echo "Input file " &amp;amp; sInFile &amp;amp; " does not exist."&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&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; &lt;/SPAN&gt;wscript.quit(1)&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;end if&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;do while not oInFile.AtEndOfStream&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&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; &lt;/SPAN&gt;sLine = oInFile.ReadLine&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&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; &lt;/SPAN&gt;aValues = split(sLine,sDelimiter)&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&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; &lt;/SPAN&gt;if ubound(aValues)&amp;gt;0 then&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&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;&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;/SPAN&gt;if ucase(trim(aValues(0))) = ucase("Serial Number:") then&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&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;&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;&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;/SPAN&gt;iRetVal = oShell.Run("certutil -revoke " &amp;amp; """"&amp;amp; aValues(1) &amp;amp;"""" &amp;amp; " 1",TRUE)&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&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;&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;/SPAN&gt;end if&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&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; &lt;/SPAN&gt;end if&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;loop ' oFile&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;oInFile.Close&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;Now it should be easy to create a batch file that will first create an input file with&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;serial numbers of all revoked certificates and then run vbscript that will parse through this file and re-revoke them with new reason code.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;To truly really automate this solution we'll need to automatically inject the date into the command that creates the input file, otherwise it will re-revoke bunch more certificates that we really need. But I didn’t do any investigation yet on how easy it would be inject a certain date into that command. Maybe some other time.&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 11pt; MARGIN: 0in; FONT-FAMILY: Calibri"&gt;By the way it would take me much longer to come up with this solution if not for some quick pointers from PG and help with writing vbscript from&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;another MS Consultant. Mark you are da man!&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=1772806" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author><category term="PKI" scheme="http://blogs.technet.com/dmitrii/archive/tags/PKI/default.aspx" /><category term="General" scheme="http://blogs.technet.com/dmitrii/archive/tags/General/default.aspx" /><category term="Security" scheme="http://blogs.technet.com/dmitrii/archive/tags/Security/default.aspx" /></entry><entry><title>Cool Windows 2008 posters</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2007/07/19/cool-windows-2008-posters.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2007/07/19/cool-windows-2008-posters.aspx</id><published>2007-07-19T16:27:00Z</published><updated>2007-07-19T16:27:00Z</updated><content type="html">&lt;P&gt;cool posters for download, check it out:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c2b9e44e-0bbd-47cb-bc09-b3d48be7f867&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=c2b9e44e-0bbd-47cb-bc09-b3d48be7f867&amp;amp;displaylang=en&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=1557960" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author><category term="General" scheme="http://blogs.technet.com/dmitrii/archive/tags/General/default.aspx" /><category term="Windows Server 2008" scheme="http://blogs.technet.com/dmitrii/archive/tags/Windows+Server+2008/default.aspx" /></entry><entry><title>TS Gateway #4</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2007/07/01/ts-gateway-4.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2007/07/01/ts-gateway-4.aspx</id><published>2007-07-02T00:38:00Z</published><updated>2007-07-02T00:38:00Z</updated><content type="html">&amp;nbsp; 
&lt;P&gt;&lt;STRONG&gt;Server side configuration&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In previous 3 postings I talked about why I liked TS gateway, the overall architecture for configuring TS Gateway in home lab environment and the client side configuration. &lt;/P&gt;
&lt;P&gt;This time I'll show a few screen shots of the TS Gateway configuration. The configuration is very simple and one can figure it out by basically going through the wizard and consulting available help. But pictures sometime are nice to see too, especially of already configured server.&lt;/P&gt;
&lt;P&gt;Anyway, in my lab I have TS Gateway server running the publically available beta of Windows Server 2008, it is running as virtual guest on Virtual PC hosted on Windows Vista. TS Gateway server has one network card assigned to it. It is important to know the IP address on this card and make sure your perimeter firewall (Linksys in my case) is configured to allow port 443 to this IP.&lt;/P&gt;
&lt;P&gt;When you install TS Gateway the wizard will ask you to specify certificate, create new one or to choose one later. I didn't have one at the time of installation and decided to install certificate later. When TS Gateway is installed you can right-click on the server name and choose properties. For simple installations the "SSL Certificate" tab is of most importance as it will allow you to choose or replace certificates. Without certificate TS gateway cannot function. The following screenshot shows my certificate issued from my own CA. As I wrote before it is very important to make sure that certificate name (shown in Issued to: field) is the name you specify in the Remote Desktop connection client, if they don't match you won't be able to connect.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.technet.com/photos/dmitrii/picture1416735.aspx" target=_blank&gt;&lt;IMG src="http://blogs.technet.com/photos/dmitrii/images/1416735/original.aspx" border=0&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;During installation wizard you'll be asked to configure 2 polices required for TS Gateway:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Connection Authorization Policies&lt;/LI&gt;
&lt;LI&gt;Resource Authorization Policies &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Connection Authorization Policy (TS CAP) allows you to specify the users who can connect to this TS Gateway server. The configuration is fairly simple and straightforward. You'd specify the groups or users who can connect to this TS Gateway server. Interesting granularity here is that you can specify the type of authentication will be supported by this TS CAP - Password and/or Smart Card. So if you have issued Smart Cards to your employees you can create policy that only allows Smart Card authentication into the TS Gateway server - very secure mechanism for remote authentication. Here is the shot of the TS CAP requirements. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/photos/dmitrii/picture1416749.aspx" target=_blank&gt;&lt;IMG src="http://blogs.technet.com/photos/dmitrii/images/1416749/original.aspx" border=0&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Device Redirection tab can be useful in controlling who can redirect what from the TS server to their client PC.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/photos/dmitrii/picture1416754.aspx" target=_blank&gt;&lt;IMG src="http://blogs.technet.com/photos/dmitrii/images/1416754/original.aspx" border=0&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The second policy that must be configured is the TS RAP which allows to specify the network resources that users can connect to remotely through this TS Gateway server. During configuration or later you can choose which computers you be able to access or just provide a blank policy that will allow connection to any target computer.&lt;/P&gt;
&lt;P&gt;All in all , it is easy to configure a single server TS Gateway to allow access to your internal network.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=1416719" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author><category term="PKI" scheme="http://blogs.technet.com/dmitrii/archive/tags/PKI/default.aspx" /><category term="Security" scheme="http://blogs.technet.com/dmitrii/archive/tags/Security/default.aspx" /><category term="Windows Server 2008" scheme="http://blogs.technet.com/dmitrii/archive/tags/Windows+Server+2008/default.aspx" /></entry><entry><title>Windows Server 2008 Terminal Services gateway #3</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2007/06/27/windows-server-2008-terminal-services-gateway-3.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2007/06/27/windows-server-2008-terminal-services-gateway-3.aspx</id><published>2007-06-28T02:50:00Z</published><updated>2007-06-28T02:50:00Z</updated><content type="html">&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Client Side Configuration to access remote TS Server via TS Gateway&lt;/P&gt;
&lt;P&gt;Windows Vista Remote Desktop Connection client has new option under Advanced Tab - "Connect from anywhere"&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.technet.com/photos/dmitrii/picture1379568.aspx" target=_blank&gt;&lt;/A&gt;&lt;A href="http://blogs.technet.com/photos/dmitrii/picture1379568.aspx" target=_blank&gt;&lt;IMG src="http://blogs.technet.com/photos/dmitrii/images/1379568/original.aspx" border=0&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;If you click on the Settings button it will allow to specify the TS Gateway server:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.technet.com/photos/dmitrii/picture1379570.aspx" target=_blank&gt;&lt;IMG src="http://blogs.technet.com/photos/dmitrii/images/1379570/original.aspx" border=0&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Server name that you type here must resolve to the Public IP address on your firewall and it must match the name on the certificate installed on the TS Gateway.&lt;/P&gt;
&lt;P&gt;And finally what name are you going to specify for the target server that you are actually trying to access? It might be confusing at first but the IP must be the actual IP of the target server and it must be accessible from the TS Gateway server. You are not connecting to this IP directly, TS Gateway server connects to it. So we put the actual private IP of my Domain Controller, it will look like that:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.technet.com/photos/dmitrii/picture1379571.aspx" target=_blank&gt;&lt;IMG src="http://blogs.technet.com/photos/dmitrii/images/1379571/original.aspx" border=0&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;OK, but what if I have Windows XP and not Vista? If you open Remote Desktop Connection and look under advanced tab you won't see Connect from anywhere configuration button. No problem, just go to the Windows Update site and under optional updates you'll find new version for Remote Desktop Connection client. Just install it and you are in business.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=1379540" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author><category term="PKI" scheme="http://blogs.technet.com/dmitrii/archive/tags/PKI/default.aspx" /><category term="Security" scheme="http://blogs.technet.com/dmitrii/archive/tags/Security/default.aspx" /><category term="Windows Server 2008" scheme="http://blogs.technet.com/dmitrii/archive/tags/Windows+Server+2008/default.aspx" /></entry><entry><title>Windows Server 2008 Terminal Services Gateway #2</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2007/06/26/windows-server-2008-terminal-services-gateway-2.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2007/06/26/windows-server-2008-terminal-services-gateway-2.aspx</id><published>2007-06-27T03:49:00Z</published><updated>2007-06-27T03:49:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Configuration of the Terminal Services Gateway is fairly straightforward. The following diagram shows the simplified configuration of how I configured it to get access to my home lab.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;IMG src="http://blogs.technet.com/photos/dmitrii/images/1372124/original.aspx" mce_src="http://blogs.technet.com/photos/dmitrii/images/1372124/original.aspx"&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Windows 2008 provides wizards for all of it different components and the configuration of Terminal Services Gateway is probably the easiest in the entire solution. The most difficulty most people will encounter will be with acquiring SSL certificate for TS Gateway. You have a few choices here:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Get this certificate from one of the commercial CAs.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Implement your own PKI (like in my lab)&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;TS Gateway can issue self signed certificate. This is usually used only for testing.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Another challenge is to provide name resolution to the public IP address assigned to your router by your Internet service provider. Usually this IP is assigned via DHCP and unless you pay extra money to have static IP it can change. In my experience, if you keep your router powered on 24/7 the IP address doesn’t change very frequently. So use one of the many Dynamic DNS free services to keep the DNS name up to date with current IP address or just update it manually if you find that the IP has changed.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The key point here is that the name on the certificate you install on the TS Gateway must match the FQDN assigned to Public IP address on your router&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Next time we’ll talk about how to configure TS Gateway server.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=1372117" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author><category term="PKI" scheme="http://blogs.technet.com/dmitrii/archive/tags/PKI/default.aspx" /><category term="Security" scheme="http://blogs.technet.com/dmitrii/archive/tags/Security/default.aspx" /><category term="Windows Server 2008" scheme="http://blogs.technet.com/dmitrii/archive/tags/Windows+Server+2008/default.aspx" /></entry><entry><title>Windows 2008 Terminal Services Gateway</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/dmitrii/archive/2007/06/25/windows-2008-terminal-services-gateway.aspx" /><id>http://blogs.technet.com/dmitrii/archive/2007/06/25/windows-2008-terminal-services-gateway.aspx</id><published>2007-06-26T02:42:00Z</published><updated>2007-06-26T02:42:00Z</updated><content type="html">&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;One of the new exciting technologies that will be shipped with Windows 2008 Server is the Terminal Services Gateway. It is exciting not just because it will be used by many companies but because it can be used by many other technologists and make our life a little easier and more exciting.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;I like to test new technologies and for my work sometimes I have to test or show different new and old products. I have 2 laptops, one is for my general day-day work with bunch of productivity applications and all required corporate tools, it runs Windows Vista. The second laptop is running Windows XP Pro with Windows Virtual Server 2005 R2 SP1. It acts as the host platform to run different virtual guest systems - DC, CA, ILM, SQL etc etc. I use to carry both laptops on my trips because I needed access to my virtual environment to test certain things or learn new product. As you imagine carrying 2 laptops is not fun, it is heavy, it is pain to go through the security checks at the airports, requires extra space at any table... &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;So I've been looking forward to a solution that will allow me to keep my virtual network back at my house and have full secure access to it from any network that I have to be - it is usually 90% of the time at my client, or on my BlackJack 3G Cingular network.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Of course I could always leave my virtual network back at my house and configure my Linksys router to path port 3389 to one of the systems. What is the problem with such solution? None of the corporate firewalls allow outbound port 3389. So I could not connect to my home based virtual network via normal TS session.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;So thankfully now we have a solution for this type of problem - use Windows 2008 Terminal Services gateway. It works over SSL port 443. Is that port open on corporate firewalls? You betcha it is. Now you can connect to you home network from any location via normal SSL port.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Next time I’ll write how I configured Windows 2008 Server Terminal Services gateway to get into my home network virtually from any location.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Dmitrii&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=1360948" width="1" height="1"&gt;</content><author><name>lezine</name><uri>http://blogs.technet.com/members/lezine.aspx</uri></author><category term="PKI" scheme="http://blogs.technet.com/dmitrii/archive/tags/PKI/default.aspx" /><category term="Security" scheme="http://blogs.technet.com/dmitrii/archive/tags/Security/default.aspx" /><category term="Windows Server 2008" scheme="http://blogs.technet.com/dmitrii/archive/tags/Windows+Server+2008/default.aspx" /></entry></feed>