Posts

Showing posts from May, 2021

Using Active Directory Service Principal authentication to connect to Azure SQL

Image
This article describes how to authorize a .NET application to connect to an Azure SQL Server through Azure Active Directory. Why You don't want to connect to a database with your personal account details. You want to be able to control the login over time, expiring access as needed. Register your application Presuming you have an Azure SQL Server and a Database you'd like to connect to, you'll need to register your application in Azure AD. This is done through the App Registrations blade : You won't need to register a Redirect URL for this example. At this point, it will be prudent to write down the following properties for later use: Application (client) ID (called AppId  in the accompanying code) Directory (tenant) ID (called TenantId  in the accompanying code) Grant access to Azure SQL Database Next up, we need to give your application access to the Azure SQL Database service . This is done through the API Permissions  blade: Add client authentication In order for yo

Infrastructure as Code - a Summary

Adhere to DORA's Accelerate research, track Delivery lead time , Deployment frequency , Change fail percentage and Mean Time to Restore . Prioritize speed and quality by continuously deliver infrastructure changes through code and automated pipelines. These is the final part of the Infrastructure as Code series . Define everything as code. Continuously test and deliver all work in progress. Build small, simple pieces that you can change independently. You need a Cloud Age mindset, exploiting speed to improve quality and building quality in to gain speed. Automating your infrastructure takes work, but doing it helps you make changes (and build better systems from scratch). Assume that systems are unreliable. Make everything reproducible. Avoid snowflake systems that you dare not touch. Create disposable things. Minimize variation to simplify maintenance, even if you dockerize everything. Ensure that you can repeat any action. Minimize configuration. If you need radically different