From 928e31bfdc0fcddf2ef4c5004e0873348c9aca69 Mon Sep 17 00:00:00 2001 From: Nick Marinelli Date: Fri, 26 Aug 2022 15:25:38 -0400 Subject: [PATCH] adapt for mkcert Signed-off-by: Nick Marinelli --- contrib/docs/tutorials/enable-ssl-self-signed.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/contrib/docs/tutorials/enable-ssl-self-signed.md b/contrib/docs/tutorials/enable-ssl-self-signed.md index 8169e277fb..589e96dc80 100644 --- a/contrib/docs/tutorials/enable-ssl-self-signed.md +++ b/contrib/docs/tutorials/enable-ssl-self-signed.md @@ -4,11 +4,7 @@ If you need to use an `https:` URL for local testing (i.e. if an OAuth provider ## Backend -1. Generate a self-signed certificate and key for localhost. One approach uses OpenSSL: - ```bash - mkdir certs ; - openssl req -x509 -newkey rsa:2048 -nodes -keyout certs/localhost.key -out certs/localhost.crt -sha256 -days 3650 -subj '/CN=localhost' ; - ``` +1. Generate a self-signed certificate and key for localhost and configure your system to trust it. [mkcert](https://github.com/FiloSottile/mkcert) is a helpful tool to accomplish this. 1. Update `backend.baseUrl` in app-config.local.yaml to use an `https:` address, and copy the contents of the certificate and key files into `backend.https.certificate.cert` and `backend.https.certificate.cert`, respectively. Your app-config.local.yaml should look something like: ```yaml backend: @@ -26,8 +22,7 @@ If you need to use an `https:` URL for local testing (i.e. if an OAuth provider ... -----END PRIVATE KEY----- ``` -1. Convince your browser to trust the certificate. In Windows this might mean adding the certificate to your Trusted Root CAs, or you may use a browser-specific configuration like Chrome's flag `chrome://flags/#allow-insecure-localhost`. -1. Start the backend with `NODE_EXTRA_CA_CERTS=/absolute/path/to/certs/localhost.crt yarn start-backend` +1. Start the backend with `NODE_EXTRA_CA_CERTS=/absolute/path/to/cert.pem yarn start-backend` ## Frontend