Skype meeting with Dan and Javier on outline
javiercn to review.
Edit:
This needs to go in Enforce HTTPS in an ASP.NET Core
The first time you run dotnet after installing the SDK you get this message
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.
@Rick-Anderson edit: Copied this to new issue #6199
We also need to cover how to setup the dev certificate when using Docker in development:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://localhost;http://localhost
- ASPNETCORE_HTTPS_PORT=44349
ports:
# Replace the values on the left by the values on your launchSettings.json
- "51217:80"
- "44349:443"
volumes:
- ${APPDATA}/Microsoft/UserSecrets/:/root/.microsoft/usersecrets
- ${APPDATA}/ASP.NET/Https:/root/.aspnet/https/
{
"Kestrel":{
"Certificates":{
"Default":{
"Path": "/root/.aspnet/https/<AppName>>.pfx",
"Password": "<<Your-Password>>"
}
}
}
}
@richlander Did a great job covering this for the docker images and samples, so you should definitely reuse his doc and expand a bit on it. https://github.com/dotnet/dotnet-docker/pull/545/files
Per @javiercn
We need to have a doc on how to do it with the tool and also how to do it manually in a platform idiomatic way on each platform.
@scottaddie can you put this on your priority list?
@Rick-Anderson I have some more eBook work to do today, but I can look at it next week.
I describe how to setup a base docker image for dotnet core 2.2 with https & http/2 (as well as brotli) here - https://medium.com/@ma1f/docker-dotnet-3d979f56efe6
key environment settings as follows - no need to setup listener in startup with ports etc.
ENV Kestrel:Certificates:Default:Path=/etc/ssl/private/cert.pfx
ENV Kestrel:Certificates:Default:Password=changeit
ENV Kestrel:Certificates:Default:AllowInvalid=true
ENV Kestrel:EndPointDefaults:Protocols=Http1AndHttp2
Most helpful comment
@Rick-Anderson edit: Copied this to new issue #6199
We also need to cover how to setup the dev certificate when using Docker in development:
EXPOSE 443