Showing all posts tagged: 'security'

A 23-post collection

Setting up Managed Identities for ASP.NET Core web app running on Azure App Service

A few weeks ago I wrote about Secure application development with Key Vault and Azure Managed Identities which are managed, behind the scenes, by Azure Active Directory. At the end of that blog post, I promised to show you how to take your app from local development to production seamlessly, leveraging Managed Identities on the Azure App Service. What does the app currently doBefore setting things up on Azure, let's remind ourselves quickly what the application does and where Azure Managed Identities and Key Vault fit. The Razor Web App retrieves two secrets from Key Vault without having to configure …[read more]


Working with Azure EasyAuth (Azure App Service Authentication) and .NET Core 3.1

Working with authentication in your apps can sometimes be tricky and every app has its own constraints. But the Azure platform provides developers and organizations with many options when it comes to implementing authentication and authorization, from fully customized, coded solutions to turn-key authentication with little to no code changes. Imagine the scenario where you already have an app that was coded without authentication. This could be an app that was developer to run internally but now it needs to be moved to Azure. To secure access to the app, you have 2 options: Add authentication in code so that …[read more]


Create a protected .NET Core 3.1 API that calls into MS Graph on behalf of a Power App

In this blog post I'm going to explain how to create a .NET Core API that accepts authenticated requests from a Power App, validates the user and then makes a call into MS Graph to retrieve the appropriate data. All secured via Azure AD while using the latest (and funkiest) Microsoft.Identity.Web library for authentication and the MS Graph SDK for getting the Graph  data. If you haven't used the Microsoft.Identity.Web NuGet package yet,  then I would urge you to have a look at the repo and start integrating it with your ASP.NET Core apps. The …[read more]


Secure app development with Azure AD, Key Vault and Managed Identities

‌ Or - How to eliminate your application secrets once and for all. Developing applications using security best practices doesn't have to be hard. And yet, many organizations and developers struggle with this since the space is so vast and it's hard to know where to start. However, if you are developing for Azure, then there are some powerful features in place to ensure that you and your team can develop securely end-to-end. The main component is: Azure Managed Identities, which rely on Azure Active Directory. PrerequisitesAn Azure SubscriptionAzure Active DirectoryIf you don't have an Azure subscription, you can get one …[read more]


Getting started with Microsoft Identity for Developers (AAD)

In this blog post (series) I'll be looking at Microsoft Identity from a developer perspective. In other words, I'll cover how to set up authentication and authorization for your solution using Azure Active Directory (AAD). If you haven't worked with AAD before, don't worry. I'll make sure to cover the basics as we go through this journey together. AAD allows developers to register an app that can then be used to authenticate AD users and provide the appropriate roles and permissions to users to execute certain actions. As one of my colleagues says (Kyle), what developers care about in the …[read more]


Using HTTPS with Azure Functions in local development

It's usually the small things that make a big difference. As I was updating my Function Core tools today (the Functions CLI) I was pleasantly surprised to notice some new functionality which was added to the tooling. The Functions team has added the capability to enforce/use HTTPS when developing and debugging in the local development using the Functions Core tools. If you're new to Azure Functions and never used the Core tools, then you may be surprised to find that we now have 2 versions of the tools. I know, but stay with me because they currently server different …[read more]


Enforcing HTTPS only traffic with ASP.NET Core and Kestrel

In the early days of ASP.NET Core, [Kestrel](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?tabs=aspnetcore2x" target="_blank) (the lightweight, open source web server) was fairly basic. And this was totally intentional! Kestrel provides a mechanism to spin up and run ASP.NET Core websites and APIs fast and efficiently with as little overhead as possible. This, combined with the other ASP.NET Core improvements (90% smaller HTTP requests etc) have contributed to ASP.NET Core's speed. Kestrel was great at its job but in some cases proved to be very basic. It's …[read more]


.NET Core authentication and authorisation using Auth0

I'm a big proponent of delegated authentication. It's no surprise that [Broken Authentication](https://www.owasp.org/index.php/Top_10-2017_A2-Broken_Authentication" target="_blank) is #2 at the OWASP top 10 latest report. It's been #2 for a very long time, which means that developers and enterprises are still getting this wrong. There are so many ways that authentication that can go wrong, that delegated authentication should be the preferred and possibly the default choice for all platforms. There are many different services that can provide this. I've heavily worked with Azure AD and Azure AD B2C …[read more]