Posts

Showing posts from January, 2021

Tidy up - Unused Project and Nuget package reference using Visual Studio 2019

If you are a Developer/Architect using Visual Studio as IDE for your development activities, this blog post will be of your interest. During the Ignite 2021 conference, Microsoft released Visual Studio 2019 v16.9 and v16.10 Preview 1. As part of version 16.10 Preview 1, one of the cool features they introduced is to "Remove Unused References..." for any Projects and Nuget packages that are not in use. At the time of writing this blog post, we have Visual Studio Version 16.10.0 (official release) which includes this new feature.  As part of development, we generally get carried away and introduce new Nuget package references to your project and add new references to your Projects. By the end of development, you will not be 100% sure which are not being referenced and unused which means you will leave those unused project references in your application. Now you might be wondering what's the big deal in it since it doesn't harm. The advantage of removing unused project r...

How to Audit - Azure Key Vault?

Image
In this blog post, we will see how to send logs and metrics for the Azure Key Vault which can be used for auditing. Azure Key Vault Overview Azure Key Vault provides a way to store securely keys, secrets, and certificates in a centralized location. Key Vault greatly reduces the chances of secrets being accidentally leaked, by simplified administration of application secrets. Azure Key Vault solution is not just for Cloud Solutions it can be integrated with on-premise as well. Integration with other Azure services is simplified with a managed identity. Azure Key Vault is not just only for Application secrets (Development) it goes well with Infrastructure team like DevOps where Passwords, Certificate, etc can be managed related to Infrastructure additionally Integration with Azure DevOps makes it more powerful. Things that can go in your vaults are: Application secrets  Connection strings API keys Tokens Passwords etc Certificates Encryption Keys Audit Enabling on K...

Cleaning Azure Container Registry (ACR) on demand or schedule

Image
In this blog post, we will see how to purge container images from Azure Container Registry (ACR). Till recent time most of them would have written custom PowerShell or bash script and run it to clean (purge) ACR container images. Recently Microsoft introduced a new preview feature to automatically purge images based on filters, duration, and untagged manifests. Additionally, this new preview feature supports to run on-demand or on a schedule using CRON expression. In my current project, our delivery team is committing code several times a day. This automatically triggers a CI pipeline from which images are automatically built and pushed into ACR. Most of them would be going through the same journey. In this situation using this new preview feature, helps to keep ACR clean and not worrying about the Container registry getting bloated with images.  Both on-demand or schedule will make use of acr purge command. ACR purge is designed to run as a container command in ...