microsoft / microsoft/aspire

Add a notification to the dashboard to show when the HTTPS development cert is untrusted with a button to trust it

Open
#10,395 1 comment 0 reactions 0 assignees View on GitHub
area-app-model area-dashboard
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

Kestrel logs a warning when run in the "Development" environment and an HTTPS URL is specified (or no URLs are specified so defaults are assumed) and a valid HTTPS dev cert is found *but not trusted*. This warning is hard to find or not shown at all when running an Aspire AppHost. We should use the Interaction Service to show a banner in the dashboard when this situation is detected with an action button that when clicked shows a prompt with instructions on what will happen (i.e. the OS will launch its own dialog) and a button that when clicked attempts to trust the dev cert.

This improves the situation of someone running an Aspire app when the dev cert is present but not trusted by leading them actively through the steps to rectify the situation.

We can consider shelling out to `dotnet dev-certs https --check --trust` to perform the detection of whether of the cert is trusted, and `dotnet dev-certs https --trust` to perform the actual trust operation. This could be encapsulated in a service like `HttpsDevCertManager` to enable re-use by issues like #6890

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.