How to disable registeration in sentry 8 docker?

Hi,

There was the SENTRY_ALLOW_REGISTRATION environment variable that you could pass with False until 7.4 version. But after updating to latest docker I see that it’s deprecated in favor of SENTRY_FEATURES[‘auth:register’]. But how can I pass this as environment variable in my docker-compose.yml ?

Thanks

Hey @vahidm, we try and not encourage configuring everything with environment variables because it’s not possible to do realistically. Instead, just put this into your sentry.conf.py and rebuild your image. Or mount in a config file from the host, etc.

Thanks @matt.

BTW, I think when I get a hosted service I probably want to fully control the accounts, specifically in something like Sentry where anyone with access may easily find your system vulnerabilities. I don’t know the policy that removed the registration environment variable. Using the solutions you mentioned solves the problem, but I’m not sure these are best approaches when using a docker container.

If there are alternative solutions I’m up to implement and open merge request for it.

We’re explicitly choosing to not go all-in on Docker. We want a unified configuration solution that works everywhere, rather than having to various branches just to support one ecosystem. IMHO the environment variable pattern is not a pattern, and it’s been far too overloaded in the Docker world.

(You’ll likely not convince us to change this, as even internally people debated this opinion, but I explicitly made the decision that we require people to use standard configuration within Sentry)

Thanks David,

I understand and respect your policy, and I somehow agree with you on environment variable usage being overloaded in Docker world. And also this case is not a serious problem for Docker users.

I will comeback if I had an alternative proposal for unified configurations you mentioned. (While I’m not sure if it’s something to contribute to :D)