This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Downloader | |
{ | |
using System; | |
using System.IO; | |
using System.IO.Compression; | |
using System.Net.Http.Json; | |
using System.Text; | |
using System.Text.Json.Nodes; | |
using Azure.Core; | |
using Azure.Identity; // <PackageReference Include="Azure.Identity" Version="1.9.0" /> |
- Federated credentials / workload identity federation allows your CI/CD pipelines in GitHub and GitLab to access your Azure subscription without any secrets stored in the pipeline config.
- GitHub's
azure/login@1
task handles this transparently, but I also explain how it works under the hood. GitLab supplies the necessary token directly to your pipeline run. - Both GitHub and GitLab are easy to setup and federate securely with your Azure subscription.
- BitBucket can't be setup that way, because tokens issued by BitBucket don't have a predicable subject identifier.
In #GitLab, you don't need to request a GitLab-issued token from some token endpoint. Instead, you just specify in your id_tokens
section that you want a token for a certain audience, and GitLab hosts the #JWT token in the environment variable you specify.
In this example, GitLab issues a token for the audience api://AzureADTokenExchange
and makes it available in the environment variable ID_TOKEN_FOR_AZURE
.
Demo how to access an Azure resource, in this example read a secret from KeyVault (az keyvault secret show
).
- Links for .NET memory management
- Advanced .NET debugging - Tess Ferrandez-Norlander - NDC London 2022
- Enable diagnostics logging for apps in Azure App Service
- Application performance FAQs for Web Apps in Azure
- Collect memory dump for App Service (Windows only)
- How to debug a managed memory dump with .NET Diagnostic Analyzers
- Dump files in the Visual Studio debugger