-
Notifications
You must be signed in to change notification settings - Fork 684
Description
Some of the Aspire samples in the samples repo now demonstrate how non-project resources can be configured to use and trust the ASP.NET Core HTTPS development certificate so that they can host HTTPS endpoints that are trusted by the host browser (and other host resources) and trust the HTTPS endpoints of other resources that they connect to.
- AspireWithNode: Configures the front-end Node.js app to host HTTPS endpoints using the dev cert and trust connections to the back-end ASP.NET Core API project which is also using the dev cert.
- Metrics: Configures the OpenTelemetry Collector container resource to host its endpoint using HTTPS via the dev cert and trust connections to downstream collectors (like the Aspire dashboard) that also use the dev cert.
- Keycloak: Configures the Keycloak container resource to host its endpoints using HTTPS via the dev cert and trust connections to client apps including project resources that are using the dev cert.
All of these samples utilize a common helper DevCertHostingExtensions.cs
.
We should consider adding this base helper capability natively to Aspire.Hosting
and then updating the various hosting integrations to utilize it along with whatever custom logic is required for that specific integration to add a resource-specific RunWithHttpsDevCertificate
overload that does what's required to configure the integration to correctly use the certificate.
Related issues: