Can't use selft-signed certificates in on-premisse infra
Welcome!
- [X] Yes, I have searched for similar issues on GitHub and found none.
What did you do?
I run all my services on premisse and just for my bussiness use, so we user self signed certificates to https. I installed the CA cert in evolution container and tested with curl with no cerificate erros:
/evolution # curl https://n8n.drogarialitoranea.intra.net/webhook-test/1cb7f5cf-0aa2-4f2a-a065-f786bf6a8e35 {"code":404,"message":"The requested webhook \"1cb7f5cf-0aa2-4f2a-a065-f786bf6a8e35\" is not registered.","hint":"Click the 'Execute workflow' button on the canvas, then try again. (In test mode, the webhook only works for one call after you cli
But when Evolution tries do send data to my webhook this errors explode:
[Evolution API] [filipe] v1.8.2 1 - Sun Oct 06 2024 10:57:56 ERROR [ChannelStartupService] [object]
{
local: 'ChannelStartupService.sendDataWebhook-local',
message: 'unable to verify the first certificate',
hostName: undefined,
syscall: undefined,
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
error: undefined,
stack: 'Error: unable to verify the first certificate\n' +
' at AxiosError.from (/evolution/node_modules/axios/dist/node/axios.cjs:841:14)\n' +
' at RedirectableRequest.handleRequestError (/evolution/node_modules/axios/dist/node/axios.cjs:3106:25)\n' +
' at RedirectableRequest.emit (node:events:514:28)\n' +
' at eventHandlers.<computed> (/evolution/node_modules/follow-redirects/index.js:38:24)\n' +
' at ClientRequest.emit (node:events:514:28)\n' +
' at TLSSocket.socketErrorListener (node:_http_client:495:9)\n' +
' at TLSSocket.emit (node:events:514:28)\n' +
' at emitErrorNT (node:internal/streams/destroy:151:8)\n' +
' at emitErrorCloseNT (node:internal/streams/destroy:116:3)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n' +
' at Axios.request (/evolution/node_modules/axios/dist/node/axios.cjs:4224:41)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)',
name: 'Error',
url: 'https://n8n.drogarialitoranea.intra.net/webhook-test/1cb7f5cf-0aa2-4f2a-a065-f786bf6a8e35',
server_url: 'https://evo-api.drogarialitoranea.intra.net'
}
What did you expect?
It should accept selft signed certificates, not everyone will expose evolution to internet, in my case for exemple, all my stores have VPN connetion to main store where the server runs on our intranet.
What did you observe instead of what you expected?
Even if i install the CA certificate in Evolution docker, it seems Evolution can't access to verify certificate with custom CA.
Screenshots/Videos
No response
Which version of the API are you using?
v1.8.2
What is your environment?
Docker
Other environment specifications
No response
If applicable, paste the log output
No response
Additional Notes
No response
u have tryied with another version of evolution? like v2?
este erro tem a ver com certificado ssl, pode ser que o traefik não tenha gerado o certificado corretamente ou o evolution não está conseguindo validar o certificado existente, ainda estou tentando resolver este bug também
este erro tem a ver com certificado ssl, pode ser que o traefik não tenha gerado o certificado corretamente ou o evolution não está conseguindo validar o certificado existente, ainda estou tentando resolver este bug também
Eu estava usando o Nginx Proxy Manager, todos os serviços estavam funcionando muito bem com meu certificado, somente a Evolution que não. Como estava precisando colocar em produção rápido foi o jeito mudar para o Let's Encripty mesmo já que na empresa tenho IP público, acabei tendo que expor os serviços mesmo sem querer.
Ainda vou testar novamente com o Traefik
este erro tem a ver com certificado ssl, pode ser que o traefik não tenha gerado o certificado corretamente ou o evolution não está conseguindo validar o certificado existente, ainda estou tentando resolver este bug também
Eu estava usando o Nginx Proxy Manager, todos os serviços estavam funcionando muito bem com meu certificado, somente a Evolution que não. Como estava precisando colocar em produção rápido foi o jeito mudar para o Let's Encripty mesmo já que na empresa tenho IP público, acabei tendo que expor os serviços mesmo sem querer.
Ainda vou testar novamente com o Traefik
Na stack do Evolution eu adicionei a seguinte linha para solucionar o problema por hora usando um certificado personalizado, environment: # Configuração do Node - NODE_TLS_REJECT_UNAUTHORIZED=0
Na stack do Evolution eu adicionei a seguinte linha para solucionar o problema por hora usando um certificado personalizado, environment: # Configuração do Node - NODE_TLS_REJECT_UNAUTHORIZED=0
Bacana! Vou testar, o Node desencoraga o uso desse recurso mas para uma rede local não vejo problema, contudo seria interessante poder instalar o certificado CA para o Node fazer a checagem da cadeia de certificados.
para instalar o certificado personalizado precisa ter os arquivos do certificado, em alguns casos precisam ter 3 arquivos, isso depende do seu tipo de certificado. Na maioria dos casos é preciso ter o crt, key e pem. Em caso do seu certificado necessitar de um arquivo intermediario precisa apontar 3 arquivos, se não, precisa apenas dos dois.