Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Id.Web should not use DefaultAzureCredential in production code #3238

Open
bgavrilMS opened this issue Feb 10, 2025 · 2 comments
Open

Id.Web should not use DefaultAzureCredential in production code #3238

bgavrilMS opened this issue Feb 10, 2025 · 2 comments
Labels
bug Something isn't working P2

Comments

@bgavrilMS
Copy link
Member

bgavrilMS commented Feb 10, 2025

Description

As per https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/best-practices?tabs=aspdotnet#use-deterministic-credentials-in-production-environments, DefaultAzureCredential (DAC) should not be used in production scenarios. This is based on a PIR. Please read the public doc for to see the scenario where DAC breaks production.

Id.Web uses DAC in production code

Expected behavior

Consider using https://learn.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-9.0 to determine if the app runs in DEV or in STAGING or PROD. Not sure about ASP.NET Classic. If not possible, we should let the app developer choose.

If production env, we could use only the SP auth (env credential, msi credential, workload cred, FICs). In "dev" scenarios we can continue to use DAC.

@bgavrilMS bgavrilMS changed the title Id.Web should not use DefaultAzureCredential Id.Web should not use DefaultAzureCredential in production code Feb 10, 2025
@bgavrilMS
Copy link
Member Author

Would need an opinion on how to actually fix this @jmprieur @jennyf19 . If we can use the "environment" concept, I would argue that this is not a breaking change. https://learn.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-9.0

Otherwise, it could be a breaking change.

@jmprieur
Copy link
Collaborator

Needs to be taking with the test buble support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2
Projects
None yet
Development

No branches or pull requests

2 participants