Context
PR #9707 added managed-identity / Entra ID authentication to Microsoft.Testing.Extensions.AzureFoundry via DefaultAzureCredential, which introduces a direct dependency on Azure.Identity. This transitively pulls in a heavyweight graph (MSAL / Microsoft.Identity.Client, Azure.Core, Microsoft.IdentityModel.*, System.Memory, etc.) that becomes a transitive dependency for all consumers of the package.
The package is currently alpha / IsShipping=false, so this is acceptable for now.
Task
Before this package moves to shipping/GA status, revisit the dependency footprint. Options to weigh:
- Keep
Azure.Identity as a direct dependency (simplest, secure-by-default).
- Abstract credential creation behind an injectable
TokenCredential (or a factory) so consumers who only use API keys aren't forced to pull the full MSAL graph.
- Consider an optional/separate package for the managed-identity path.
Also re-verify that the pinned Azure.Identity version is current and supported at GA time (it was bumped to 1.21.0 in #9707).
References
Context
PR #9707 added managed-identity / Entra ID authentication to
Microsoft.Testing.Extensions.AzureFoundryviaDefaultAzureCredential, which introduces a direct dependency onAzure.Identity. This transitively pulls in a heavyweight graph (MSAL /Microsoft.Identity.Client,Azure.Core,Microsoft.IdentityModel.*,System.Memory, etc.) that becomes a transitive dependency for all consumers of the package.The package is currently
alpha/IsShipping=false, so this is acceptable for now.Task
Before this package moves to shipping/GA status, revisit the dependency footprint. Options to weigh:
Azure.Identityas a direct dependency (simplest, secure-by-default).TokenCredential(or a factory) so consumers who only use API keys aren't forced to pull the full MSAL graph.Also re-verify that the pinned
Azure.Identityversion is current and supported at GA time (it was bumped to 1.21.0 in #9707).References