A .NET Developer's Guide to Windows Security: Understanding Protocol Transition
There are a couple of scenarios where this can be helpful. The first (and the reason for the name "protocol transition") is when you simply can't use Kerberos to authenticate users on the front end of a distributed application. For example, if users are contacting your server over the Internet (without a VPN connection), they likely won't be able to talk to your domain controller to get the tickets necessary to talk to the server because firewalls prevent them from contacting your domain controller (Item 59). This means you'll need to use some other form of authentication, perhaps a client-side certificate in conjunction with SSL, to authenticate your client. In Windows 2000, whatever authentication protocol you chose, once your middle tier authenticated the client, in order to map the user onto a legitimate Windows user account, the middle tier had to know the password for that account in order to establish a logon session and get a token (typically via the Win32 API LogonUser that I discussed in Item 26).
In a perfect world, a user's master key should be known only by that user and her domain authority. But when you need to transition from one authentication protocol (such as SSL) to Kerberos on the back end, the server performing this transition (authenticating the client using SSL in this case and mapping that client onto a Windows account with Kerberos credentials) ends up with a big juicy password database that just screams, "Attack me!" The point of protocol transition is to make it possible for designated servers (think of them as gateways) to be able to perform this service without having to store passwords.
At this point you might be wondering how protocol transition helps. Just because the gateway no longer stores passwords, it can still get a logon for any user it wants (including highly privileged users in the domain). This means an attacker who has compromised the gateway can do the same thing, right? Yes, but protocol transition works hand in hand with the constrained delegation feature in Windows Server 2003 that I discussed in Item 62. In other words, the gateway can't use this feature to obtain tickets for just any servers on the network. Once it logs in the user via protocol transition (without knowing her password, in other words) and impersonates her, when it attempts to use her credentials to talk to other servers on the network, the domain authority only issues tickets for the servers on the gateway's "allow-to-delegate-to" list.
For example, in Figure 63.1, the WEBSERVER gateway will be allowed to log in users without knowing their passwords, but will only be able to use those credentials to talk to SQL Server on a machine called DATASERVER. This sort of constraint wouldn't be possible if WEBSERVER were storing passwords for user accounts. Because we're using protocol transition on WEBSERVER, if that machine is compromised by an attacker, the attacker will find, much to her dismay, that the domain authority simply won't issue tickets for other servers on the network. She won't be able to authenticate with those servers and will be denied access, assuming you've configured your servers to disallow anonymous requests (Item 35)! Sure, the attacker will be able to use a variety of user credentials to get to DATASERVER, but he would have been able to do that (and more) had you stored passwords on WEBSERVER instead. And remember that you should mark highly privileged accounts "sensitive and cannot be delegated" (Item 62), which would restrict the attacker from using those accounts to talk to DATASERVER.
Figure 63.1 Configuring protocol transition for a gateway
Configuring protocol transition is exactly like configuring constrained delegation, which I cover in Item 64. The only difference is what I've highlighted in Figure 63.1: You must select the option that says "Use any authentication protocol."
Here's another interesting new feature: On any Windows Server 2003 machine that's running in a native Windows Server 2003 domain, you can obtain a token for a domain user without knowing her password. If your server account isn't marked as being trusted to delegate to other servers, you can only use this token to find out what groups the user is in. If your server process is running with the SeTcbPrivilege enabled (SYSTEM is the only security context with this privilege by default, as I discussed in Item 28), you get what's called an impersonation token and you can use it to impersonate and open up local secured objects such as files. Access checks to these resources are made based on the identity in the impersonation token. Without this privilege, you get what's called an identification token, designed only for doing access checks and group lookups. If you try to impersonate using this token, you'll be successful, but if you do anything interesting like try to open a local file, the request will fail.
But even if you get only an identification token, it's still useful because you can use it to see what groups the user is a member of. This has been a really hard problem on Windows 2000, if you can believe it. Recall from Item 20 that group membership lists are decentralized in Windows. Global group memberships are stored in the client's domain, domain local group memberships are stored in the server's domain, and universal group memberships are stored in the Global Catalog. Plus, these domain groups can be nested! Oh, and don't forget local groups, which are stored on individual machines. Trying to discover these group memberships manually is expensive and it's very difficult to get an authoritative answer. The best way to discover the groups for a user is to get a token for her. In the past, however, that required knowing the user's password. With this new feature, you can get a token for a user and get an authoritative list of groups without any hassle. Your server doesn't have to have any special trust to be able to do this (although there's an access check to make sure the server is allowed to read the group memberships for the user).