Skip to content

Commit

Permalink
fix: self-signed cert for grpc endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziinc committed Nov 20, 2024
1 parent 524709f commit 17094f6
Show file tree
Hide file tree
Showing 16 changed files with 4 additions and 11 deletions.
11 changes: 3 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,8 @@ ssl.staging: CERT_DOMAIN = logflarestaging.com

$(addprefix ssl.,${envs}): ssl.%:
@echo "Generating self-signed certificate..."
@echo "Generating server private key (cert.key) and certificate signing request (req.pem)"
@openssl req -newkey rsa:2048 -nodes -days 365000 -keyout .$*.cert.key -out .$*.req.pem \
-subj "/C=US/ST=DE/O=Supabase/OU=Logflare/CN=$(CERT_DOMAIN)"
@echo "Signing cert.pem using private key and CSR"
@openssl x509 -req -days 12783 -set_serial 1 \
-in .$*.req.pem -signkey .$*.cert.key -out .$*.cert.pem \
-CA .$*.cacert.pem -CAkey .$*.cacert.key

@openssl req -x509 -newkey rsa:2048 -keyout .$*.cert.key -out .$*.cert.pem -days 3650 \
-nodes -subj "/C=US/ST=DE/O=Supabase/OU=Logflare/CN=$(CERT_DOMAIN)"


.PHONY: $(addprefix ssl.,${envs})
Binary file modified cloudbuild/.prod.cert.key.enc
Binary file not shown.
Binary file modified cloudbuild/.prod.cert.pem.enc
Binary file not shown.
Binary file modified cloudbuild/.prod.db-client-cert.pem.enc
Binary file not shown.
Binary file modified cloudbuild/.prod.db-client-key.pem.enc
Binary file not shown.
Binary file modified cloudbuild/.prod.db-server-ca.pem.enc
Binary file not shown.
Binary file modified cloudbuild/.prod.env.enc
Binary file not shown.
Binary file modified cloudbuild/.prod.gcloud.json.enc
Binary file not shown.
Binary file modified cloudbuild/.staging.cert.key.enc
Binary file not shown.
Binary file modified cloudbuild/.staging.cert.pem.enc
Binary file not shown.
Binary file modified cloudbuild/.staging.db-client-cert.pem.enc
Binary file not shown.
Binary file modified cloudbuild/.staging.db-client-key.pem.enc
Binary file not shown.
Binary file modified cloudbuild/.staging.db-server-ca.pem.enc
Binary file not shown.
Binary file modified cloudbuild/.staging.env.enc
Binary file not shown.
Binary file modified cloudbuild/.staging.gcloud.json.enc
Binary file not shown.
4 changes: 1 addition & 3 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,8 @@ if(
) do
config :logflare,
ssl: [
cacerts: :public_key.cacerts_get(),
certfile: "cert.pem",
keyfile: "cert.key",
verify: :verify_peer
keyfile: "cert.key"
]
end

Expand Down

0 comments on commit 17094f6

Please sign in to comment.