Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for configuring non-project resources to trust and/or use the ASP.NET Core HTTPS development certificate #6890

Open
DamianEdwards opened this issue Dec 6, 2024 · 0 comments
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication security 🔐 untriaged New issue has not been triaged

Comments

@DamianEdwards
Copy link
Member

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:

@DamianEdwards DamianEdwards added area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication security 🔐 labels Dec 6, 2024
@joperezr joperezr added the untriaged New issue has not been triaged label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication security 🔐 untriaged New issue has not been triaged
Projects
None yet
Development

No branches or pull requests

2 participants