Debugging Wekan Webhooks

I am attempting to setup outgoing webhooks for Wekan which are not working in the current production build. I'm not sure which this is the case.

My suspicion is that its got something to do with trusted certificates within the Wekan production container. The host to which the webhook is being pushed is not trusted by wekan because the certificates are not installed and hence the hook is going going through.

In order to debug this I was looking for a way to enable debug logs. Silly me, I figured from the Dockerfile that its a production build so may not have debug logs enabeld. In any cases, there are no error logs to suggest anything is wrong in the production environment.

The second guess is that there is some explicity setting to enable webhooks which I haven't turned or setup correctly. I am going to explore this first.

A few hours later...

I went through the docker-compose file and discovered many new options that may be applicable. There is a one particular configuration that limits the information sent by the webhook WEBHOOKS_ATTRIBUTES.

However, my initial hunch was correct, it was related to a CA certificate error. I had mounted the certificate to Ubuntu. However, since wekan is a node application, it uses a different CA mechanism as per this note. I initally passed the environment variable NODE_TLS_REJECT_UNAUTHORIZED=0 via docker-compose. However the correct way is to pass it the certificate via NODE_EXTRA_CA_CERTS. The certificate has to be in PEM format which you can achive using openssl x509 -in cert.crt -text > cert.pem. However, for some reason this did not work. The documentation here suggested there are some situations where the variable does not apply and I didn't delve into it because it's not very relevant in my environment.

Show Comments