What is Claims-Based Authentication?
Join the DZone community and get the full member experience.
Join For Freebefore going on with my other posts i want to introduce you claims-based authentication that makes is way to almost all microsoft web-based platforms around. it is more complex than old username-password method but also more secure and general. in this posting i will give you short and not very technical overview about claims-based authentication.
what are claims?
claim is piece of information that describes given identity on some aspect. take claim as name-value pair. claims are held in authentication token that may have also signature so you can be sure that token is not tampered on its way from remote machine to your system. you can think of token as envelop that contains claims about user.
token may contain different claims:
- username or user id in remote system,
- full name of user,
- e-mail address,
- membership in security groups,
- phone number,
- color of eyes.
system can use claims to identify and describe given user from more than one aspect. this is something you don’t achieve easily with regular username-password based authentication mechanisms.
claims-based authentication
claims-based authentication is more general authentication mechanism that allows users to authenticate on external systems that provide asking system with claims about user. the next image from technet library page authentication patterns illustrates authentication flow simply and effectively.
here is authentication flow:
- user makes request to some application.
- system redirects user to authentication page of external system (it may also happen after system lets user to select external system where he or she wants to log in).
- after successful authentication external system redirects user back with some information.
- application makes request to external system to validate user.
- if user is valid then user gets access to application.
claims-based authentication in practice
claims-based authentication can be found from many applications:
- microsoft sharepoint 2010 and 2013,
- windows azure access control services (acs),
- active directory federation services (adfs),
- applications using windows identity foundation (wif).
this list is not complete, of course, and i am sure you can find more examples from web. about windows azure acs you can read my posting asp.net mvc 3: using appfabric access control service to authenticate users .
from user information to claims
not all authentication mechanisms support claims. take oauth and windows authentication as examples. so, how can claims-aware systems use these authentication methods and still provide claims? the answer is simple – we need adapters or proxies that can wrap user information to claims.
this is simplified picture that is here to give you some idea about how user information from other systems is turned to claims. in the case of using adapter directly web application or some component is able to understand one or more authentication mechanisms and wrapping information to claims happens in web application. if you want to be close-to-metal-guy then i can scare you with one of my older blog posts adding twitter authentication support to asp.net application .
it is also possible to use identity “proxy”. in this case we have token service between our application and external system where user authenticates. this kind of token service is used by windows azure acs. token service of acs knows details about different authentication mechanisms and provides your application with token service so your application receives always tokens with claims.
wrapping up
claims-based authentication is more general authentication system than old and unsecure username-password thing. instead of saying yes or no about authentication attempt claims-based authentication is wider – external system can give out more information about user by creating claims and putting these into signed token. although claims-based authentication is new thing it has been around for awhile and in microsoft world it is trending up. claims-based authentication is more complex by implementation but it also more secure than yesterday’s authentication mechanisms. besides sharepoint it lately made its way also to asp.net web applications.
related posts
the post what is claims-based authentication? appeared first on gunnar peipman - programming blog .
Published at DZone with permission of Gunnar Peipman, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments