Author name: Tore Nestenius

Tore is an independent educator and consultant through his company TN-Datakonsult http://www.tn-data.se, where he specializes in training developers in .NET, Web Security, OpenID-Connect, architecture, and more. Tore regularly shares his knowledge about .NET on his blog https://nestenius.se, focusing on security and authentication.

Persisting the ASP.NET Core Data Protection Key Ring in Azure Key Vault

The ASP.NET Core Data Protection API (DPAPI) is an essential service in ASP.NET Core that is often overlooked. This post will give an overview of what it does and how we can persist the encryption keys in Azure Key Vault. The API’s main purpose is to encrypt and decrypt data. For example, it is used

Persisting the ASP.NET Core Data Protection Key Ring in Azure Key Vault Read More »

Improving ASP.NET Core Security By Putting Your Cookies On A Diet

Improving ASP.NET Core Security By Putting Your Cookies On A Diet

In this blog post, we’ll explore a practical way to enhance the security of your ASP.NET Core applications by reducing the size of authentication cookies. Large cookies can lead to performance issues and security risks, especially when using OpenID Connect or storing sensitive information. By implementing these optimizations, you can keep your application secure, streamlined,

Improving ASP.NET Core Security By Putting Your Cookies On A Diet Read More »

Demystifying OpenID Connect’s State and Nonce Parameters in ASP.NET Core

Demystifying OpenID Connect’s State and Nonce Parameters in ASP.NET Core

In the world of web application security, OpenID Connect plays a key role in streamlining authentication processes. But what makes it really tick? In this blog post, we dive deep into two critical security features of OpenID Connect – the state and nonce parameters – and how they are used in ASP.NET Core. This simplified

Demystifying OpenID Connect’s State and Nonce Parameters in ASP.NET Core Read More »

ASP.NET Core issues several cookies, including authentication, antiforgery, and session cookies. This blog post will explore what these cookies contain and how they are protected.

Exploring what is inside the ASP.NET Core cookies

ASP.NET Core generates various types of cookies, such as authentication, antiforgery, and session cookies. In this blog post, we’ll take a closer look at what information these cookies store, how they function, and the security measures used to protect them, including encryption and the Data Protection API. Protecting The ASP.NET Core Cookies The content of

Exploring what is inside the ASP.NET Core cookies Read More »

Debugging cookie problems in ASP.NET Core

Debugging cookie problems in ASP.NET Core

Troubleshooting cookie problems in ASP.NET Core Having answered over 1000 questions on Stack Overflow, I’ve found that cookie-related issues are a frequent challenge for developers using ASP.NET Core, especially when implementing authentication and OpenID Connect. Cookie problems can, in my experience, be categorized into the following categories: Browser RejectionCookies provided by the server that aren’t

Debugging cookie problems in ASP.NET Core Read More »

In ASP.NET Core 8, Microsoft added a new authentication handler named BearerToken. In this blog post, I will explain how it works and its purpose. This handler is part of a bigger push by Microsoft to simplify authentication in ASP.NET Core, but in this blog post, we will focus on this handler.

BearerToken: The new Authentication handler in ASP.NET Core 8

Microsoft introduced the new BearerToken authentication handler in ASP.NET Core 8 as part of an initiative to streamline and modernize authentication processes. This blog post dives into how the BearerToken in ASP.NET Core handler works, its key features, and how it differs from existing authentication handlers like Cookie and JwtBearer. Head over to the blog

BearerToken: The new Authentication handler in ASP.NET Core 8 Read More »

Missing claims in the ClaimsPrincipal user object is a frequent problem when using OpenID Connect authentication in ASP.NET Core. In this blog post, we’ll explore common causes behind these claim issues and provide troubleshooting steps to help you identify and resolve them effectively.

Debugging OpenID Connect Claim Problems in ASP.NET Core

Missing claims in the ClaimsPrincipal user object is a frequent problem when using OpenID Connect authentication in ASP.NET Core. In this blog post, we’ll explore common causes behind these claim issues and provide troubleshooting steps to help you identify and resolve them effectively.   What is the purpose of the OpenIDConnect handler? The handler has

Debugging OpenID Connect Claim Problems in ASP.NET Core Read More »

Troubleshooting JwtBearer authentication problems in ASP.NET Core

Troubleshooting JwtBearer authentication issues in ASP.NET Core

One of the most frequent questions I encounter on Stack Overflow is how to troubleshoot JwtBearer authentication issues in ASP.NET Core. In this post, I’ll share top tips and solutions to help you resolve common JwtBearer handler problems effectively. The JwtBearer handler We add the JwtBearer handler to the authentication middleware in our ASP.NET Core

Troubleshooting JwtBearer authentication issues in ASP.NET Core Read More »