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

test: add SSL test #620

Merged
merged 2 commits into from
Jan 23, 2024
Merged

test: add SSL test #620

merged 2 commits into from
Jan 23, 2024

Conversation

jeblair
Copy link
Contributor

@jeblair jeblair commented Jun 26, 2020

This adds a simple SSL test along with the framework for running
the test Zookeeper in a mode where it listens on both SSL and
non-SSL ports.

This is based on earlier work in #619.

kazoo/testing/harness.py Outdated Show resolved Hide resolved
kazoo/testing/harness.py Outdated Show resolved Hide resolved
kazoo/testing/harness.py Outdated Show resolved Hide resolved
kazoo/testing/harness.py Outdated Show resolved Hide resolved
Copy link
Member

@StephenSorriaux StephenSorriaux left a comment

Choose a reason for hiding this comment

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

Thanks for this PR. It seems like tests using this setup are failing, is this related to the Travis environment?

kazoo/testing/sslfixtures.py Outdated Show resolved Hide resolved
@jeffwidman
Copy link
Member

nudge @jeblair

Copy link

codecov bot commented Jan 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (aa21989) 96.62% compared to head (a05f8ed) 96.65%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #620      +/-   ##
==========================================
+ Coverage   96.62%   96.65%   +0.02%     
==========================================
  Files          27       27              
  Lines        3557     3557              
==========================================
+ Hits         3437     3438       +1     
+ Misses        120      119       -1     

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

@StephenSorriaux
Copy link
Member

I rebased this PR but it is not working because ZK is expecting a keystore and a truststore (java stuff) instead of .pem files. Will try to get this working soon and add some "cert auto generation".

kazoo/testing/common.py Outdated Show resolved Hide resolved
kazoo/tests/test_client.py Outdated Show resolved Hide resolved
@StephenSorriaux StephenSorriaux requested review from jeffwidman and ceache and removed request for bbangert, jeffwidman and ceache January 23, 2024 01:32
@StephenSorriaux
Copy link
Member

@jeffwidman @ceache @jeblair this one is finalized, would love a review to get it merged.

jeffwidman
jeffwidman previously approved these changes Jan 23, 2024
Copy link
Member

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

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

Looks great 👍

kazoo/testing/__init__.py Outdated Show resolved Hide resolved
James E. Blair and others added 2 commits January 22, 2024 20:52
This adds a simple SSL test along with the framework for running
the test Zookeeper in a mode where it listens on both SSL and
non-SSL ports.
We need pypy 7.3.10+ anyway to perform the SSL test because cryptography is not available before.
@StephenSorriaux StephenSorriaux merged commit 383cdf8 into python-zk:master Jan 23, 2024
26 checks passed
@jeblair
Copy link
Contributor Author

jeblair commented Jan 23, 2024

Thanks for updating this. ZK can use a pem file that is just a concatenation of the cert and key as its "keystore" without any special jks functionality. But since that seems to have bitrotted in this PR somehow, doing all the actual jks stuff is probably going to be more robust in the long run. :)

@StephenSorriaux
Copy link
Member

Thank you again for the PR @jeblair and thank you for the updated information. I remember using a product that would "weirdly" accept this kind of .pem files as a "keystore" and you are certainly right that it was ZK. My comment about the reason why the tests were failing was probably wrong.

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.

4 participants