mirror of
https://github.com/plankanban/planka.git
synced 2026-02-05 00:39:58 +03:00
[Bug]: "unable to verify the first certificate" with OIDC behind self-signed certificate #593
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Velociraptor45 on GitHub (Oct 27, 2024).
Where is the problem occurring?
None
What browsers are you seeing the problem on?
No response
Current behaviour
Hey there, I'm running a keycloak in my local network behind a self-signed certificate. But when I try to spin up the Planka containers with enabled OIDC, I get the following output in during the starting phase:
Desired behaviour
The app starts and can verify the self-signed certificate of the OIDC provider
Steps to reproduce
Other information
I already map the ssl certificates of my host (which include my root certificate) into the planka container
When I disable OIDC, start the container and
docker execinto it, I can ping keycloak without issues. Awgeton the realm executes without issues as well - meaning the container can successfully verify the certificate. It just seems the application can't. Any insights into this?@meltyshev commented on GitHub (Oct 27, 2024):
Hi! I’ve found a few options, but it’s hard to say if they will solve the problem since I’m not very familiar with this:
Node.js has a
--use-openssl-caargument. Please try adding it to thestart.shfile. If you’re using docker compose, you can add this line to theplankaservice:command: export NODE_ENV=production && set -e && node db/init.js && node app.js --prod --use-openssl-caThere is a
NODE_EXTRA_CA_CERTSenvironment variable for Node.js. You can try setting it to point to the PEM file.@Velociraptor45 commented on GitHub (Oct 28, 2024):
That actually worked, with a few tweaks. For everyone else coming after me, you have to add /bin/bash to the command that you use:
command: /bin/bash -c 'export NODE_ENV=production && set -e && node db/init.js && node app.js --prod --use-openssl-ca'And you have to make sure that the .pem file physically lies in the volume that you're mapping. Normally, when you execute a
update-ca-certificates, the OS will generate a link from your personal certificate in/usr/local/share/ca-certificatesto/etc/ssl/certs, but not make a hard copy.Or you just reference the OS-generated
ca-certificates.crt(from/etc/ssl/certs) in your NODE_EXTRA_CA_CERTS. That's where aupdate-ca-certificatesincorporates your certificates. Then it also works.@meltyshev thanks again for the help. I'll leave it to you to close this issue or keep it open in case want to make changes to the application based on the discussion.