Azure provides many services; a typical .NET application uses a set like this: - Compute: App Service (web apps and APIs), Azure Functions (serverless, event-driven), Container Apps or AKS (containers). - Data: Azure SQL Database, Cosmos DB (NoSQL, globally distributed), Azure Cache for Redis, Blob Storage (files), Table and Queue Storage. - Messaging: Service Bus (enterprise queues and topics), Event Grid (event routing), Event Hubs (high-volume streaming). - Integration: Logic Apps (low-code workflows), API Management (gateway, policies, developer portal). - Identity and security: Microsoft Entra ID, managed identities, Key Vault. - Monitoring: Azure Monitor, Application Insights, Log Analytics. - DevOps: Azure DevOps or GitHub Actions, Bicep or ARM templates, Container Registry. Azure Key Vault A managed service for storing and controlling access to: - Secrets: connection strings, API keys, passwords. - Keys: cryptographic keys for encryption and signing (software-protected or HSM-backed in the Premium tier and Managed HSM). - Certificates: TLS certificates, including automatic renewal with integrated certificate authorities. How applications use it securely 1. Enable a managed identity on the App Service or Function. 2. Grant that identity the Key Vault Secrets User role (Azure RBAC) on the vault. 3. Read secrets without storing any credentials: builder.Configuration.AddAzureKeyVault( new Uri("https://myvault.vault.azure.net/"), new DefaultAzureCredential()); var conn = builder.Configuration["Sql-ConnectionString"]; Or use App Service Key Vault references in app settings: @Microsoft.KeyVault(SecretUri=https://myvault.vault.azure.net/secrets/Sql-ConnectionString/). Best practices - One vault per application and environment; least-privilege RBAC. - Soft delete and purge protection enabled; private endpoints or firewall rules. - Secret versioning and rotation policies; Event Grid notifications for near-expiry secrets. - Diagnostic logging to monitor access. - Prefer managed identity to access services directly (SQL, Storage), so fewer secrets need to exist at all.
Ravindra Wadile · · 0 likes