Repository navigation
Feature/certificate trust defaults - #2539
aaronpowell merged 6 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 2539Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 2539" |
|
The README Integrations Check is a quirk of upping to net11.0, I believe. Since it's a shared eng script, I won't address it in this PR. My agent tried to suggest just slapping:
At the top of eng/scripts/generate-readme-integrations.md. I have my doubts 😆 |
There was a problem hiding this comment.
🔵 Needs a closer look
The Perl TLS trust changes need runtime validation because the configuration-only tests do not verify HTTPS trust or confirm that Append mode preserves public-CA access.
No open issues 🎉
What changed in this PR
Makes certificate trust automatic for Perl resources, aligning the integration with Aspire’s Python and Java behavior and addressing #2538.
Changes:
- Enables
Systemtrust by default, with scope-aware Perl TLS and OpenTelemetry certificate configuration. - Makes dependency installers inherit the parent’s final trust settings and retains
WithPerlCertificateTrust()as an obsolete no-op. - Expands regression tests and documents trust scopes, overrides, and publish-mode behavior.
| File | Description |
|---|---|
| tests/CommunityToolkit.Aspire.Hosting.Perl.Tests/WithCertificateTrustTests.cs | Tests defaults, scopes, installer inheritance, telemetry certificates, and compatibility. |
| tests/CommunityToolkit.Aspire.Hosting.Perl.Tests/PublishModeWiringTests.cs | Tests publish-mode environment and absence of installers. |
| tests/CommunityToolkit.Aspire.Hosting.Perl.Tests/LoggingTestHelper.cs | Separates startup-event publication from log collection. |
| src/CommunityToolkit.Aspire.Hosting.Perl/README.md | Documents default trust and migration from the opt-in helper. |
| src/CommunityToolkit.Aspire.Hosting.Perl/PerlOtelEnvironmentVariableMirror.cs | Clarifies the shared environment dictionary’s XML documentation. |
| src/CommunityToolkit.Aspire.Hosting.Perl/PerlAppResourceBuilderExtensions.PackageManager.cs | Configures installer trust and copies parent settings at startup. |
| src/CommunityToolkit.Aspire.Hosting.Perl/PerlAppResourceBuilderExtensions.cs | Enables default trust, handles scopes, and obsoletes the old helper. |
| src/CommunityToolkit.Aspire.Hosting.Perl/api/CommunityToolkit.Aspire.Hosting.Perl.cs | Reflects the helper’s obsolete status in the API baseline. |
| src/CommunityToolkit.Aspire.Hosting.Perl/Annotations/PerlCertificateTrustAnnotation.cs | Removes the unused opt-in marker annotation. |
Review effort: Balanced
|
Am looking into the suggestion about the Perl TLS runtime validation - potentially worth adding a few integration tests that serve as those. Will check the assumptions between Windows / Linux on this since the defaults need special handling on Windows vs Linux and compare to how others are handling them (if it's a thing for their languages). |
|
Do you want to hold off the merge until you look at the runtime validation stuff? |
|
@aaronpowell yeah, I started on lunch break but am having issues with the dev container to test changed locally. I'll fiddle with it tonight when the family goes to bed and hard request review when it's ready. |
… defaults. I will have a follow-up with windows tests since it is a quirky scenario.
…om/Omnideth/CommunityToolkit.Aspire.Contributions into feature/certificate-trust-defaults
|
I've just popped it back to draft state so we don't accidentally merge it while you're part way through. Set it back to ready when you're happy with where it's at. |
The integration test now serves as the "runtime validation" for the default behaviors for cert trust.

Closes #2538
Perl resources now trust the custom certificate authorities and developer certificate configured in Aspire by
default. Previously, trust required the experimental opt-in
WithPerlCertificateTrust()helper(
CTASPIREPERL001), which is now an obsolete no-op. This brings the Perl integration to feature parity withAspire.Hosting.PythonandAspire.Hosting.Java, which configure certificate trust by default from theirAdd*methods.PR Checklist
The current WithPerlCertificateTrust() behavior is/was experimental, so the breaking change is that it is obsoleted and it now no-ops with a note to the user. By default, though, all Perl Resources now provide a sane default and options under Aspire's .WithCertificateTrustScope(...) method.
SSL_CERT_FILE/PERL_LWP_SSL_CA_FILE/MOJO_CA_FILEOTEL_EXPORTER_OTLP_CERTIFICATESystem(default)OverrideAppendNone