| Eron Wright's profileLive CoderBlogLists | Help |
|
May 30 Identity Federation with ADFS: Part 1I have identity federation fever. For a recent partner integration project, we decided to use WS-Federation to enable web single sign-on across two applications on separate domains. This has taken me on a whirl-wind tour of products and technologies, as well as some serious coding in the end.
Identity Federation is becoming a hot feature for web applications. Salesforce.com now supports federation, such that your corporate network credentials can be used to access the applications. Boeing, for another example, is federating its employee accounts to dozens of applications. I have personally yearned for Passport/Live ID integration for years, and this is an enabler for that too. Ws-Federation ProductsI identified numerous products that seem to support WS-Federation.
WS-Federation and Passport (aka Windows Live ID)It is public knowledge that Live ID will support WS-Federation. It will no doubt plug in seamlessly into ADFS (or other federation server) as an account partner, such that your claims-enabled application can use Live ID accounts with ease. This has long been envisioned by Microsoft; see this "Network of Trust" article. ADFS and Account Stores (Active Directory)ADFS, acting as a resource server, can be useful without the involvement of Active Directory. But let's face it, you are likely porting an application with legacy accounts, so you must also act as an account partner to your own application. How to best hook your assumedly database-backed accounts into ADFS? You have at least four options. One, migrate your accounts into AD or ADAM. Two, use a product such as Microsoft Identity Integration Server to synchronize the accounts with AD. Three, implement WS-Federation directly. Four, buy a federation product with good support for database-backed credentials. I chose the third option, which I will discuss below. ADFS DevelopmentTo implement WS-Federation to act as an account server, I located a great piece of sample code from the Microsoft Patterns & Practices group. The SAML STS for WSE 3.0 QuickStart sample provides much of the code needed to generate and sign a SAML 1.1 token, which is the most substantial aspect of implementing WS-Federation. The missing ingredient in the QuickStart is support for WS-Federation Passive Profile, which in essence consists of an HTTP handler, some user/roles lookup code, and some federation-specific claims code. This code was surprisingly easy to write. Achieving interop with ADFS was, on the other hand, a bit of a nightmare. ADFS simply rejected my SAML token with a vague validation error. By instrumenting and debugging the ADFS server library (using this great technique) I identified the four problems that were behind it:
Of course, whenever developing with ADFS be sure to enable the myriad of debug flags in the snap-in, in the server's web.config, and perhaps in the registry as documented in the troubleshooting guide. I whoteheartedly recommend experimenting using the ADFS Virtual Lab, then subsequently using Virtual Server on your workstation (complete with undo disks) to develop an ADFS solution. ADFS ProfileHere is some facts I know about ADFS, after long hours of debugging. More interop knowledge can be obtained by examining the Shibboleth source code and notes. With respect to SAML attribute statements, ADFS supports a single namespace to carry the group and custom claims:
The SAML authentication statement supports the following identifier formats:
Note that ADFS requires a suffix to be present on a given UPN (userid@adatum.com, for example). The suffix must be listed in the configuration for the given account partner.
ADFS does not support the SAML SubjectLocality clause, and will reject the token with a validation error.
With respect to XML signatures, ADFS supports two types of key identifiers:
Note that security token references are not supported.
ADFS in the FutureADFS is a maturing component of Windows Server. Today it supports only the WS-Federation Passive Requestor Profile, which allows browsers to support single sign-on. Future versions will support the Active Client Profile, which allows web services to support impersonation of federated identities. Longhorn appears to be taking it further yet (beyond Active Directory perhaps):
Hope this information helps! Comments (10)
Trackbacks (2)The trackback URL for this entry is: http://ewright.spaces.live.com/blog/cns!C0C3DF24CE16DC2F!165.trak Weblogs that reference this entry
|
|
|