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.

Comments

Popular posts from this blog

Windows Docker Containers can make WIN32 API calls, use COM and ASP.NET WebForms

After the last post , I received two interesting questions related to Docker and Windows. People were interested if we do Win32 API calls from a Docker container and if there is support for COM. WIN32 Support To test calls to WIN32 API, let’s try to populate SYSTEM_INFO class. [StructLayout(LayoutKind.Sequential)] public struct SYSTEM_INFO { public uint dwOemId; public uint dwPageSize; public uint lpMinimumApplicationAddress; public uint lpMaximumApplicationAddress; public uint dwActiveProcessorMask; public uint dwNumberOfProcessors; public uint dwProcessorType; public uint dwAllocationGranularity; public uint dwProcessorLevel; public uint dwProcessorRevision; } ... [DllImport("kernel32")] static extern void GetSystemInfo(ref SYSTEM_INFO pSI); ... SYSTEM_INFO pSI = new SYSTEM_INFO(

Azure AD and AWS Cognito side-by-side

In the last few weeks, I was involved in multiple opportunities on Microsoft Azure and Amazon, where we had to analyse AWS Cognito, Azure AD and other solutions that are available on the market. I decided to consolidate in one post all features and differences that I identified for both of them that we should need to take into account. Take into account that Azure AD is an identity and access management services well integrated with Microsoft stack. In comparison, AWS Cognito is just a user sign-up, sign-in and access control and nothing more. The focus is not on the main features, is more on small things that can make a difference when you want to decide where we want to store and manage our users.  This information might be useful in the future when we need to decide where we want to keep and manage our users.  Feature Azure AD (B2C, B2C) AWS Cognito Access token lifetime Default 1h – the value is configurable 1h – cannot be modified

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 http://go.microsoft.com/fwlink/?LinkId=260882 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.51 EF 6.0.2 VS2013 It see