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

Enable SSL without client verification #736

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

mohammad-aburadeh
Copy link
Contributor

Support SSL connection when client verification is not required.

Description

This PR is to support SSL connection without cert files required. This is needed when "require_client_auth" is disabled in Cassandra configurations.

Status

  • done, ready for review

Closes #563 and #543

Copy link

sonarcloud bot commented Apr 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@mohammad-aburadeh
Copy link
Contributor Author

Hi @rzvoncek
This is requested by many customers. Can you plz review it ?

Copy link
Contributor

@rzvoncek rzvoncek left a comment

Choose a reason for hiding this comment

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

Hello @mohammad-aburadeh , I'm sorry to send this back to you, but I don't think the change is complete.

@@ -74,15 +74,18 @@ def __init__(self, ip_addresses, config):
password=self._cassandra_config.cql_password)
self._auth_provider = auth_provider

if self._cassandra_config.certfile is not None:
if ((self._cassandra_config.ssl is not None and evaluate_boolean(self._cassandra_config.ssl))
or self._cassandra_config.certfile is not None):
ssl_context = SSLContext(PROTOCOL_TLSv1_2)
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @mohammad-aburadeh! Sorry for the delay, but I finally managed to find the time to look at this.

And I'm sorry to admit, but I don't quite understand what the proposed change is. If I'm reading this right, the new behaviour is that if the new ssl option is present and set to True, it'll just set the ssl_context variable ... and then do nothing else.
The line 88 is indented under the condition of certfile being present, which is basically the old behaviour.

Please, could you clarify what your intent was?

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.

Support SSL without cert files
2 participants