Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support ssl connections to redis #3848

Merged
merged 7 commits into from
Jun 12, 2019
Merged

Conversation

nason
Copy link
Contributor

@nason nason commented May 29, 2019

What type of PR is this? (check all applicable)

  • Feature

Description

Allows TLS connection to Redis via rediss scheme https://www.iana.org/assignments/uri-schemes/prov/rediss

This is achieved mostly via dependency upgrades, and some config tweaks. I've been running this on our self-hosted for a few weeks and its been working great.

Related Tickets & Documents

This follows #2357

I'd appreciate any thoughts or pointers on:

  • how can ssl_config be passed in?
  • testing this
  • docs

redash/__init__.py Outdated Show resolved Hide resolved
redash/worker.py Outdated Show resolved Hide resolved
@@ -30,6 +31,12 @@
CELERY_RESULT_EXPIRES = int(os.environ.get(
"REDASH_CELERY_RESULT_EXPIRES",
os.environ.get("REDASH_CELERY_TASK_RESULT_EXPIRES", 3600 * 4)))
CELERY_SSL_CONFIG = {
Copy link
Contributor Author

@nason nason Jun 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rauchy thank you for the feedback! How does this look as far as settings now?

I'll try this change out on our self-hosted setup later today

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Settings look fine to me. However, the build is failing and requires your attention.

@arikfr
Copy link
Member

arikfr commented Jun 6, 2019

Thank you for opening this Pull Request, @nason. Based on the failing tests, it seems that the new code does not work when using no SSL configuration. Can you please check this out?

@nason
Copy link
Contributor Author

nason commented Jun 6, 2019

On it! I saw the failing tests once I made this configurable but wasn't sure how to read them. I will look into this later today and update.

@nason
Copy link
Contributor Author

nason commented Jun 6, 2019

I’ve updated with config changes to ensure that ssl config is not passed to celery unless ssl is enabled.

The build and tests seem ok again, and our self hosted deploys with this branch and SSL enabled Redis is still working correctly

@arikfr arikfr merged commit 4e0a251 into getredash:master Jun 12, 2019
@arikfr
Copy link
Member

arikfr commented Jun 12, 2019

👍 thanks!

harveyrendell pushed a commit to pushpay/redash that referenced this pull request Nov 14, 2019
* Add support ssl connections to redis

* Fix line length

* Update redash/__init__.py w suggestion

Co-Authored-By: Omer Lachish <omer@rauchy.net>

* Cleanup init after suggestion

* Move redis SSL config to settings

* Do not pass celery SSL config unless necessary

* Fix typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants