Skip to main content

Azure Active Directory (Day 12 of 31)

List of all posts from this series: http://vunvulearadu.blogspot.ro/2014/11/azure-blog-post-marathon-is-ready-to.html

Short Description 
Azure Active Directory (Azure AD) is an identify management service offered by Microsoft over Azure. Can be used with success to identify and authenticate users in applications (that can be hosted on-premises on cloud).
This is a service that can be used by any company, from small one to large ones. Using Azure AD we can add single sign on functionality very easily.


Main Features 
Sign-sign on
Using Azure AD we can add and manage only one mechanism of authentication cross all our applications.
Users and Group management
We have the possibility to manage not only users and their rights, but also groups like in an on-premises AD.
Integration with on-premises Active Directory
Azure AD can be integrated very easily with on-premises version of AD. In this way we can sync both systems and manage only in one place our list of users and groups. The same auth. mechanism can be used for on-premises applications and cloud.
Default tenant
By default there is a default tenant in all Azure AD called “Default Directory”. By default the administrator of subscription will be administrators on this tenant.
Supported Protocols
The current version of Azure AD supports:

  • WS-Federation
  • SAML 2.0

Single sign-on endpoints
There are only one endpoint for each protocol that is used by all tenants to sign-on using Azure AD.
REST API
All configuration and management of Azure AD can be made over a RESTfull API.
Microsoft services
By default, there is a list of Microsoft services that are using Azure AD. On top of this we can extend it and add other service. The list of services that are using Azure AD by default is:

  • Azure
  • Office 365
  • Windows Intune   
  • Dynamic CRM Online

Types of application that can used Azure AD
Any kind of application can use Azure AD for authentication from web application to mobile one or even Daemon and embedded.
Tenants’ types
There are two types of tenants that can be used:

  • Single tenant – is used for application that are used for your own organization
  • Multi tenant – is used for applications that are used by users that are not only from your organization

Session (token) management
We have full control of the session. For example we have the possibility to specify the token expiration time. When the token expire, the user will need to sign on again.
Multi-factor authentication
There is full support for multi-factor authentication. This features is out-of-the-box. You need only to activate it and it will work without any kind of problems.
Cross Platform
Azure AD works with any platform and device. We are not limited to use it only on some specific devices.
Self-service password reset 
Users had the ability to manage their password by themselves (and even reset the password).
Company branding 
The Azure AD auth. pages can be use customer logos and UI. In this way we can have custom UI.
Advanced Security Reports 
Azure AD is capable to generate complex security report that can be used by our IT and security team for audit.
Alerts Usage Reports Enterprise scale SLA 
We can define custom alerts based on our usage reports.

Limitations 
No multi-factor authentication for technologies that use Direct Access 
If you are using Direct Access, then you will not be able to use multi-factor authentication.
Office 365 and Live Accounts are not the same
If you migrate from live account to Office 365 you will end up with two different email address, one for Office 365 and another one for live. You don’t have the possibility to merge them (yet).

Applicable Use Cases 
Below you can find 4 use cases when I would use Azure AD.
Migrate from on-premises to Azure
When you start to migrate your applications from on-premises to Azure, you don’t need to recreate your AD structure into cloud. You can connect your on-premises AD to Azure AD and synchronize it. In this way you will do AD management in the same way you did before.
Single Sign-on
For new application I would try to use single sign-on functionality. Users can be managed more easily and when you extend your application you will be able to give access to the same users to new application also.
Secure application
For application where security is very important Azure AD and Multi-Factor authentication it is a have to. This two features combined allow us to create application that are very secure and reliable.
Self-Service
For large companies, Azure AD can help them to delegate different task to different groups of users. In this way we can create different groups of users that have different management rights. In this the management of users can be made more easily.

Code Sample 
For a full code samples, related to all platform and features I recommend to you to check the fallowing GIT repository: http://msdn.microsoft.com/en-us/library/azure/dn646737.aspx
Using OWIN, we can do cool stuff on our web applications. Below you can see how simple the account controllers will be if you will use OWIN:
public class AccountController : Controller
    {
        public void SignIn()
        {
            // Send a WSFederation sign-in request.
            if (!Request.IsAuthenticated)
            {
                HttpContext.GetOwinContext().Authentication.Challenge(new AuthenticationProperties { RedirectUri = "/" }, WsFederationAuthenticationDefaults.AuthenticationType);
            }
        }
        public void SignOut()
        {
            // Send a WSFederation sign-out request.
            HttpContext.GetOwinContext().Authentication.SignOut(
                WsFederationAuthenticationDefaults.AuthenticationType, CookieAuthenticationDefaults.AuthenticationType);
        }
    }

Pros and Cons 
Pros

  • Easy to use
  • Integrated with on-premises AD
  • Multi-Factor Authentication
Cons
  • Management portal is not very intuitive


Pricing
There are 3 types of tiers that are offered in this moment (Free, Basic, and Premium). For the last two of them we don’t have kind of limitations related to number of users. When you are thinking to migrate or move to Azure AD you should take into account:

  • Number of users
  • Number of applications that will be used per user
  • Type of service agreement
  • Number of users that will use multi-factor authentication 


Conclusion
In conclusion we can say that Azure AD is a powerful service that is already part of Azure core. It is a service that is here to stay. Azure AD should be the first option when we are thinking about security and user management in cloud.

Comments

Popular posts from this blog

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&#…

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.51EF 6.0.2VS2013
It seems that there …

Run native .NET application in Docker (.NET Framework 4.6.2)

Scope
The main scope of this post is to see how we can run a legacy application written in .NET Framework in Docker.

Context
First of all, let’s define what is a legacy application in our context. By a legacy application we understand an application that runs .NET Framework 3.5 or higher in a production environment where we don’t have any more the people or documentation that would help us to understand what is happening behind the scene.
In this scenarios, you might want to migrate the current solution from a standard environment to Docker. There are many advantages for such a migration, like:

Continuous DeploymentTestingIsolationSecurity at container levelVersioning ControlEnvironment Standardization
Until now, we didn’t had the possibility to run a .NET application in Docker. With .NET Core, there was support for .NET Core in Docker, but migration from a full .NET framework to .NET Core can be costly and even impossible. Not only because of lack of features, but also because once you…