Skip to content

Storage Explorer doesn't work with certs generated from dotnet dev-certs #2859

@jongio

Description

@jongio

We want to be able to use the certs generated by dotnet dev-certs to help create a seamless dev exp across Azurite, ASP.NET, Storage Explorer, and the SDKs. This issue is blocking that exp.

  1. Generate a cert
  • Install dotnet SDK
    dotnet dev-certs https --trust -ep cert.pfx -p azurite
  1. Start Azurite with that cert
    npm install azurite
    azurite --oauth basic --cert cert.pfx --pwd azurite --blobHost localhost --queueHost localhost

  2. Create connection to Azurite using this connection string
    DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=https://localhost:10000/devstoreaccount1;QueueEndpoint=https://localhost:10001/devstoreaccount1;

  3. Add cert to Storage explorer

Edit -> SSL Certificates -> Import Certificates

Import the cert.pfx file you created in first step

  1. Reload Storage Explorer

  2. Try to access Azurite node and you get this:
    image

I tried importing the cert into the Root Certificate store, but still got the same issue. Here's the command I tried:
certutil -f -user -enterprise -p azurite -importpfx root cert.pfx

This same cert works with the Azure SDKs, so I think there's something about Storage Explorer that doesn't support this cert. The source for how this cert is generated is here:

https://github.com/dotnet/aspnetcore/blob/master/src/Tools/dotnet-dev-certs/src/Program.cs

Metadata

Metadata

Assignees

No one assigned

    Labels

    💡 feature requestNew feature or request❔ externalRoot cause of this issue is in another component, product, or service

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions