Microsoft's official enterprise support blog for AD DS and more
Hi, Rob here. First I want to thank you guys for reading and participating in our blogging efforts. I had one of you e-mail us and ask about the web site I used in the Kerberos Authentication Troubleshooting blogs and if they could get a copy of it.
The web site was created by our IIS support counterparts and it turns out it was released to the web as DelegConfig. Brian Murphy-Booth has a blog about the web site here. We at AskDS do not support the DelegConfig web site, so if you have questions or comments about it leave your feedback at that blog location.
With this web site you can test Kerberos double hop configurations and the newer delegation types of constrained delegation and constrained delegation with protocol transition from IIS to the following services: SQL, File Server, OLAP Server, or another web server. The reason why this documentation exists is to help customers configure Kerberos delegation to become familiar with all the tasks involved to configure the environment correctly.
NOTE: Review Setup and Known issues.txt from the DelegConfig.zip file for proper ASP.NET version to be installed on the IIS Server.
For more information on this topic as it relates to IIS you can review the below web site location:
Configuring Constrained Delegation for Kerberos (IIS 6.0)http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/df979570-81f6-4586-83c6-676bb005b13e.mspx?mfr=true
So that this blog is not too long (yeah, I know I am not known for short blogs) we are only going to show you how to configure the SQL server as the backend and how to test it since this is the most common situation where Kerberos delegation is configured. Keep in mind that for learning how Kerberos multi-hop works you do not need to install the full version of SQL. You can use SQL Express, and it can be installed on any operating system.
Registering a Service Principal Name http://technet.microsoft.com/en-us/library/ms191153.aspx
Kerberos Authentication and SQL Server http://technet.microsoft.com/en-us/library/cc280744.aspx
The SQL Server Service can run under basically two types of accounts.
The web site can verify either of these configurations, but there are different steps that need to be followed dependant on which configuration the SQL Server Service is running. Of course with all these configurations it is very important that we have the correct SPNs registered to the correct computer or user account.
I hope that you have been able to learn some new things. All the steps outlined here need to be done when configuring Kerberos delegation and this site will definitely help engineers to understand how Kerberos delegation works.
Have fun learning and testing all the different configurations that are possible with this application!
- Rob Greene
Note that this content has also been added to the TechNet Wiki to allow for community editing.
http://social.technet.microsoft.com/wiki/contents/articles/how-to-back-up-and-restore-ntfs-and-share-permissions.aspx
From time to time we are asked how to backup and restore NTFS file system permissions as well as network share permissions. KB article 125996 talks about the network share piece of it, but it does not talk about NTFS permissions.
One thing that has made the NTFS permissions piece of this simpler is the Icacls tool. Icacls was developed for Windows Vista as a replacement for tools such as Cacls, Xcacls, and Xcacls.vbs. It was also included in Service Pack 2 for Windows Server 2003 and Windows Server 2008.
Backup and Restore of Share Permissions
To backup share permissions, export the Shares registry key.
When you want to restore the permissions, double-click shareperms.reg to import it back into the registry.
Use the Reg tool to backup the registry key from the command line:
reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares shareperms.reg
If you need to restore it at some point, just run:
reg import shareperms.reg
Backup and Restore of NTFS Permissions
Use this command to backup NTFS permissions:
icacls d:\data /save ntfsperms.txt /t /c
The /T switch allows it to get subfolder permissions too. The /C switch allows it to continue even if errors are encountered (although errors will still be displayed).
Use this command to restore them:
icacls d:\ /restore ntfsperms.txt
Note that in the command to save the permissions, I specified the target folder D:\Data, but when I restored them, I specified just D:\ as the target. Icacls is a little funky like that, and here’s why.
If you open the text file with the exported permissions (ntfsperms.txt in the above example), you’ll see that Icacls uses relative paths (in bold below). Underneath the relative paths are the permissions for the folders in Security Descriptor Definition Language (SDDL) format.
data D:AI(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;FA;;;SY)(A;OICIIOID;GA;;;SY)(A;OICIID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)(A;OICIIOID;SDGXGWGR;;;AU) data\folder1 D:AI(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;FA;;;SY)(A;OICIIOID;GA;;;SY)(A;OICIID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)(A;OICIIOID;SDGXGWGR;;;AU) data\folder2 D:AI(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;FA;;;SY)(A;OICIIOID;GA;;;SY)(A;OICIID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)(A;OICIIOID;SDGXGWGR;;;AU)
Had I specified D:\Data in the command to restore the permissions, it would have failed looking for a D:\Data\Data folder:
D:\>icacls d:\data /restore perms.txt d:\data\data: The system cannot find the file specified. Successfully processed 0 files; Failed processing 1 files
You might think specifying D:\ as the target in the restore command may somehow mess up the permissions on other folders at that level, but as you can see from the ntfsperms.txt output file, it only has information about the Data folder and subfolders, so that is all it will change.
- Craig Landis
New KB articles related to Directory Services for the week of 11/16-11/23.
957556
Repair options that you can use to recover if you accidentally make an incorrect Distributed File System Replication (DFSR) member authoritative in a Windows Server 2003 R2 environment
957441
Client connections return a "STATUS_INVALID_PARAM" error code when you use a "Send NTLMv2 response only" authentication level in Windows Server 2008 or in Windows Vista
955625
Mandatory user profiles do not work as expected on Windows Vista-based and Windows Server 2008-based client computers when the %LogonServer% environment variable is set in the profile path
958808
User data from the USMT may be deleted unexpectedly by the task sequence engine during the operating system deployment process in System Center Configuration Manager 2007 SP1
955989
The SPN registration of a cluster fails, and Error event IDs 1119 and 1034 are logged in an Exchange Server 2007 Service Pack 1 environment
960246
Hang When Reading StdErr/StdOut Properties of WshScriptExec Object
957930
A name resolution query fails when Windows Server 2003-based DNS servers set the AA bit for the DNS query and forward the query to conditional forwarders
960271
Windows SteadyState may not automatically restart a Windows XP-based computer in certain circumstances
Hi all. This is Sean again and it’s ADFS blog time! Today I’m going to touch on Security Assertion Markup Language (SAML) tokens, and an issue we’ve run into when federating with Tivoli Federated Identity Manager (TFIM). I’ll discuss what a SAML token is, why it’s important, and what happens when TFIM tries to validate one from ADFS.
As you may know, the Active Directory Federation Service (ADFS) uses SAML tokens to represent claims. These claims about a user are made by the Federation Service Account (FS-A) server. The claims located in the SAML token are what allow the Federation Service Resource (FS-R) server to determine what claims to grant the user in the resource’s domain. Generally, the transaction goes something like this:
After this happens, the SAML token is verified, the claims are extracted, and the rest of the ADFS process continues, right?
Well, almost. In addition to validating the SAML token using the public key of the certificate that the FS-A used to sign it, the FS-R also looks at time conditions specified in the token. To view the SAML token, you will need to enable the verbose debug level on the Federation Service Properties page. This can be done on either the FS-A or the FS-R. The log file will be located in the log files directory that you specify.
In the SAML token you will see a condition block close to the top that looks like this:
<saml:Conditions NotBefore="2008-09-11T19:47:41Z" NotOnOrAfter="2008-09-11T20:47:41Z"> <saml:AudienceRestrictionCondition> <saml:Audience>urn:federation:treyresearch</saml:Audience> </saml:AudienceRestrictionCondition> </saml:Conditions>
Note the “NotBefore” and “NotOnOrAfter” conditions that are in bold. These mean exactly that. If the SAML token is presented to the FS-R BEFORE the NotBefore time, or ON or AFTER the NotOnOrAfter time, then the SAML token will fail validation. Generally you’ll get an error message on the FS-R to the effect of “Unable to Validate Signature on SAML Token.”
It’s important to note that the time used to check against these values is the local time on the FS-R (whether it’s an ADFS FS-R or another solution like TFIM). The issue comes when the FS-A and the FS-R clocks are not in sync. Let’s explore this with an example.
Let’s say we have a client from Adatum.com trying to access a resource in Treyresearch.net. The client will hit the website, get redirected to the Treyresearch.net federation server, perform the client realm discover, and get redirected to the Adatum.com federation server. At this point we’ll go through the process outlined above for obtaining a SAML token. Now, the Adatum resource server is going to set the NotBefore time to the time the SAML token was issued based on its local time. So, if it has a time of 11:31AM when the SAML token is issued, that’s what the NotBefore time will be set to. When the client gets redirected back to the Treyresearch federation server, the NotBefore time will be compared to its local time. If the time on the Treyresearch federation server is set to something earlier than 11:31AM then the token validation will fail.
Apparently someone in the ADFS development group understood that this could be a common issue. To help mitigate the issue, in a federated environment with ADFS running on the resource side the FS-R will allow for a token that is sent five minutes “in the future.” This eliminates the need for absolutely strict time consistency between two completely separate organizations.
On the other hand, TFIM strictly enforces the NotBefore setting in the token. If the local time is before the NotBefore setting then the SAML token will fail validation. So, if ADFS is setup as the account partner, and TFIM is setup as the resource partner, the ADFS federation server’s time cannot be ahead of the TFIM federation server’s time. Let’s consider this with another example.
Suppose an ADFS FS-A issued a SAML token with a NotBefore time of 11:31. The client then gets redirected to a TFIM FS-R whose local time is 11:29. When the TFIM server goes to validate the SAML token, it will fail because the NotBefore time hasn’t been reached.
To help alleviate this issue Microsoft released hotfix 956279 that makes the allowed time difference between the ADFS server and the TFIM server configurable. Once the hotfix is installed on the FS-A, the web.config file on the FS-A can include the <TokenIssuanceNotBeforeSkewInMinutes> tag inside of the <FederationServerConfiguration> tag. If you wanted to set a 5 minute skew, the web.config file would contain this:
<TokenIssuanceNotBeforeSkewInMinutes>5</TokenIssuanceNotBeforeSkewInMinutes>
Right after this:
<FederationServerConfiguration>
So, what’s the moral of this story? If you’re running ADFS on the account side of a federation and TFIM is hosting the resource side, make sure you’ve got time synced on both servers or download the hotfix to configure a little wiggle room. Otherwise you will be “Unable to Validate Signature on SAML Token” as well.
For more information about setting up ADFS and TFIM check out the ADFS Step-by-step Guide: Federation with IBM Tivoli Federated Identity Manager.
- Sean “Lurch” Ivey
We’ve been at this for over a year (since August 2007), with more than 100 posts (127 to be exact), so maybe we can indulge in a little metablogging to look back on what we’ve done.
First let’s look at the posts that sparked the most conversation – because that is what blogging is all about right? If we wanted to simply publish information, we could just as easily create KB or Technet articles. Well, ok, there are decidedly fewer hoops to jump through to post a blog, but by blogging we also get to hear from you. Being in tech support, we hear from you quite a bit already. But I’m guessing many of you take pride in how infrequently you call us, so the blog opens up conversations with people we may never hear from otherwise.
The big winner here was Ned’s Top 10 Common Causes of Slow Replication with DFSR. It has five times the number of comments as the next highest post. It basically became a support forum for DFSR issues, and Ned was nice enough to oblige. To a lesser degree that is what happened with the other most-commented posts.
Top 10 AskDS Posts by Comments (Aug. 07 – Nov. 08)
Not surprisingly, the same post topped the list for page views. But there are several that show up here with high page views that didn’t generate much conversation at all.
Top 10 AskDS Posts by Page Views (Aug. 07 – Nov. 08)
Our goal with this blog is to get information in the hands of customers so they can more effectively use our products, and hopefully save some of you from having to call us for support. If you have any thoughts about topics you would like to see more (or less) about, please leave us a comment.
Ned here again. I recently spent a week with Microsoft Support Engineers from all over the world, and bumped into a colleague that works in MS Spain, out of Madrid. She mentioned that they had a Spanish-language blog focused on Directory Services, networking, and other Windows Platform topics. For all of our Spanish-speaking readers, I highly recommend you visit them; they have some very interesting articles and techniques they offer.
Platformas (Consulta con el equipo de Windows)
¡Hola Paula! :-)
- Ned Pyle
New KB articles related to Directory Services for the week of 11/9-11/16.
958802
List of currently available hotfixes for Distributed File System (DFS) technologies in Windows Server 2003 R2
960050
EFS may not be enabled expectedly after you disable a policy and this policy turn off the EFS feature
911832
A Windows Server 2003-based terminal server that is added to the Terminal Services Computers group cannot obtain a license from a terminal licensing server that has the "License server security group" setting enabled
958839
Error message when you try to perform a metadata cleanup of an ADAM instance on a Windows Server 2003 R2-based computer: “DsRemoveDsServerW error 0x57(The parameter is incorrect.)”
958804
You cannot log on to the domain, join a computer to the domain, or run the Active Directory Installation Wizard (Dcpromo.exe) in Windows Server 2003
959064
Microsoft Windows Vista Service Pack 1 (SP1) Frequently Asked Questions
955425
Event 4106 generated by a Windows Server 2008-based Terminal licensing server may report incorrect number of issued "Per User" licenses
958901
The text filter function may not return any results in the Group Policy Management Editor window on a computer that is running Windows Server 2008 or Windows Vista SP1
955555
The LocalLow folder may not be created on a Windows Vista SP1-based computer or on a Windows Server 2008-based computer when roaming profiles are used in a domain environment
Ned here again. We recently had a very lively discussion about 'Lag Sites' as a disaster recovery option. If you've been digging around the MS Download Center, you may have already come across Introduction to Windows Server 2008 R2. After some digging, you'll come across:
Improvements in Active Directory Domain ServicesThe Active Directory Domain Service server role in Windows Server 2008 R2 includes the following improvements:• Recovery of deleted objects. Domains in Active Directory now have a Recycle Bin feature that allows you to recover deleted objects. If an Active Directory object is inadvertently deleted, you can restore the object from the Recycle Bin. This feature requires the updated R2 forest functional level.
So while this won't be a replacement for solid backups, it certainly should augment them well and allow admins to get data back quickly without the need for complex lag site arrangements, or worries that the deletion has occured before the backups have had a chance to capture it. As always, this is pre-release documentation and there are no guarantees made about the component availablity or even if it will be included yet. Definitely keep your eyes open for it though. :-)
Definitely skim that document, there are all sorts of interesting tid-bits in there for the sharp-eyed. More news to come...