Skip to content

Running ASP.NET Core apps using HTTPS on macOS results in Keychain Access prompts #44754

Closed
@DamianEdwards

Description

@DamianEdwards

It seems we regressed some of the work we did for .NET 7 around improving the developer experience on macOS, specifically the change to have Kestrel load the developer HTTPS cert (i.e. the one created by dotnet dev-certs https) from a .pfx file on disk rather than from the macOS Keychain in order to avoid Keychain Access prompts for every new ASP.NET Core app created that's run with the https launch profile.

The regression was made in PR #43358 with the code change meaning that the matching dev cert from the Keychain is always preferred over the dev cert loaded from the .pfx file.

We'll need to ensure that when the dev cert is being loaded for the purpose of a Kestrel HTTPS endpoint, that the file on disk is preferred. Other scenarios (e.g. operations performed by dotnet dev-certs https) will likely require the cert to be loaded from the Keychain (at least the scenario that involves exporting it from the Keychain to a .pfx file on disk will 😄), but the details of that will need to be determined and confirmed.

Metadata

Metadata

Labels

area-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsbugThis issue describes a behavior which is not expected - a bug.feature-kestrel

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions