Skip to content

Updating dotnet dev-certs https to better support expanded scenarios #60369

Open
@benjaminpetit

Description

@benjaminpetit

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

It would be helpful to be able to retrieve and generate dev certs programmatically.

Currently, we have to use some hacky way to retrieve it programmatically (see https://github.com/dotnet/aspire-samples/pull/667/files).

Another limitation of the current situation is that since the cert is only valid for localhost, so if an app is running in a container and needs to access another service on the host, there will be an SSL error since requests will be done against https://host.docker.internal. Same issue with other container services running with short names, like https://catalog for example.

Describe the solution you'd like

  • A public interface to interact with the dev cert (at least get the current one)
  • Ideally a way to add alternative subject name to support the container case.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIfeature-devcerts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions