Everything that has been described so far assumes that an application and all of its clients are inside the same identity scope—in other words, the same Windows forest. But what happens when a user wants to access an application in another forest or in an identity scope that was created with a technology other than AD Domain Services? How can an identity from one scope be used in another?
The answer is identity federation. Simply put, federation allows applications in one identity scope to use identities from an identity provider in another scope. Providing this cross-scope access is important whenever users from one organization need to access a resource, such as a Web application, that is provided by another organization.
Suppose, for example, that your company needs to give its employees access to a Windows SharePoint Services site at a partner company, or perhaps let them access a retirement savings application that is provided by a partner financial-services firm. One approach would be for the partner organization to create a local account for every user in your company. While this solution would work, it’s got plenty of drawbacks. One of the biggest is that users aren’t likely to be happy with it. Along with logging on to their own identity scope, they’ll also need to log on separately to applications in each partner—perhaps, using a different user name and password. Another problem is expense: Administrators in the partner organization are now required to maintain accounts for both their own users and those in your company. And keeping those accounts synchronized will be painful. How is the account of a fired employee in your firm removed from all of the connected partners?
Federation offers a simpler and cheaper approach. Instead of requiring the partner to create accounts for users in your identity scope, the partner agrees to accept identities that are issued by your scope’s identity provider. Doing this has a number of benefits, including the following:
-
Users get single sign-on to applications across all federated scopes. Users log on only once to their own scope, and then can access applications in this scope and in every federated scope without being prompted again for logon information. Users can even access an application running in a federated scope from someplace outside of their home scope, such as a hotel room.
-
Administrative expenses are reduced, because administrators must create and manage identities for only their own users. Because federation allows their scope to accept identities that are owned by other scopes, there’s no need to maintain local copies of that information.
-
No account synchronization is required. When a user leaves the company, for example, the user’s account is deleted in the user’s own scope. Because there are no duplicates of this account in any other scopes, nothing more is required.
The Microsoft technology for identity federation is ADFS. In fact, ADFS works in much the same way across identity scopes as it does within a single Windows forest. Because two distinct scopes are involved, however, a bit more work is required, as the following figure shows:
Figure 6
Although it wasn’t mentioned earlier, the exchanges between a Web browser and the various ADFS components are defined in a multivendor specification that is called WS-Federation. Originally created by Microsoft and IBM, WS-Federation is now implemented in products from Oracle, CA, BMC, and others. Because both the interactions and the token format that ADFS uses are spelled out in this standard, ADFS allows a Windows forest to federate with any identity scope, Windows or otherwise, that also supports WS-Federation.
In the preceding figure, for example, the application is in one identity scope—known as the resource domain—which is using Windows and ADFS. The Web browser is in another scope—known as the account domain—which might or might not be using Windows. Because all of the exchanges are defined by WS-Federation, any technology that implements this specification can be used on either side of the communication.
As before, the process begins when a user attempts to access an application from the user’s browser. The ADFS agent on this application’s machine once again notices that the request doesn’t contain the required SAML token, and so it redirects the browser (step 1). Unlike the single-scope case, however, the browser is now redirected to a resource server—here, implemented by using ADFS. The browser then issues a request to this resource server for a SAML token for the application (step 2). The resource server gives these tokens only to clients that present an appropriate SAML token of their own, however, and so it once again redirects the browser—this time, sending it to an account server in the account domain. The browser then requests this SAML token from the account server’s token source, authenticating itself with a Kerberos ticket (step 3) or perhaps in some other way. Assuming that the authentication succeeds, the account server creates, digitally signs, and returns a SAML token for the resource server (step 4). As before, this token contains claims that are specific to the application that the user is trying to access.
.gif)
Figure 7
Now that the browser has the SAML token that it needs to prove its identity to the resource server, it once again contacts that server. It presents this new token, and then requests another SAML token for the target application (step 5). The resource server verifies the digital signature on the token that it receives, and then creates and digitally signs a new SAML token for the application and returns it to the browser (step 6). The browser can now repeat its original attempt to access the application—this time, providing the required SAML token (step 7). The ADFS agent on the application’s system verifies the token’s signature; and, as in the earlier example, the application can now use the claims in the token (step 8).
But exactly what claims does the token contain? In the single-domain case that was shown earlier, the answer was simple: The token contained whatever claims the ADFS server inserted into it. With federation, however, there are more options. In this case, the person who installs the application tells the administrator of the resource server what claims this application expects to see in the token. This administrator then tells the administrator of the account server what claims that server should insert into tokens that are created for this application. (Doing this might be a bit challenging, because this administrator likely works for a different organization, but it’s the only way to ensure that the application will get the information that it needs to work correctly.) The account-server administrator causes those claims to be inserted into the SAML token that this server issues. When this token is received by the resource server, as shown in step 6, this server might just copy those claims unchanged into the SAML token that it creates for the application. Alternatively, the resource server can copy only some of the claims into the new token—perhaps, adding others that are available locally—depending on what the application needs. What the application finally receives in the token is the result of this entire process.
To the application, all of this looks just as it did in the single-scope case; it needn’t do anything differently to work with Web browser clients in its own or another scope. As before, an NT token application can behave as if ADFS weren’t present, while a claims-based application can use any extra information that is contained in the SAML token that it receives.
As is probably evident by now, administrators play a central role in making federation possible. For example, because the resource domain is trusting identities that belong to the account domain, it must have some way to verify the SAML tokens that it receives from this domain. Along with the tasks that were already described, administrators do the work that is necessary to establish the necessary trust between the account server and the resource server. To accomplish this, the account server provides its certificate to the resource server in the resource domain. The resource server can then use the public key in this certificate to check the digital signature on each SAML token that it receives, verifying that it really is from this account domain.
One more point worth making is that even with federation, the resource domain might need to create local copies of accounts from the account domain. Any NT token applications that use Windows ACLs must have shadow accounts and/or shadow groups created for them in the resource domain. Without this, there’s no way for the identity in the SAML token to be mapped to a legitimate Windows identity for that domain—a step that’s required to support NT token applications.
Federation provides one more example of the value of claims-based applications. Because there will never be a universal set of claims that all scopes accept, federation requires the ability to transmit and accept diverse claims. Instead of relying on a token that’s bound to a single identity scope, such as a Kerberos ticket, a claims-based application meets this need by using the more general SAML token. And letting this token carry application-specific information is especially useful when the store from which this information comes is in another scope. Directly accessing a store in another organization might be problematic, as organizations aren’t likely to allow this kind of access; thus, carrying the necessary information as claims can be the only pragmatic solution.
As different organizations continue to work more closely together, the need for identity federation grows. In the not-too-distant future, support for federation—and the claims-based approach that it implies—is likely to be required for new applications. In the Windows world, this means that more and more applications will rely on ADFS.