Repository navigation
Resolve relative DEV_PROXY_CERT_PATH against config folder - #1949
Merged
waldekmastykarz merged 2 commits intoOct 21, 2026
Merged
Conversation
…tnet#1947 The Kestrel CertificateAuthority ignored a relative DEV_PROXY_CERT_PATH and fell back to <configDir>/rootCert.pfx. The Docker images set DEV_PROXY_CERT_PATH=rootCert/rootCert.pfx, so the root certificate was written outside the mounted rootCert volume. Resolve relative values against the config folder, matching v3.3.1 (Titanium) behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6bef9494-04d4-42fb-bd36-c84a4b6ed44f
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix matches the reported requirements, includes regression tests, and has no identified blocking issues.
No open issues 🎉
What changed in this PR
Fixes #1947 by resolving relative certificate paths against the config folder, allowing Docker’s mounted rootCert volume to persist the certificate across runs.
Changes:
- Preserves rooted paths and the default for unset or empty values.
- Adds path-resolution and subfolder-persistence tests.
| File | Description |
|---|---|
| DevProxy.Proxy.Kestrel/Internal/CertificateAuthority.cs | Resolves relative certificate paths and documents the behavior. |
| DevProxy.Proxy.Kestrel.Tests/CertificateAuthorityTests.cs | Tests path resolution and certificate persistence. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1947
In the Kestrel engine,
CertificateAuthority.CreateDefaultonly honoredDEV_PROXY_CERT_PATHwhen it was rooted, otherwise falling back to<configDir>/rootCert.pfx. The Docker images setDEV_PROXY_CERT_PATH=rootCert/rootCert.pfx, so the root certificate ended up outside the mountedrootCertvolume and was regenerated on each container run.This change resolves a relative
DEV_PROXY_CERT_PATHagainst the config folder, matching v3.3.1 (TitaniumCertificateDiskCache.GetRootCertificatePath). Rooted paths are used as-is and an empty value still falls back to<configDir>/rootCert.pfx.Added unit tests for path resolution and for persisting the root into a relative subfolder.