-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Important Details
How are you running Sentry?
On-Premise w/ Docker, version 21.6.1
Description
I'm trying to connect a new self hosted instance of GitLab to my existing self hosted Sentry instance. Now, my boss has been making a push to kill off non-secure HTTP traffic on our network, so we have everything set to require it, since it's easy enough to install the root cert on new servers and PCs automatically. Step-ca handles generating cert via ACME, so that takes care of that side, and for bonus points, it's got name restrictions to limit the domains it can sign for, so no one can steal it and sign a fake google.com one.
The GitLab instance is an internal only internal service sitting at gitlab.company_name.internal. It resolves correctly on the Sentry host machine and certificates work, checked with both curl and openssl on the Sentry host, once the root CA is installed. Sentry is public facing service (though we might change that at some point, since we really just need my tunnel end point exposed) and has both a valid public domain and TLS certificate (error.company_name.com and *.company_name.com).
Steps to Reproduce
- Attempt to add GitLab instance.
- Get SSL/TLS errors.
- Try to add the root CA to all the container.
- Get a different error.
- Cry, because the logs are not much help.
The only bit of logs that looked tied to it at the attempts:
web_1 | 20:34:17 [INFO] sentry.identity: identity.token-exchange-error (error='invalid_state' pipeline_state='9334b7b6a88d4d6eab80d5800dea4d49')
web_1 | 20:34:17 [ERROR] sentry.integration.gitlab: pipeline error (organization_id=1 provider='gitlab' error='An error occurred while validating your request.')
Docker Compose overrides, for injecting the cert.
https://gist.github.com/Spice-King/0275c8629dc7b6c2e615d6ceda1a699a
What you expected to happen
Be able to get a working GitLab connection, and leave work for the day with a bit of a smile hidden under my mask.
Mild joking aside, I'll need to do up an issue (or a PR if I get the time to) for make adding a root CA less of a pain. Injection via environment variable is probably the simplest, with a bit of script added to the entrypoints to update the global certs. Any pointers to some better logs or clues for figuring out what I missed? Java keystores or local openssl installs would be something I did not hunt for off the top of my head.
