Add logging if we detect the app host is running with an untrusted dev cert#13943
Add logging if we detect the app host is running with an untrusted dev cert#13943
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 13943Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 13943" |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Logging isn't good enough, lets turn this into a notification. |
Added both a notification and explicitly controlling the dev cert the dashboard uses. |
|
/ba-g transient template failures. |
🎬 CLI E2E Test RecordingsThe following terminal recordings are available for commit
📹 Recordings uploaded automatically from CI run #21379107285 |
| logger.LogWarning("{Message}", message); | ||
|
|
||
| // Send notification to the dashboard | ||
| _ = interactionService.PromptNotificationAsync( |
There was a problem hiding this comment.
I moved where the check happens to DcpHost alongside the container runtime check.
|
@DamianEdwards can you try this out. |
✅ PR #13943 Validation Report - VERIFIEDPR Information
CLI Version Verification
Test Results
EvidenceScenario 2 - Untrusted Certificate:
Scenario 3 - Trusted Certificate:
Overall Result: ✅ PR VERIFIEDThe PR correctly implements:
📋 Full session log: https://gist.github.com/DamianEdwards/9a40bff87fcf4cb6bd37321673feab10 |


Description
It's possible, particularly after .NET SDK updates, to end up in a situation where there's a newer dev cert added to the
CurrentUser/Mycert store (which is the source of dev certs for TLS termination), but not to theCurrentUser/Rootcert store which is where trusted certificates are pulled from. This can lead to a situation where services try to terminate HTTPS endpoints with an updated dev cert, but nothing actually trusts the new certificate. Diagnosing the issue is confusing and can require checking the logs for individual services.This adds an explicit error level log if automatic dev cert trust is enabled and the latest certificate isn't in the trusted root store.
Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplate