Exploring App Service Authentication on Linux

A while ago, it has been announced that App Service on Linux has gained the ability to make use of Authentication / Authorization as well. Originally, I wanted to publish the article earlier, but I got to finish it just now. This article is going to walk you through how the Authentication / Authorization works in App Service on Linux and might give you few hints how to make some more use of it.

Continue reading “Exploring App Service Authentication on Linux”

A Christmas Present… for you!

About a week ago I announced the Microsoft Authentication Graph Helpers. Since then, I decided to publish a small, but a useful enhancement to it – AzureAdAuthorizationAttribute and AzureAdAuthorizationHandler!

Continue reading “A Christmas Present… for you!”

Microsoft Authentication Graph Helpers

I initially wanted to publish this code in summer already, but in the end, I didn’t have enough time to spare to do so. Do you find yourself implementing Microsoft Graph, ADAL, MSAL etc. in many projects over and over again? If so, or you just want to have less work with that, read on!

Continue reading “Microsoft Authentication Graph Helpers”

UseHttpsRedirection on Azure App Service

Recently, when deploying a project, we have hit an interesting issue – when we deployed an ASP.NET Core 2.1 application with HTTPS redirection middleware with HSTS middleware disabled, however the redirection wasn’t working correctly.

Continue reading “UseHttpsRedirection on Azure App Service”

Beware of SameSite cookie policy in ASP.NET Core and upcoming iOS 12

I have recently stumbled across a bug in iOS 12 preview which sort of breaks existing sites which make use of OpenID Connect middleware in ASP.NET Core 2.1.

Continue reading “Beware of SameSite cookie policy in ASP.NET Core and upcoming iOS 12”

Working with certificates in Azure App Service

Recently, we had a project which required us to connect to a MySQL server from .NET Core with a client certificate authentication. While this seemed fairly trivial, we have hit some issues after deploying the application to Azure App Service.

Read more

Passing state through authentication in ASP.NET Core

When authenticating a user, you might want to persist the state through the authentication request – for example whether the user is authenticating for some special action like organizational signup or simply some state of your application. ASP.NET Core makes this very easy.

Continue reading “Passing state through authentication in ASP.NET Core”

Including front-end libraries in ASP.NET Core projects

I have been recently working on an internal project which allows people to authenticate into a Wi-Fi with Azure AD and other various methods through a captive portal. While trying to maintain a strict policy on what hostnames can be accessed (basically just allowing Azure AD endpoint’s and the application server) I noticed that the default ASP.NET Core project setup seems to set a bad example in handling JavaScript libraries in your project.

Continue reading “Including front-end libraries in ASP.NET Core projects”

Missing claims in ASP.NET Core 2.0 OpenID Connect

We have been migrating couple of projects to ASP.NET Core 2.0 recently. Amongst the major changes in ASP.NET Core 2.0, probably the biggest change has been done in the Authentication. I have written an article about cookie size in ASP.NET Core which explains the basic issue with too many claims in the identity. ASP.NET Core 2.0 OIDC addresses this by removing some of the token values from the identity on the background.

Continue reading “Missing claims in ASP.NET Core 2.0 OpenID Connect”

The dangers of too many cookies on a website

Sometimes, when browsing Microsoft’s sites, you can run into some weird errors – likeĀ Bad Request – Request too long or sometimes evenĀ Connection refused. These errors are mostly caused by cookies. In this article, I am going to show you the most common causes and also tips on how to avoid these issues on your sites.

Continue reading “The dangers of too many cookies on a website”