Showing all posts tagged: 'security'

A 12-post collection

EF Core, String Interpolation and SQL Injection

EF Core has always provided support for inline SQL queries. This means that you could pass a T-SQL query to be executed through the current DbContext. A typical example would look like this: var term = "some search term"); var blogs = db.Blogs.FromSql($"SELECT * FROM dbo.Blogs WHERE Title = {term}") .OrderBy(b => b.Url) .Select(b => b.Url); This feature is great if you need to call a table function etc. I would urge that this feature is used in moderation and with careful consideration. Calling raw T-SQL requires that developers understand the potential security or performance implications …[read more]


Secure Azure ARM templates with Key Vault and VSTS

Azure ARM templates are the recommended way for standardising and automating resource deployments to Azure. The resource manager engine that drives the current portal and is also responsible for managing your infrastructure, where everything is a resource (VMs, WebApps, CosmosDB etc). ARM templates are JSON files that describe what your infrastructure looks like and comes with some great benefits: Infrastructure as Code Idempotent Source Control Tool flexibility Tighter security and control For this post, I would like to focus a bit on security and show you how to leverage some of the built-in Azure features to improve your overall Azure …[read more]


Securing Azure Storage Tables with SAS authentication and CORS in .NET

I'm currently working on a side project as an excuse to try some of the latest code features and functionality in .NET Core. It's a small project with a couple of models and basic CRUD. The project is going to touch everything new such as ASP.NET Core 2.0 Preview, .NET Standard 2.0 Preview, Azure Storage SDK for .NET Coreetc. It was a conscious decision as I wanted to see how the latest tooling and libraries would work. The migration from MVC 5 -> ASP.NET Core project was mainly painless with a few small changes, but remember …[read more]


Securing ASP.NET Core application settings using Azure Key Vault

Azure Key Vault is one of my favourite services, competing for first place with Azure Functions. And .NET Core is my favorite framework for writing applications. Imagine, then, my suprise when I found out that my favorite tools can now work together! Azure Key Vault is a cloud service for storing sensitive "secrets" and (encryption) "keys". Key Vault is simple, easy and indispensible when developing secure applications. It helps avoid the complexity of storing sensitive information in configuration files. This can be API passwords, database connections strings etc. You get the point! Previous solutions where convoluted and complex and often …[read more]


How to fix Bitlocker issues on Windows 10

I like shiny new things. And when you work in tech, shiny new things are easy to acquire. Just switch to the new alpha/beta channel for your favourite toolset and you're sorted. However, all this comes with a massive disclosure: things can quite frequently go horribly wrong. But I love the excitement of trying new features and I'm quite happy to overlook any broken bits. I also do my best to report back to the developers. And for a long time I managed to ride the (innovation) wave without major issues. Ok, I had to reinstall things from time …[read more]