The Basics of Claims – Part 4 – SharePoint Authentication Logic is Simplified with Claims

There is logic found inside of any application out there which supports the various features that it offers. However, applications aren’t always able to successfully rely upon the Windows authentication to help it with the process. You may have web based application that store the names and passwords of users. They may need to be reset when lockouts occur or there is a breach in the system. With enterprise facing applications, there is a domain controller in place that Windows will use to authenticate.

There are plenty of challenges that can occur though in spite of the presence of integrated authentication though. Kerberos tickets are able to give you a list of groups and user accounts. What are you going to do though if you have a need to send an email to them through your application? As you can see, that would become complex in nature to achieve even when you are only working within the framework of a single domain.

While Kerberos does have limitations, you can get around them when you program the Active Directory. This is a complex process though so be ready. Your goal should be to have a very efficient LDAP (Lightweight Directory Access Protocol). This way the queries made aren’t going to slow down your directory server.

You will find that with claims based identity you are able eliminate the authentication logic when you are talking about individual applications. What will happen is that there is an application that verifies the user through the claims process. Therefore, claims is a way for your to get rid of authentication logic in terms of your application.

Don’t let the concept of claims based identity intimidate you because it is used all the time and it is everywhere in society. Let’s take the authentication protocol that is in place at the airport as an example. You aren’t able to just go to a gate to board a plane with your photo ID in hand. You have to go through a process that requires you to check in at the right ticket counter location prior to proceeding to the boarding gate. You will be asked for various information at that time including your name and photo ID.

For those passengers with a flight that takes them out of the country, a passport will be required. All of this pertains to adults traveling but not to minors with them. The only thing you will need to provide for children is their names and so that becomes their authentication. The person behind the ticket counter will also make sure there isn’t any problems with the payment that was processed to pay for the flights. Once all that is done boarding passes are issued and then you can head to the gate for your plane.

All of the information you need to get onto the plane is offered on that boarding pass. The agent at the gate will look at your name and they can even see if you are a frequent flyer member. They will also see your flight number and your seating location. There can be additional information too depending on the specific airline you happen to be flying with. Everything on a given boarding pass allows the process to be a smooth one for customers as well as staff.

If you take a closer look at any airport boarding pass, you will also notice that there is a bar code on it. Some of them have a magnetic strip in lieu of it. There is plenty of information encrypted into those areas too. For example the boarding serial number that shows it to be legitimate as there are ways to make fake boarding passes out there.

All of the information on a given boarding pass is a set of claims that the airline has for identifying you. It verifies that you are authorized to be getting onto a given airplane and assigned a particular seat on it. The agents that are at the gate are going to view your boarding pass, they don’t have to ask you for all the same information that you already gave when you first checked in.

Another scenario though is that you may be able to get the validation you need from another source. For example many airlines now make it convenient to get your boarding pass online and then you can bypass the ticket counter when you arrive at the airport. Which method you used to create your boarding pass won’t alter the end result that it allows you to get on your flight as specified. This is because the claims linked to it have been authenticated.

When it comes to software, the claims involved are referred to as the security tokens. Each one is to be signed by a particular issuer that has created it. In a claims based application, the users are authenticated when they are able to present a signed security token that has been validated by a trusted issuer.

When you are talking about an application developer, they have an advantage with this type of system. You see the application won’t need to have a specific type of credential involved from the user. Of course the person in charge of security for your company is going to create policies and rules that will be evaluated by the user. What your application receives is very similar to the boarding pass information I just shared with you.

What all this means is that regardless of the authentication protocol that is used the application is going to get a set of signed claims. These claims will have the pertinent information on them about the user. This information is in a format that is simplistic in nature and the application will be able to use it immediately.

Share

SharePoint Claims Based Authentication Architectures Explained Part 4 Claims Authentication Important Steps

Should a user not be authenticated, the browser is going to request a token from the issuer known as the ADFS where the query is taken to get the right information and a signed token for the browser. Once the POST has been given for the application the WIF takes control. The application has already been configured for this. The FAM will take the authenticate request and validate it at several points. This includes checking to see if there are any restrictions for a given audience that is requesting the token. The expiration date will also be validated.

When there is audience restriction in place, the Audience URI will be in place. This is what determines if the tokens have a claim that will be sent. The FAM uses the public key to make sure the token was signed by the trusted issuer. If it feels anything was modified in transit then access won’t be allowed. The claims in the token will issue a cookie at the start of the logon session. This is the same thing that would happen if you were to used forms authentication.

The process isn’t repeated again until the user is ready to sign off. When they do so, that cookie will be destroyed. This can also happen if there is a time limit on a session and that time has been reached. After the FAM creates the session token, the cookies are then compressed and encrypted for the coding. The cookies are offered in chunks so that there isn’t any problem encountered with size.

There are some other steps too but they will run with the SSL (Secure Sockets Layer). This ensures that someone can’t be looking at what is taking place and then steal the token and use that information to gain access to what only a legitimate user would be able to. The key is to get the best optimized performance possible through the process.

The logon session cookie can be used to cache for the client so that reduces the number of times a round trip is required by the issuer. The issuer also has its own cookie so that they can be logged in while the issuer has to go back and access other applications. This means when someone visits a second application they will be taken right back to that same issuer. When the issuer sees this they will know that it has all been authenticated. This is how it is user friendly with one single sign on for the browser based application.

You won’t even need a browser though when you use a web service. You will use a client application that has logic for handling the claims based identity process. There are two different protocols that are used for this. The WS-Trust helps to get a security token from an issuer. The WS-Security allows for the token to pass to the claims based web service.

The same procedure for the SOAP based web service applies here. Using the Microsoft Visual Studio development system or a command line tool, you can download the WSDL (Web Service Definition Language). This document supplies the various details for the binding, the contract, and the service address. This tool also creates a proxy for updating your application configuration file using the information that is in the WSDL document.

This can be done with a claims based service and the WSDL document as long as the WS-Policy has the details it needs about an issuer so that the service trusts can be verified. The proxy will know it needs to get a security token from the issuer before it is able to request anything from the service. Since the information is stored in the configuration file on the client application, the proxy is able to get the token before it talks to the service. This is firmer than with the browser process because the browser first has to be redirected by the issuer.

The steps involved for a smart client are very similar to those that are used for a browser based application. The smart client is able to make a round trip to the issuer with the WS-Trust to get a security token. The orders web service is configure with the WS Federation Http Binding. This binding offers a web service policy that allows the client to attach a SAML token to the security header. This will successfully create the web service processing.

For this to work, the client will need to call the issuer with credentials including a username and password. This is required to get a SAML token then the client can call the web service with the token attached to the security header. The WS-Trust request includes a field called Applies To so the smart client can attach. This is very similar to the wtrealm query used for the web browser.

Once the issuer has verified the user the application can be accessed. The issuer will send back the response including a security token that is signed. It will be encrypted with the public key for the web service. The token includes a proof key. This is a key that is randomly generated by the issuer. It is included as part of the RSTR and the client will also have a copy of it.

It is the clients responsibility to send the token to the web service that is in the security header of the SOAP envelope. The client has to sign the SOAP headers with the proof key. The additional level of encryption helps to ensure that the web service was definitely the one who was issued the token. It is common for a start up session using the WS-Secure Conversation to be used. The client will cache the RSTR for a day and then they need to connect to it again.

Share