Skill 2.3.6
Implement secrets management
Key Concepts
The best secret is none: GitHub Actions and Azure Pipelines authenticate to Azure with workload identity federation (OpenID Connect), where a Microsoft Entra app registration or user-assigned managed identity trusts tokens issued for a specific repository, branch or environment, so azure/login needs only client, tenant and subscription IDs. The deployment identity then connects to the database with Microsoft Entra authentication, for example by passing an access token to SqlPackage.
Values that must stay secret are stored as GitHub secrets (repository, environment or organization level, masked in logs) or in Azure Key Vault and read at run time. Environment secrets are released only to jobs that target the environment, after its protection rules pass. Secret scanning and push protection detect secrets committed by mistake, which must then be rotated, not merely deleted from history.