[Disclaimer(): base() { this blog is NOT the source of the official guidance on the Geneva products. Please always check out the Geneva team blog for hearing directly from the product group} ]
Few weeks ago I had the pleasure of presenting, together with Planky, a TechEd EMEA interactive session on the subject of equipping your Identity Provider with an STS. The session was pretty popular, I got a lot of people telling me that they searched for that exact content without finding it anywhere else, and the topic of custom STSes keeps coming out: hence I decided to capture some of the key points in a couple of posts before the Thanksgiving laziness takes over. The first one, that you are reading right now, will be about demystifying the topic a bit; the second installment will be about a simple example of custom STS written with the Geneva Framework.
Many businesses are natural identity providers. Countries, banks, airlines, clubs, credit reporting agencies, social networks... those are all examples of entities involved in a 1:many relationship with subjects & knowing a great deal of interesting facts about them. Those would probably be the IPs you'd think of if you'd come from the information card camp. However, as anybody from the "traditional" federation camp would tell you, there are many more candidates to the IP role: any business entity wishing to federate with another may, depending on which side of the relationship it sits, be an identity provider. We can get even more granular: if inside your enterprise you have a product or an island of some sort which maintains a users/attributes store and does not integrate with your directory, here there's another construct that may benefit from being modeled as an IP. I could go on, but I guess you get the point by now: the IP role is ubiquitous and can be successfully applied in a wide range of scenarios.
Once you realize that yes, you want to be an IP, you've got to make that happen. That basically means that you need the capability of minting portable identities for your users whenever you are asked to and you deem appropriate: and yes, in the current backbone architecture of the metasystem that means that you need an STS.
A security token service, or STS if you are in a hurry, is the tool that the IP uses for fulfilling its role: the security tokens are in a sense the reification (sort of) of identities, hence being able of processing requests for issuing tokens does the trick (at least formally: for being an effective IP you need to worry about many other things).
For its very nature, the STS plays an absolutely pivotal role for the IP: no STS, no party. A couple of examples:
Let's say that you are now aware of the importance of getting the STS right: from where you should start? The problem can be very complicated, however I suggest that the rough steps you may follow are:
Too generic? Well, let's dig in some more details.
At the end of the day, an STS can be just a web service that is able to issue security tokens. Or is it? Perhaps your scenario is a federation in which only passive clients are allowed: in that case, the STS is actually a web page rather than a WS-* service. And what "able to issue security tokens" means? Using which protocols? Authenticating against which kind of credentials? And which token format should be produced, by the way?
All those decisions can shape up the STS that you need to deploy in order to meet your needs: ignoring security/availability/manageability, which are orthogonal to everything else, let's take a brief look to some of the most important influencing factors.
This is just a short list, definitely incomplete. Furthermore, it lists just the external elements that may already be part of your scenario even before making the move toward being an IP: there is a much longer list of things you should think about once you get the ball rolling. Card issuance policies & stores, revocation handling, claim filtering criteria, factors influencing issuance rules... let's keep those out for simplicity.
In my little recipe above the step 2 says "Pick an off-the-shelf product that satisfies your requirements" (yes I know, step 3 should be "Profit!"). Now, that's a pretty young market and there's not a lot out there: but there is a product I feel I can suggest to you, and that's Geneva Server. Geneva Server
If you compare this description with the list of relevant factors I gave earlier, you'll see how Geneva Server as is can address a wiiide range of cases. If you want to set up an STS for your IP and you are working on Windows, you should really think long & hard before deciding NOT to use it. The Not Invented Here syndrome has a strong allure to every developer and architect, we all like to fiddle with things and leave our fingerprints everywhere: but remember, the day in which your baby goes in production it ceases to be your play buddy and can become an endless nuisance. Given the fact that the merry time spent designing and developing the system is usually a fraction of the time it is expected to function, make sure you take the right decision there :-)
There will always be situations that the product won't be able to address. Maybe you want to use an exotic token format, corresponding to an exotic authentication factor; or more simply, you don't have AD and this beta requires it as the authentication store. Besides the fact that this is the first beta of the product, hence I expect that your feedback can still go a long way for influencing the feature set at release time: if everything else fails, you still have the chance of writing your own custom STS. You have to be prepared to give up a number of the good properties that a shrink wrap product such as geneva server gives you, or be prepared to work hard to reproduce those in your custom code, but writing your custom STS is definitely a possibility. In fact, it has never been easier: the geneva framework, which BTW has been used for writing the geneva server, offers suitable classes and a programming model that helps you as much as humanly possible to streamline the development of an STS. The fact is that while there are things that we can manage for you, such as sheer handling of the protocol and crypto management, there are others that are intrinsically up to you: how you want to retrieve claim values from custom stores, for example, or how you want to perform user credential/RP/claim types validation. We can give you good hooks in the programming model for injecting your login in the right place, but we can't help you to make that logic secure or performing. And of course you are in control of all other vertical aspects, such as hosting/availability/manageability/health monitoring/auditing and everything else. You may simply not care about many of those factors, like in the previous example in which your real product is an RP and the STS is just an artifact used for testing; or perhaps the intended use of your STS is for some reason not as demanding as I am implying above; or again, perhaps you are a pro ISV with the necessary know-how and you do intend to have fine control on everything hence you are willing to invest what it takes for getting all those aspects right. You may have your own reason, and I don't want to discourage you from writing your own STS: I just want to make sure that you are aware of the implications of doing so and that you are OK with it. In fact, in the next post I will show you how you can structure a simple custom STS with the October beta of the Geneva Framework
[Disclaimer(): base() { this blog is NOT the source of the official guidance on the Geneva products.
Thanks for this post. It is very relevant for me right now. I am currently architecting a solution for single sign on between our products and am trying to decide whether or not to build our own STS, and if so what are the implications and considerations.
Unfortunately, we can't afford to wait for Geneva because we are scheduled to deliver in February/March next year. So instead we are looking at building an STS in WCF and using ws2007FederationHttpBinding. We can't rely on AD as a dependency for all of our customer sites, that's why we're leaning towards our own STS.