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

Allow disabling Redis SSL verification for rediss schema #129

Merged
merged 4 commits into from
Oct 8, 2024

Conversation

amureki
Copy link
Member

@amureki amureki commented Oct 7, 2024

Certain services (like Heroku) do require disabling SSL certificate verification for their rediss schema:

They do require disabling the certificate validation - https://devcenter.heroku.com/articles/connecting-heroku-redis

This PR is aiming to adjust the client to be able to accept REDIS_CERT_REQS and pass it in such cases.

@amureki amureki self-assigned this Oct 7, 2024
@amureki amureki force-pushed the support-rediss branch 3 times, most recently from eb15776 to 4480ebe Compare October 7, 2024 11:56
Copy link
Member

@codingjoe codingjoe left a comment

Choose a reason for hiding this comment

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

@amureki
Copy link
Member Author

amureki commented Oct 7, 2024

@codingjoe you are right, but I did not finish working on this PR and did not elaborate properly (thus wrong description/title).

I am referring to the way Heroku (and a couple of other providers) work with rediss schema:

They do require disabling the certificate validation - https://devcenter.heroku.com/articles/connecting-heroku-redis

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.66%. Comparing base (72e8f1c) to head (98faeb0).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #129      +/-   ##
==========================================
+ Coverage   95.57%   95.66%   +0.09%     
==========================================
  Files          19       20       +1     
  Lines         610      623      +13     
==========================================
+ Hits          583      596      +13     
  Misses         27       27              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@amureki amureki changed the title Support rediss-schema Allow disabling Redis SSL verification for rediss schema Oct 7, 2024
@amureki amureki requested a review from codingjoe October 7, 2024 12:37
Copy link
Member

@codingjoe codingjoe left a comment

Choose a reason for hiding this comment

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

Please use redis' native parse_url function and override the single parameter. I would also suggest injecting the value of the parameter via an environment variable, since this is a Heroku problem.

@amureki
Copy link
Member Author

amureki commented Oct 8, 2024

Please use redis' native parse_url function and override the single parameter. I would also suggest injecting the value of the parameter via an environment variable, since this is a Heroku problem.

Yeah, my initial attempt of doing so failed, as it "magically" uses different connections based on the schema provided.

@amureki amureki requested a review from codingjoe October 8, 2024 09:20
@amureki amureki merged commit c593f13 into main Oct 8, 2024
5 checks passed
@amureki amureki deleted the support-rediss branch October 8, 2024 09:22
Copy link

sentry-io bot commented Oct 8, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ TypeError: Redis.init() got an unexpected keyword argument 'connection_class' sam.redis_utils in async_redis_client View Issue

Did you find this useful? React with a 👍 or 👎

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.

2 participants