gbip / sentry_tunnel

Proxy sentry request to a sentry server using a tunnel/proxy endpoint
BSD 2-Clause "Simplified" License
33 stars 12 forks source link

Server certificate cannot be validated #5

Open booltype opened 1 year ago

booltype commented 1 year ago

Hello,

using the latest docker image as of today I receive an error message that the server certificate cannot be validated (copied verbatim below). The server is using Let's encrypt certificates which work fine when visiting the domain by browser (it's self-hosting sentry).

Any quick suggestions on what might be going? I saw there was a fix a while back dealing with missing SSL certs and think this should still be active. I haven't dug deeper into building the image myself and for whatever reasons cannot run a shell in the container to dig around in there myself (slightly puzzled by that actually).

Thanks!

sentry_tunnel | ERROR - the server certificate could not be validated - Host = not-shown-here

booltype commented 1 year ago

Closing this as I am using a Cloudflare worker now instead.

gbip commented 1 year ago

I'll try to dive into that I think that the root certificates are hardcoded into the image which might create some issues.

kittenswolf commented 1 year ago

Having the same issue here.

fritjofbuettner commented 1 year ago

I just ran into the same problem, I tried to integrate sentry_tunnel as a service within the docker-compose stack behind a traefik proxy. I got rid of the certificate errors by building the image instead of pulling it:

services:
  sentry_tunnel:
    build: https://github.com/gbip/sentry_tunnel.git
    environment:
      - TUNNEL_IP=0.0.0.0
      - TUNNEL_REMOTE_HOST=https://oXXXXXX.ingest.sentry.io
      - TUNNEL_PATH=/sentry
      - TUNNEL_PROJECT_IDS=XXXXXX
    labels:
      - traefik.enable=true
      - traefik.http.routers.sentry-http.rule=PathPrefix(`/sentry`)
      - traefik.http.services.sentry.loadbalancer.server.port=7878

however, all POST requests to http://localhost/sentry made by the Sentry JS SDK still fail with a 400 code and no additional information in the response or the container logs...

gbip commented 1 year ago

I try to take a look tonight.

gbip commented 1 year ago

Looking at this right now.

gbip commented 1 year ago

I pushed a new image that should solve the problem at least for now.