Skip to main content

What are the steps done to authentication Windows Azure using federation mechanism and company Active Directory?

Windows Azure supports federation and integration with Windows Server Active Directory. This information is not new. I observe that people tend to use services that don’t understand. The scope of this blog post is to explain how an end user login into Windows Azure Portal using federation mechanism.
Let’s assume that our company has already configured the integration of the private Active Directory with the federation mechanism. From our internal network a user wants to access the Windows Azure company portal (each company can define their own portal where users and subscriptions can be managed).
First thing that is done is made automatically when the user login into the computer and network with the credentials. In this moment the Active Directory server from our network is used to check the user credentials. There can be different ways of authentication from user/password to RSA SecureID, smartcard and so on. The company IT can configure different ways of authentication that will be recorded on the token (ticket) that is generated at this step.
When the user authenticate with success, the AD server will generate a token called Kerberos Ticket Granting Ticket (KTGT) that is valid for a specific time interval. The validation period is configurable by the company IT.
In the moment when a user wants to access the Windows Azure Portal of the company, the user will be redirected to the Windows Azure Active Directory where the company domain name will be added to the request. Based on the domain name, Windows Azure Active Directory will know what is the address of Active Directory Federation Service (ADFS) – from our on-premise network. This service needs to be exposed over internet through a public endpoint.
After this step, all the verification process will be on the client private network. The ADFS server will contact the client PC. In this step the KTGT ticket that was generated in the moment when user authenticates in the network is used to check the user. Based on this ticket the Ticket Granting Server (KDS) is contact to generate a Service Ticket (KST). The generated KST ticket is used by the client computer to authenticate to ADFS. During this last step the token is generated. This token is sight using Security Assertion Markup Language (SAML).
This is the last token that is generated and used. The user is redirected automatically to the Windows Azure Active Directory where the SAML token is attached. This is a POST request that contains all the information needed for the final steps (no credentials will be send from the client private network) to Windows Azure Active Directory. From this moment Windows Azure Active Directory will trust the user and will give access to the Windows Azure company portal.
Based on this token the Windows Azure Active Directory will be able to generate an identity token that is signed by Windows Azure Active Directory. This encrypted token contains the identity claims of the user. As in the previous step, this token is send through a POST to Windows Azure Portal.
With this encrypted token, Windows Azure Portal can extract the user identity and use to display all the related information and of course trust the user.
It is important to know, that IT team of the company can configure further authentications steps in the moment when KDS is generated. For example an authentication step that includes a RSA Security ID or a smart card can be requested.

And we are done. This is the authentication mechanism on Windows Azure Portal of a company that used the Federation. Implementing this mechanism is pretty simple and Windows Azure Portal can automatic generate the scripts required by IT to configure the system.


Popular posts from this blog

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine:
threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration:

TeamCity.NET 4.51EF 6.0.2VS2013
It seems that there …

How to check in AngularJS if a service was register or not

There are cases when you need to check in a service or a controller was register in AngularJS.
For example a valid use case is when you have the same implementation running on multiple application. In this case, you may want to intercept the HTTP provider and add a custom step there. This step don’t needs to run on all the application, only in the one where the service exist and register.
A solution for this case would be to have a flag in the configuration that specify this. In the core you would have an IF that would check the value of this flag.
Another solution is to check if a specific service was register in AngularJS or not. If the service was register that you would execute your own logic.
To check if a service was register or not in AngularJS container you need to call the ‘has’ method of ‘inhector’. It will return TRUE if the service was register.
if ($injector.has('httpInterceptorService')) { $httpProvider.interceptors.push('httpInterceptorService&#…

Fundamental Books of a Software Engineer (version 2018)

More then six years ago I wrote a blog post about fundamental books that any software engineer (developer) should read. Now it is an excellent time to update this list with new entries.

There are 5 different categories of books, that represent the recommended path. For example, you start with Coding books, after that, you read books about Programming, Design and so on.
There are some books about C++ that I recommend not because you shall know C++, only because the concepts that you can learn from it.


Writing solid codeCode completeProgramming Pearls, more programming pearls(recommended)[NEW] Introduction to Algorithms


Refactoring (M. Fowler)Pragmatic ProgrammerClean code[NEW] Software Engineering: A Practitioner's Approach[NEW] The Mythical Man-Month[NEW] The Art of Computer Programming


Applying UML and Patterns (GRASP patterns)C++ coding standards (Sutter, Alexandrescu)The C++ programming language (Stroustrup, Part IV)Object-oriented programming (Peter Coad)P…